PageSourceSearch

https://www.solsedu.com/_next/static/chunks/pages/_app-6cc1c1a39a614525.js

js solsedu.com collected 2026-10-02 00:33:22 UTC 497,390 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{48711:function(e,t,n){"use strict";n.d(t,{Z:function(){return W}});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){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=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]}(n);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else n.appendChild(document.createTextNode(e));this.ctr++}
vendor: 4,149 bytes, line 1
1,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,t,n){return e.replace(t,n)}function l(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function c(e,t,n){return e.slice(t,n)}function h(e){return e.length}function d(e,t){return t.push(e),e}var p=1,f=1,g=0,m=0,v=0,y="";function _(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:p,column:f,length:s,return:""}}function b(e,t){return s(_("",null,null,"",null,null,0),e,{length:-e.length},t)}function w(){return v=m<g?u(y,m++):0,f++,10===v&&(f=1,p++),v}function k(){return u(y,m)}function C(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 S(e){return p=f=1,g=h(y=e),m=0,[]}function E(e){var t,n;return(t=m-1,n=function e(t){for(;w();)switch(v){case t:return m;case 34:case 39:34!==t&&39!==t&&e(v);break;case 40:41===t&&e(t);break;case 92:w()}return m}(91===e?e+2:40===e?e+1:e),c(y,t,n)).trim()}var x="-ms-",I="-moz-",T="-webkit-",P="comm",O="rule",R="decl",N="@keyframes";function A(e,t){for(var n="",r=e.length,i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function L(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case R:return e.return=e.return||e.value;case P:return"";case N:return e.return=e.value+"{"+A(e.children,r)+"}";case O:e.value=e.props.join(",")}return h(n=A(e.children,r))?e.return=e.value+"{"+n+"}":""}function D(e,t,n,r,o,s,l,u,h,d,p){for(var f=o-1,g=0===o?s:[""],m=g.length,v=0,y=0,b=0;v<r;++v)for(var w=0,k=c(e,f+1,f=i(y=l[v])),C=e;w<m;++w)(C=(y>0?g[w]+" "+k:a(k,/&\f/g,g[w])).trim())&&(h[b++]=C);return _(e,t,n,0===o?O:u,h,d,p)}function M(e,t,n,r){return _(e,t,n,R,c(e,0,r),c(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),!C(i);)w();return c(y,e,m)},F=function(e,t){var n=-1,r=44;do switch(C(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=j(m-1,t,n);break;case 2:e[n]+=E(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=w());return e},Z=function(e,t){var n;return n=F(S(e),t),y="",n},$=new WeakMap,U=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)||$.get(n))&&!r){$.set(e,!0);for(var i=[],o=Z(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},z=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},q=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case R:e.return=function e(t,n){switch(45^u(t,0)?(((n<<2^u(t,0))<<2^u(t,1))<<2^u(t,2))<<2^u(t,3):0){case 5103:return T+"print-"+t+t;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 T+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return T+t+I+t+x+t+t;case 6828:case 4268:return T+t+x+t+t;case 6165:return T+t+x+"flex-"+t+t;case 5187:return T+t+a(t,/(\w+).+(:[^]+)/,T+"box-$1$2"+x+"flex-$1$2")+t;case 5443:return T+t+x+"flex-item-"+a(t,/flex-|-self/,"")+t;case 4675:return T+t+x+"flex-line-pack"+a(t,/align-content|flex-|-self/,"")+t;case 5548:return T+t+x+a(t,"shrink","negative")+t;case 5292:return T+t+x+a(t,"basis","preferred-size")+t;case 6060:return T+"box-"+a(t,"-grow","")+T+t+x+a(t,"grow","positive")+t;case 4554:return T+a(t,/([^-])(transform)/g,"$1"+T+"$2")+t;case 6187:return a(a(a(t,/(zoom-|grab)/,T+"$1"),/(image-set)/,T+"$1"),t,"")+t;case 5495:case 3959:return a(t,/(image-set\([^]*)/,T+"$1$`$1");case 4968:return a(a(t,/(.+:)(flex-)?(.*)/,T+"box-pack:$3"+x+"flex-
1pack:$3"),/s.+-b[^;]+/,"justify")+T+t+t;case 4095:case 3583:case 4068:case 2532:return a(t,/(.+)-inline(.+)/,T+"$1$2")+t;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(t)-1-n>6)switch(u(t,n+1)){case 109:if(45!==u(t,n+4))break;case 102:return a(t,/(.+:)(.+)-([^]+)/,"$1"+T+"$2-$3$1"+I+(108==u(t,n+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?e(a(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==u(t,n+1))break;case 6444:switch(u(t,h(t)-3-(~l(t,"!important")&&10))){case 107:return a(t,":",":"+T)+t;case 101:return a(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+T+(45===u(t,14)?"inline-":"")+"box$3$1"+T+"$2$3$1"+x+"$2box$3")+t}break;case 5936:switch(u(t,n+11)){case 114:return T+t+x+a(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return T+t+x+a(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return T+t+x+a(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return T+t+x+t+t}return t}(e.value,e.length);break;case N:return A([b(e,{value:a(e.value,"@","@"+T)})],r);case O:if(e.length){var i,o;return i=e.props,o=function(t){var n;switch(n=t,(n=/(::plac\w+|:read-\w+)/.exec(n))?n[0]:n){case":read-only":case":read-write":return A([b(e,{props:[a(t,/:(read-\w+)/,":"+I+"$1")]})],r);case"::placeholder":return A([b(e,{props:[a(t,/:(plac\w+)/,":"+T+"input-$1")]}),b(e,{props:[a(t,/:(plac\w+)/,":"+I+"$1")]}),b(e,{props:[a(t,/:(plac\w+)/,x+"input-$1")]})],r)}return""},i.map(o).join("")}}}
vendor: 2,223 bytes, line 1
1],W=function(e){var t,n,i,s,g,b,x=e.key;if("css"===x){var I=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(I,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var T=e.stylisPlugins||q,O={},R=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+x+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)O[t[n]]=!0;R.push(e)});var N=(n=(t=[U,z].concat(T,[L,(i=function(e){b.insert(e)},function(e){!e.root&&(e=e.return)&&i(e)})])).length,function(e,r,i,o){for(var s="",a=0;a<n;a++)s+=t[a](e,r,i,o)||"";return s}),j=function(e){var t,n;return A((n=function e(t,n,r,i,s,g,b,S,x){for(var I,T=0,O=0,R=b,N=0,A=0,L=0,j=1,F=1,Z=1,$=0,U="",z=s,q=g,W=i,V=U;F;)switch(L=$,$=w()){case 40:if(108!=L&&58==u(V,R-1)){-1!=l(V+=a(E($),"&","&\f"),"&\f")&&(Z=-1);break}case 34:case 39:case 91:V+=E($);break;case 9:case 10:case 13:case 32:V+=function(e){for(;v=k();)if(v<33)w();else break;return C(e)>2||C(v)>3?"":" "}(L);break;case 92:V+=function(e,t){for(var n;--t&&w()&&!(v<48)&&!(v>102)&&(!(v>57)||!(v<65))&&(!(v>70)||!(v<97)););return n=m+(t<6&&32==k()&&32==w()),c(y,e,n)}(m-1,7);continue;case 47:switch(k()){case 42:case 47:d(_(I=function(e,t){for(;w();)if(e+v===57)break;else if(e+v===84&&47===k())break;return"/*"+c(y,t,m-1)+"*"+o(47===e?e:w())}(w(),m),n,r,P,o(v),c(I,2,-2),0),x);break;default:V+="/"}break;case 123*j:S[T++]=h(V)*Z;case 125*j:case 59:case 0:switch($){case 0:case 125:F=0;case 59+O:-1==Z&&(V=a(V,/\f/g,"")),A>0&&h(V)-R&&d(A>32?M(V+";",i,r,R-1):M(a(V," ","")+";",i,r,R-2),x);break;case 59:V+=";";default:if(d(W=D(V,n,r,T,O,s,S,U,z=[],q=[],R),g),123===$){if(0===O)e(V,n,W,W,z,g,R,S,q);else switch(99===N&&110===u(V,3)?100:N){case 100:case 108:case 109:case 115:e(t,W,W,i&&d(D(t,W,W,0,0,s,S,U,s,z=[],R),q),s,q,R,S,i?z:q);break;default:e(V,W,W,W,[""],q,0,S,q)}}}T=O=A=0,j=Z=1,U=V="",R=b;break;case 58:R=1+h(V),A=L;default:if(j<1){if(123==$)--j;else if(125==$&&0==j++&&125==(v=m>0?u(y,--m):0,f--,10===v&&(f=1,p--),v))continue}switch(V+=o($),$*j){case 38:Z=O>0?1:(V+="\f",-1);break;case 44:S[T++]=(h(V)-1)*Z,Z=1;break;
1case 64:45===k()&&(V+=E(w())),N=k(),O=R=h(U=V+=function(e){for(;!C(k());)w();return c(y,e,m)}(m)),$++;break;case 45:45===L&&2==h(V)&&(j=0)}}return g}("",null,null,null,[""],t=S(t=e),0,[0],t),y="",n),N)};g=function(e,t,n,r){b=n,j(e?e+"{"+t.styles+"}":t.styles),r&&(F.inserted[t.name]=!0)};var F={key:x,sheet:new r({key:x,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:O,registered:{},insert:g};return F.sheet.hydrate(R),F}},45042:function(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,{Z:function(){return r}})},87685:function(e,t,n){"use strict";n.d(t,{C:function(){return u},E:function(){return m},T:function(){return h},c:function(){return f},h:function(){return d},w:function(){return c}});var r=n(67294),i=n(48711),o=n(70444),s=n(85662),a=n(27278),l=r.createContext("undefined"!=typeof HTMLElement?(0,i.Z)({key:"css"}):null),u=l.Provider,c=function(e){return(0,r.forwardRef)(function(t,n){return e(t,(0,r.useContext)(l),n)})},h=r.createContext({}),d={}.hasOwnProperty,p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(e,t){var n={};for(var r in t)d.call(t,r)&&(n[r]=t[r]);return n[p]=e,n},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.hC)(t,n,r),(0,a.L)(function(){return(0,o.My)(t,n,r)}),null},m=c(function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var a=e[p],l=[i],u="";"string"==typeof e.className?u=(0,o.fp)(t.registered,l,e.className):null!=e.className&&(u=e.className+" ");var c=(0,s.O)(l,void 0,r.useContext(h));u+=t.key+"-"+c.name;var f={};for(var m in e)d.call(e,m)&&"css"!==m&&m!==p&&(f[m]=e[m]);return f.className=u,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(g,{cache:t,serialized:c,isStringTag:"string"==typeof a}),r.createElement(a,f))})},70917:function(e,t,n){"use strict";n.d(t,{F4:function(){return p},iv:function(){return d},xB:function(){return h}});var r,i,o=n(87685),s=n(67294),a=n(70444),l=n(27278),u=n(85662);n(48711),n(8679);var c=function(e,t){var n=arguments;if(null==t||!o.h.call(t,"css"))return s.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=o.E,i[1]=(0,o.c)(e,t);for(var a=2;a<r;a++)i[a]=n[a];return s.createElement.apply(null,i)};r=c||(c={}),i||(i=r.JSX||(r.JSX={}));var h=(0,o.w)(function(e,t){var n=e.styles,r=(0,u.O)([n],void 0,s.useContext(o.T)),i=s.useRef();return(0,l.j)(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}),o=!1,s=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==s&&(o=!0,s.setAttribute("data-emotion",e),n.hydrate([s])),i.current=[n,o],function(){n.flush()}},[t]),(0,l.j)(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}if(void 0!==r.next&&(0,a.My)(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)},[t,r.name]),null});function d(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,u.O)(t)}function p(){var e=d.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_"}}}},85662:function(e,t,n){"use strict";n.d(t,{O:function(){return f}});var r,i={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(45042),s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.Z)(function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()}),h=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,n){return r={name:t,styles:n,next:r},t})}return 1===i[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return r={name:n.name,styles:n.styles,next:r},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)r={name:i.name,styles:i.styles,next:r},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":u(s)&&(r+=c(o)+":"+h(o,s)+";");else if(Array.isArray(s)&&"string"==typeof s[0]&&(null==t||void 0===t[s[0]]))for(var a=0;a<s.length;a++)u(s[a])&&(r+=c(o)+":"+h(o,s[a])+";");else{var l=d(e,t,s);switch(o){case"animation":case"animationName":r+=c(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var o=r,s=n(e);return r=o,d(e,t,s)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var p=/label:\s*([^\s;{]+)\s*(;|$)/g;function f(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var i,o=!0,s="";r=void 0;var a=e[0];null==a||void 0===a.raw?(o=!1,s+=d(n,t,a)):s+=a[0];for(var l=1;l<e.length;l++)s+=d(n,t,e[l]),o&&(s+=a[l]);p.lastIndex=0;for(var u="";null!==(i=p.exec(s));)u+="-"+i[1];return{name:function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))*1540483477+((t>>
1>16)*59797<<16),t^=t>>>24,n=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&n)*1540483477+((n>>>16)*59797<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n^=255&e.charCodeAt(r),n=(65535&n)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,(((n=(65535&n)*1540483477+((n>>>16)*59797<<16))^n>>>15)>>>0).toString(36)}(s)+u,styles:s,next:r}}},27278:function(e,t,n){"use strict";n.d(t,{L:function(){return s},j:function(){return a}});var r,i=n(67294),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},70444:function(e,t,n){"use strict";function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}n.d(t,{My:function(){return o},fp:function(){return r},hC:function(){return i}});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)}}},74444:function(e,t,n){"use strict";n.d(t,{$s:function(){return ei},BH:function(){return C},DV:function(){return W},GJ:function(){return z},L:function(){return d},LL:function(){return M},L_:function(){return I},P0:function(){return b},Pz:function(){return k},Sg:function(){return S},UI:function(){return B},US:function(){return u},Wl:function(){return Z},Yr:function(){return R},ZR:function(){return D},aH:function(){return w},b$:function(){return P},cI:function(){return F},dS:function(){return en},eu:function(){return A},g5:function(){return s},gK:function(){return et},gQ:function(){return J},h$:function(){return h},hl:function(){return N},hu:function(){return o},m9:function(){return eo},ne:function(){return X},p$:function(){return f},pd:function(){return Y},q4:function(){return _},r3:function(){return q},ru:function(){return T},tV:function(){return p},uI:function(){return x},ug:function(){return er},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let o of r){if(!i.includes(o))return!1;let r=t[o],s=n[o];if(H(r)&&H(s)){if(!e(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}},w1:function(){return O},w9:function(){return U},xO:function(){return K},xb:function(){return V},z$:function(){return E},zI:function(){return L},zd:function(){return G}});var r=n(83454);let i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw s(t)},s=function(e){return Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},a=function(e){let t=[],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:((64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},l=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){let 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{let o=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")},u={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_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],o=t+1<e.length,s=o?e[t+1]:0,a=t+2<e.length,l=a?e[t+2]:0,u=i>>2,c=(3&i)<<4|s>>4,h=(15&s)<<2|l>>6,d=63&l;a||(d=64,o||(h=64)),r.push(n[u],n[c],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(a(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0,s=++t<e.length?n[e.charAt(t)]:64,a=++t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==o||null==s||null==a)throw new c;let l=i<<2|o>>4;if(r.push(l),64!==s){let e=o<<4&240|s>>2;if(r.push(e),64!==a){let 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)}}};
1class c extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let h=function(e){let t=a(e);return u.encodeByteArray(t,!0)},d=function(e){return h(e).replace(/\./g,"")},p=function(e){try{return u.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function f(e){return function e(t,n){if(!(n instanceof Object))return n;switch(n.constructor){case Date:return new Date(n.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return n}for(let r in n)n.hasOwnProperty(r)&&"__proto__"!==r&&(t[r]=e(t[r],n[r]));return t}(void 0,e)}let g=()=>(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,m=()=>{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},v=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&p(e[1]);return t&&JSON.parse(t)},y=()=>{try{return g()||m()||v()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},_=e=>{var t,n;return null===(n=null===(t=y())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},b=e=>{let t=_(e);if(!t)return;let n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},w=()=>{var e;return null===(e=y())||void 0===e?void 0:e.config},k=e=>{var t;return null===(t=y())||void 0===t?void 0:t[`_${e}`]};class C{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 S(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let 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[d(JSON.stringify({alg:"none",type:"JWT"})),d(JSON.stringify(o)),""].join(".")}function E(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function x(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(E())}function I(){return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function T(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function P(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function O(){let e=E();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function R(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN}function N(){try{return"object"==typeof indexedDB}catch(e){return!1}}function A(){return new Promise((e,t)=>{try{let n=!0,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(e){t(e)}})}function L(){return"undefined"!=typeof navigator&&!!navigator.cookieEnabled}class D extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,D.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,M.prototype.create)}}class M{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?i.replace(j,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",s=`${this.serviceName}: ${o} (${r}).`;return new D(r,s,n)}}let j=/\{\$([^}]+)}/g;function F(e){return JSON.parse(e)}function Z(e){return JSON.stringify(e)}let $=function(e){let t={},n={},r={},i="";try{let o=e.split(".");t=F(p(o[0])||""),n=F(p(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}},U=function(e){let t=$(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},z=function(e){let t=$(e).claims;return"object"==typeof t&&!0===t.admin};function q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function W(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function V(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function B(e,t,n){let r={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function H(e){return null!==e&&"object"==typeof e}function K(e){let t=[];
1for(let[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 G(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function Y(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class J{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){let n,r;t||(t=0);let i=this.W_;if("string"==typeof e)for(let n=0;n<16;n++)i[n]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let n=0;n<16;n++)i[n]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let e=16;e<80;e++){let t=i[e-3]^i[e-8]^i[e-14]^i[e-16];i[e]=(t<<1|t>>>31)&4294967295}let o=this.chain_[0],s=this.chain_[1],a=this.chain_[2],l=this.chain_[3],u=this.chain_[4];for(let e=0;e<80;e++){e<40?e<20?(n=l^s&(a^l),r=1518500249):(n=s^a^l,r=1859775393):e<60?(n=s&a|l&(s|a),r=2400959708):(n=s^a^l,r=3395469782);let t=(o<<5|o>>>27)+n+u+r+i[e]&4294967295;u=l,l=a,a=(s<<30|s>>>2)&4294967295,s=o,o=t}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+u&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);let n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;for(;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){let e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let e=this.blockSize-1;e>=56;e--)this.buf_[e]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let t=0;t<5;t++)for(let r=24;r>=0;r-=8)e[n]=this.chain_[t]>>r&255,++n;return e}}function X(e,t){let n=new Q(e,t);return n.subscribe.bind(n)}class Q{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 Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=ee),void 0===r.error&&(r.error=ee),void 0===r.complete&&(r.complete=ee);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),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(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}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 ee(){}function et(e,t){return`${e} failed: ${t} argument `}let en=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>=55296&&i<=56319){let t=i-55296;o(++r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(t<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},er=function(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t};function ei(e,t=1e3,n=2){let r=t*Math.pow(n,e);return Math.min(144e5,r+Math.round(.5*r*(Math.random()-.5)*2))}function eo(e){return e&&e._delegate?e._delegate:e}},41234:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}}),n(67294);var r=n(70917),i=n(85893);function o(e){let{styles:t,defaultTheme:n={}}=e,o="function"==typeof t?e=>t(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(r.xB,{styles:o})}},94810:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(67294),i=n(87685),o=n(48711),s=n(85893);let a=new Map;function l(e){let{injectFirst:t,enableCssLayer:n,children:l}=e,u=r.useMemo(()=>{let e=`${t}-${n}`;if("object"==typeof document&&a.has(e))return a.get(e);
1let r=function(e,t){let n=(0,o.Z)({key:"css",prepend:e});if(t){let e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}(t,n);return a.set(e,r),r},[t,n]);return t||n?(0,s.jsx)(i.C,{value:u,children:l}):l}},49731:function(e,t,n){"use strict";n.r(t),n.d(t,{GlobalStyles:function(){return _.Z},StyledEngineProvider:function(){return y.Z},ThemeContext:function(){return i.T},css:function(){return v.iv},default:function(){return b},internal_processStyles:function(){return w},internal_serializeStyles:function(){return C},keyframes:function(){return v.F4}});var r=n(87462),i=n(87685),o=n(85662),s=n(27278),a=n(70444),l=n(67294),u=n(45042),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,h=(0,u.Z)(function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)}),d=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?h:d},f=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},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;
1return(0,a.hC)(t,n,r),(0,s.L)(function(){return(0,a.My)(t,n,r)}),null},m=(function e(t,n){var s,u,c=t.__emotion_real===t,h=c&&t.__emotion_base||t;void 0!==n&&(s=n.label,u=n.target);var d=f(t,n,c),m=d||p(h),v=!m("as");return function(){var y=arguments,_=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==s&&_.push("label:"+s+";"),null==y[0]||void 0===y[0].raw)_.push.apply(_,y);else{var b=y[0];_.push(b[0]);for(var w=y.length,k=1;k<w;k++)_.push(y[k],b[k])}var C=(0,i.w)(function(e,t,n){var r=v&&e.as||h,s="",c=[],f=e;if(null==e.theme){for(var y in f={},e)f[y]=e[y];f.theme=l.useContext(i.T)}"string"==typeof e.className?s=(0,a.fp)(t.registered,c,e.className):null!=e.className&&(s=e.className+" ");var b=(0,o.O)(_.concat(c),t.registered,f);s+=t.key+"-"+b.name,void 0!==u&&(s+=" "+u);var w=v&&void 0===d?p(r):m,k={};for(var C in e)(!v||"as"!==C)&&w(C)&&(k[C]=e[C]);return k.className=s,n&&(k.ref=n),l.createElement(l.Fragment,null,l.createElement(g,{cache:t,serialized:b,isStringTag:"string"==typeof r}),l.createElement(r,k))});return C.displayName=void 0!==s?s:"Styled("+("string"==typeof h?h:h.displayName||h.name||"Component")+")",C.defaultProps=t.defaultProps,C.__emotion_real=C,C.__emotion_base=h,C.__emotion_styles=_,C.__emotion_forwardProp=d,Object.defineProperty(C,"toString",{value:function(){return"."+u}}),C.withComponent=function(t,i){return e(t,(0,r.Z)({},n,i,{shouldForwardProp:f(C,i,!0)})).apply(void 0,_)},C}}).bind(null);["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){m[e]=m(e)});var v=n(70917),y=n(94810),_=n(41234);function b(e,t){return m(e,t)}let w=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},k=[];function C(e){return k[0]=e,(0,o.O)(k)}},2101:function(e,t,n){"use strict";var r=n(64836);t.Fq=function(e,t){return e=a(e),t=s(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)},t._j=c,t._4=function(e,t=.15){return u(e)>.5?c(e,t):h(e,t)},t.mi=function(e,t){let n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.$n=h;var i=r(n(55480)),o=r(n(14800));function s(e,t=0,n=1){return(0,o.default)(e,t,n)}function a(e){let t;if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));let n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw Error((0,i.default)(9,e));let o=e.substring(n+1,e.length-1);if("color"===r){if(t=(o=o.split(" ")).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(t))throw Error((0,i.default)(10,t))}else o=o.split(",");return{type:r,values:o=o.map(e=>parseFloat(e)),colorSpace:t}}function l(e){let{type:t,colorSpace:n}=e,{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}
1 ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function u(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(function(e){let{values:t}=e=a(e),n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(e,t=(e+n/30)%12)=>i-o*Math.max(Math.min(t-3,9-t,1),-1),u="rgb",c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}(e)).values:e.values;return Number((.2126*(t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)))[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){if(e=a(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 l(e)}function h(e,t){if(e=a(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 l(e)}},58128:function(e,t,n){"use strict";var r=n(64836);t.ZP=function(e={}){let{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,c=e=>(0,u.default)((0,i.default)({},e,{theme:y((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,(e,u={})=>{var h;let p;(0,s.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));let{name:g,slot:m,skipVariantsResolver:b,skipSx:w,overridesResolver:k=(h=v(m))?(e,t)=>t[h]:null}=u,C=(0,o.default)(u,d),S=g&&g.startsWith("Mui")||m?"components":"custom",E=void 0!==b?b:m&&"Root"!==m&&"root"!==m||!1,x=w||!1,I=f;"Root"===m||"root"===m?I=r:m?I=l:"string"==typeof e&&e.charCodeAt(0)>96&&(I=void 0);let T=(0,s.default)(e,(0,i.default)({shouldForwardProp:I,label:p},C)),P=e=>"function"==typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?r=>{let o=y({theme:r.theme,defaultTheme:n,themeId:t});return _(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?S:void 0)}:e,O=(r,...o)=>{let s=P(r),a=o?o.map(P):[];g&&k&&a.push(e=>{let r=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[g]||!r.components[g].styleOverrides)return null;let o=r.components[g].styleOverrides,s={};return Object.entries(o).forEach(([t,n])=>{s[t]=_(n,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),k(e,s)}),g&&!E&&a.push(e=>{var r;let o=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));return _({variants:null==o||null==(r=o.components)||null==(r=r[g])?void 0:r.variants},(0,i.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),x||a.push(c);let l=a.length-o.length;if(Array.isArray(r)&&l>0){let e=Array(l).fill("");(s=[...r,...e]).raw=[...r.raw,...e]}let u=T(s,...a);return e.muiName&&(u.muiName=e.muiName),u};return T.withConfig&&(O.withConfig=T.withConfig),O}};var i=r(n(10434)),o=r(n(7071)),s=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(void 0);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(49731)),a=n(58524);r(n(87641)),r(n(92125));var l=r(n(19926)),u=r(n(386));let c=["ownerState"],h=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function g(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}let m=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:n}){return 0===Object.keys(t).length?e:t[n]||t}function _(e,t,n){let{ownerState:r}=t,a=(0,o.default)(t,c),l="function"==typeof e?e((0,i.default)({ownerState:r},a)):e;if(Array.isArray(l))return l.flatMap(e=>_(e,(0,i.default)({ownerState:r},a),n));
1if(l&&"object"==typeof l&&Array.isArray(l.variants)){let{variants:e=[]}=l,t=(0,o.default)(l,h);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,i.default)({ownerState:r},a,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&a[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);let o="function"==typeof e.style?e.style((0,i.default)({ownerState:r},a,r)):e.style;t.push(n?g((0,s.internal_serializeStyles)(o),n):o)}}),t}return n?g((0,s.internal_serializeStyles)(l),n):l}},32842:function(e,t,n){"use strict";n.d(t,{i:function(){return a}});var r=n(67294),i=n(35971),o=n(85893);let s=r.createContext(void 0);function a({props:e,name:t}){return function(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let o=t.components[n];return o.defaultProps?(0,i.Z)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.Z)(o,r)}({props:e,name:t,theme:{components:r.useContext(s)}})}t.Z=function({value:e,children:t}){return(0,o.jsx)(s.Provider,{value:e,children:t})}},25723:function(e,t,n){"use strict";n(67294);var r=n(49731),i=n(41234),o=n(96682),s=n(85893);function a(e){let t=(0,r.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}t.Z=function({styles:e,themeId:t,defaultTheme:n={}}){let r=(0,o.Z)(n),l=t&&r[t]||r,u="function"==typeof e?e(l):e;return l.modularCssLayers&&(u=Array.isArray(u)?u.map(e=>"function"==typeof e?a(e(l)):a(e)):a(u)),(0,s.jsx)(i.Z,{styles:u})}},82056:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var r=n(87462),i=n(63366),o=n(67294),s=n(85893);let a=["value"],l=o.createContext(),u=()=>{let e=o.useContext(l);return null!=e&&e};t.Z=function(e){let{value:t}=e,n=(0,i.Z)(e,a);return(0,s.jsx)(l.Provider,(0,r.Z)({value:null==t||t},n))}},95408:function(e,t,n){"use strict";n.d(t,{L7:function(){return l},P$:function(){return c},VO:function(){return i},W8:function(){return a},dt:function(){return u},k9:function(){return s}});var r=n(4953);let i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function s(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||o;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){let e=r.breakpoints||o;return Object.keys(t).reduce((r,o)=>(-1!==Object.keys(e.values||i).indexOf(o)?r[e.up(o)]=n(t[o],o):r[o]=t[o],r),{})}return n(t)}function a(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{let n=e[t];return n&&0!==Object.keys(n).length||delete e[t],e},t)}function u(e,...t){let n=a(e),i=[n,...t].reduce((e,t)=>(0,r.Z)(e,t),{});return l(Object.keys(n),i)}function c({values:e,breakpoints:t,base:n}){let r;let i=Object.keys(n||function(e,t){if("object"!=typeof e)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(e,t));return 0===i.length?e:i.reduce((t,n,i)=>(Array.isArray(e)?(t[n]=null!=e[i]?e[i]:e[r],r=i):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[r],r=n):t[n]=e,t),{})}},57064:function(e,t,n){"use strict";function r(e,t){return this.vars&&"function"==typeof this.getColorSchemeSelector?{[this.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:this.palette.mode===e?t:{}}n.d(t,{Z:function(){return r}})},41512:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(63366),i=n(87462);let o=["values","unit","step"],s=e=>{let 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.Z)({},e,{[t.key]:t.val}),{})};function a(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,l=(0,r.Z)(e,o),u=s(t),c=Object.keys(u);function h(e){let r="number"==typeof t[e]?t[e]:e;return`@media (min-width:${r}${n})`}function d(e){let r="number"==typeof t[e]?t[e]:e;return`@media (max-width:${r-a/100}${n})`}function p(e,r){let i=c.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[c[i]]?t[c[i]]:r)-a/100}${n})`}return(0,i.Z)({keys:c,values:u,up:h,down:d,between:p,only:function(e){return c.indexOf(e)+1<c.length?p(e,c[c.indexOf(e)+1]):h(e)},not:function(e){let t=c.indexOf(e);return 0===t?h(c[1]):t===c.length-1?d(c[t]):p(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},17172:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(87462),i=n(63366),o=n(4953),s=n(41512),a={borderRadius:4},l=n(98700),u=n(86523),c=n(44920),h=n(57064);let d=["breakpoints","palette","spacing","shape"];var p=function(e={},...t){let{breakpoints:n={},palette:p={},spacing:f,shape:g={}}=e,m=(0,i.Z)(e,d),v=(0,s.Z)(n),y=function(e=8){if(e.mui)return e;let t=(0,l.hB)({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map(e=>{let n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(f),_=(0,o.Z)({breakpoints:v,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},p),spacing:y,shape:(0,r.Z)({},a,g)},m);return _.applyStyles=h.Z,(_=t.reduce((e,t)=>
1(0,o.Z)(e,t),_)).unstable_sxConfig=(0,r.Z)({},c.Z,null==m?void 0:m.unstable_sxConfig),_.unstable_sx=function(e){return(0,u.Z)({sx:e,theme:this})},_}},19926:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},private_createBreakpoints:function(){return i.Z},unstable_applyStyles:function(){return o.Z}});var r=n(17172),i=n(41512),o=n(57064)},47730:function(e,t,n){"use strict";var r=n(4953);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},98700:function(e,t,n){"use strict";n.d(t,{hB:function(){return f},eI:function(){return p},NA:function(){return g},e6:function(){return v},o3:function(){return y}});var r=n(95408),i=n(54844),o=n(47730);let 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"},u=function(e){let 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]}let[t,n]=e.split(""),r=s[t],i=a[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],h=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...c,...h];function p(e,t,n,r){var o;let s=null!=(o=(0,i.DW)(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:()=>void 0}function f(e){return p(e,"spacing",8,"spacing")}function g(e,t){if("string"==typeof t||null==t)return t;let n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function m(e,t){let n=f(e.theme);return Object.keys(e).map(i=>(function(e,t,n,i){var o;if(-1===t.indexOf(n))return null;let s=(o=u(n),e=>o.reduce((t,n)=>(t[n]=g(i,e),t),{})),a=e[n];return(0,r.k9)(e,a,s)})(e,t,i,n)).reduce(o.Z,{})}function v(e){return m(e,c)}function y(e){return m(e,h)}function _(e){return m(e,d)}v.propTypes={},v.filterProps=c,y.propTypes={},y.filterProps=h,_.propTypes={},_.filterProps=d},54844:function(e,t,n){"use strict";n.d(t,{DW:function(){return o},Jq:function(){return s}});var r=n(14142),i=n(95408);function o(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){let 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,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:o(e,n)||r,t&&(i=t(i,r,e)),i}t.ZP=function(e){let{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,u=e=>{if(null==e[t])return null;let u=e[t],c=o(e.theme,a)||{};return(0,i.k9)(e,u,e=>{let i=s(c,l,e);return(e===i&&"string"==typeof e&&(i=s(c,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n)?i:{[n]:i}})};return u.propTypes={},u.filterProps=[t],u}},44920:function(e,t,n){"use strict";n.d(t,{Z:function(){return $}});var r=n(98700),i=n(54844),o=n(47730),s=function(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?(0,o.Z)(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n},a=n(95408);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,i.ZP)({prop:e,themeKey:"borders",transform:t})}let c=u("border",l),h=u("borderTop",l),d=u("borderRight",l),p=u("borderBottom",l),f=u("borderLeft",l),g=u("borderColor"),m=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),_=u("borderLeftColor"),b=u("outline",l),w=u("outlineColor"),k=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){let t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius");return(0,a.k9)(e,e.borderRadius,e=>({borderRadius:(0,r.NA)(t,e)}))}return null};k.propTypes={},k.filterProps=["borderRadius"],s(c,h,d,p,f,g,m,v,y,_,k,b,w);let C=e=>{if(void 0!==e.gap&&null!==e.gap){let t=(0,r.eI)(e.theme,"spacing",8,"gap");return(0,a.k9)(e,e.gap,e=>({gap:(0,r.NA)(t,e)}))}return null};C.propTypes={},C.filterProps=["gap"];let S=e=>
1{if(void 0!==e.columnGap&&null!==e.columnGap){let t=(0,r.eI)(e.theme,"spacing",8,"columnGap");return(0,a.k9)(e,e.columnGap,e=>({columnGap:(0,r.NA)(t,e)}))}return null};S.propTypes={},S.filterProps=["columnGap"];let E=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){let t=(0,r.eI)(e.theme,"spacing",8,"rowGap");return(0,a.k9)(e,e.rowGap,e=>({rowGap:(0,r.NA)(t,e)}))}return null};E.propTypes={},E.filterProps=["rowGap"];let x=(0,i.ZP)({prop:"gridColumn"}),I=(0,i.ZP)({prop:"gridRow"}),T=(0,i.ZP)({prop:"gridAutoFlow"}),P=(0,i.ZP)({prop:"gridAutoColumns"}),O=(0,i.ZP)({prop:"gridAutoRows"}),R=(0,i.ZP)({prop:"gridTemplateColumns"});function N(e,t){return"grey"===t?t:e}function A(e){return e<=1&&0!==e?`${100*e}%`:e}s(C,S,E,x,I,T,P,O,R,(0,i.ZP)({prop:"gridTemplateRows"}),(0,i.ZP)({prop:"gridTemplateAreas"}),(0,i.ZP)({prop:"gridArea"})),s((0,i.ZP)({prop:"color",themeKey:"palette",transform:N}),(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:N}),(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:N}));let L=(0,i.ZP)({prop:"width",transform:A}),D=e=>void 0!==e.maxWidth&&null!==e.maxWidth?(0,a.k9)(e,e.maxWidth,t=>{var n,r;let i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||a.VO[t];return i?(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:A(t)}}):null;D.filterProps=["maxWidth"];let M=(0,i.ZP)({prop:"minWidth",transform:A}),j=(0,i.ZP)({prop:"height",transform:A}),F=(0,i.ZP)({prop:"maxHeight",transform:A}),Z=(0,i.ZP)({prop:"minHeight",transform:A});(0,i.ZP)({prop:"size",cssProperty:"width",transform:A}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:A}),s(L,D,M,j,F,Z,(0,i.ZP)({prop:"boxSizing"}));var $={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:k},color:{themeKey:"palette",transform:N},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:N},backgroundColor:{themeKey:"palette",transform:N},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},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:C},rowGap:{style:E},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:A},maxWidth:{style:D},minWidth:{transform:A},height:{transform:A},maxHeight:{transform:A},minHeight:{transform:A},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}},39707:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(87462),i=n(63366),o=n(4953),s=n(44920);let a=["sx"],l=e=>{var t,n;let r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:s.Z;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function u(e){let t;let{sx:n}=e,{systemProps:s,otherProps:u}=l((0,i.Z)(e,a));return t=Array.isArray(n)?[s,...n]:"function"==typeof n?(...e)=>{let t=n(...e);return(0,o.P)(t)?(0,r.Z)({},s,t):s}:(0,r.Z)({},s,n),(0,r.Z)({},u,{sx:t})}},386:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},extendSxProp:function(){return i.Z},unstable_createStyleFunctionSx:function(){return r.n},unstable_defaultSxConfig:function(){return o.Z}});var r=n(86523),i=n(39707),o=n(44920)},86523:function(e,t,n){"use strict";n.d(t,{n:function(){return l}});var r=n(14142),i=n(47730),o=n(54844),s=n(95408),a=n(44920);function l(){function e(e,t,n,i){let a={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};let{cssProperty:u=e,themeKey:c,transform:h,style:d}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};let p=(0,o.DW)(n,c)||{};
1return d?d(a):(0,s.k9)(a,t,t=>{let n=(0,o.Jq)(p,h,t);return(t===n&&"string"==typeof t&&(n=(0,o.Jq)(p,h,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===u)?n:{[u]:n}})}return function t(n){var r;let{sx:o,theme:l={},nested:u}=n||{};if(!o)return null;let c=null!=(r=l.unstable_sxConfig)?r:a.Z;function h(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;let o=(0,s.W8)(l.breakpoints),a=Object.keys(o),h=o;return(Object.keys(r).forEach(n=>{var o;let a="function"==typeof(o=r[n])?o(l):o;if(null!=a){if("object"==typeof a){if(c[n])h=(0,i.Z)(h,e(n,a,l,c));else{let e=(0,s.k9)({theme:l},a,e=>({[n]:e}));(function(...e){let t=new Set(e.reduce((e,t)=>e.concat(Object.keys(t)),[]));return e.every(e=>t.size===Object.keys(e).length)})(e,a)?h[n]=t({sx:a,theme:l,nested:!0}):h=(0,i.Z)(h,e)}}else h=(0,i.Z)(h,e(n,a,l,c))}}),!u&&l.modularCssLayers)?{"@layer sx":(0,s.L7)(a,h)}:(0,s.L7)(a,h)}return Array.isArray(o)?o.map(h):h(o)}}let u=l();u.filterProps=["sx"],t.Z=u},96682:function(e,t,n){"use strict";var r=n(17172),i=n(34168);let o=(0,r.Z)();t.Z=function(e=o){return(0,i.Z)(e)}},34168:function(e,t,n){"use strict";var r=n(67294),i=n(87685);t.Z=function(e=null){let t=r.useContext(i.T);return t&&0!==Object.keys(t).length?t:e}},37078:function(e,t){"use strict";let n;let r=e=>e,i=(n=r,{configure(e){n=e},generate:e=>n(e),reset(){n=r}});t.Z=i},86542:function(e,t,n){"use strict";var r=n(87462),i=n(90712);t.Z=function(e,t,n){return void 0===e||(0,i.Z)(e)?t:(0,r.Z)({},t,{ownerState:(0,r.Z)({},t.ownerState,n)})}},14142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(56535);function i(e){if("string"!=typeof e)throw Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},87641:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(14142)},7610:function(e,t){"use strict";t.Z=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},14800:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(7610)},94780:function(e,t,n){"use strict";function r(e,t,n){let r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){let i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{Z:function(){return r}})},91476:function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,{Z:function(){return r}})},4953:function(e,t,n){"use strict";n.d(t,{P:function(){return o},Z:function(){return function e(t,n,s={clone:!0}){let a=s.clone?(0,r.Z)({},t):t;return o(t)&&o(n)&&Object.keys(n).forEach(r=>{i.isValidElement(n[r])?a[r]=n[r]:o(n[r])&&Object.prototype.hasOwnProperty.call(t,r)&&o(t[r])?a[r]=e(t[r],n[r],s):s.clone?a[r]=o(n[r])?function e(t){if(i.isValidElement(t)||!o(t))return t;let n={};return Object.keys(t).forEach(r=>{n[r]=e(t[r])}),n}(n[r]):n[r]:a[r]=n[r]}),a}}});var r=n(87462),i=n(67294);function o(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}},58524:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z},isPlainObject:function(){return r.P}});var r=n(4953)},99113:function(e,t){"use strict";t.Z=function(e,t=[]){if(void 0===e)return{};let 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}},56535:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{Z:function(){return r}})},55480:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r.Z}});var r=n(56535)},34867:function(e,t,n){"use strict";n.d(t,{ZP:function(){return o}});var r=n(37078);let i={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 o(e,t,n="Mui"){let o=i[t];return o?`${n}-${o}`:`${r.Z.generate(e)}-${t}`}},1588:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(34867);function i(e,t,n="Mui"){let i={};return t.forEach(t=>{i[t]=(0,r.ZP)(e,t,n)}),i}},92125:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l},getFunctionName:function(){return o}});var r=n(79593);let i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){let t=`${e}`.match(i);return t&&t[1]||""}function s(e,t=""){return e.displayName||e.name||o(e)||t}function a(e,t,n){let 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.A4:return a(e,e.render,"ForwardRef");case r._Y:return a(e,e.type,"memo")}}}},57907:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i(e){if(parseInt(r.version,10)>=19){var t;return(null==e||null==(t=e.props)?void 0:t.ref)||null}return(null==e?void 0:e.ref)||null}},29726:function(e,t,n){"use strict";function r(e){let t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}n.d(t,{Z:function(){return r}})},90712:function(e,t){"use strict";t.Z=function(e){return"string"==typeof e}},55120:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(87462),i=n(90512),o=n(99113),s=function(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>
1!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},a=function(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:l,className:u}=e;if(!t){let e=(0,i.Z)(null==n?void 0:n.className,u,null==l?void 0:l.className,null==a?void 0:a.className),t=(0,r.Z)({},null==n?void 0:n.style,null==l?void 0:l.style,null==a?void 0:a.style),o=(0,r.Z)({},n,l,a);return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let c=(0,o.Z)((0,r.Z)({},l,a)),h=s(a),d=s(l),p=t(c),f=(0,i.Z)(null==p?void 0:p.className,null==n?void 0:n.className,u,null==l?void 0:l.className,null==a?void 0:a.className),g=(0,r.Z)({},null==p?void 0:p.style,null==n?void 0:n.style,null==l?void 0:l.style,null==a?void 0:a.style),m=(0,r.Z)({},p,n,d,h);return f.length>0&&(m.className=f),Object.keys(g).length>0&&(m.style=g),{props:m,internalRef:p.ref}}},82690:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},74161:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(82690);function i(e){return(0,r.Z)(e).defaultView||window}},65610:function(e,t){"use strict";t.Z=function(e,t,n){return"function"==typeof e?e(t,n):e}},35971:function(e,t,n){"use strict";n.d(t,{Z:function(){return function e(t,n){let i=(0,r.Z)({},n);return Object.keys(t).forEach(o=>{if(o.toString().match(/^(components|slots)$/))i[o]=(0,r.Z)({},t[o],i[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){let s=t[o]||{},a=n[o];i[o]={},a&&Object.keys(a)?s&&Object.keys(s)?(i[o]=(0,r.Z)({},a),Object.keys(s).forEach(t=>{i[o][t]=e(s[t],a[t])})):i[o]=a:i[o]=s}else void 0===i[o]&&(i[o]=t[o])}),i}}});var r=n(87462)},27364:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:function(){return r}})},73546:function(e,t,n){"use strict";var r=n(67294);let i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;t.Z=i},59948:function(e,t,n){"use strict";var r=n(67294),i=n(73546);t.Z=function(e){let t=r.useRef(e);return(0,i.Z)(()=>{t.current=e}),r.useRef((...e)=>(0,t.current)(...e)).current}},33703:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),i=n(27364);function o(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{(0,i.Z)(e,t)})},e)}},92996:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r,i=n(67294);let o=0,s=(r||(r=n.t(i,2)))["useId".toString()];function a(e){if(void 0!==s){let t=s();return null!=e?e:t}return function(e){let[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{null==t&&(o+=1,n(`mui-${o}`))},[t]),r}(e)}},82963:function(e,t,n){"use strict";var r=n(87462),i=n(63366),o=n(33703),s=n(86542),a=n(55120),l=n(65610);let u=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];t.Z=function(e){var t;let{elementType:n,externalSlotProps:c,ownerState:h,skipResolvingSlotProps:d=!1}=e,p=(0,i.Z)(e,u),f=d?{}:(0,l.Z)(c,h),{props:g,internalRef:m}=(0,a.Z)((0,r.Z)({},p,{externalSlotProps:f})),v=(0,o.Z)(m,null==f?void 0:f.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,s.Z)(n,(0,r.Z)({},g,{ref:v}),h)}},46271:function(e,t,n){"use strict";n.d(t,{V:function(){return s},Z:function(){return a}});var r=n(67294);let i={},o=[];class s{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new s}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function a(){var e;let t=function(e,t){let n=r.useRef(i);return n.current===i&&(n.current=e(void 0)),n}(s.create).current;return e=t.disposeEffect,r.useEffect(e,o),t}},8679:function(e,t,n){"use strict";var r=n(21296),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 u=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var s=c(n);h&&(s=s.concat(h(n)));for(var a=l(t),g=l(n),m=0;m<s.length;++m){var v=s[m];if(!o[v]&&!(r&&r[v])&&!(g&&g[v])&&!(a&&a[v])){var y=d(n,v);try{u(t,v,y)}catch(e){}}}}return t}},96103:function(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,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case h:case o:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case d:case m:case g:case l:return e;default:return t}}case i:return t}}}function k(e){return w(e)===h}t.AsyncMode=c,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===a||e===s||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},21296:function(e,t,n){"use strict";e.exports=n(96103)},532:function(e,t,n){"use strict";let r;n.d(t,{cC:function(){return F},Jc:function(){return tn},$G:function(){return z}});var i=n(67294),o=n(71739),s=n.n(o),a=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function l(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s()[n[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var i=new RegExp(a),o=null;null!==(o=i.exec(e));)if(o[0].trim()){if(o[1]){var l=o[1].trim(),u=[l,""];l.indexOf("=")>-1&&(u=l.split("=")),t.attrs[u[0]]=u[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1))}return t}var u=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,c=/^\s*$/,h=Object.create(null),d={parse:function(e,t){t||(t={}),t.components||(t.components=h);var n,r=[],i=[],o=-1,s=!1;if(0!==e.indexOf("<")){var a=e.indexOf("<");r.push({type:"text",content:-1===a?e:e.substring(0,a)})}return e.replace(u,function(a,u){if(s){if(a!=="</"+n.name+">")return;s=!1}var h,d="/"!==a.charAt(1),p=a.startsWith("<!--"),f=u+a.length,g=e.charAt(f);if(p){var m=l(a);return o<0?r.push(m):(h=i[o]).children.push(m),r}if(d&&(o++,"tag"===(n=l(a)).type&&t.components[n.name]&&(n.type="component",s=!0),n.voidElement||s||!g||"<"===g||n.children.push({type:"text",content:e.slice(f,e.indexOf("<",f))}),0===o&&r.push(n),(h=i[o-1])&&h.children.push(n),i[o]=n),(!d||n.voidElement)&&(o>-1&&(n.voidElement||n.name===a.slice(2,-1))&&(n=-1==--o?r:i[o]),!s&&"<"!==g&&g)){h=-1===o?r:i[o].children;var v=e.indexOf("<",f),y=e.slice(f,-1===v?void 0:v);c.test(y)&&(y=" "),(v>-1&&o+h.length>=0||" "!==y)&&h.push({type:"text",content:y})}}),r}};function p(){if(console&&console.warn){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];w(t[0])&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}let f={};function g(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];w(t[0])&&f[t[0]]||(w(t[0])&&(f[t[0]]=new Date),p(...t))}let m=(e,t)=>
1()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},v=(e,t,n)=>{e.loadNamespaces(t,m(e,n))},y=(e,t,n,r)=>{w(n)&&(n=[n]),n.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,m(e,r))},_=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;let s=(e,n)=>{let r=t.services.backendConnector.state[`${e}|${n}`];return -1===r||2===r};return(!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1)||!t.services.backendConnector.backend||!t.isLanguageChangingTo||!!s(t.isLanguageChangingTo,e))&&!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))},b=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):_(e,t,n):(g("i18n.languages were undefined or empty",t.languages),!0)},w=e=>"string"==typeof e,k=e=>"object"==typeof e&&null!==e,C=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,S={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},E=e=>S[e],x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(C,E)},I=()=>x,T=()=>r,P=(e,t)=>{if(!e)return!1;let n=e.props?e.props.children:e.children;return t?n.length>0:!!n},O=e=>{if(!e)return[];let t=e.props?e.props.children:e.children;return e.props&&e.props.i18nIsDynamicList?N(t):t},R=e=>Array.isArray(e)&&e.every(i.isValidElement),N=e=>Array.isArray(e)?e:[e],A=(e,t)=>
1{let n={...t};return n.props=Object.assign(e.props,t.props),n},L=(e,t)=>{if(!e)return"";let n="",r=N(e),o=t.transSupportBasicHtmlNodes&&t.transKeepBasicHtmlNodesFor?t.transKeepBasicHtmlNodesFor:[];return r.forEach((e,r)=>{if(w(e))n+=`${e}`;else if((0,i.isValidElement)(e)){let{props:i,type:s}=e,a=Object.keys(i).length,l=o.indexOf(s)>-1,u=i.children;if(u||!l||a){if(!u&&(!l||a)||i.i18nIsDynamicList)n+=`<${r}></${r}>`;else if(l&&1===a&&w(u))n+=`<${s}>${u}</${s}>`;else{let e=L(u,t);n+=`<${r}>${e}</${r}>`}}else n+=`<${s}/>`}else if(null===e)p("Trans: the passed in value is invalid - seems you passed in a null child.");else if(k(e)){let{format:t,...r}=e,i=Object.keys(r);if(1===i.length){let e=t?`${i[0]}, ${t}`:i[0];n+=`{{${e}}}`}else p("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else p("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)}),n},D=(e,t,n,r,o,s)=>{if(""===t)return[];let a=r.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(a.map(e=>`<${e}`).join("|")).test(t);if(!e&&!l&&!s)return[t];let u={},c=e=>{N(e).forEach(e=>{w(e)||(P(e)?c(O(e)):k(e)&&!(0,i.isValidElement)(e)&&Object.assign(u,e))})};c(e);let h=d.parse(`<0>${t}</0>`),p={...u,...o},f=(e,t,n)=>{let r=O(e),i=m(r,t.children,n);return R(r)&&0===i.length||e.props&&e.props.i18nIsDynamicList?r:i},g=(e,t,n,r,o)=>{e.dummy?(e.children=t,n.push((0,i.cloneElement)(e,{key:r},o?void 0:t))):n.push(...i.Children.map([e],e=>{let n={...e.props};return delete n.i18nIsDynamicList,(0,i.createElement)(e.type,{...n,key:r,ref:e.ref},o?null:t)}))},m=(t,o,u)=>{let c=N(t);return N(o).reduce((t,o,h)=>{let d=o.children&&o.children[0]&&o.children[0].content&&n.services.interpolator.interpolate(o.children[0].content,p,n.language);if("tag"===o.type){let s=c[parseInt(o.name,10)];1!==u.length||s||(s=u[0][o.name]),s||(s={});let v=0!==Object.keys(o.attrs).length?A({props:o.attrs},s):s,y=(0,i.isValidElement)(v),_=y&&P(o,!0)&&!o.voidElement,b=l&&k(v)&&v.dummy&&!y,C=k(e)&&Object.hasOwnProperty.call(e,o.name);if(w(v)){let e=n.services.interpolator.interpolate(v,p,n.language);t.push(e)}else if(P(v)||_){let e=f(v,o,u);g(v,e,t,h)}else if(b)g(v,m(c,o.children,u),t,h);else if(Number.isNaN(parseFloat(o.name))){if(C){let e=f(v,o,u);g(v,e,t,h,o.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(o.name)>-1){if(o.voidElement)t.push((0,i.createElement)(o.name,{key:`${o.name}-${h}`}));else{let e=m(c,o.children,u);t.push((0,i.createElement)(o.name,{key:`${o.name}-${h}`},e))}}else if(o.voidElement)t.push(`<${o.name} />`);else{let e=m(c,o.children,u);t.push(`<${o.name}>${e}</${o.name}>`)}}else if(k(v)&&!y){let e=o.children[0]?d:null;e&&t.push(e)}else g(v,d,t,h,1!==o.children.length||!d)}else if("text"===o.type){let e=r.transWrapTextNodes,a=s?r.unescape(n.services.interpolator.interpolate(o.content,p,n.language)):n.services.interpolator.interpolate(o.content,p,n.language);e?t.push((0,i.createElement)(e,{key:`${o.name}-${h}`},a)):t.push(a)}return t},[])};return O(m([{dummy:!0,children:e||[]}],h,N(e||[]))[0])},M=(0,i.createContext)();class j{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces=()=>Object.keys(this.usedNamespaces)}function F(e){let{children:t,count:n,parent:r,i18nKey:o,context:s,tOptions:a={},values:l,defaults:u,components:c,ns:h,i18n:d,t:p,shouldUnescape:f,...m}=e,{i18n:v,defaultNS:y}=(0,i.useContext)(M)||{},_=d||v||T(),b=p||_&&_.t.bind(_);return function(e){let{children:t,count:n,parent:r,i18nKey:o,context:s,tOptions:a={},values:l,defaults:u,components:c,ns:h,i18n:d,t:p,shouldUnescape:f,...m}=e,v=d||T();if(!v)return g("You will need to pass in an i18next instance by using i18nextReactModule"),t;let y=p||v.t.bind(v)||(e=>e),_={...I(),...v.options&&v.options.react},b=h||y.ns||v.options&&v.options.defaultNS;b=w(b)?[b]:b||["translation"];let k=L(t,_),C=u||k||_.transEmptyNodeValue||o,{hashTransKey:S}
1=_,E=o||(S?S(k||C):k||C);v.options&&v.options.interpolation&&v.options.interpolation.defaultVariables&&(l=l&&Object.keys(l).length>0?{...l,...v.options.interpolation.defaultVariables}:{...v.options.interpolation.defaultVariables});let x=l||void 0!==n||!t?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},P={...a,context:s||a.context,count:n,...l,...x,defaultValue:C,ns:b},O=E?y(E,P):C;c&&Object.keys(c).forEach(e=>{let t=c[e];"function"==typeof t.type||!t.props||!t.props.children||0>O.indexOf(`${e}/>`)&&0>O.indexOf(`${e} />`)||(c[e]=(0,i.createElement)(function(){return(0,i.createElement)(i.Fragment,null,t)}))});let R=D(c||t,O,v,_,P,f),N=void 0!==r?r:_.defaultTransParent;return N?(0,i.createElement)(N,m,R):R}({children:t,count:n,parent:r,i18nKey:o,context:s,tOptions:a,values:l,defaults:u,components:c,ns:h||b&&b.ns||y||_&&_.options&&_.options.defaultNS,i18n:_,t:p,shouldUnescape:f,...m})}let Z=(e,t)=>{let n=(0,i.useRef)();return(0,i.useEffect)(()=>{n.current=t?n.current:e},[e,t]),n.current},$=(e,t,n,r)=>e.getFixedT(t,n,r),U=(e,t,n,r)=>(0,i.useCallback)($(e,t,n,r),[e,t,n,r]),z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{i18n:n}=t,{i18n:r,defaultNS:o}=(0,i.useContext)(M)||{},s=n||r||T();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new j),!s){g("You will need to pass in an i18next instance by using initReactI18next");let e=(e,t)=>w(t)?t:k(t)&&w(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}s.options.react&&void 0!==s.options.react.wait&&g("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");let a={...I(),...s.options.react,...t},{useSuspense:l,keyPrefix:u}=a,c=e||o||s.options&&s.options.defaultNS;c=w(c)?[c]:c||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(c);let h=(s.isInitialized||s.initializedStoreOnce)&&c.every(e=>b(e,s,a)),d=U(s,t.lng||null,"fallback"===a.nsMode?c:c[0],u),p=()=>d,f=()=>$(s,t.lng||null,"fallback"===a.nsMode?c:c[0],u),[m,_]=(0,i.useState)(p),C=c.join();t.lng&&(C=`${t.lng}${C}`);let S=Z(C),E=(0,i.useRef)(!0);(0,i.useEffect)(()=>{let{bindI18n:e,bindI18nStore:n}=a;E.current=!0,h||l||(t.lng?y(s,t.lng,c,()=>{E.current&&_(f)}):v(s,c,()=>{E.current&&_(f)})),h&&S&&S!==C&&E.current&&_(f);let r=()=>{E.current&&_(f)};return e&&s&&s.on(e,r),n&&s&&s.store.on(n,r),()=>{E.current=!1,e&&s&&e.split(" ").forEach(e=>s.off(e,r)),n&&s&&n.split(" ").forEach(e=>s.store.off(e,r))}},[s,C]),(0,i.useEffect)(()=>{E.current&&h&&_(p)},[s,u,h]);let x=[m,s,h];if(x.t=m,x.i18n=s,x.ready=h,h||!h&&!l)return x;throw new Promise(e=>{t.lng?y(s,t.lng,c,()=>e()):v(s,c,()=>e())})};function q(e){let{i18n:t,defaultNS:n,children:r}=e,o=(0,i.useMemo)(()=>({i18n:t,defaultNS:n}),[t,n]);return(0,i.createElement)(M.Provider,{value:o},r)}var W=n(87462);function V(e){return(V="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})(e)}function B(e,t,n){var r;return(r=function(e,t){if("object"!=V(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=V(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==V(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H=n(8679),K=n.n(H);function G(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 Y(e,t){if(e){if("string"==typeof e)return G(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)?G(e,t):void 0}}function J(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,u=!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){u=!0,i=e}
1finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}(e,t)||Y(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var X=n(63366);function Q(e,t){if(null==e)return{};var n,r,i=(0,X.Z)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ee={defaultNS:"common",errorStackTraceLimit:0,i18n:{defaultLocale:"en",locales:["en"]},get initImmediate(){return"undefined"!=typeof window},get initAsync(){return"undefined"!=typeof window},interpolation:{escapeValue:!1},load:"currentOnly",localeExtension:"json",localePath:"./public/locales",localeStructure:"{{lng}}/{{ns}}",react:{useSuspense:!1},reloadOnPrerender:!1,serializeConfig:!0,use:[]},et="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,en=["i18n"],er=["i18n"];function ei(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 eo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var es=["backend","detection"],ea=function(e){if("string"!=typeof(null==e?void 0:e.lng))throw Error("config.lng was not passed into createConfig");var t,n,r,i=e.i18n,o=Q(e,en),s=ee.i18n,a=eo(eo(eo(eo({},Q(ee,er)),o),s),i),l=a.defaultNS,u=a.lng,c=a.localeExtension,h=a.localePath,d=a.nonExplicitSupportedLngs,p=a.locales.filter(function(e){return"default"!==e});if("cimode"===u)return a;
1if(void 0===a.fallbackLng&&(a.fallbackLng=a.defaultLocale,"default"===a.fallbackLng)){var f=J(p,1);a.fallbackLng=f[0]}var g=null==e||null===(t=e.interpolation)||void 0===t?void 0:t.prefix,m=null==e||null===(n=e.interpolation)||void 0===n?void 0:n.suffix,v=null!=g?g:"{{",y=null!=m?m:"}}";"string"!=typeof(null==e?void 0:e.localeStructure)&&(g||m)&&(a.localeStructure="".concat(v,"lng").concat(y,"/").concat(v,"ns").concat(y));var _=a.fallbackLng,b=a.localeStructure;if(d){var w=function(e,t){var n=J(t.split("-"),1)[0];return e[t]=[n],e};if("string"==typeof _)a.fallbackLng=a.locales.filter(function(e){return e.includes("-")}).reduce(w,{default:[_]});else if(Array.isArray(_))a.fallbackLng=a.locales.filter(function(e){return e.includes("-")}).reduce(w,{default:_});else if("object"===V(_))a.fallbackLng=Object.entries(a.fallbackLng).reduce(function(e,t){var n=J(t,2),r=n[0],i=n[1];return e[r]=r.includes("-")?Array.from(new Set([r.split("-")[0]].concat(function(e){if(Array.isArray(e))return G(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||Y(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))):i,e},_);else if("function"==typeof _)throw Error("If nonExplicitSupportedLngs is true, no functions are allowed for fallbackLng")}return(null==e||null===(r=e.use)||void 0===r?void 0:r.some(function(e){return"backend"===e.type}))||("string"==typeof h?a.backend={addPath:"".concat(h,"/").concat(b,".missing.").concat(c),loadPath:"".concat(h,"/").concat(b,".").concat(c)}:"function"!=typeof h||(a.backend={addPath:function(e,t){return h(e,t,!0)},loadPath:function(e,t){return h(e,t,!1)}})),"string"==typeof a.ns||Array.isArray(a.ns)||(a.ns=[l]),es.forEach(function(t){e[t]&&(a[t]=eo(eo({},a[t]),e[t]))}),a};let el=e=>"string"==typeof e,eu=()=>{let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},ec=e=>null==e?"":""+e,eh=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ed=/###/g,ep=e=>e&&e.indexOf("###")>-1?e.replace(ed,"."):e,ef=e=>!e||el(e),eg=(e,t,n)=>{let r=el(t)?t.split("."):t,i=0;for(;i<r.length-1;){if(ef(e))return{};let t=ep(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ef(e)?{}:{obj:e,k:ep(r[i])}},em=(e,t,n)=>{let{obj:r,k:i}=eg(e,t,Object);if(void 0!==r||1===t.length){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=eg(e,s,Object);for(;void 0===a.obj&&s.length;)o=`${s[s.length-1]}.${o}`,(a=eg(e,s=s.slice(0,s.length-1),Object))&&a.obj&&void 0!==a.obj[`${a.k}.${o}`]&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},ev=(e,t,n,r)=>{let{obj:i,k:o}=eg(e,t,Object);i[o]=i[o]||[],i[o].push(n)},ey=(e,t)=>{let{obj:n,k:r}=eg(e,t);if(n)return n[r]},e_=(e,t,n)=>{let r=ey(e,n);return void 0!==r?r:ey(t,n)},eb=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?el(e[r])||e[r]instanceof String||el(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):eb(e[r],t[r],n):e[r]=t[r]);return e},ew=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ek={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let eC=e=>el(e)?e.replace(/[&<>"'\/]/g,e=>ek[e]):e;class eS{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}let eE=[" ",",","?","!",";"],ex=new eS(20),eI=(e,t,n)=>{t=t||"",n=n||"";let r=eE.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let i=ex.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!i.test(e);if(!o){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(o=!0)}return o},eT=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let r=t.split(n),i=e;for(let e=0;e<r.length;){let t;if(!i||"object"!=typeof i)return;let o="";for(let s=e;s<r.length;++s)if(s!==e&&(o+=n),o+=r[s],void 0!==(t=i[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&s<r.length-1)continue;e+=s-e+1;break}i=t}return i},eP=e=>e&&e.replace("_","-"),eO={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class eR{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||eO,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(el(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new eR(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new eR(this.logger,e)}}var eN=new eR;class eA{constructor(){this.observers={}}
1on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(t=>{let[r,i]=t;for(let t=0;t<i;t++)r.apply(r,[e,...n])})}}class eL extends eA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):el(n)&&o?r.push(...n.split(o)):r.push(n)));let a=ey(this.data,r);return(!a&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!a&&s&&el(n))?eT(this.data&&this.data[e]&&this.data[e][t],n,o):a}addResource(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[e,t];
1n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),em(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let r in n)(el(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=ey(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?eb(a,n,i):a={...a,...n},em(this.data,s,a),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var eD={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,i))}),t}};let eM={};class ej extends eA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),eh(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=eN.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!eI(e,n,r);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:el(i)?[i]:i};let o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(r)}return{key:e,namespaces:el(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:o,namespaces:s}=this.extractFromKey(e[e.length-1],t),a=s[s.length-1],l=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(u){let e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${a}${e}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:o}let c=this.resolve(e,t),h=c&&c.res,d=c&&c.usedKey||o,p=c&&c.exactUsedKey||o,f=Object.prototype.toString.apply(h),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!el(h)&&"boolean"!=typeof h&&"number"!=typeof h;if(m&&h&&v&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(f)&&!(el(g)&&Array.isArray(h))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,h,{...t,ns:s}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(i){let e=Array.isArray(h),n=e?[]:{},r=e?p:d;for(let e in h)if(Object.prototype.hasOwnProperty.call(h,e)){let o=`${r}${i}${e}`;n[e]=this.translate(o,{...t,joinArrays:!1,ns:s}),n[e]===o&&(n[e]=h[e])}h=n}}else if(m&&el(g)&&Array.isArray(h))(h=h.join(g))&&(h=this.extendTranslation(h,e,t,n));else{let r=!1,s=!1,u=void 0!==t.count&&!el(t.count),d=ej.hasDefaultValue(t),p=u?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&u?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",g=u&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(h)&&d&&(r=!0,h=m),this.isValidLookup(h)||(s=!0,h=o);let v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,y=d&&m!==h&&this.options.updateMissing;if(s||r||y){if(this.logger.log(y?"updateKey":"missingKey",l,a,o,y?m:h),i){let e=this.resolve(o,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);let r=(e,n,r)=>{let i=d&&r!==h?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,i,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,n,i,y,t),this.emit
1("missingKey",e,a,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&u?e.forEach(e=>{let n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>n.indexOf(`${this.options.pluralSeparator}zero`)&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],o+n,t[`defaultValue${n}`]||m)})}):r(e,o,m))}h=this.extendTranslation(h,e,t,c,n),s&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${o}`),(s||r)&&this.options.parseMissingKeyHandler&&(h="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,r?h:void 0):this.options.parseMissingKeyHandler(h))}return r?(c.res=h,c.usedParams=this.getUsedParamsDetails(t),c):h}extendTranslation(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let s;n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=el(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&!el(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):o.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}
1let s=n.postProcess||this.options.postProcess,a=el(s)?[s]:s;return null!=e&&a&&a.length&&!1!==n.applyPostProcessor&&(e=eD.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return el(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let a=this.extractFromKey(e,s),l=a.key;n=l;let u=a.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==s.count&&!el(s.count),h=c&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==s.context&&(el(s.context)||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);u.forEach(e=>{this.isValidLookup(t)||(o=e,!eM[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(eM[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{let o;if(this.isValidLookup(t))return;i=n;let a=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,s);else{let e;c&&(e=this.pluralResolver.getSuffix(n,s.count,s));let t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(a.push(l+e),s.ordinal&&0===e.indexOf(r)&&a.push(l+e.replace(r,this.options.pluralSeparator)),h&&a.push(l+t)),d){let n=`${l}${this.options.contextSeparator}
1${s.context}`;a.push(n),c&&(a.push(n+e),s.ordinal&&0===e.indexOf(r)&&a.push(n+e.replace(r,this.options.pluralSeparator)),h&&a.push(n+t))}}for(;o=a.pop();)this.isValidLookup(t)||(r=o,t=this.getResource(n,e,o,s))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&!el(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}let eF=e=>e.charAt(0).toUpperCase()+e.slice(1);class eZ{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=eN.create("languageUtils")}getScriptPartFromCode(e){if(!(e=eP(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=eP(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(el(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}let t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=eF(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=eF(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=eF(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),el(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return el(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):el(e)&&i(this.formatLanguageCode(e)),n.forEac
1h(e=>{0>r.indexOf(e)&&i(this.formatLanguageCode(e))}),r}}let e$=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],eU={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)},ez=["v1","v2","v3"],eq=["v4"],eW={zero:0,one:1,two:2,few:3,many:4,other:5},eV=()=>{let e={};return e$.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:eU[t.fc]}})}),e};class eB{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=eN.create("pluralResolver"),(!this.options.compatibilityJSON||eq.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=eV(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){let n;let r=eP("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:i})}catch(i){if(!e.match(/-|_/))return;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>
1eW[e]-eW[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));let i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}
1shouldUseIntlApi(){return!ez.includes(this.options.compatibilityJSON)}}let eH=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],o=e_(e,t,n);return!o&&i&&el(n)&&void 0===(o=eT(e,n,r))&&(o=eT(t,n,r)),o},eK=e=>e.replace(/\$/g,"$$$$");class eG{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=eN.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:h,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:eC,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=i?ew(i):o||"{{",this.suffix=s?ew(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?ew(h):d||ew("$t("),this.nestingSuffix=p?ew(p):f||ew(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,o,s;let a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let i=eH(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),o=i.shift().trim(),s=i.join(this.formatSeparator).trim();return this.format(eH(t,a,o,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:o})};this.resetRegExp();let u=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>eK(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?eK(this.escape(e)):eK(e)}].forEach(t=>{for(s=0;i=t.regex.exec(e);){let n=i[1].trim();if(void 0===(o=l(n))){if("function"==typeof u){let t=u(e,i,r);o=el(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(c){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else el(o)||this.useRawValueToEscape||(o=ec(o));let a=t.safeValue(o);if(e=e.replace(i[0],a),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=this.maxReplaces)break}}),e}nest(e,t){let n,r,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),o=`{${r[1]}`;e=r[0];let s=(o=this.interpolate(o,i)).match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];(i=(i={...o}).replace&&!el(i.replace)?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){let e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),a=e,l=!0}if((r=t(s.call(this,n[1].trim(),i),i))&&n[0]===e&&!el(r))return r;el(r)||(r=ec(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=a.reduce((e,t)=>
1this.format(e,t,o.lng,{...o,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}let eY=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);"currency"===t&&0>i.indexOf(":")?n.currency||(n.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?n.range||(n.range=i.trim()):i.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),i=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=i),"false"===i&&(n[o]=!1),"true"===i&&(n[o]=!0),isNaN(i)||(n[o]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},eJ=e=>{let t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});let s=r+JSON.stringify(o),a=t[s];return a||(a=e(eP(r),i),t[s]=a),a(n)}};class eX{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=eN.create("formatter"),this.options=e,this.formats={number:eJ((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:eJ((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:eJ((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:eJ((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:eJ((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=eJ(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&0>i[0].indexOf(")")&&i.find(e=>e.indexOf(")")>-1)){let e=i.findIndex(e=>e.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:o}=eY(t);if(this.formats[i]){let t=e;try{let s=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[i](e,a,{...o,...r,...s})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}}let eQ=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class e0 extends eA{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=eN.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let i={},o={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===o[s]&&(o[s]=!0):(this.state[s]=1,r=!1,void 0===o[s]&&(o[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){let r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&n&&this.store.addResourceBundle(i,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let s={};this.queue.forEach(n=>{ev(n.loaded,[i],o),eQ(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}
1),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:o});return}this.readingCalls++;let s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(s&&a&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*i,o)},i);return}o(s,a)},a=this.backend[n].bind(this.backend);if(2===a.length){try{let n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(e){s(e)}return}return a(e,t,s)}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();el(e)&&(e=this.languageUtils.toResolveHierarchy(e)),el(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],i=n[1];this.read(r,i,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=n&&""!==n){if(this.backend&&this.backend.create){let a={...o,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let i;(i=5===l.length?l(e,t,n,r,a):l(e,t,n,r))&&"function"==typeof i.then?i.then(e=>s(null,e)).catch(s):s(null,i)}catch(e){s(e)}else l(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let e1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),el(e[1])&&(t.defaultValue=e[1]),el(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),e2=e=>(el(e.ns)&&(e.ns=[e.ns]),el(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),el(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),e3=()=>{},e4=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})};class e5 extends eA{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=e2(e),this.services={},this.logger=eN,this.modules={external:[]},e4(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(el(t.ns)?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let r=e1();this.options={...r,...this.options,...e2(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);let i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?eN.init(i(this.modules.logger),this.options):eN.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=eX);let n=new eZ(this.options);this.store=new eL(this.options.resources,this.options);let o=this.services;o.logger=eN,o.resourceStore=this.store,o.languageUtils=n,o.pluralResolver=new eB(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=i(t),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new eG(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new e0(i(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}),this.modules.languageDetector&&(o.languageDetector=i(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=i(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new ej(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit(t,...r)}
1),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=e3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let o=eu(),s=()=>{let e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),o}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e3,n=t,r=el(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=eu();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=e3),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&eD.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let r=eu();this.emit("languageChanging",e);let i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(e,o)=>{o?(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},s=t=>{e||t||!this.services.languageDetector||(t=[]);let n=el(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{o(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;let i=function(e,t){let o,s;if("object"!=typeof t){for(var a=arguments.length,l=Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([e,t].concat(l))}else o={...t};o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);let c=r.options.keySeparator||".";return s=o.keyPrefix&&Array.isArray(e)?e.map(e=>`${o.keyPrefix}${c}${e}`):o.keyPrefix?`${o.keyPrefix}${c}${e}`:e,r.t(s,o)};return el(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(i,e)))}loadNamespaces(e,t){let n=eu();return this.options.ns?(el(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=eu();el(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf((this.services&&this.services.languageUtils||new eZ(e1())).getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new e5(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e3,n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},i=new e5(r);return(void 0!==e.debug||void 0!==e.prefix)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(e=>{i[e]=this[e]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new eL(this.store.data,r),i.services.resourceStore=i.store),i.translator=new ej(i.services,r),i.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit(e,...n)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let e6=e5.createInstance();e6.createInstance=e5.createInstance,e6.createInstance,e6.dir,e6.init,e6.loadResources,e6.reloadResources,e6.use,e6.changeLanguage,e6.getFixedT,e6.t,e6.exists,e6.setDefaultNamespace,e6.hasLoadedNamespace,e6.loadNamespaces,e6.loadLanguages;var e8=function(e){void 0===e.ns&&(e.ns=[]);var t,n,r=e6.createInstance(e);return r.isInitialized?t=Promise.resolve(e6.t):(null==e||null===(n=e.use)||void 0===n||n.forEach(function(e){return r.use(e)}),"function"==typeof e.onPreInitI18next&&e.onPreInitI18next(r),t=r.init(e)),{i18n:r,initPromise:t}},e7=i.createElement;function e9(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 te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e9(Object(n),!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e9(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var tt=function(e,t){if(t&&e.isInitialized)for(var n=0,r=Object.keys(t);n<r.length;n++)for(var i=r[n],o=0,s=Object.keys(t[i]);o<s.length;o++){var a,l=s[o];null!=e&&null!==(a=e.store)&&void 0!==a&&a.data&&e.store.data[i]&&e.store.data[i][l]||e.addResourceBundle(i,l,t[i][l],!0,!0)}},tn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return K()(function(n){var r,o,s=(n.pageProps||{})._nextI18Next,a=null!==(r=null==s?void 0:s.initialLocale)&&void 0!==r?r:null==n||null===(o=n.router)||void 0===o?void 0:o.locale,l=null==s?void 0:s.ns,u=(0,i.useRef)(null),c=(0,i.useMemo)(function(){if(!s&&!t)return null;var e,n=null!=t?t:null==s?void 0:s.userConfig;if(!n)throw Error("appWithTranslation was called without a next-i18next config");if(!(null!=n&&n.i18n))throw Error("appWithTranslation was called without config.i18n");if(!(null!=n&&null!==(e=n.i18n)&&void 0!==e&&e.defaultLocale))throw Error("config.i18n does not include a defaultLocale property");var r=(s||{}).initialI18nStore,i=null!=t&&t.resources?t.resources:r;a||(a=n.i18n.defaultLocale);var o=u.current;return o?tt(o,i):(tt(o=e8(te(te(te({},ea(te(te({},n),{},{lng:a}))),{},{lng:a},l&&{ns:l}),{},{resources:i})).i18n,i),u.current=o),o},[s,a,l]);return et(function(){c&&a&&c.changeLanguage(a)},[c,a]),null!==c?e7(q,{i18n:c},e7(e,n)):e7(e,(0,W.Z)({key:a},n))},e)}},83454:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(33923)}])},60420:function(e,t,n){"use strict";n.d(t,{Cy:function(){return r},E6:function(){return w},Kv:function(){return f},On:function(){return S},P$:function(){return E},Qk:function(){return p},Sp:function(){return b},T0:function(){return T},Wt:function(){return v},Z1:function(){return m},bc:function(){return d},bz:function(){return i},cp:function(){return C},dX:function(){return _},fo:function(){return o},gW:function(){return s},jG:function(){return I},kN:function(){return y},lK:function(){return h},qO:function(){return x},u0:function(){return l},uy:function(){return g},wF:function(){return a},wi:function(){return c},wq:function(){return u},xe:function(){return k}});let r="start_featured_course_homepage",i="view_english_course_homepage",o="view_skills_course_homepage",s="view_live_course_homepage",a="percent_complete_course_50",l="percent_complete_course_100",u="request_certificate_course",c="stripe_purchase_success",h="user_logout",d="user_login",p="user_signup",f="user_password_reset",g="view_my_courses",m="view_my_course_details",v="view_lesson_map",y="view_placement_test",_="view_cambridge_package",b="cambridge_hubspot_success",w="refund_request_success",k="view_profile",C="view_course_details",S="view_reports_page",E="no_of_registrations",x="no_of_start_learning",I="no_of_complete_module",T="no_of_complete_course"},65033:function(e,t,n){"use strict";n.d(t,{Vo:function(){return u},Yi:function(){return c},fZ:function(){return h},kV:function(){return d},ni:function(){return p},uT:function(){return f}});var r=n(67294),i=n(78986),o=n(81517),s=n(53059),a=n(80785),l=n(60420);let u=(0,r.createContext)({user:null});async function c(e){let{email:t,password:n}
1=e,r=await (0,o.Xb)(i.I8,t,n);return(0,s.Iv)(i.co,r.user.uid),(0,a.z)(l.Qk,{provider:"email"}),r}async function h(e){let{email:t,password:n}=e,r=await (0,o.e5)(i.I8,t,n);return(0,s.Iv)(i.co,r.user.uid),(0,a.z)(l.bc,{authProvider:"email"}),r}async function d(){let e=new o.hJ;return await (0,o.rh)(i.I8,e)}async function p(){(0,a.z)(l.lK),await (0,o.w7)(i.I8)}async function f(e){let t=await (0,o.LS)(i.I8,e);return(0,a.z)(l.Kv),t}},78986:function(e,t,n){"use strict";let r;n.d(t,{co:function(){return r},I8:function(){return c},db:function(){return h}});var i=n(32238);(0,i.KN)("firebase","10.14.1","app");var o=n(81517),s=n(89355),a=n(77004),l=n(53059);let u=(0,i.ZF)({apiKey:"AIzaSyCQ68uGVwK2fkuyldHUblErz1oWJ3bN1uA",authDomain:"sols-edu-pro.firebaseapp.com",databaseURL:"https://sols-edu-pro.firebaseio.com",projectId:"sols-edu-pro",storageBucket:"sols-edu-pro.appspot.com",messagingSenderId:"945196301069",appId:"1:945196301069:web:f1d57de523224eaa",measurementId:"G-3G7BET1XKH"}),c=(0,o.v0)(u),h=(0,s.N8)(u);(0,a.$C)(u),u.name&&(r=(0,l.IH)(u))},55895:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(94780),l=n(77527),u=n(44001),c=n(13077),h=n(85893),d=(0,c.Z)((0,h.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"),p=n(1588),f=n(34867);function g(e){return(0,f.ZP)("MuiAvatar",e)}(0,p.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var m=n(39583);let v=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],y=e=>{let{classes:t,variant:n,colorDefault:r}=e;return(0,a.Z)({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},g,t)},_=(0,l.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{let{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,i.Z)({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:(0,i.Z)({backgroundColor:t.palette.grey[400]},t.applyStyles("dark",{backgroundColor:t.palette.grey[600]})))}]}}),b=(0,l.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),w=(0,l.ZP)(d,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});var k=o.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiAvatar"}),{alt:a,children:l,className:c,component:d="div",slots:p={},slotProps:f={},imgProps:g,sizes:k,src:C,srcSet:S,variant:E="circular"}=n,x=(0,r.Z)(n,v),I=null,T=function(e){let{crossOrigin:t,referrerPolicy:n,src:r,srcSet:i}=e,[s,a]=o.useState(!1);return o.useEffect(()=>{if(!r&&!i)return;a(!1);let e=!0,o=new Image;return o.onload=()=>{e&&a("loaded")},o.onerror=()=>{e&&a("error")},o.crossOrigin=t,o.referrerPolicy=n,o.src=r,i&&(o.srcset=i),()=>{e=!1}},[t,n,r,i]),s}((0,i.Z)({},g,{src:C,srcSet:S})),P=C||S,O=P&&"error"!==T,R=(0,i.Z)({},n,{colorDefault:!O,component:d,variant:E}),N=y(R),[A,L]=(0,m.Z)("img",{className:N.img,elementType:b,externalForwardedProps:{slots:p,slotProps:{img:(0,i.Z)({},g,f.img)}},additionalProps:{alt:a,src:C,srcSet:S,sizes:k},ownerState:R});return I=O?(0,h.jsx)(A,(0,i.Z)({},L)):l||0===l?l:P&&a?a[0]:(0,h.jsx)(w,{ownerState:R,className:N.fallback}),(0,h.jsx)(_,(0,i.Z)({as:d,ownerState:R,className:(0,s.Z)(N.root,c),ref:t},x,{children:I}))})},14312:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(94780),l=n(77527),u=n(44001),c=n(80539),h=n(1588),d=n(34867);function p(e){return(0,d.ZP)("MuiBackdrop",e)}(0,h.Z)("MuiBackdrop",["root","invisible"]);var f=n(85893);let g=["children","className","component","components","componentsProps","invisible","open","slotProps","
1slots","TransitionComponent","transitionDuration"],m=e=>{let{classes:t,invisible:n}=e;return(0,a.Z)({root:["root",n&&"invisible"]},p,t)},v=(0,l.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,i.Z)({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"})});var y=o.forwardRef(function(e,t){var n,o,a;let l=(0,u.i)({props:e,name:"MuiBackdrop"}),{children:h,className:d,component:p="div",components:y={},componentsProps:_={},invisible:b=!1,open:w,slotProps:k={},slots:C={},TransitionComponent:S=c.Z,transitionDuration:E}=l,x=(0,r.Z)(l,g),I=(0,i.Z)({},l,{component:p,invisible:b}),T=m(I),P=null!=(n=k.root)?n:_.root;return(0,f.jsx)(S,(0,i.Z)({in:w,timeout:E},x,{children:(0,f.jsx)(v,(0,i.Z)({"aria-hidden":!0},P,{as:null!=(o=null!=(a=C.root)?a:y.Root)?o:p,className:(0,s.Z)(T.root,d,null==P?void 0:P.className),ownerState:(0,i.Z)({},I,null==P?void 0:P.ownerState),classes:T,ref:t,children:h}))}))})},60990:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),i=n(63366),o=n(67294),s=n(90512),a=n(49731),l=n(86523),u=n(39707),c=n(96682),h=n(85893);let d=["className","component"];var p=n(37078),f=n(72799),g=n(88439);let m=(0,n(1588).Z)("MuiBox",["root"]),v=(0,f.Z)();var y=function(e={}){let{themeId:t,defaultTheme:n,defaultClassName:p="MuiBox-root",generateClassName:f}=e,g=(0,a.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.Z);return o.forwardRef(function(e,o){let a=(0,c.Z)(n),l=(0,u.Z)(e),{className:m,component:v="div"}=l,y=(0,i.Z)(l,d);return(0,h.jsx)(g,(0,r.Z)({as:v,ref:o,className:(0,s.Z)(m,f?f(p):p),theme:t&&a[t]||a},y))})}({themeId:g.Z,defaultTheme:v,defaultClassName:m.root,generateClassName:p.Z.generate})},84677:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(35971),l=n(94780),u=n(2101),c=n(77527),h=n(83008),d=n(44001),p=n(3153),f=n(66643),g=n(1588),m=n(34867);function v(e){return(0,m.ZP)("MuiButton",e)}let y=(0,g.Z)("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"]),_=o.createContext({}),b=o.createContext(void 0);var w=n(85893);let k=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],C=e=>{let{color:t,disableElevation:n,fullWidth:r,size:o,variant:s,classes:a}=e,u={root:["root",s,"".concat(s).concat((0,f.Z)(t)),"size".concat((0,f.Z)(o)),"".concat(s,"Size").concat((0,f.Z)(o)),"color".concat((0,f.Z)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,f.Z)(o))],endIcon:["icon","endIcon","iconSize".concat((0,f.Z)(o))]},c=(0,l.Z)(u,v,a);return(0,i.Z)({},a,c)},S=e=>(0,i.Z)({},"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}}),E=(0,c.ZP)(p.Z,{shouldForwardProp:e=>(0,h.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,f.Z)(n.color))],t["size".concat((0,f.Z)(n.size))],t["".concat(n.variant,"Size").concat((0,f.Z)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{var t,n;let{theme:r,ownerState:o}=e,s="light"===r.palette.mode?r.palette.grey[300]:r.palette.grey[800],a="light"===r.palette.mode?r.palette.grey.A100:r.palette.grey[700];return(0,i.Z)({},r.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(r.vars||r).shape.borderRadius,transition:r.transitions.create(["background-color","box-shadow","border-color","color"],{duration:r.transitions.duration.short}),"&:hover":(0,i.Z)({textDecoration:"none",backgroundColor:r.vars?"rgba(".concat(r.vars.palette.text.primaryChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):(0,u.Fq)(r.palette.text.primary,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===o.variant&&"inherit"!==o.color&&{backgroundColor:r.vars?"rgba(".concat(r.vars.palette[o.
1color].mainChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):(0,u.Fq)(r.palette[o.color].main,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===o.variant&&"inherit"!==o.color&&{border:"1px solid ".concat((r.vars||r).palette[o.color].main),backgroundColor:r.vars?"rgba(".concat(r.vars.palette[o.color].mainChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):(0,u.Fq)(r.palette[o.color].main,r.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===o.variant&&{backgroundColor:r.vars?r.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(r.vars||r).shadows[4],"@media (hover: none)":{boxShadow:(r.vars||r).shadows[2],backgroundColor:(r.vars||r).palette.grey[300]}},"contained"===o.variant&&"inherit"!==o.color&&{backgroundColor:(r.vars||r).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(r.vars||r).palette[o.color].main}}),"&:active":(0,i.Z)({},"contained"===o.variant&&{boxShadow:(r.vars||r).shadows[8]}),["&.".concat(y.focusVisible)]:(0,i.Z)({},"contained"===o.variant&&{boxShadow:(r.vars||r).shadows[6]}),["&.".concat(y.disabled)]:(0,i.Z)({color:(r.vars||r).palette.action.disabled},"outlined"===o.variant&&{border:"1px solid ".concat((r.vars||r).palette.action.disabledBackground)},"contained"===o.variant&&{color:(r.vars||r).palette.action.disabled,boxShadow:(r.vars||r).shadows[0],backgroundColor:(r.vars||r).palette.action.disabledBackground})},"text"===o.variant&&{padding:"6px 8px"},"text"===o.variant&&"inherit"!==o.color&&{color:(r.vars||r).palette[o.color].main},"outlined"===o.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===o.variant&&"inherit"!==o.color&&{color:(r.vars||r).palette[o.color].main,border:r.vars?"1px solid rgba(".concat(r.vars.palette[o.
1color].mainChannel," / 0.5)"):"1px solid ".concat((0,u.Fq)(r.palette[o.color].main,.5))},"contained"===o.variant&&{color:r.vars?r.vars.palette.text.primary:null==(t=(n=r.palette).getContrastText)?void 0:t.call(n,r.palette.grey[300]),backgroundColor:r.vars?r.vars.palette.Button.inheritContainedBg:s,boxShadow:(r.vars||r).shadows[2]},"contained"===o.variant&&"inherit"!==o.color&&{color:(r.vars||r).palette[o.color].contrastText,backgroundColor:(r.vars||r).palette[o.color].main},"inherit"===o.color&&{color:"inherit",borderColor:"currentColor"},"small"===o.size&&"text"===o.variant&&{padding:"4px 5px",fontSize:r.typography.pxToRem(13)},"large"===o.size&&"text"===o.variant&&{padding:"8px 11px",fontSize:r.typography.pxToRem(15)},"small"===o.size&&"outlined"===o.variant&&{padding:"3px 9px",fontSize:r.typography.pxToRem(13)},"large"===o.size&&"outlined"===o.variant&&{padding:"7px 21px",fontSize:r.typography.pxToRem(15)},"small"===o.size&&"contained"===o.variant&&{padding:"4px 10px",fontSize:r.typography.pxToRem(13)},"large"===o.size&&"contained"===o.variant&&{padding:"8px 22px",fontSize:r.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(y.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(y.disabled)]:{boxShadow:"none"}}}),x=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,f.Z)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,i.Z)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},S(t))}),I=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,f.Z)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,i.Z)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},S(t))});var T=o.forwardRef(function(e,t){let n=o.useContext(_),l=o.useContext(b),u=(0,a.Z)(n,e),c=(0,d.i)({props:u,name:"MuiButton"}),{children:h,color:p="primary",component:f="button",className:g,disabled:m=!1,disableElevation:v=!1,disableFocusRipple:y=!1,endIcon:S,focusVisibleClassName:T,fullWidth:P=!1,size:O="medium",startIcon:R,type:N,variant:A="text"}=c,L=(0,r.Z)(c,k),D=(0,i.Z)({},c,{color:p,component:f,disabled:m,disableElevation:v,disableFocusRipple:y,fullWidth:P,size:O,type:N,variant:A}),M=C(D),j=R&&(0,w.jsx)(x,{className:M.startIcon,ownerState:D,children:R}),F=S&&(0,w.jsx)(I,{className:M.endIcon,ownerState:D,children:S});return(0,w.jsxs)(E,(0,i.Z)({ownerState:D,className:(0,s.Z)(n.className,M.root,g,l||""),component:f,disabled:m,focusRipple:!y,focusVisibleClassName:(0,s.Z)(M.focusVisible,T),ref:t,type:N},L,{classes:M,children:[j,h,F]}))})},3153:function(e,t,n){"use strict";let r,i,o,s;n.d(t,{Z:function(){return B}});var a=n(87462),l=n(63366),u=n(67294),c=n(90512),h=n(94780),d=n(77527),p=n(44001),f=n(7491),g=n(30403),m=n(79310),v=n(82729),y=n(75068),_=n(220);function b(e,t){var n=Object.create(null);return e&&u.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,u.isValidElement)(e)?t(e):e}),n}function w(e,t,n){return null!=n[t]?n[t]:e.props[t]}var k=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},C=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,y.Z)(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,i=t.children,o=t.handleExited;
1return{children:t.firstRender?b(e.children,function(t){return(0,u.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:w(t,"appear",e),enter:w(t,"enter",e),exit:w(t,"exit",e)})}):(Object.keys(r=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 u=i[l][r];a[i[l][r]]=n(u)}a[l]=n(l)}for(r=0;r<o.length;r++)a[o[r]]=n(o[r]);return a}(i,n=b(e.children))).forEach(function(t){var s=r[t];if((0,u.isValidElement)(s)){var a=t in i,l=t in n,c=i[t],h=(0,u.isValidElement)(c)&&!c.props.in;l&&(!a||h)?r[t]=(0,u.cloneElement)(s,{onExited:o.bind(null,s),in:!0,exit:w(s,"exit",e),enter:w(s,"enter",e)}):l||!a||h?l&&a&&(0,u.isValidElement)(c)&&(r[t]=(0,u.cloneElement)(s,{onExited:o.bind(null,s),in:c.props.in,exit:w(s,"exit",e),enter:w(s,"enter",e)})):r[t]=(0,u.cloneElement)(s,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=b(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,a.Z)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,l.Z)(e,["component","childFactory"]),i=this.state.contextValue,o=k(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?u.createElement(_.Z.Provider,{value:i},o):u.createElement(_.Z.Provider,{value:i},u.createElement(t,r,o))},t}(u.Component);C.propTypes={},C.defaultProps={component:"div",childFactory:function(e){return e}};var S=n(70917),E=n(46271),x=n(85893),I=n(1588);let T=(0,I.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);function P(){let e=(0,v._)(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"]);return P=function(){return e},e}function O(){let e=(0,v._)(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"]);return O=function(){return e},e}function R(){let e=(0,v._)(["\n  0% {\n    transform: scale(1);\n  }\n\n  50% {\n    transform: scale(0.92);\n  }\n\n  100% {\n    transform: scale(1);\n  }\n"]);return R=function(){return e},e}function N(){let e=(0,v._)(["\n  opacity: 0;\n  position: absolute;\n\n  &."," {\n    opacity: 0.3;\n    transform: scale(1);\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  &."," {\n    animation-duration: ","ms;\n  }\n\n  & ."," {\n    opacity: 1;\n    display: block;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%;\n    background-color: currentColor;\n  }\n\n  & ."," {\n    opacity: 0;\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  & ."," {\n    position: absolute;\n    /* @noflip */\n    left: 0px;\n    top: 0;\n    animation-name: ",";\n    animation-duration: 2500ms;\n    animation-timing-function: ",";\n    animation-iteration-count: infinite;\n    animation-delay: 200ms;\n  }\n"]);return N=function(){return e},e}let A=["center","classes","className"],L=(0,S.F4)(r||(r=P())),D=(0,S.F4)(i||(i=O())),M=(0,S.F4)(o||(o=R())),j=(0,d.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),F=(0,d.ZP)(function(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:h}=e,[d,p]=u.useState(!1),f=(0,c.Z)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g=(0,c.Z)(n.child,d&&n.childLeaving,r&&n.childPulsate);return a||d||p(!0),u.useEffect(()=>{if(!a&&null!=l){let e=setTimeout(l,h);return()=>{clearTimeout(e)}}},[l,a,h]),(0,x.jsx)("span",{className:f,style:{width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},children:(0,x.jsx)("span",{className:g})})},{name:"MuiTouchRipple",slot:"Ripple"})(s||(s=N()),T.rippleVisible,L,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},T.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},T.child,T.childLeaving,D,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},T.childPulsate,M,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),Z=u.forwardRef(function(e,t){let n=(0,p.i)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,s=(0,l.Z)(n,A),[h,d]=u.useState([]),f=u.useRef(0),g=u.useRef(null);u.useEffect(()=>{g.current&&(g.current(),g.current=null)},[h]);let m=u.useRef(!1),v=(0,E.Z)(),y=u.useRef(null),_=u.useRef(null),b=u.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:s}=e;d(e=>[...e,(0,x.jsx)(F,{classes:{ripple:(0,c.Z)(i.ripple,T.ripple),rippleVisible:(0,c.Z)(i.rippleVisible,T.rippleVisible),ripplePulsate:(0,c.Z)(i.ripplePulsate,T.ripplePulsate),
1child:(0,c.Z)(i.child,T.child),childLeaving:(0,c.Z)(i.childLeaving,T.childLeaving),childPulsate:(0,c.Z)(i.childPulsate,T.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},f.current)]),f.current+=1,g.current=s},[i]),w=u.useCallback(function(){let e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},{pulsate:a=!1,center:l=r||o.pulsate,fakeElement:u=!1}=o;if((null==i?void 0:i.type)==="mousedown"&&m.current){m.current=!1;return}(null==i?void 0:i.type)==="touchstart"&&(m.current=!0);let c=u?null:_.current,h=c?c.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(!l&&void 0!==i&&(0!==i.clientX||0!==i.clientY)&&(i.clientX||i.touches)){let{clientX:n,clientY:r}=i.touches&&i.touches.length>0?i.touches[0]:i;e=Math.round(n-h.left),t=Math.round(r-h.top)}else e=Math.round(h.width/2),t=Math.round(h.height/2);l?(n=Math.sqrt((2*h.width**2+h.height**2)/3))%2==0&&(n+=1):n=Math.sqrt((2*Math.max(Math.abs((c?c.clientWidth:0)-e),e)+2)**2+(2*Math.max(Math.abs((c?c.clientHeight:0)-t),t)+2)**2),null!=i&&i.touches?null===y.current&&(y.current=()=>{b({pulsate:a,rippleX:e,rippleY:t,rippleSize:n,cb:s})},v.start(80,()=>{y.current&&(y.current(),y.current=null)})):b({pulsate:a,rippleX:e,rippleY:t,rippleSize:n,cb:s})},[r,b,v]),k=u.useCallback(()=>{w({},{pulsate:!0})},[w]),S=u.useCallback((e,t)=>{if(v.clear(),(null==e?void 0:e.type)==="touchend"&&y.current){y.current(),y.current=null,v.start(0,()=>{S(e,t)});return}y.current=null,d(e=>e.length>0?e.slice(1):e),g.current=t},[v]);return u.useImperativeHandle(t,()=>({pulsate:k,start:w,stop:S}),[k,w,S]),(0,x.jsx)(j,(0,a.Z)({className:(0,c.Z)(T.root,i.root,o),ref:_},s,{children:(0,x.jsx)(C,{component:null,exit:!0,children:h})}))});var $=n(34867);function U(e){return(0,$.ZP)("MuiButtonBase",e)}let z=(0,I.Z)("MuiButtonBase",["root","disabled","focusVisible"]),q=["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"],W=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=(0,h.Z)({root:["root",t&&"disabled",n&&"focusVisible"]},U,i);return n&&r&&(o.root+=" ".concat(r)),o},V=(0,d.ZP)("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"},["&.".concat(z.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var B=u.forwardRef(function(e,t){let n=(0,p.i)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:s,component:h="button",disabled:d=!1,disableRipple:v=!1,disableTouchRipple:y=!1,focusRipple:_=!1,LinkComponent:b="a",onBlur:w,onClick:k,onContextMenu:C,onDragLeave:S,onFocus:E,onFocusVisible:I,onKeyDown:T,onKeyUp:P,onMouseDown:O,onMouseLeave:R,onMouseUp:N,onTouchEnd:A,onTouchMove:L,onTouchStart:D,tabIndex:M=0,TouchRippleProps:j,touchRippleRef:F,type:$}=n,U=(0,l.Z)(n,q),z=u.useRef(null),B=u.useRef(null),H=(0,f.Z)(B,F),{isFocusVisibleRef:K,onFocus:G,onBlur:Y,ref:J}=(0,m.Z)(),[X,Q]=u.useState(!1);d&&X&&Q(!1),u.useImperativeHandle(r,()=>({focusVisible:()=>{Q(!0),z.current.focus()}}),[]);let[ee,et]=u.useState(!1);u.useEffect(()=>{et(!0)},[]);let en=ee&&!v&&!d;function er(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return(0,g.Z)(r=>(t&&t(r),!n&&B.current&&B.current[e](r),!0))}u.useEffect(()=>{X&&_&&!v&&ee&&B.current.pulsate()},[v,_,X,ee]);let ei=er("start",O),eo=er("stop",C),es=er("stop",S),ea=er("stop",N),el=er("stop",e=>{X&&e.preventDefault(),R&&R(e)}),eu=er("start",D),ec=er("stop",A),eh=er("stop",L),ed=er("stop",e=>{Y(e),!1===K.current&&Q(!1),w&&w(e)},!1),ep=(0,g.Z)(e=>{z.current||(z.current=e.currentTarget),G(e),!0===K.current&&(Q(!0),I&&I(e)),E&&E(e)}),ef=()=>{let e=z.current;return h&&"button"!==h&&!("A"===e.tagName&&e.href)},eg=u.useRef(!1),em=(0,g.Z)(e=>{_&&!eg.current&&X&&B.current&&" "===e.key&&(eg.current=!0,B.current.stop(e,()=>{B.current.start(e)})),e.target===e.currentTarget&&ef()&&" "===e.key&&e.preventDefault(),T&&T(e),e.target===e.currentTarget&&ef()&&"Enter"===e.key&&!d&&(e.preventDefault(),k&&k(e))}),ev=(0,g.Z)(e=>{_&&" "===e.key&&B.current&&X&&!e.defaultPrevented&&(eg.current=!1,B.current.stop(e,()=>{B.current.pulsate(e)})),P&&P(e),k&&e.target===e.currentTarget&&ef()&&" "===e.key&&!e.defaultPrevented&&k(e)}),ey=h;"button"===ey&&(U.href||U.to)&&(ey=b);let e_={};"button"===ey?(e_.type=void 0===$?"button":$,e_.disabled=d):(U.href||U.to||(e_.role="button"),d&&(e_["aria-disabled"]=d));let eb=(0,f.Z)(t,J,z),ew=(0,a.Z)({},n,{centerRipple:i,component:h,disabled:d,disableRipple:v,disableTouchRipple:y,focusRipple:_,tabIndex:M,focusVisible:X}),ek=W(ew);
1return(0,x.jsxs)(V,(0,a.Z)({as:ey,className:(0,c.Z)(ek.root,s),ownerState:ew,onBlur:ed,onClick:k,onContextMenu:eo,onFocus:ep,onKeyDown:em,onKeyUp:ev,onMouseDown:ei,onMouseLeave:el,onMouseUp:ea,onDragLeave:es,onTouchEnd:ec,onTouchMove:eh,onTouchStart:eu,ref:eb,tabIndex:d?-1:M,type:$},e_,U,{children:[o,en?(0,x.jsx)(Z,(0,a.Z)({ref:H,center:i},j)):null]}))})},60762:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(87462),i=n(63366),o=n(67294),s=n(90512),a=n(94780),l=n(77527),u=n(44001),c=n(93454),h=n(1588),d=n(34867);function p(e){return(0,d.ZP)("MuiCard",e)}(0,h.Z)("MuiCard",["root"]);var f=n(85893);let g=["className","raised"],m=e=>{let{classes:t}=e;return(0,a.Z)({root:["root"]},p,t)},v=(0,l.ZP)(c.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"}));var y=o.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiCard"}),{className:o,raised:a=!1}=n,l=(0,i.Z)(n,g),c=(0,r.Z)({},n,{raised:a}),h=m(c);return(0,f.jsx)(v,(0,r.Z)({className:(0,s.Z)(h.root,o),elevation:a?8:void 0,ref:t,ownerState:c},l))})},44001:function(e,t,n){"use strict";n.d(t,{i:function(){return i}}),n(67294);var r=n(32842);function i(e){return(0,r.i)(e)}n(85893)},80539:function(e,t,n){"use strict";var r=n(87462),i=n(63366),o=n(67294),s=n(8662),a=n(57907),l=n(18745),u=n(93232),c=n(7491),h=n(85893);let d=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],p={entering:{opacity:1},entered:{opacity:1}},f=o.forwardRef(function(e,t){let n=(0,l.Z)(),f={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:g,appear:m=!0,children:v,easing:y,in:_,onEnter:b,onEntered:w,onEntering:k,onExit:C,onExited:S,onExiting:E,style:x,timeout:I=f,TransitionComponent:T=s.ZP}=e,P=(0,i.Z)(e,d),O=o.useRef(null),R=(0,c.Z)(O,(0,a.Z)(v),t),N=e=>t=>{if(e){let n=O.current;void 0===t?e(n):e(n,t)}},A=N(k),L=N((e,t)=>{(0,u.n)(e);let r=(0,u.C)({style:x,timeout:I,easing:y},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),b&&b(e,t)}),D=N(w),M=N(E),j=N(e=>{let t=(0,u.C)({style:x,timeout:I,easing:y},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),C&&C(e)}),F=N(S);return(0,h.jsx)(T,(0,r.Z)({appear:m,in:_,nodeRef:O,onEnter:L,onEntered:D,onEntering:A,onExit:j,onExited:F,onExiting:M,addEndListener:e=>{g&&g(O.current,e)},timeout:I},P,{children:(e,t)=>o.cloneElement(v,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||_?void 0:"hidden"},p[e],x,v.props.style),ref:R},t))}))});t.Z=f},93535:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(94780),l=n(82963),u=n(33703),c=n(57907),h=n(82690),d=n(85893);function p(e){let t=[],n=[];return Array.from(e.querySelectorAll('input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])')).forEach((e,r)=>{let i=function(e){let 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||e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;let t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t)),n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==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 f(){return!0}var g=function(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=p,isEnabled:a=f,open:l}=e,g=o.useRef(!1),m=o.useRef(null),v=o.useRef(null),y=o.useRef(null),_=o.useRef(null),b=o.useRef(!1),w=o.useRef(null),k=(0,u.Z)((0,c.Z)(t),w),C=o.useRef(null);o.useEffect(()=>{l&&w.current&&(b.current=!n)},[n,l]),o.useEffect(()=>{if(!l||!w.current)return;let e=(0,h.Z)(w.current);return!w.current.contains(e.activeElement)&&(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),b.current&&w.current.focus()),()=>{i||(y.current&&y.current.focus&&(g.current=!0,y.current.focus()),y.current=null)}},[l]),o.useEffect(()=>{if(!l||!w.current)return;let e=(0,h.Z)(w.current),t=t=>{C.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===w.current&&t.shiftKey&&(g.current=!0,v.current&&v.current.focus())},n=()=>{let t=w.current;if(null===t)return;if(!e.hasFocus()||!a()||g.current){g.current=!1;return}if(t.contains(e.activeElement)||r&&e.activeElement!==m.current&&e.activeElement!==v.current)return;if(e.activeElement!==_.current)_.current=null;else if(null!==_.current)return;if(!b.current)return;let n=[];if((e.activeElement===m.current||e.activeElement===v.current)&&(n=s(w.
1current)),n.length>0){var i,o;let e=!!((null==(i=C.current)?void 0:i.shiftKey)&&(null==(o=C.current)?void 0:o.key)==="Tab"),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);let i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,l,s]);let S=e=>{null===y.current&&(y.current=e.relatedTarget),b.current=!0};return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("div",{tabIndex:l?0:-1,onFocus:S,ref:m,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:k,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),b.current=!0,_.current=e.target;let n=t.props.onFocus;n&&n(e)}}),(0,d.jsx)("div",{tabIndex:l?0:-1,onFocus:S,ref:v,"data-testid":"sentinelEnd"})]})},m=n(75725),v=n(77527),y=n(44001),_=n(14312),b=n(59948),w=n(91476),k=n(99113),C=n(74161),S=n(29726);function E(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,C.Z)(e).getComputedStyle(e).paddingRight,10)||0}function I(e,t,n,r,i){let o=[t,n,...r];[].forEach.call(e.children,e=>{let t=-1===o.indexOf(e),n=!function(e){let 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&&E(e,i)})}function T(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}class P{add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&E(e.modalRef,!1);let r=function(e){let t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);I(t,e.mount,e.modalRef,r,!0);let i=T(this.containers,e=>e.container===t);return -1!==i?this.containers[i].modals.push(e):this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n}mount(e,t){let n=T(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e;if(function(e){let t=(0,h.Z)(e);return t.body===e?(0,C.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){let e=(0,S.Z)((0,h.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(x(r)+e,"px");let t=(0,h.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(x(t)+e,"px")})}if(r.parentNode instanceof DocumentFragment)e=(0,h.Z)(r).body;else{let t=r.parentElement,n=(0,C.Z)(r);e=(null==t?void 0:t.nodeName)==="HTML"&&"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)})}}(r,t))}remove(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=this.modals.indexOf(e);if(-1===n)return n;let r=T(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&&E(e.modalRef,t),I(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&E(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}}let O=new P;var R=function(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:s=O,closeAfterTransition:a=!1,onTransitionEnter:l,onTransitionExited:c,children:d,onClose:p,open:f,rootRef:g}=e,m=o.useRef({}),v=o.useRef(null),y=o.useRef(null),_=(0,u.Z)(y,g),[C,S]=o.useState(!f),x=!!d&&d.props.hasOwnProperty("in"),I=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(I=!1);let T=()=>(0,h.Z)(v.current),P=()=>(m.current.modalRef=y.current,m.current.mount=v.current,m.current),R=()=>{s.mount(P(),{disableScrollLock:r}),y.current&&(y.current.scrollTop=0)},N=(0,b.Z)(()=>{let e=("function"==typeof t?t():t)||T().body;
1s.add(P(),e),y.current&&R()}),A=o.useCallback(()=>s.isTopModal(P()),[s]),L=(0,b.Z)(e=>{v.current=e,e&&(f&&A()?R():y.current&&E(y.current,I))}),D=o.useCallback(()=>{s.remove(P(),I)},[I,s]);o.useEffect(()=>()=>{D()},[D]),o.useEffect(()=>{f?N():x&&a||D()},[f,D,x,a,N]);let M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&A()&&!n&&(t.stopPropagation(),p&&p(t,"escapeKeyDown"))},j=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&p&&p(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,k.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r=(0,i.Z)({},n,t);return(0,i.Z)({role:"presentation"},r,{onKeyDown:M(r),ref:_})},getBackdropProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)({"aria-hidden":!0},e,{onClick:j(e),open:f})},getTransitionProps:()=>({onEnter:(0,w.Z)(()=>{S(!1),l&&l()},null==d?void 0:d.props.onEnter),onExited:(0,w.Z)(()=>{S(!0),c&&c(),a&&D()},null==d?void 0:d.props.onExited)}),rootRef:_,portalRef:L,isTopModal:A,exited:C,hasTransition:x}},N=n(1588),A=n(34867);function L(e){return(0,A.ZP)("MuiModal",e)}(0,N.Z)("MuiModal",["root","hidden","backdrop"]);let D=["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"],M=e=>{let{open:t,exited:n,classes:r}=e;return(0,a.Z)({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},L,r)},j=(0,v.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,i.Z)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),F=(0,v.ZP)(_.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1});var Z=o.forwardRef(function(e,t){var n,a,u,c,h,p;let f=(0,y.i)({name:"MuiModal",props:e}),{BackdropComponent:v=F,BackdropProps:_,className:b,closeAfterTransition:w=!1,children:k,container:C,component:S,components:E={},componentsProps:x={},disableAutoFocus:I=!1,disableEnforceFocus:T=!1,disableEscapeKeyDown:P=!1,disablePortal:O=!1,disableRestoreFocus:N=!1,disableScrollLock:A=!1,hideBackdrop:L=!1,keepMounted:Z=!1,onBackdropClick:$,open:U,slotProps:z,slots:q}=f,W=(0,r.Z)(f,D),V=(0,i.Z)({},f,{closeAfterTransition:w,disableAutoFocus:I,disableEnforceFocus:T,disableEscapeKeyDown:P,disablePortal:O,disableRestoreFocus:N,disableScrollLock:A,hideBackdrop:L,keepMounted:Z}),{getRootProps:B,getBackdropProps:H,getTransitionProps:K,portalRef:G,isTopModal:Y,exited:J,hasTransition:X}=R((0,i.Z)({},V,{rootRef:t})),Q=(0,i.Z)({},V,{exited:J}),ee=M(Q),et={};if(void 0===k.props.tabIndex&&(et.tabIndex="-1"),X){let{onEnter:e,onExited:t}=K();et.onEnter=e,et.onExited=t}let en=null!=(n=null!=(a=null==q?void 0:q.root)?a:E.Root)?n:j,er=null!=(u=null!=(c=null==q?void 0:q.backdrop)?c:E.Backdrop)?u:v,ei=null!=(h=null==z?void 0:z.root)?h:x.root,eo=null!=(p=null==z?void 0:z.backdrop)?p:x.backdrop,es=(0,l.Z)({elementType:en,externalSlotProps:ei,externalForwardedProps:W,getSlotProps:B,additionalProps:{ref:t,as:S},ownerState:Q,className:(0,s.Z)(b,null==ei?void 0:ei.className,null==ee?void 0:ee.root,!Q.open&&Q.exited&&(null==ee?void 0:ee.hidden))}),ea=(0,l.Z)({elementType:er,externalSlotProps:eo,additionalProps:_,getSlotProps:e=>H((0,i.Z)({},e,{onClick:t=>{$&&$(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,s.Z)(null==eo?void 0:eo.className,null==_?void 0:_.className,null==ee?void 0:ee.backdrop),ownerState:Q});return Z||U||X&&!J?(0,d.jsx)(m.Z,{ref:G,container:C,disablePortal:O,children:(0,d.jsxs)(en,(0,i.Z)({},es,{children:[!L&&v?(0,d.jsx)(er,(0,i.Z)({},ea)):null,(0,d.jsx)(g,{disableEnforceFocus:T,disableAutoFocus:I,disableRestoreFocus:N,isEnabled:Y,open:U,children:o.cloneElement(k,et)})]}))}):null})},93454:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(94780),l=n(2101),u=n(77527),c=e=>((e<1?5.11916*e**2:4.5*Math.log(e+1)+2)/100).toFixed(2),h=n(44001),d=n(1588),p=n(34867);function f(e){return(0,p.ZP)("MuiPaper",e)}(0,d.Z)("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"]);var g=n(85893);let m=["className","component","elevation","square","variant"],v=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return(0,a.Z)({root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]}
1,f,i)},y=(0,u.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{var t;let{theme:n,ownerState:r}=e;return(0,i.Z)({backgroundColor:(n.vars||n).palette.background.paper,color:(n.vars||n).palette.text.primary,transition:n.transitions.create("box-shadow")},!r.square&&{borderRadius:n.shape.borderRadius},"outlined"===r.variant&&{border:"1px solid ".concat((n.vars||n).palette.divider)},"elevation"===r.variant&&(0,i.Z)({boxShadow:(n.vars||n).shadows[r.elevation]},!n.vars&&"dark"===n.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,l.Fq)("#fff",c(r.elevation)),", ").concat((0,l.Fq)("#fff",c(r.elevation)),")")},n.vars&&{backgroundImage:null==(t=n.vars.overlays)?void 0:t[r.elevation]}))});var _=o.forwardRef(function(e,t){let n=(0,h.i)({props:e,name:"MuiPaper"}),{className:o,component:a="div",elevation:l=1,square:u=!1,variant:c="elevation"}=n,d=(0,r.Z)(n,m),p=(0,i.Z)({},n,{component:a,elevation:l,square:u,variant:c}),f=v(p);return(0,g.jsx)(y,(0,i.Z)({as:a,ownerState:p,className:(0,s.Z)(f.root,o),ref:t},d))})},75725:function(e,t,n){"use strict";var r=n(67294),i=n(73935),o=n(33703),s=n(57907),a=n(73546),l=n(27364),u=n(85893);let c=r.forwardRef(function(e,t){let{children:n,container:c,disablePortal:h=!1}=e,[d,p]=r.useState(null),f=(0,o.Z)(r.isValidElement(n)?(0,s.Z)(n):null,t);return((0,a.Z)(()=>{!h&&p(("function"==typeof c?c():c)||document.body)},[c,h]),(0,a.Z)(()=>{if(d&&!h)return(0,l.Z)(t,d),()=>{(0,l.Z)(t,null)}},[t,d,h]),h)?r.isValidElement(n)?r.cloneElement(n,{ref:f}):(0,u.jsx)(r.Fragment,{children:n}):(0,u.jsx)(r.Fragment,{children:d?i.createPortal(n,d):d})});t.Z=c},96788:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(63366),i=n(87462),o=n(67294),s=n(90512),a=n(39707),l=n(94780),u=n(77527),c=n(44001),h=n(66643),d=n(1588),p=n(34867);function f(e){return(0,p.ZP)("MuiTypography",e)}(0,d.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var g=n(85893);let m=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,"inherit"!==e.align&&"align".concat((0,h.Z)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,l.Z)(a,f,s)},y=(0,u.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,h.Z)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,i.Z)({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})}),_={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=e=>b[e]||e;var k=o.forwardRef(function(e,t){let n=(0,c.i)({props:e,name:"MuiTypography"}),o=w(n.color),l=(0,a.Z)((0,i.Z)({},n,{color:o})),{align:u="inherit",className:h,component:d,gutterBottom:p=!1,noWrap:f=!1,paragraph:b=!1,variant:k="body1",variantMapping:C=_}=l,S=(0,r.Z)(l,m),E=(0,i.Z)({},l,{align:u,color:o,className:h,component:d,gutterBottom:p,noWrap:f,paragraph:b,variant:k,variantMapping:C}),x=d||(b?"p":C[k]||_[k])||"span",I=v(E);return(0,g.jsx)(y,(0,i.Z)({as:x,ref:t,ownerState:E,className:(0,s.Z)(I.root,h)},S))})},25360:function(e,t){"use strict";t.Z={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"}},35591:function(e,t){"use strict";t.Z={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"}},73705:function(e,t){"use strict";t.Z={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"}},72799:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(87462),i=n(63366),o=n(56535),s=n(4953),a=n(44920),l=n(86523),u=n(17172),c=n(2101),h={black:"#000",white:"#fff"},d=n(35591),p={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"},f=n(73705),g={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"},m={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"},v={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"},y=n(25360);let _=["mode","contrastThreshold","tonalOffset"],b={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:h.white,default:h.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)",disabledBackgroun
1d:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:h.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:h.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 k(e,t,n,r){let i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,c.$n)(e.main,i):"dark"===t&&(e.dark=(0,c._j)(e.main,o)))}let C=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],S={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function x(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return["".concat(t[0],"px ").concat(t[1],"px ").concat(t[2],"px ").concat(t[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(t[4],"px ").concat(t[5],"px ").concat(t[6],"px ").concat(t[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(t[8],"px ").concat(t[9],"px ").concat(t[10],"px ").concat(t[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}let I=["none",x(0,2,1,-1,0,1,1,0,0,1,3,0),x(0,3,1,-2,0,2,2,0,0,1,5,0),x(0,3,3,-2,0,3,4,0,0,1,8,0),x(0,2,4,-1,0,4,5,0,0,1,10,0),x(0,3,5,-1,0,5,8,0,0,1,14,0),x(0,3,5,-1,0,6,10,0,0,1,18,0),x(0,4,5,-2,0,7,10,1,0,2,16,1),x(0,5,5,-3,0,8,10,1,0,3,14,2),x(0,5,6,-3,0,9,12,1,0,3,16,2),x(0,6,6,-3,0,10,14,1,0,4,18,3),x(0,6,7,-4,0,11,15,1,0,4,20,3),x(0,7,8,-4,0,12,17,2,0,5,22,4),x(0,7,8,-4,0,13,19,2,0,5,24,4),x(0,7,9,-4,0,14,21,2,0,5,26,4),x(0,8,9,-5,0,15,22,2,0,6,28,5),x(0,8,10,-5,0,16,24,2,0,6,30,5),x(0,8,11,-5,0,17,26,2,0,6,32,5),x(0,9,11,-5,0,18,28,2,0,7,34,6),x(0,9,12,-6,0,19,29,2,0,7,36,6),x(0,10,13,-6,0,20,31,3,0,8,38,7),x(0,10,13,-6,0,21,33,3,0,8,40,7),x(0,10,14,-6,0,22,35,3,0,8,42,7),x(0,11,14,-7,0,23,36,3,0,9,44,8),x(0,11,15,-7,0,24,38,3,0,9,46,8)];var T=n(47470),P={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};let O=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];var R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t,n=arguments.length,x=Array(n>1?n-1:0),R=1;R<n;R++)x[R-1]=arguments[R];let{mixins:N={},palette:A={},transitions:L={},typography:D={}}=e,M=(0,i.Z)(e,O);if(e.vars&&void 0===e.generateCssVars)throw Error((0,o.Z)(18));let j=function(e){let{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,l=(0,i.Z)(e,_),u=e.primary||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:m[200],light:m[50],dark:m[400]}:{main:m[700],light:m[400],dark:m[800]}}(t),C=e.secondary||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),S=e.error||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:f.Z[500],light:f.Z[300],dark:f.Z[700]}:{main:f.Z[700],light:f.Z[400],dark:f.Z[800]}}(t),E=e.info||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),x=e.success||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:y.Z[400],light:y.Z[300],dark:y.Z[700]}:{main:y.Z[800],light:y.Z[500],dark:y.Z[900]}}(t),I=e.warning||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return"dark"===e?{main:g[400],light:g[300],dark:g[700]}:{main:"#ed6c02",light:g[500],dark:g[900]}}(t);function T(e){return(0,c.mi)(e,w.text.primary)>=n?w.text.primary:b.text.primary}let P=e=>{let{color:t,name:n,mainShade:i=500,lightShade:s=300,darkShade:l=700}=e;if(!(t=(0,r.Z)({},t)).main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw Error((0,o.Z)(11,n?" (".concat(n,")"):"",i));if("string"!=typeof t.main)throw Error((0,o.Z)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return k(t,"light",s,a),k(t,"dark",l,a),t.contrastText||(t.contrastText=T(t.main)),t};return(0,s.Z)((0,r.Z)({common:(0,r.Z)({},h),mode:t,primary:P({color:u,name:"primary"}
1),secondary:P({color:C,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:P({color:S,name:"error"}),warning:P({color:I,name:"warning"}),info:P({color:E,name:"info"}),success:P({color:x,name:"success"}),grey:d.Z,contrastThreshold:n,getContrastText:T,augmentColor:P,tonalOffset:a},{dark:w,light:b}[t]),l)}(A),F=(0,u.Z)(e),Z=(0,s.Z)(F,{mixins:(t=F.breakpoints,(0,r.Z)({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},N)),palette:j,shadows:I.slice(),typography:function(e,t){let n="function"==typeof t?t(e):t,{fontFamily:o=E,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:u=400,fontWeightMedium:c=500,fontWeightBold:h=700,htmlFontSize:d=16,allVariants:p,pxToRem:f}=n,g=(0,i.Z)(n,C),m=a/14,v=f||(e=>"".concat(e/d*m,"rem")),y=(e,t,n,i,s)=>(0,r.Z)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:n},o===E?{letterSpacing:"".concat(Math.round(i/t*1e5)/1e5,"em")}:{},s,p),_={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(u,48,1.167,0),h4:y(u,34,1.235,.25),h5:y(u,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(u,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(u,16,1.5,.15),body2:y(u,14,1.43,.15),button:y(c,14,1.75,.4,S),caption:y(u,12,1.66,.4),overline:y(u,12,2.66,1,S),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,s.Z)((0,r.Z)({htmlFontSize:d,pxToRem:v,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:c,fontWeightBold:h},_),g,{clone:!1})}(j,D),transitions:(0,T.ZP)(L),zIndex:(0,r.Z)({},P)});return Z=(0,s.Z)(Z,M),(Z=x.reduce((e,t)=>(0,s.Z)(e,t),Z)).unstable_sxConfig=(0,r.Z)({},a.Z,null==M?void 0:M.unstable_sxConfig),Z.unstable_sx=function(e){return(0,l.Z)({sx:e,theme:this})},Z}},47470:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},x9:function(){return a}});var r=n(63366),i=n(87462);let o=["duration","easing","delay"],s={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)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function u(e){if(!e)return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function c(e){let t=(0,i.Z)({},s,e.easing),n=(0,i.Z)({},a,e.duration);return(0,i.Z)({getAutoHeightDuration:u,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{duration:s=n.standard,easing:a=t.easeInOut,delay:u=0}=i;return(0,r.Z)(i,o),(Array.isArray(e)?e:[e]).map(e=>"".concat(e," ").concat("string"==typeof s?s:l(s)," ").concat(a," ").concat("string"==typeof u?u:l(u))).join(",")}},e,{easing:t,duration:n})}},98251:function(e,t,n){"use strict";let r=(0,n(72799).Z)();t.Z=r},88439:function(e,t){"use strict";t.Z="$$material"},83008:function(e,t,n){"use strict";var r=n(43094);t.Z=e=>(0,r.Z)(e)&&"classes"!==e},43094:function(e,t){"use strict";t.Z=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},77527:function(e,t,n){"use strict";var r=n(58128),i=n(98251),o=n(88439),s=n(83008);let a=(0,r.ZP)({themeId:o.Z,defaultTheme:i.Z,rootShouldForwardProp:s.Z});t.ZP=a},18745:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}}),n(67294);var r=n(96682),i=n(98251),o=n(88439);function s(){let e=(0,r.Z)(i.Z);return e[o.Z]||e}},93232:function(e,t,n){"use strict";n.d(t,{C:function(){return i},n:function(){return r}});let r=e=>e.scrollTop;function i(e,t){var n,r;let{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}}},66643:function(e,t,n){"use strict";var r=n(14142);t.Z=r.Z},13077:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(87462),i=n(67294),o=n(63366),s=n(90512),a=n(94780),l=n(66643),u=n(44001),c=n(77527),h=n(1588),d=n(34867);function p(e){return(0,d.ZP)("MuiSvgIcon",e)}(0,h.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(85893);let g=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=e=>{let{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.Z)(t)),"fontSize".concat((0,l.Z)(n))]};return(0,a.Z)(i,p,r)},v=(0,c.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.Z)(n.color))],t["fontSize".concat((0,l.Z)(n.fontSize))]]}})(e=>{var t,n,r,i,o,s,a,l,u,c,h,d,p;let{theme:f,ownerState:g}=e;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:g.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(t=f.transitions)||null==(n=t.create)?void 0:n.call(t,"fill",{duration:null==(r=f.transitions)||null==(r=r.duration)?void 0:r.shorter}),fontSize:({inherit:"inherit",small:(null==(i=f.typography)||null==(o=i.pxToRem)?void 0:o.call(i,20))||"1.25rem",medium:(null==(s=f.typography)||null==(a=s.pxToRem)?void 0:a.call(s,24))||"1.5rem",large:(null==(l=f.typography)||null==(u=l.pxToRem)?void 0:u.call(l,35))||"2.1875rem"})[g.fontSize],color:null!=(c=null==(h=(f.vars||f).palette)||null==(h=h[g.color])?void 0:h.main)?c:({action:null==(d=(f.vars||f).palette)||null==(d=d.action)?void 0:d.active,disabled:null==(p=(f.vars||f).palette)||null==(p=p.action)?void 0:p.disabled,inherit:void 0})[g.color]}}),y=i.forwardRef(function(e,t){let n=(0,u.i)({props:e,name:"MuiSvgIcon"}),{children:a,className:l,color:c="inherit",component:h="svg",fontSize:d="medium",htmlColor:p,inheritViewBox:y=!1,titleAccess:_,viewBox:b="0 0 24 24"}=n,w=(0,o.Z)(n,g),k=i.isValidElement(a)&&"svg"===a.type,C=(0,r.Z)({},n,{color:c,component:h,fontSize:d,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:b,hasSvgAsChild:k}),S={};y||(S.viewBox=b);let E=m(C);return(0,f.jsxs)(v,(0,r.Z)({as:h,className:(0,s.Z)(E.root,l),focusable:"false",color:p,"aria-hidden":!_||void 0,role:_?"img":void 0,ref:t},S,w,k&&a.props,{ownerState:C,children:[k?a.props.children:a,_?(0,f.jsx)("title",{children:_}):null]}))});function _(e,t){function n(n,i){return(0,f.jsx)(y,(0,r.Z)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))}return n.muiName=y.muiName,i.memo(i.forwardRef(n))}y.muiName="SvgIcon"},30403:function(e,t,n){"use strict";var r=n(59948);t.Z=r.Z},7491:function(e,t,n){"use strict";var r=n(33703);t.Z=r.Z},79310:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(67294),i=n(46271);let o=!0,s=!1,a=new i.V,l={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 u(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function h(){"hidden"===this.visibilityState&&s&&(o=!0)}var d=function(){let e=r.useCallback(e=>{if(null!=e){var t;(t=e.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",h,!0)}},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!function(e){let{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return o||function(e){let{type:t,tagName:n}=e;return"INPUT"===n&&!!l[t]&&!e.readOnly||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(s=!0,a.start(100,()=>{s=!1}),t.current=!1,!0)},ref:e}}},39583:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(87462),i=n(63366),o=n(33703),s=n(86542),a=n(65610),l=n(55120);let u=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],c=["component","slots","slotProps"],h=["component"];function d(e,t){let{className:n,elementType:d,ownerState:p,externalForwardedProps:f,getSlotOwnerState:g,internalForwardedProps:m}=t,v=(0,i.Z)(t,u),{component:y,slots:_={[e]:void 0},slotProps:b={[e]:void 0}}=f,w=(0,i.Z)(f,c),k=_[e]||d,C=(0,a.Z)(b[e],p),S=(0,l.Z)((0,r.Z)({className:n},v,{externalForwardedProps:"root"===e?w:void 0,externalSlotProps:C})),{props:{component:E},internalRef:x}=S,I=(0,i.Z)(S.props,h),T=(0,o.Z)(x,null==C?void 0:C.ref,t.ref),P=g?g(I):{},O=(0,r.Z)({},p,P),R="root"===e?E||y:E,N=(0,s.Z)(k,(0,r.Z)({},"root"===e&&!y&&!_[e]&&m,"root"!==e&&!_[e]&&m,I,R&&{as:R},{ref:T}),O);
1return Object.keys(P).forEach(e=>{delete N[e]}),[k,N]}},33923:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return H}});var r=n(20567),i=n(85893),o=n(67294),s=n(94810),a=n(87462),l=n(63366);let u=o.createContext(null);function c(){return o.useContext(u)}var h="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",d=function(e){let{children:t,theme:n}=e,r=c(),s=o.useMemo(()=>{let e=null===r?n:"function"==typeof n?n(r):(0,a.Z)({},r,n);return null!=e&&(e[h]=null!==r),e},[n,r]);return(0,i.jsx)(u.Provider,{value:s,children:t})},p=n(87685),f=n(34168),g=n(82056),m=n(32842),v=n(73546),y=n(92996),_=n(25723);let b={};function w(e,t,n,r=!1){return o.useMemo(()=>{let i=e&&t[e]||t;if("function"==typeof n){let o=n(i),s=e?(0,a.Z)({},t,{[e]:o}):o;return r?()=>s:s}return e?(0,a.Z)({},t,{[e]:n}):(0,a.Z)({},t,n)},[e,t,n,r])}var k=function(e){let{children:t,theme:n,themeId:r}=e,o=(0,f.Z)(b),s=c()||b,a=w(r,o,n),l=w(r,s,n,!0),u="rtl"===a.direction,h=function(e){let t=(0,f.Z)(),n=(0,y.Z)()||"",{modularCssLayers:r}=e,o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return(o=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",(0,v.Z)(()=>{var e,t;let r=document.querySelector("head");if(!r)return;let i=r.firstChild;if(o){if(i&&null!=(e=i.hasAttribute)&&e.call(i,"data-mui-layer-order")&&i.getAttribute("data-mui-layer-order")===n)return;let t=document.createElement("style");t.setAttribute("data-mui-layer-order",n),t.textContent=o,r.prepend(t)}else null==(t=r.querySelector(`style[data-mui-layer-order="${n}"]`))||t.remove()},[o,n]),o)?(0,i.jsx)(_.Z,{styles:o}):null}(a);return(0,i.jsx)(d,{theme:l,children:(0,i.jsx)(p.T.Provider,{value:a,children:(0,i.jsx)(g.Z,{value:u,children:(0,i.jsxs)(m.Z,{value:null==a?void 0:a.components,children:[h,t]})})})})},C=n(88439);let S=["theme"];function E(e){let{theme:t}=e,n=(0,l.Z)(e,S),r=t[C.Z],o=r||t;return"function"!=typeof t&&(r&&!r.vars?o=(0,a.Z)({},r,{vars:null}):t&&!t.vars&&(o=(0,a.Z)({},t,{vars:null}))),(0,i.jsx)(k,(0,a.Z)({},n,{themeId:r?C.Z:void 0,theme:o}))}var x=n(29496),I=n(532);n(10484);var T=n(65033),P=n(85703),O=n(93535),R=n(14312),N=n(60762),A=n(96788),L=n(60990),D=n(84677),M=n(55895),j=n(77527),F=n(11163);let Z="LanguageSelector",$={modal:"".concat(Z,"-modal"),card:"".concat(Z,"-card"),box:"".concat(Z,"-box"),title:"".concat(Z,"-title"),button:"".concat(Z,"-button"),avatar:"".concat(Z,"-avatar")},U=(0,j.ZP)(O.Z)(e=>{let{theme:t}=e;return{["&.".concat($.modal)]:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.75)"},["& .".concat($.card)]:{width:"100%",maxWidth:400,height:"auto",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:"2rem 3rem",borderRadius:"1rem",outline:0,zIndex:1},["& .".concat($.box)]:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"flex-start",alignItems:"center",[t.breakpoints.down("md")]:{flexDirection:"column"}},["& .".concat($.title)]:{marginBottom:"1.5rem",fontWeight:500,fontSize:"1.2rem"},["& .".concat($.button)]:{margin:"0.5rem",fontSize:"1rem",maxWidth:270,textTransform:"capitalize",justifyContent:"left",padding:"10px 35px",border:"1px solid #ddd",fontWeight:600,color:"#444",backgroundColor:"#fcfcfc",[t.breakpoints.down("md")]:{maxWidth:300,padding:"10px 15px"}},["& .".concat($.avatar)]:{width:30,height:30,marginRight:"1rem",border:"1px solid #efefef"}}});var z=()=>{let[e,t]=(0,o.useState)(!1),n=(0,F.useRouter)(),r=e=>{n.push(n.asPath,null,{locale:"string"==typeof e?e:n.locale}),t(!1),localStorage.setItem("lang",e),window.localStorage.setItem(s.localStorageKey,"false")};(0,o.useEffect)(()=>{t("false"!==window.localStorage.getItem(s.localStorageKey))},[]);let s={localStorageKey:"showLanguageSelector",title:"Choose Your Language"};return(0,i.jsx)(U,{open:e,onClose:r,className:$.modal,closeAfterTransition:!0,BackdropComponent:R.Z,BackdropProps:{timeout:500},disablePortal:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,i.jsxs)(N.Z,{className:$.card,children:[(0,i.jsx)(A.Z,{variant:"body1",color:"textPrimary",className:$.title,children:s.title}),(0,i.jsx)(L.Z,{className:$.box,children:[{name:"Bahasa Malaysia",prefix:"ms",image_src:"/assets/icons/malaysia_flag.png"},{name:"English",prefix:"en",image_src:"/assets/icons/british_flag.png"},{name:"中文",prefix:"cn",image_src:"/assets/icons/china_flag.png"},{name:"Bahasa Indonesia",prefix:"id",image_src:"/assets/icons/indonesia_flag.png"},,{name:"தமிழ் மொழி",prefix:"tm",image_src:"/assets/icons/india_flag.png"}].map(e=>(0,i.jsxs)(D.Z,{variant:"outlined",onClick:()=>r(e.prefix),fullWidth:!0,className:$.button,children:[(0,i.jsx)(M.Z,{src:e.image_src,className:$.avatar}),e.name]},"languageSelector"+e.name))})]})})},q=n(54649),W=n(48711);let V="undefined"!=typeof document,B=function(){let e;if(V){let t=document.querySelector('meta[name="emotion-insertion-point"]');e=null!=t?t:void 0}return(0,W.Z)({key:"mui-style",insertionPoint:e})}();
1var H=(0,I.Jc)(e=>{let{Component:t,emotionCache:a=B,pageProps:l}=e,[u]=(0,o.useState)(null);return(0,o.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js"),(async()=>{(async()=>{let{default:e}=await n.e(1767).then(n.t.bind(n,51767,23));e.init("401909157370514",null,{autoConfig:!0,debug:!0}),e.pageView(),e.track("ViewContent")})()})()},[]),(0,o.useEffect)(()=>{if(!window)return;let e=window.location.search;(0,q.Qx)(e)},[]),(0,i.jsx)(o.StrictMode,{children:(0,i.jsx)(T.Vo.Provider,{value:{user:u},children:(0,i.jsx)(s.Z,{injectFirst:!0,children:(0,i.jsx)(p.C,{value:a,children:(0,i.jsx)(E,{theme:P.Z,children:(0,i.jsxs)(x.wT,{maxSnack:3,autoHideDuration:2500,children:[(0,i.jsx)(t,(0,r._)({},l)),(0,i.jsx)(z,{})]})})})})})})})},54649:function(e,t,n){"use strict";n.d(t,{Qx:function(){return a},iD:function(){return l}});var r=n(20567),i=n(53059),o=n(78986);let s=e=>window&&window.localStorage?window.localStorage.getItem(e):null,a=e=>{let t={},n=new URLSearchParams(e);for(let[e,r]of(console.log("searchParams",n),n.entries()))t[e]?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r;if(console.log("paramsFromUrl",t),t.utm_source||t.utm_medium||t.utm_campaign||t.utm_term||t.utm_content){let e={utm_source:t.utm_source,utm_medium:t.utm_medium,utm_campaign:t.utm_campaign,utm_term:t.utm_term,utm_content:t.utm_content};return localStorage.setItem("utmParams",JSON.stringify(e)),t}{let e=JSON.parse(s("utmParams"));return e?(console.log("paramsLocalStorage",t=(0,r._)({},t,e)),t):null}},l=async e=>{async function t(){let t=JSON.parse(s("utmParams")),i=(0,r._)({userId:e,timestamp:Date.now()},t),o={autoConfig:!0,debug:!1};n.e(1767).then(n.t.bind(n,51767,23)).then(e=>e.default).then(e=>{void 0!==e&&void 0===e.init&&e.init("401909157370514",null,o),e.trackCustom("user_registration",i)})}async function a(){(0,i.Iv)(o.co,e);let t=JSON.parse(s("utmParams")),n=(0,r._)({userId:e,timestamp:Date.now()},t);console.log("analyticsData",n),(0,i.Kz)(o.co,"user_registration",n)}
1console.log("registrationAnalytics",e),e&&(await t(),await a(),window&&window.localStorage&&window.localStorage.removeItem("utmParams"))}},80785:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(78986),i=n(53059);function o(e,t){(0,i.Kz)(r.co,e,t),n.e(1767).then(n.t.bind(n,51767,23)).then(e=>e.default).then(n=>n.trackCustom(e,t))}},85703:function(e,t,n){"use strict";var r=n(72799);let i={xs:0,sm:480,md:768,lg:1280,xl:1920},o=(0,r.Z)({breakpoints:{values:i}}),s=(0,r.Z)({palette:{primary:{main:"#F8BE15",light:"#F7F7F9",dark:"#333333",contrastText:"#333333"},secondary:{main:"#333333",light:"#333333",dark:"#333333",contrastText:"#F7F7F9"},success:{main:"#36A852",light:"#2db742",dark:"#31983f",contrastText:"#F7F7F9"},info:{main:"#084366",light:"#084366",dark:"#181c25"},error:{main:"#cb1f27",light:"#db4b4b",dark:"#cb1f27"},common:{black:"#333333",white:"#F7F7F9"},background:{default:"#F7F7F9",paper:"#FFFFFF"}},breakpoints:o.breakpoints,typography:{fontFamily:'"Open Sans", Helvetica, Arial, Verdana, sans-serif',h1:{fontSize:"2em",color:"#333333",fontWeight:"bold",margin:"1rem 0"},h2:{fontSize:"1.5em",color:"#333333",fontWeight:"bold",margin:"0.8rem 0"},h3:{fontSize:"1.2em",color:"#333333",fontWeight:"bold",margin:"0.8rem 0"},h4:{fontSize:"1em",color:"#333333",fontWeight:"bold",margin:"0.5rem 0"},body1:{lineHeight:"1.8em"}},components:{MuiAccordion:{styleOverrides:{root:e=>{let{theme:t}=e;return{backgroundColor:t.palette.primary.light,border:"none","&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-expanded":{margin:"auto"}}}}},MuiAccordionSummary:{styleOverrides:{root:{display:"flex",alignItems:"centre",minHeight:56,"&.Mui-expanded":{minHeight:56}},content:{"&.Mui-expanded":{margin:0}}}},MuiAccordionDetails:{styleOverrides:{root:{padding:"0 2rem"}}},MuiCard:{styleOverrides:{root:e=>{let{theme:t}=e;return{backgroundColor:t.palette.background.paper,borderRadius:"1rem",display:"flex",flexDirection:"column",justifyContent:"space-between",width:"100%","&.MuiPaper-elevation8":{cursor:"pointer",transition:"transform 0.2s ease-in-out",boxShadow:"0 2px 5px rgba(0.5, 0.5, 0.5, 0.1)","&:hover":{transform:"translateY(-2%)"}},"&.sideDetails":{padding:"1.5rem 1rem",display:"flex",flexDirection:"column",alignItems:"center","& > .sideDetailsContainer":{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",maxWidth:300,color:t.palette.grey[500],"& > h2":{color:t.palette.grey[700],margin:0,width:"100%",textAlign:"center",padding:"1rem",borderBottom:"1px solid",borderBottomColor:t.palette.grey[300]}}}}}}},MuiCardHeader:{styleOverrides:{title:{fontSize:"1.2rem",fontWeight:"bold"},avatar:{display:"block","& img":{borderRadius:"1rem"}}}},MuiCardContent:{styleOverrides:{root:{padding:".5rem 1rem"}}},MuiButton:{styleOverrides:{contained:{maxWidth:300,fontWeight:700,borderRadius:"5px",boxShadow:"1px 1px 5px 0 rgba(0,0,0,.1)",fontFamily:'"Open Sans", Helvetica, Arial, Verdana, sans-serif',fontSize:"1rem",justifyContent:"space-evenly",[i.sm]:{fontSize:"0.8rem"}},fullWidth:{padding:".6rem",marginTop:"1rem"},containedPrimary:e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.palette.primary.dark,color:t.palette.primary.light}}},containedSecondary:e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.palette.primary.main,color:t.palette.primary.dark}}}}},MuiTableContainer:{styleOverrides:{root:{[o.breakpoints.down("md")]:{maxHeight:500}}}},MuiTableHead:{styleOverrides:{root:e=>{let{theme:t}=e;return{fontFamily:'"Open Sans", Helvetica, Arial, Verdana, sans-serif',fontSize:20,fontWeight:600,textTransform:"capitalize",color:t.palette.common.black,border:"none",textAlign:"center",verticalAlign:"bottom"}}}},MuiTableRow:{styleOverrides:{root:{"&:nth-of-type(odd)":{backgroundColor:"white",border:"none"}}}},MuiTableCell:{styleOverrides:{root:e=>{let{theme:t}=e;return{fontFamily:'"Open Sans", Helvetica, Arial, Verdana, sans-serif',fontSize:16,fontWeight:400,color:t.palette.grey[700],border:"none",minWidth:150}}}},MuiTab:{styleOverrides:{root:e=>{let{theme:t}=e;return{color:t.palette.primary.dark,textTransform:"capitalize",fontWeight:"bold",[o.breakpoints.down("sm")]:{maxWidth:120,minWidth:72},minWidth:160}}}}}});t.Z=s},10484:function(){},77663:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:s}
1catch(e){n=s}}();var l=[],u=!1,c=-1;function h(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}},s=!0;try{t[e](o,o.exports,r),s=!1}finally{s&&delete n[e]}return o.exports}r.ab="//";var i=r(229);e.exports=i}()},11163:function(e,t,n){e.exports=n(43079)},29496:function(e,t,n){"use strict";n.d(t,{wT:function(){return ex},Ds:function(){return eI}});var r,i,o,s,a,l,u=n(67294),c=n(73935),h=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(r&&(r+=" "),r+=t);return r};let d={data:""},p=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||d,f=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,g=/\/\*[^]*?\*\/|  +/g,m=/\n+/g,v=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+s+";":r+="f"==o[1]?v(s,o):o+"{"+v(s,"k"==o[1]?"":t)+"}":"object"==typeof s?r+=v(s,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=v.p?v.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},y={},_=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+_(e[n]);return t}return e},b=(e,t,n,r,i)=>{var o;let s=_(e),a=y[s]||(y[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!y[a]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=f.exec(e.replace(g,""));)t[4]?r.shift():t[3]?(n=t[3].replace(m," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(m," ").trim();return r[0]})(e);y[a]=v(i?{["@keyframes "+a]:t}:t,n?"":"."+a)}let l=n&&y.g?y.g:null;return n&&(y.g=y[a]),o=y[a],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),a},w=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":v(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function k(e){let t=this||{},n=e.call?e(t.p):e;return b(n.unshift?n.raw?w(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,p(t.target),t.g,t.o,t.k)}function C(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 S(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),e}function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function I(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function T(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}k.bind({g:1}),k.bind({k:1});var P=function(){return""},O=u.createContext({enqueueSnackbar:P,closeSnackbar:P}),R="@media (max-width:599.95px)",N="@media (min-width:600px)",A=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},L=function(e){return""+A(e.vertical)+A(e.horizontal)},D=function(e){return!!e||0===e},M="unmounted",j="exited",F="entering",Z="entered",$="exiting",U=function(e){function t(t){n=e.call(this,t)||this;var n,r,i=t.appear;return n.appearStatus=null,t.in?i?(r=j,n.appearStatus=F):r=Z:r=t.unmountOnExit||t.mountOnEnter?M:j,n.state={status:r},n.nextCallback=null,n}x(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===M?{status:j}: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!==F&&n!==Z&&(t=F):(n===F||n===Z)&&(t=$)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter
1:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===F?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===j&&this.setState({status:M})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();if(!e&&!n){this.safeSetState({status:Z},function(){t.props.onEntered&&t.props.onEntered(t.node,e)});return}this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:F},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:Z},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();if(!t){this.safeSetState({status:j},function(){e.props.onExited&&e.props.onExited(e.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:$},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:j},function(){e.props.onExited&&e.props.onExited(e.node)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(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(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;if(!this.node||n){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===M)return null;var t=this.props;return(0,t.children)(e,I(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},S(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(u.Component);function z(){}function q(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function W(e,t){return(0,u.useMemo)(function(){return null==e&&null==t?null:function(n){q(e,n),q(t,n)}},[e,t])}function V(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}U.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z};var B={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},H=function(e){e.scrollTop=e.scrollTop},K=function(e){return Math.round(e)+"ms"};function G(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,s=void 0===o?B.easeInOut:o,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:K(i))+" "+s+" "+("string"==typeof l?l:K(l))}).join(",")}function Y(e){return(e&&e.ownerDocument||document).defaultView||window}function J(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Y(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var s=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+s-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-s)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var X=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,o=e.in,s=e.style,a=e.timeout,l=void 0===a?0:a,c=e.onEnter,h=e.onEntered,d=e.onExit,p=e.onExited,f=I(e,["children","direction","in","
1style","timeout","onEnter","onEntered","onExit","onExited"]),g=(0,u.useRef)(null),m=W(n.ref,g),v=W(m,t),y=(0,u.useCallback)(function(){g.current&&J(i,g.current)},[i]);return(0,u.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){g.current&&J(i,g.current)}),t=Y(g.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,u.useEffect)(function(){o||y()},[o,y]),(0,u.createElement)(U,Object.assign({appear:!0,nodeRef:g,onEnter:function(e,t){J(i,e),H(e),c&&c(e,t)},onEntered:h,onEntering:function(e){var t=(null==s?void 0:s.transitionTimingFunction)||B.easeOut,n=V({timeout:l,mode:"enter",style:E({},s,{transitionTimingFunction:t})});e.style.webkitTransition=G("-webkit-transform",n),e.style.transition=G("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==s?void 0:s.transitionTimingFunction)||B.sharp,n=V({timeout:l,mode:"exit",style:E({},s,{transitionTimingFunction:t})});e.style.webkitTransition=G("-webkit-transform",n),e.style.transition=G("transform",n),J(i,e),d&&d(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",p&&p(e)},in:o,timeout:l},f),function(e,t){return(0,u.cloneElement)(n,E({ref:v,style:E({visibility:"exited"!==e||o?void 0:"hidden"},s,{},n.props.style)},t))})});X.displayName="Slide";var Q=function(e){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ee={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:u.createElement(function(){return u.createElement(Q,null,u.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n        10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:u.createElement(function(){return u.createElement(Q,null,u.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:u.createElement(function(){return u.createElement(Q,null,u.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:u.createElement(function(){return u.createElement(Q,null,u.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n        0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:X,transitionDuration:{enter:225,exit:195}},et=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:ee.autoHideDuration},en=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?E({},ee.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?E({},ee.transitionDuration,{},t):ee.transitionDuration};function er(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return E({},e,((n={})[r]=k(i),n))},{})}var ei="notistack-CollapseWrapper",eo=er({root:{height:0},entered:{height:"auto"}}),es=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,u.useRef)(null),s=(0,u.useRef)(null),a=W(t,s),l=function(){return o.current?o.current.clientHeight:0};return(0,u.createElement)(U,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=V({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){H(e);var t=V({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:s,timeout:175},function(e,t){return(0,u.createElement)("div",Object.assign({ref:a,className:h(eo.root,"entered"===e&&eo.entered),style:E({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:G("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,u.createElement)("div",{ref:o,className:ei,style:{display:"flex",width:"100%"}},n))})});es.displayName="Collapse";
1var ea={right:"left",left:"right",bottom:"up",top:"down"},el=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return E({},t,((r={})[n]=e[n],r))},{})},eu=function(){};function ec(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=[].concat(i);t&&-1===s.indexOf(t)&&s.push(t),e.apply(this,s),n.apply(this,s)}},eu)}var eh="undefined"!=typeof window?u.useLayoutEffect:u.useEffect;function ed(e){var t=(0,u.useRef)(e);return eh(function(){t.current=e}),(0,u.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var ep=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,o=e.disableWindowBlurListener,s=void 0!==o&&o,a=e.onClose,l=e.id,c=e.open,d=e.SnackbarProps,p=void 0===d?{}:d,f=(0,u.useRef)(),g=ed(function(){a&&a.apply(void 0,arguments)}),m=ed(function(e){a&&null!=e&&(f.current&&clearTimeout(f.current),f.current=setTimeout(function(){g(null,"timeout",l)},e))});(0,u.useEffect)(function(){return c&&m(i),function(){f.current&&clearTimeout(f.current)}},[c,i,m]);var v=function(){f.current&&clearTimeout(f.current)},y=(0,u.useCallback)(function(){null!=i&&m(.5*i)},[i,m]);return(0,u.useEffect)(function(){if(!s&&c)return window.addEventListener("focus",y),window.addEventListener("blur",v),function(){window.removeEventListener("focus",y),window.removeEventListener("blur",v)}},[s,y,c]),(0,u.createElement)("div",Object.assign({ref:t},p,{className:h("notistack-Snackbar",r),onMouseEnter:function(e){p.onMouseEnter&&p.onMouseEnter(e),v()},onMouseLeave:function(e){p.onMouseLeave&&p.onMouseLeave(e),y()}}),n)});ep.displayName="Snackbar";var ef=er({root:((r={display:"flex",flexWrap:"wrap",flexGrow:1})[N]={flexGrow:"initial",minWidth:"288px"},r)}),eg=(0,u.forwardRef)(function(e,t){var n=e.className,r=I(e,["className"]);return u.createElement("div",Object.assign({ref:t,className:h(ef.root,n)},r))});eg.displayName="SnackbarContent";var em=er({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),ev="notistack-snackbar",ey=(0,u.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,s=e.variant,a=e.hideIconVariant,l=e.style,c=e.className,d=o[s],p=i;return"function"==typeof p&&(p=p(n)),u.createElement(eg,{ref:t,role:"alert","aria-describedby":ev,style:l,className:h("notistack-MuiContent","notistack-MuiContent-"+s,em.root,em[s],c,!a&&d&&em.lessPadding)},u.createElement("div",{id:ev,className:em.message},a?null:d,r),p&&u.createElement("div",{className:em.action},p))});ey.displayName="MaterialDesignContent";var e_=(0,u.memo)(ey),eb=er({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),ew=function(e){var t,n=(0,u.useRef)(),r=(0,u.useState)(!0),i=r[0],o=r[1],s=ec([e.snack.onClose,e.onClose]),a=(0,u.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,u.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,c=e.classes,d=e.Component,p=(0,u.useMemo)(function(){return el(c)},[c]),f=l.open,g=l.SnackbarProps,m=l.TransitionComponent,v=l.TransitionProps,y=l.transitionDuration,_=l.disableWindowBlurListener,b=l.content,w=I(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=E({direction:"center"!==(t=w.anch
1orOrigin).horizontal?ea[t.horizontal]:ea[t.vertical],timeout:y},v),C=b;"function"==typeof C&&(C=C(w.id,w.message));var S=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return E({},t,((r={})[n]=ec([e.snack[n],e[n]],w.id),r))},{});return u.createElement(es,{in:i,onExited:S.onExited},u.createElement(ep,{open:f,id:w.id,disableWindowBlurListener:_,autoHideDuration:w.autoHideDuration,className:h(eb.wrappedRoot,p.root,p["anchorOrigin"+L(w.anchorOrigin)]),SnackbarProps:g,onClose:s},u.createElement(m,Object.assign({},k,{appear:!0,in:f,onExit:S.onExit,onExited:a,onEnter:S.onEnter,onEntered:ec([S.onEntered,function(){e.snack.requestClose&&s(null,"instructed",e.snack.id)}],w.id)}),C||u.createElement(void 0===d?e_:d,Object.assign({},w)))))},ek="."+ei,eC=er({root:((i={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:G(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[ek]={padding:"6px 0px",transition:"padding 300ms ease 0ms"},i.maxWidth="calc(100% - 40px)",i[R]={width:"100%",maxWidth:"calc(100% - 32px)"},i),rootDense:((o={})[ek]={padding:"2px 0px"},o),top:{top:"14px",flexDirection:"column"},bottom:{bottom:"14px",flexDirection:"column-reverse"},left:((s={left:"20px"})[N]={alignItems:"flex-start"},s[R]={left:"16px"},s),right:((a={right:"20px"})[N]={alignItems:"flex-end"},a[R]={right:"16px"},a),center:((l={left:"50%",transform:"translateX(-50%)"})[N]={alignItems:"center"},l)}),eS=(0,u.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,s=h("notistack-SnackbarContainer",eC[r.vertical],eC[r.horizontal],eC.root,n.containerRoot,n["containerAnchorOrigin"+L(r)],i&&eC.rootDense);return u.createElement("div",{className:s},o)}),eE=function(e){return!("string"==typeof e||(0,u.isValidElement)(e))},ex=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var r,i=eE(e)?e:t,o=eE(e)?e.message:e,s=i.key,a=i.preventDuplicate,l=I(i,["key","preventDuplicate"]),u=D(s),c=u?s:new Date().getTime()+Math.random(),d=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?E({},ee[e],{},r[e],{},l[e]):"autoHideDuration"===e?et(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?en(l.transitionDuration,r.transitionDuration):l[e]||r[e]||ee[e]}),p=E({id:c},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:d("persist"),action:d("action"),content:d("content"),variant:d("variant"),anchorOrigin:d("anchorOrigin"),disableWindowBlurListener:d("disableWindowBlurListener"),autoHideDuration:d("autoHideDuration"),hideIconVariant:d("hideIconVariant"),TransitionComponent:d("TransitionComponent"),transitionDuration:d("transitionDuration"),TransitionProps:d("TransitionProps",!0),iconVariant:d("iconVariant",!0),style:d("style",!0),SnackbarProps:d("SnackbarProps",!0),className:h(n.props.className,l.className)});return p.persist&&(p.autoHideDuration=void 0),n.setState(function(e){if(void 0===a&&n.props.preventDuplicate||a){var t=function(e){return u?e.id===c:e.message===o},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(E({},e,{queue:[].concat(e.queue,[p])}))}),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?E({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?E({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),E({},e,{open:!1})):E({},e,{requestClose:!0})});return E({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!D(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?E({},e,{entered:!0}):E({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?E({},e,{open:!1}):E({},e,{requestClose:!0}):E({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});D(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!D(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(E({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(T(n)),closeSnackbar:n.closeSnackbar.bind(T(n))}},n}return x(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=n.children,o=n.dense,s=void 0!==o&&o,a=n.Components,l=void 0===a?{}:a,h=n.classes,d=this.state.snacks.reduce(function(e,t){var n,r=L(t.anchorOrigin),i=e[r]||[];return E({},e,((n={})[r]=[].concat(i,[t]),n))},{}),p=Object.keys(d).map(function(t){var n=d[t],r=n[0];return u.createElement(eS,{key:t,dense:s,anchorOrigin:r.anchorOrigin,classes:h},n.map(function(t){return u.createElement(ew,{key:t.id,snack:t,classes:h,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:ec([e.handleExitedSnack,e.props.onExited],t.id),onEntered:ec([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return u.createElement(O.Provider,{value:t},i,r?(0,c.createPortal)(p,r):p)},S(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||ee.maxSnack}}]),t}(u.Component),eI=function(){return(0,u.useContext)(O)}},79593:function(e,t){"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.consumer"),Symbol.for("react.context");var n=Symbol.for("react.forward_ref"),r=(Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"));Symbol.for("react.lazy"),Symbol.for("react.view_transition"),Symbol.for("react.client.reference"),t.A4=n,t._Y=r},8662:function(e,t,n){"use strict";n.d(t,{ZP:function(){return m}});var r=n(63366),i=n(75068),o=n(67294),s=n(73935),a={disabled:!1},l=n(220),u="unmounted",c="exited",h="entering",d="entered",p="exiting",f=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=c,r.appearStatus=h):i=d:i=t.unmountOnExit||t.mountOnEnter?u:c,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:c}: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!==h&&n!==d&&(t=h):(n===h||n===d)&&(t=p)}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,a
1ppear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===h){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[s.findDOMNode(this),r],o=i[0],l=i[1],u=this.getTimeouts(),c=r?u.appear:u.enter;if(!e&&!n||a.disabled){this.safeSetState({status:d},function(){t.props.onEntered(o)});return}this.props.onEnter(o,l),this.safeSetState({status:h},function(){t.props.onEntering(o,l),t.onTransitionEnd(c,function(){t.safeSetState({status:d},function(){t.props.onEntered(o,l)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s.findDOMNode(this);if(!t||a.disabled){this.safeSetState({status:c},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:p},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:c},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:s.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,i=(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,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(l.Z.Provider,{value:null},"function"==typeof n?n(e,i):o.cloneElement(o.Children.only(n),i))},t}(o.Component);function g(){}f.contextType=l.Z,f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},f.UNMOUNTED=u,f.EXITED=c,f.ENTERING=h,f.ENTERED=d,f.EXITING=p;var m=f},220:function(e,t,n){"use strict";var r=n(67294);t.Z=r.createContext(null)},71739:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},10434:function(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},64836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},7071:function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},87462:function(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}).apply(null,arguments)}n.d(t,{Z:function(){return r}})},75068:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:function(){return i}})},63366:function(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(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:function(){return r}})},32238:function(e,t,n){"use strict";n.d(t,{Jn:function(){return k},KN:function(){return E},Mq:function(){return S},Xd:function(){return v},ZF:function(){return C},qX:function(){return y},rh:function(){return _}});var r=n(8463),i=n(53333),o=n(74444),s=n(26531);class a{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let l="@firebase/app",u="0.10.13",c=new i.Yd("@firebase/app"),h="[DEFAULT]",d={[l]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/data-connect":"fire-data-connect","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/vertexai-preview":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},p=new Map,f=new Map,g=new Map;function m(e,t){try{e.container.addComponent(t)}catch(n){c.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function v(e){let t=e.name;if(g.has(t))return c.debug(`There were multiple attempts to register component ${t}.`),!1;
1for(let n of(g.set(t,e),p.values()))m(n,e);for(let t of f.values())m(t,e);return!0}function y(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function _(e){return void 0!==e.settings}let b=new o.LL("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 w{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 r.wA("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 b.create("app-deleted",{appName:this._name})}}let k="10.14.1";function C(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});let i=Object.assign({name:h,automaticDataCollectionEnabled:!1},t),s=i.name;if("string"!=typeof s||!s)throw b.create("bad-app-name",{appName:String(s)});if(n||(n=(0,o.aH)()),!n)throw b.create("no-options");let a=p.get(s);if(a){if((0,o.vZ)(n,a.options)&&(0,o.vZ)(i,a.config))return a;throw b.create("duplicate-app",{appName:s})}let l=new r.H0(s);for(let e of g.values())l.addComponent(e);let u=new w(n,i,l);return p.set(s,u),u}function S(e=h){let t=p.get(e);if(!t&&e===h&&(0,o.aH)())return C();if(!t)throw b.create("no-app",{appName:e});return t}function E(e,t,n){var i;let o=null!==(i=d[e])&&void 0!==i?i:e;n&&(o+=`-${n}`);let s=o.match(/\s|\//),a=t.match(/\s|\//);if(s||a){let e=[`Unable to register library "${o}" with version "${t}":`];s&&e.push(`library name "${o}" contains illegal characters (whitespace or "/")`),s&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),c.warn(e.join(" "));return}v(new r.wA(`${o}-version`,()=>({library:o,version:t}),"VERSION"))}let x="firebase-heartbeat-store",I=null;function T(){return I||(I=(0,s.X3)("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(x)}catch(e){console.warn(e)}}}).catch(e=>{throw b.create("idb-open",{originalErrorMessage:e.message})})),I}async function P(e){try{let t=(await T()).transaction(x),n=await t.objectStore(x).get(R(e));return await t.done,n}catch(e){if(e instanceof o.ZR)c.warn(e.message);else{let t=b.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});c.warn(t.message)}}}async function O(e,t){try{let n=(await T()).transaction(x,"readwrite"),r=n.objectStore(x);await r.put(t,R(e)),await n.done}catch(e){if(e instanceof o.ZR)c.warn(e.message);else{let t=b.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});c.warn(t.message)}}}function R(e){return`${e.name}!${e.options.appId}`}class N{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new L(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){var e,t;try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=A();if((null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(e=>e.date===r))return;return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache)}catch(e){c.warn(e)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)==null||0===this._heartbeatsCache.heartbeats.length)return"";let t=A(),{heartbeatsToSend:n,unsentEntries:r}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),D(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),D(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=(0,o.L)(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(e){return c.warn(e),""}}}function A(){return new Date().toISOString().substring(0,10)}class L{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,o.hl)()&&(0,o.eu)().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await P(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return O(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){let n=await this.read();return O(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function D(e){return(0,o.L)(JSON.stringify({version:2,heartbeats:e})).length}v(new r.wA("platform-logger",e=>new a(e),"PRIVATE")),v(new r.wA("heartbeat",e=>new N(e),"PRIVATE")),E(l,u,""),E(l,u,"esm2017"),E("fire-js","")},8463:function(e,t,n){"use strict";n.d(t,{H0:function(){return a},wA:function(){return i}});var r=n(74444);class i{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}}let o="[DEFAULT]";class s{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){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new r.BH;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}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("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:o})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=o){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let 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(e=o){return this.instances.has(e)}getOptions(e=o){return this.instancesOptions.get(e)||{}}initialize(e={}){let{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`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;let 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);let o=this.instances.get(r);return o&&e(o,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:e===o?void 0:e,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}return n||null}normalizeInstanceIdentifier(e=o){return this.component?this.component.multipleInstances?e:o:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw 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);let t=new s(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},53333:function(e,t,n){"use strict";var r,i;n.d(t,{Yd:function(){return c},in:function(){return r}});let o=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let s={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},u=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=l[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);
1else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class c{constructor(e){this.name=e,this._logLevel=a,this._logHandler=u,this._userLogHandler=null,o.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in r))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?s[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,r.DEBUG,...e),this._logHandler(this,r.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,r.VERBOSE,...e),this._logHandler(this,r.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,r.INFO,...e),this._logHandler(this,r.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,r.WARN,...e),this._logHandler(this,r.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,r.ERROR,...e),this._logHandler(this,r.ERROR,...e)}}},82729:function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{_:function(){return r}})},90512:function(e,t,n){"use strict";t.Z=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(r&&(r+=" "),r+=t);return r}},53059:function(e,t,n){"use strict";let r,i,o,s;n.d(t,{IH:function(){return eS},Kz:function(){return eI},Iv:function(){return eE},xP:function(){return ex}});var a=n(32238),l=n(53333),u=n(74444),c=n(8463),h=n(26531);let d="@firebase/installations",p="0.6.9",f=`w:${p}`,g="FIS_v2",m=new u.LL("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function v(e){return e instanceof u.ZR&&e.code.includes("request-failed")}function y({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function _(e){return{token:e.token,requestStatus:2,expiresIn:Number(e.expiresIn.replace("s","000")),creationTime:Date.now()}}async function b(e,t){let n=(await t.json()).error;return m.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function w({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function k(e){let t=await e();return t.status>=500&&t.status<600?e():t}async function C({appConfig:e,heartbeatServiceProvider:t},{fid:n}){let r=y(e),i=w(e),o=t.getImmediate({optional:!0});if(o){let e=await o.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({fid:n,authVersion:g,appId:e.appId,sdkVersion:f})},a=await k(()=>fetch(r,s));if(a.ok){let e=await a.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:_(e.authToken)}}throw await b("Create Installation",a)}function S(e){return new Promise(t=>{setTimeout(t,e)})}let E=/^[cdef][\w-]{21}$/;function x(e){return`${e.appName}!${e.appId}`}let I=new Map;function T(e,t){let n=x(e);P(n,t),function(e,t){let n=(!O&&"BroadcastChannel"in self&&((O=new BroadcastChannel("[Firebase] FID Change")).onmessage=e=>{P(e.data.key,e.data.fid)}),O);n&&n.postMessage({key:e,fid:t}),0===I.size&&O&&(O.close(),O=null)}(n,t)}function P(e,t){let n=I.get(e);if(n)for(let e of n)e(t)}let O=null,R="firebase-installations-store",N=null;function A(){return N||(N=(0,h.X3)("firebase-installations-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(R)}})),N}async function L(e,t){let n=x(e),r=(await A()).transaction(R,"readwrite"),i=r.objectStore(R),o=await i.get(n);return await i.put(t,n),await r.done,o&&o.fid===t.fid||T(e,t.fid),t}async function D(e){let t=x(e),n=(await A()).transaction(R,"readwrite");await n.objectStore(R).delete(t),await n.done}async function M(e,t){let n=x(e),r=(await A()).transaction(R,"readwrite"),i=r.objectStore(R),o=await i.get(n),s=t(o);return void 0===s?await i.delete(n):await i.put(s,n),await r.done,s&&(!o||o.fid!==s.fid)&&T(e,s.fid),s}async function j(e){let t;let n=await M(e.appConfig,n=>{let r=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(m.create("app-offline"))};let n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=F(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Z(e)}:{installationEntry:t}}(e,U(n||{fid:function(){try{let e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;let t=btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22);return E.test(t)?t:""}catch(e){return""}}(),registrationStatus:0}));return t=r.registrationPromise,r.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function F(e,t){try{let n=await C(e,t);return L(e.appConfig,n)}
1catch(n){throw v(n)&&409===n.customData.serverCode?await D(e.appConfig):await L(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function Z(e){let t=await $(e.appConfig);for(;1===t.registrationStatus;)await S(100),t=await $(e.appConfig);if(0===t.registrationStatus){let{installationEntry:t,registrationPromise:n}=await j(e);return n||t}return t}function $(e){return M(e,e=>{if(!e)throw m.create("installation-not-found");return U(e)})}function U(e){return 1===e.registrationStatus&&e.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e}async function z({appConfig:e,heartbeatServiceProvider:t},n){let r=function(e,{fid:t}){return`${y(e)}/${t}/authTokens:generate`}(e,n),i=function(e,{refreshToken:t}){let n=w(e);return n.append("Authorization",`${g} ${t}`),n}(e,n),o=t.getImmediate({optional:!0});if(o){let e=await o.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}let s={method:"POST",headers:i,body:JSON.stringify({installation:{sdkVersion:f,appId:e.appId}})},a=await k(()=>fetch(r,s));if(a.ok)return _(await a.json());throw await b("Generate Auth Token",a)}async function q(e,t=!1){let n;let r=await M(e.appConfig,r=>{var i;if(!H(r))throw m.create("not-registered");let o=r.authToken;if(!t&&2===(i=o).requestStatus&&!function(e){let t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(i))return r;if(1===o.requestStatus)return n=W(e,t),r;{if(!navigator.onLine)throw m.create("app-offline");let t=function(e){let t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return n=B(e,t),t}});return n?await n:r.authToken}async function W(e,t){let n=await V(e.appConfig);for(;1===n.authToken.requestStatus;)await S(100),n=await V(e.appConfig);let r=n.authToken;return 0===r.requestStatus?q(e,t):r}function V(e){return M(e,e=>{var t;if(!H(e))throw m.create("not-registered");return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}async function B(e,t){try{let n=await z(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await L(e.appConfig,r),n}catch(n){if(v(n)&&(401===n.customData.serverCode||404===n.customData.serverCode))await D(e.appConfig);else{let n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await L(e.appConfig,n)}throw n}}function H(e){return void 0!==e&&2===e.registrationStatus}async function K(e){let{installationEntry:t,registrationPromise:n}=await j(e);return n?n.catch(console.error):q(e).catch(console.error),t.fid}async function G(e,t=!1){return await Y(e),(await q(e,t)).token}async function Y(e){let{registrationPromise:t}=await j(e);t&&await t}function J(e){return m.create("missing-app-config-values",{valueName:e})}let X="installations";(0,a.Xd)(new c.wA(X,e=>{let t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw J("App Configuration");if(!e.name)throw J("App Name");for(let t of["projectId","apiKey","appId"])if(!e.options[t])throw J(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),r=(0,a.qX)(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:r,_delete:()=>Promise.resolve()}},"PUBLIC")),(0,a.Xd)(new c.wA("installations-internal",e=>{let t=e.getProvider("app").getImmediate(),n=(0,a.qX)(t,X).getImmediate();return{getId:()=>K(n),getToken:e=>G(n,e)}},"PRIVATE")),(0,a.KN)(d,p),(0,a.KN)(d,p,"esm2017");let Q="analytics",ee="https://www.googletagmanager.com/gtag/js",et=new l.Yd("@firebase/analytics"),en=new u.LL("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}
1","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function er(e){if(!e.startsWith(ee)){let t=en.create("invalid-gtag-resource",{gtagURL:e});return et.warn(t.message),""}return e}function ei(e){return Promise.all(e.map(e=>e.catch(e=>e)))}async function eo(e,t,n,r,i,o){let s=r[i];try{if(s)await t[s];else{let e=(await ei(n)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(e){et.error(e)}e("config",i,o)}async function es(e,t,n,r,i){try{let o=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);let r=await ei(n);for(let n of e){let e=r.find(e=>e.measurementId===n),i=e&&t[e.appId];if(i)o.push(i);else{o=[];break}}}0===o.length&&(o=Object.values(t)),await Promise.all(o),e("event",r,i||{})}catch(e){et.error(e)}}class ea{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}}let el=new ea;async function eu(e){var t;let{appId:n,apiKey:r}=e,i={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":r})},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),s=await fetch(o,i);if(200!==s.status&&304!==s.status){let e="";try{let n=await s.json();(null===(t=n.error)||void 0===t?void 0:t.message)&&(e=n.error.message)}catch(e){}throw en.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}async function ec(e,t=el,n){let{appId:r,apiKey:i,measurementId:o}=e.options;if(!r)throw en.create("no-app-id");if(!i){if(o)return{measurementId:o,appId:r};throw en.create("no-api-key")}let s=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new ed;return setTimeout(async()=>{a.abort()},void 0!==n?n:6e4),eh({appId:r,apiKey:i,measurementId:o},s,a,t)}async function eh(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=el){var o;let{appId:s,measurementId:a}=e;try{await new Promise((e,n)=>{let i=setTimeout(e,Math.max(t-Date.now(),0));r.addEventListener(()=>{clearTimeout(i),n(en.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}catch(e){if(a)return et.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${null==e?void 0:e.message}]`),{appId:s,measurementId:a};throw e}try{let t=await eu(e);return i.deleteThrottleMetadata(s),t}catch(c){if(!function(e){if(!(e instanceof u.ZR)||!e.customData)return!1;let t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(c)){if(i.deleteThrottleMetadata(s),a)return et.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${null==c?void 0:c.message}]`),{appId:s,measurementId:a};throw c}let t=503===Number(null===(o=null==c?void 0:c.customData)||void 0===o?void 0:o.httpStatus)?(0,u.$s)(n,i.intervalMillis,30):(0,u.$s)(n,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+t,backoffCount:n+1};return i.setThrottleMetadata(s,l),et.debug(`Calling attemptFetch again in ${t} millis`),eh(e,l,r,i)}}class ed{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}
1abort(){this.listeners.forEach(e=>e())}}async function ep(e,t,n,r,i){if(i&&i.global){e("event",n,r);return}{let i=await t;e("event",n,Object.assign(Object.assign({},r),{send_to:i}))}}async function ef(e,t,n,r){if(r&&r.global)return e("set",{user_id:n}),Promise.resolve();e("config",await t,{update:!0,user_id:n})}async function eg(e,t,n,r){if(r&&r.global){let t={};for(let e of Object.keys(n))t[`user_properties.${e}`]=n[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}async function em(){if(!(0,u.hl)())return et.warn(en.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await (0,u.eu)()}catch(e){return et.warn(en.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}async function ev(e,t,n,o,s,a,l){var u;let c=ec(e);c.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&et.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>et.error(e)),t.push(c);let h=em().then(e=>e?o.getId():void 0),[d,p]=await Promise.all([c,h]);!function(e){for(let t of Object.values(window.document.getElementsByTagName("script")))if(t.src&&t.src.includes(ee)&&t.src.includes(e))return t;return null}(a)&&function(e,t){var n,r;let i;let o=(n="firebase-js-sdk-policy",r={createScriptURL:er},window.trustedTypes&&(i=window.trustedTypes.createPolicy(n,r)),i),s=document.createElement("script"),a=`${ee}?l=${e}&id=${t}`;s.src=o?null==o?void 0:o.createScriptURL(a):a,s.async=!0,document.head.appendChild(s)}(a,d.measurementId),i&&(s("consent","default",i),i=void 0),s("js",new Date);let f=null!==(u=null==l?void 0:l.config)&&void 0!==u?u:{};return f.origin="firebase",f.update=!0,null!=p&&(f.firebase_id=p),s("config",d.measurementId,f),r&&(s("set",r),r=void 0),d.measurementId}class ey{constructor(e){this.app=e}_delete(){return delete e_[this.app.options.appId],Promise.resolve()}}let e_={},eb=[],ew={},ek="dataLayer",eC=!1;function eS(e=(0,a.Mq)()){e=(0,u.m9)(e);let t=(0,a.qX)(e,Q);return t.isInitialized()?t.getImmediate():function(e,t={}){let n=(0,a.qX)(e,Q);if(n.isInitialized()){let e=n.getImmediate();if((0,u.vZ)(t,n.getOptions()))return e;throw en.create("already-initialized")}return n.initialize({options:t})}(e)}function eE(e,t,n){e=(0,u.m9)(e),ef(s,e_[e.app.options.appId],t,n).catch(e=>et.error(e))}function ex(e,t,n){e=(0,u.m9)(e),eg(s,e_[e.app.options.appId],t,n).catch(e=>et.error(e))}function eI(e,t,n,r){e=(0,u.m9)(e),ep(s,e_[e.app.options.appId],t,n,r).catch(e=>et.error(e))}let eT="@firebase/analytics",eP="0.10.8";(0,a.Xd)(new c.wA(Q,(e,{options:t})=>(function(e,t,n){!function(){let e=[];
1if((0,u.ru)()&&e.push("This is a browser extension environment."),(0,u.zI)()||e.push("Cookies are not available."),e.length>0){let t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=en.create("invalid-analytics-context",{errorInfo:t});et.warn(n.message)}}();let r=e.options.appId;if(!r)throw en.create("no-app-id");if(!e.options.apiKey){if(e.options.measurementId)et.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw en.create("no-api-key")}if(null!=e_[r])throw en.create("already-exists",{id:r});if(!eC){var i,a;let e,t;e=[],Array.isArray(window[ek])?e=window[ek]:window[ek]=e;let{wrappedGtag:n,gtagCore:r}=(i="gtag",t=function(...e){window[ek].push(arguments)},window[i]&&"function"==typeof window[i]&&(t=window[i]),window[i]=(a=t,async function(e,...t){try{if("event"===e){let[e,n]=t;await es(a,e_,eb,e,n)}else if("config"===e){let[e,n]=t;await eo(a,e_,eb,ew,e,n)}else if("consent"===e){let[e,n]=t;a("consent",e,n)}else if("get"===e){let[e,n,r]=t;a("get",e,n,r)}else if("set"===e){let[e]=t;a("set",e)}else a(e,...t)}catch(e){et.error(e)}}),{gtagCore:t,wrappedGtag:window[i]});s=n,o=r,eC=!0}return e_[r]=ev(e,eb,ew,t,o,ek,n),new ey(e)})(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),(0,a.Xd)(new c.wA("analytics-internal",function(e){try{let t=e.getProvider(Q).getImmediate();return{logEvent:(e,n,r)=>eI(t,e,n,r)}}catch(e){throw en.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),(0,a.KN)(eT,eP),(0,a.KN)(eT,eP,"esm2017")},81517:function(e,t,n){"use strict";n.d(t,{_O:function(){return eY},hJ:function(){return eJ},Xb:function(){return tt},v0:function(){return nc},Aj:function(){return tr},LS:function(){return te},e5:function(){return tn},rh:function(){return tL},w7:function(){return ti}});var r,i=n(32238),o=n(74444),s=n(53333);function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}"function"==typeof SuppressedError&&SuppressedError;var l=n(8463);function u(){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."}}let c=new o.LL("auth","Firebase",u()),h=new s.Yd("@firebase/auth");function d(e,...t){h.logLevel<=s.in.ERROR&&h.error(`Auth (${i.Jn}): ${e}`,...t)}function p(e,...t){throw v(e,...t)}function f(e,...t){return v(e,...t)}function g(e,t,n){let r=Object.assign(Object.assign({},u()),{[t]:n});return new o.LL("auth","Firebase",r).create(t,{appName:e.name})}function m(e){return g(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function v(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return c.create(e,...t)}function y(e,t,...n){if(!e)throw v(t,...n)}function _(e){let t="INTERNAL ASSERTION FAILED: "+e;throw d(t),Error(t)}function b(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function w(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class k{constructor(e,t){var n;this.shortDelay=e,this.longDelay=t,n="Short delay should be less than long delay!",t>e||_(n),this.isMobile=(0,o.uI)()||(0,o.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===w()||"https:"===w()||(0,o.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function C(e,t){var n,r;n=e.emulator,r="Emulator should always be set here",n||_(r);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class S{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 _("Could not find fetch implementation, make sure you call FetchProvi
1der.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 _("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 _("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let E={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"},x=new k(3e4,6e4);function I(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function T(e,t,n,r,i={}){return P(e,i,async()=>{let i={},s={};r&&("GET"===t?s=r:i={body:JSON.stringify(r)});let a=(0,o.xO)(Object.assign({key:e.config.apiKey},s)).slice(1),l=await e._getAdditionalHeaders();l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode);let u=Object.assign({method:t,headers:l},i);return(0,o.L_)()||(u.referrerPolicy="no-referrer"),S.fetch()(R(e,e.config.apiHost,n,a),u)})}async function P(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},E),t);try{let t=new N(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let o=await i.json();if("needConfirmation"in o)throw A(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{let[t,n]=(i.ok?o.errorMessage:o.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw A(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===t)throw A(e,"email-already-in-use",o);if("USER_DISABLED"===t)throw A(e,"user-disabled",o);let s=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(n)throw g(e,s,n);p(e,s)}}catch(t){if(t instanceof o.ZR)throw t;p(e,"network-request-failed",{message:String(t)})}}async function O(e,t,n,r,i={}){let o=await T(e,t,n,r,i);return"mfaPendingCredential"in o&&p(e,"multi-factor-auth-required",{_serverResponse:o}),o}function R(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?C(e.config,i):`${e.config.apiScheme}://${i}`}class N{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>
1{this.timer=setTimeout(()=>t(f(this.auth,"network-request-failed")),x.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function A(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=f(e,t,r);return i.customData._tokenResponse=n,i}function L(e){return void 0!==e&&void 0!==e.enterprise}class D{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw 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(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return function(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}}async function M(e,t){return T(e,"GET","/v2/recaptchaConfig",I(e,t))}async function j(e,t){return T(e,"POST","/v1/accounts:delete",t)}async function F(e,t){return T(e,"POST","/v1/accounts:lookup",t)}function Z(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function $(e,t=!1){let n=(0,o.m9)(e),r=await n.getIdToken(t),i=z(r);y(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let s="object"==typeof i.firebase?i.firebase:void 0,a=null==s?void 0:s.sign_in_provider;return{claims:i,token:r,authTime:Z(U(i.auth_time)),issuedAtTime:Z(U(i.iat)),expirationTime:Z(U(i.exp)),signInProvider:a||null,signInSecondFactor:(null==s?void 0:s.sign_in_second_factor)||null}}function U(e){return 1e3*Number(e)}function z(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,o.tV)(n);if(!e)return d("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return d("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}function q(e){let t=z(e);return y(t,"internal-error"),y(void 0!==t.exp,"internal-error"),y(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function W(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof o.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class V{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)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class B{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=Z(this.lastLoginAt),this.creationTime=Z(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function H(e){var t;let n=e.auth,r=await e.getIdToken(),i=await W(e,F(n,{idToken:r}));y(null==i?void 0:i.users.length,n,"internal-error");let o=i.users[0];e._notifyReloadListener(o);let s=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?G(o.providerUserInfo):[],a=[...e.providerData.filter(e=>!s.some(t=>t.providerId===e.providerId)),...s],l=e.isAnonymous,u=!(e.email&&o.passwordHash)&&!(null==a?void 0:a.length);Object.assign(e,{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 B(o.createdAt,o.lastLoginAt),isAnonymous:!!l&&u})}async function K(e){let t=(0,o.m9)(e);await H(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function G(e){return e.map(e=>{var{providerId:t}=e,n=a(e,["providerId"]);
1return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}async function Y(e,t){let n=await P(e,{},async()=>{let n=(0,o.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,s=R(e,r,"/v1/token",`key=${i}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",S.fetch()(s,{method:"POST",headers:a,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function J(e,t){return T(e,"POST","/v2/accounts:revokeToken",I(e,t))}class X{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){y(e.idToken,"internal-error"),y(void 0!==e.idToken,"internal-error"),y(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):q(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){y(0!==e.length,"internal-error");let t=q(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(y(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){let{accessToken:n,refreshToken:r,expiresIn:i}=await Y(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){let{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new X;return n&&(y("string"==typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(y("string"==typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(y("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 X,this.toJSON())}_performRefresh(){return _("not implemented")}}function Q(e,t){y("string"==typeof e||void 0===e,"internal-error",{appName:t})}class ee{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=a(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new V(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 B(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await W(this,this.stsTokenManager.getToken(this.auth,e));return y(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return $(this,e)}reload(){return K(this)}_assign(e){this!==e&&(y(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){let t=new ee(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){y(!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,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await H(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,i.rh)(this.auth.app))return Promise.reject(m(this.auth));let e=await this.getIdToken();return await W(this,j(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,isA
1nonymous: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,u;let c=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,p=null!==(o=t.photoURL)&&void 0!==o?o:void 0,f=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,v=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:_,emailVerified:b,isAnonymous:w,providerData:k,stsTokenManager:C}=t;y(_&&C,e,"internal-error");let S=X.fromJSON(this.name,C);y("string"==typeof _,e,"internal-error"),Q(c,e.name),Q(h,e.name),y("boolean"==typeof b,e,"internal-error"),y("boolean"==typeof w,e,"internal-error"),Q(d,e.name),Q(p,e.name),Q(f,e.name),Q(g,e.name),Q(m,e.name),Q(v,e.name);let E=new ee({uid:_,auth:e,email:h,emailVerified:b,displayName:c,isAnonymous:w,photoURL:p,phoneNumber:d,tenantId:f,stsTokenManager:S,createdAt:m,lastLoginAt:v});return k&&Array.isArray(k)&&(E.providerData=k.map(e=>Object.assign({},e))),g&&(E._redirectEventId=g),E}static async _fromIdTokenResponse(e,t,n=!1){let r=new X;r.updateFromServerResponse(t);let i=new ee({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await H(i),i}static async _fromGetAccountInfoResponse(e,t,n){let r=t.users[0];y(void 0!==r.localId,"internal-error");let i=void 0!==r.providerUserInfo?G(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null==i?void 0:i.length),s=new X;s.updateFromIdToken(n);let a=new ee({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:o});return Object.assign(a,{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 B(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null==i?void 0:i.length)}),a}}let et=new Map;function en(e){var t,n;t="Expected a class definition",e instanceof Function||_(t);let r=et.get(e);return r?(n="Instance stored in cache mismatched with class",r instanceof e||_(n)):(r=new e,et.set(e,r)),r}class er{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function ei(e,t,n){return`firebase:${e}:${t}:${n}`}er.type="NONE";class eo{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=ei(this.userKey,r.apiKey,i),this.fullPersistenceKey=ei("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(){let e=await this.persistence._get(this.fullUserKey);return e?ee._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;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new eo(en(er),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||en(er),o=ei(n,e.config.apiKey,e.name),s=null;for(let n of t)try{let t=await n._get(o);if(t){let r=ee._fromJSON(e,t);n!==i&&(s=r),i=n;break}}catch(e){}let 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(e){}}))),new eo(i,e,n)}}function es(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ec(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(ea(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ed(t))return"Blackberry";if(ep(t))return"Webos";if(el(t))return"Safari";
1if((t.includes("chrome/")||eu(t))&&!t.includes("edge/"))return"Chrome";if(eh(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function ea(e=(0,o.z$)()){return/firefox\//i.test(e)}function el(e=(0,o.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function eu(e=(0,o.z$)()){return/crios\//i.test(e)}function ec(e=(0,o.z$)()){return/iemobile/i.test(e)}function eh(e=(0,o.z$)()){return/android/i.test(e)}function ed(e=(0,o.z$)()){return/blackberry/i.test(e)}function ep(e=(0,o.z$)()){return/webos/i.test(e)}function ef(e=(0,o.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function eg(e=(0,o.z$)()){return ef(e)||eh(e)||ep(e)||ed(e)||/windows phone/i.test(e)||ec(e)}function em(e,t=[]){let n;switch(e){case"Browser":n=es((0,o.z$)());break;case"Worker":n=`${es((0,o.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${i.Jn}/${r}`}class ev{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}async function ey(e,t={}){return T(e,"GET","/v2/passwordPolicy",I(e,t))}class e_{constructor(e){var t,n,r,i;let 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;let 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){let 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 eb{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 ek(this),this.idTokenSubscription=new ek(this),this.beforeStateQueue=new ev(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=c,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=en(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await eo.create(this,e),!this._deleted)){if
1(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}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;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await F(this,{idToken:e}),n=await ee._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if((0,i.rh)(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let n=await this.assertedPersistence.getCurrentUser(),r=n,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,i=null==r?void 0:r._redirectEventId,s=await this.tryRedirectSignIn(e);(!n||n===i)&&(null==s?void 0:s.user)&&(r=s.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(y(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(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await H(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if((0,i.rh)(this.app))return Promise.reject(m(this));let t=e?(0,o.m9)(e):null;return t&&y(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&y(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(0,i.rh)(this.app)?Promise.reject(m(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return(0,i.rh)(this.app)?Promise.reject(m(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(en(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let 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(){let e=new e_(await ey(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new o.LL("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)=>
1{if(this.currentUser)e();else{let n=this.onAuthStateChanged(()=>{n(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await J(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){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&en(e)||this._popupRedirectResolver;y(t,this,"argument-error"),this.redirectPersistenceManager=await eo.create(this,[en(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);let 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()=>{};let i="function"==typeof t?t:t.next.bind(t),o=!1,s=this._isInitialized?Promise.resolve():this._initializationPromise;if(y(s,this,"internal-error"),s.then(()=>{o||i(this.currentUser)}),"function"==typeof t){let i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{let 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 y(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=em(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h.logLevel<=s.in.WARN&&h.warn(`Auth (${i.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function ew(e){return(0,o.m9)(e)}class ek{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,o.ne)(e=>this.observer=e)}get next(){return y(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let eC={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function eS(e){return`__${e}${Math.floor(1e6*Math.random())}`}class eE{constructor(e){this.type="recaptcha-enterprise",this.auth=ew(e)}async verify(e="verify",t=!1){async function n(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)=>
1{M(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new D(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;L(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,i)=>{n(this.auth).then(n=>{if(!t&&L(window.grecaptcha))r(n,e,i);else{var o;if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}let t=eC.recaptchaEnterpriseScript;0!==t.length&&(t+=n),(o=t,eC.loadJS(o)).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function ex(e,t,n,r=!1){let i;let o=new eE(e);try{i=await o.verify(n)}catch(e){i=await o.verify(n,!0)}let s=Object.assign({},t);return r?Object.assign(s,{captchaResp:i}):Object.assign(s,{captchaResponse:i}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function eI(e,t,n,r){var i;if(null===(i=e._getRecaptchaConfig())||void 0===i||!i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return r(e,t).catch(async i=>{if("auth/missing-recaptcha-token"!==i.code)return Promise.reject(i);{console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let i=await ex(e,t,n,"getOobCode"===n);return r(e,i)}});{let i=await ex(e,t,n,"getOobCode"===n);return r(e,i)}}function eT(e){let t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function eP(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class eO{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return _("not implemented")}_getIdTokenResponse(e){return _("not implemented")}_linkToIdToken(e,t){return _("not implemented")}_getReauthenticationResolver(e){return _("not implemented")}}async function eR(e,t){return T(e,"POST","/v1/accounts:signUp",t)}async function eN(e,t){return O(e,"POST","/v1/accounts:signInWithPassword",I(e,t))}async function eA(e,t){return T(e,"POST","/v1/accounts:sendOobCode",I(e,t))}async function eL(e,t){return eA(e,t)}async function eD(e,t){return O(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}async function eM(e,t){return O(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}class ej extends eO{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new ej(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new ej(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==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 eI(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",eN);case"emailLink":return eD(e,{email:this._email,oobCode:this._password});default:p(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eI(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",eR);case"emailLink":return eM(e,{idToken:t,email:this._email,oobCode:this._password});default:p(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function eF(e,t){return O(e,"POST","/v1/accounts:signInWithIdp",I(e,t))}class eZ extends eO{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eZ(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&&
1(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):p("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){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=a(t,["providerId","signInMethod"]);if(!n||!r)return null;let o=new eZ(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 eF(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eF(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eF(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let 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=(0,o.xO)(t)}return e}}async function e$(e,t){return T(e,"POST","/v1/accounts:sendVerificationCode",I(e,t))}async function eU(e,t){return O(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t))}async function ez(e,t){let n=await O(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t));if(n.temporaryProof)throw A(e,"account-exists-with-different-credential",n);return n}let eq={USER_NOT_FOUND:"user-not-found"};async function eW(e,t){return O(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eq)}class eV extends eO{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new eV({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new eV({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eU(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return ez(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eW(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let 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));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new eV({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eB{constructor(e){var t,n,r,i,s,a;let l=(0,o.zd)((0,o.pd)(e)),u=null!==(t=l.apiKey)&&void 0!==t?t:null,c=null!==(n=l.oobCode)&&void 0!==n?n:null,h=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=l.mode)&&void 0!==r?r:null);y(u&&c&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=c,this.continueUrl=null!==(i=l.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(s=l.languageCode)&&void 0!==s?s:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){let t=function(e){let t=(0,o.zd)((0,o.pd)(e)).link,n=t?(0,o.zd)((0,o.pd)(t)).deep_link_id:null,r=(0,o.zd)((0,o.pd)(e)).deep_link_id;return(r?(0,o.zd)((0,o.pd)(r)).link:null)||r||n||t||e}(e);try{return new eB(t)}catch(e){return null}}}class eH{constructor(){this.providerId=eH.PROVIDER_ID}static credential(e,t){return ej._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eB.parseLink(t);return y(n,"argument-error"),ej._fromEmailAndCode(e,n.code,n.tenantId)}}eH.PROVIDER_ID="password",eH.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eH.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class eK{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 eG extends eK{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class eY extends eG{constructor(){super("facebook.com")}static credential(e){return eZ._fromParams({providerId:eY.PROVIDER_ID,signInMethod:eY.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eY.credentialFromTaggedObject(e)}static credentialFromError(e){return eY.credentialFromTaggedObject(e.customData||{})}
1static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eY.credential(e.oauthAccessToken)}catch(e){return null}}}eY.FACEBOOK_SIGN_IN_METHOD="facebook.com",eY.PROVIDER_ID="facebook.com";class eJ extends eG{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eZ._fromParams({providerId:eJ.PROVIDER_ID,signInMethod:eJ.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eJ.credentialFromTaggedObject(e)}static credentialFromError(e){return eJ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return eJ.credential(t,n)}catch(e){return null}}}eJ.GOOGLE_SIGN_IN_METHOD="google.com",eJ.PROVIDER_ID="google.com";class eX extends eG{constructor(){super("github.com")}static credential(e){return eZ._fromParams({providerId:eX.PROVIDER_ID,signInMethod:eX.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eX.credentialFromTaggedObject(e)}static credentialFromError(e){return eX.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eX.credential(e.oauthAccessToken)}catch(e){return null}}}eX.GITHUB_SIGN_IN_METHOD="github.com",eX.PROVIDER_ID="github.com";class eQ extends eG{constructor(){super("twitter.com")}static credential(e,t){return eZ._fromParams({providerId:eQ.PROVIDER_ID,signInMethod:eQ.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eQ.credentialFromTaggedObject(e)}static credentialFromError(e){return eQ.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eQ.credential(t,n)}catch(e){return null}}}async function e0(e,t){return O(e,"POST","/v1/accounts:signUp",I(e,t))}eQ.TWITTER_SIGN_IN_METHOD="twitter.com",eQ.PROVIDER_ID="twitter.com";class e1{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){return new e1({user:await ee._fromIdTokenResponse(e,n,r),providerId:e2(n),_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){return await e._updateTokensIfNecessary(n,!0),new e1({user:e,providerId:e2(n),_tokenResponse:n,operationType:t})}}function e2(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class e3 extends o.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,e3.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 e3(e,t,n,r)}}function e4(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw e3._fromErrorAndOperation(e,n,t,r);throw n})}async function e5(e,t,n=!1){let r=await W(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return e1._forOperation(e,"link",r)}async function e6(e,t,n=!1){let{auth:r}=e;if((0,i.rh)(r.app))return Promise.reject(m(r));let o="reauthenticate";try{let i=await W(e,e4(r,o,t,e),n);y(i.idToken,r,"internal-error");let s=z(i.idToken);y(s,r,"internal-error");let{sub:a}=s;return y(e.uid===a,r,"user-mismatch"),e1._forOperation(e,o,i)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&p(r,"user-mismatch"),e}}async function e8(e,t,n=!1){if((0,i.rh)(e.app))return Promise.reject(m(e));let r="signIn",o=await e4(e,r,t),s=await e1._fromIdTokenResponse(e,r,o);return n||await e._updateCurrentUser(s.user),s}async function e7(e,t){return e8(ew(e),t)}async function e9(e){let t=ew(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function te(e,t,n){let r=ew(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(n){var o;y((null===(o=n.url)||void 0===o?void 0:o.length)>
10,r,"invalid-continue-uri"),y(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,r,"invalid-dynamic-link-domain"),i.continueUrl=n.url,i.dynamicLinkDomain=n.dynamicLinkDomain,i.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(y(n.iOS.bundleId.length>0,r,"missing-ios-bundle-id"),i.iOSBundleId=n.iOS.bundleId),n.android&&(y(n.android.packageName.length>0,r,"missing-android-pkg-name"),i.androidInstallApp=n.android.installApp,i.androidMinimumVersionCode=n.android.minimumVersion,i.androidPackageName=n.android.packageName)}await eI(r,i,"getOobCode",eL)}async function tt(e,t,n){if((0,i.rh)(e.app))return Promise.reject(m(e));let r=ew(e),o=eI(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",e0),s=await o.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&e9(e),t}),a=await e1._fromIdTokenResponse(r,"signIn",s);return await r._updateCurrentUser(a.user),a}function tn(e,t,n){return(0,i.rh)(e.app)?Promise.reject(m(e)):e7((0,o.m9)(e),eH.credential(t,n)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&e9(e),t})}function tr(e,t,n,r){return(0,o.m9)(e).onAuthStateChanged(t,n,r)}function ti(e){return(0,o.m9)(e).signOut()}new WeakMap;let to="__sak";class ts{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(to,"1"),this.storage.removeItem(to),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let 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 ta extends ts{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=eg(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;t?this.detachListener():this.stopPolling();let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},i=this.storage.getItem(n);(0,o.w1)()&&10===document.documentMode&&i!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(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){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}ta.type="LOCAL";class tl extends ts{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}tl.type="SESSION";class tu{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new tu(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let o=Array.from(i).map(async t=>t(e.origin,r)),s=await Promise.all(o.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:s})}_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)}}
1function tc(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}tu.receivers=[];class th{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,n=50){let r,i;let o="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!o)throw Error("connection_unavailable");return new Promise((s,a)=>{let l=tc("",20);o.port1.start();let u=setTimeout(()=>{a(Error("unsupported_event"))},n);i={messageChannel:o,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(u),r=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(r),s(e.data.response);break;default:clearTimeout(u),clearTimeout(r),a(Error("invalid_response"))}}},this.handlers.add(i),o.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[o.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}function td(){return window}function tp(){return void 0!==td().WorkerGlobalScope&&"function"==typeof td().importScripts}async function tf(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}let tg="firebaseLocalStorageDb",tm="firebaseLocalStorage",tv="fbase_key";class ty{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 t_(e,t){return e.transaction([tm],t?"readwrite":"readonly").objectStore(tm)}function tb(){let e=indexedDB.open(tg,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tm,{keyPath:tv})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(tm)?t(n):(n.close(),await new ty(indexedDB.deleteDatabase(tg)).toPromise(),t(await tb()))})})}async function tw(e,t,n){return new ty(t_(e,!0).put({[tv]:t,value:n})).toPromise()}async function tk(e,t){let n=t_(e,!1).get(t),r=await new ty(n).toPromise();return void 0===r?null:r.value}function tC(e,t){return new ty(t_(e,!0).delete(t)).toPromise()}class tS{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 tb()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return tp()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=tu._getInstance(tp()?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 tf(),!this.activeServiceWorker)return;this.sender=new th(this.activeServiceWorker);let 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){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await tb();return await tw(e,to,"1"),await tC(e,to),!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=>tw(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tk(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>tC(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new ty(t_(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;if(0!==e.length)for(let{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(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(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()}}async function tE(e,t,n){var r,i,o;let s=await n.verify();try{let a;if(y("string"==typeof s,e,"argument-error"),y("recaptcha"===n.type,e,"argument-error"),a="string"==typeof t?{phoneNumber:t}
1:t,"session"in a){let t=a.session;if("phoneNumber"in a)return y("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,recaptchaToken:s}},T(e,"POST","/v2/accounts/mfaEnrollment:start",I(e,i)))).phoneSessionInfo.sessionInfo;{y("signin"===t.type,e,"internal-error");let n=(null===(r=a.multiFactorHint)||void 0===r?void 0:r.uid)||a.multiFactorUid;return y(n,e,"missing-multi-factor-info"),(await (o={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:s}},T(e,"POST","/v2/accounts/mfaSignIn:start",I(e,o)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await e$(e,{phoneNumber:a.phoneNumber,recaptchaToken:s});return t}}finally{n._reset()}}tS.type="LOCAL",eS("rcb"),new k(3e4,6e4);class tx{constructor(e){this.providerId=tx.PROVIDER_ID,this.auth=ew(e)}verifyPhoneNumber(e,t){return tE(this.auth,e,(0,o.m9)(t))}static credential(e,t){return eV._fromVerification(e,t)}static credentialFromResult(e){return tx.credentialFromTaggedObject(e)}static credentialFromError(e){return tx.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?eV._fromTokenResponse(t,n):null}}function tI(e,t){return t?en(t):(y(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}tx.PROVIDER_ID="phone",tx.PHONE_SIGN_IN_METHOD="phone";class tT extends eO{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eF(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eF(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eF(e,this._buildIdpRequest())}_buildIdpRequest(e){let 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 tP(e){return e8(e.auth,new tT(e),e.bypassAuthState)}function tO(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),e6(n,new tT(e),e.bypassAuthState)}async function tR(e){let{auth:t,user:n}=e;return y(n,t,"internal-error"),e5(n,new tT(e),e.bypassAuthState)}class tN{constructor(e,t,n,r,i=!1){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(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:s}=e;if(o){this.reject(o);return}let 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(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tP;case"linkViaPopup":case"linkViaRedirect":return tR;case"reauthViaPopup":case"reauthViaRedirect":return tO;default:p(this.auth,"internal-error")}}resolve(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||_(n),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||_(n),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let tA=new k(2e3,1e4);async function tL(e,t,n){if((0,i.rh)(e.app))return Promise.reject(f(e,"operation-not-supported-in-this-environment"));let r=ew(e);!function(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&p(e,"argument-error"),g(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}(e,t,eK);let o=tI(r,n);return new tD(r,"signInViaPopup",t,o).executeNotNull()}
1class tD extends tN{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,tD.currentPopupAction&&tD.currentPopupAction.cancel(),tD.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return y(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||_(t);let n=tc();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],n),this.authWindow.associatedEvent=n,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(f(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(f(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tD.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(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(f(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,tA.get())};e()}}tD.currentPopupAction=null;let tM=new Map;class tj extends tN{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=tM.get(this.auth._key());if(!e){try{let t=await tF(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tM.set(this.auth._key(),e)}return this.bypassAuthState||tM.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tF(e,t){let n=ei("pendingRedirect",t.config.apiKey,t.name),r=en(e._redirectPersistence);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function tZ(e,t){tM.set(e._key(),t)}async function t$(e,t,n=!1){if((0,i.rh)(e.app))return Promise.reject(m(e));let r=ew(e),o=tI(r,t),s=new tj(r,o,n),a=await s.execute();return a&&!n&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}class tU{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 tq(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tq(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(f(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let 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(tz(e))}saveEventToCache(e){this.cachedEventUids.add(tz(e)),this.lastProcessedEventTime=Date.now()}}function tz(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tq({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}async function tW(e,t={}){return T(e,"GET","/v1/projects",t)}let tV=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tB=/^https?/;async function tH(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tW(e);for(let e of t)try{if(function(e){let t=b(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let 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(!tB.test(n))return!1;if(tV.test(e))return r===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}(e))return}catch(e){}p(e,"unauthorized-domain")}let tK=new k(3e4,6e4);function tG(){let e=td().___jsl;if(null==e?void 0:e.H){for(let 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 t=0;t<e.CP.length;t++)e.CP[t]=null}}let tY=null,tJ=new k(5e3,15e3),tX={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tQ=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function t0(e){let t=await (tY=tY||new Promise((t,n)=>{var r,i,o,s;function a(){tG(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tG(),n(f(e,"network-request-failed"))},timeout:tK.get()})}if(null===(i=null===(r=td().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(o=td().gapi)||void 0===o?void 0:o.load)a();else{let t=eS("iframefcb");return td()[t]=()=>{gapi.load?a():n(f(e,"network-request-failed"))},(s=`${eC.gapiScript}?onload=${t}`,eC.loadJS(s)).catch(e=>n(e))}}).catch(e=>{throw tY=null,e})),n=td().gapi;return y(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;y(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?C(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
1/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:i.Jn},s=tQ.get(e.config.apiHost);s&&(r.eid=s);let a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${(0,o.xO)(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tX,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=f(e,"network-request-failed"),o=td().setTimeout(()=>{r(i)},tJ.get());function s(){td().clearTimeout(o),n(t)}t.ping(s).then(s,()=>{r(i)})}))}let t1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class t2{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let t3=encodeURIComponent("fac");async function t4(e,t,n,r,s,a){y(e.config.authDomain,e,"auth-domain-config-required"),y(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:i.Jn,eventId:s};if(t instanceof eK)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,o.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))l[n]=r;if(t instanceof eG){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}for(let t of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[t]&&delete l[t];let u=await e._getAppCheckToken(),c=u?`#${t3}=${encodeURIComponent(u)}`:"";return`${function({config:e}){return e.emulator?C(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,o.xO)(l).slice(1)}${c}`}let t5="webStorageSupport";class t6{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=tl,this._completeRedirectFn=t$,this._overrideRedirectResult=tZ}async _openPopup(e,t,n,r){var i,s,a;s=null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,a="_initialize() not called before _openPopup()",s||_(a);let l=await t4(e,t,n,b(),r);return function(e,t,n,r=500,i=600){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",u=Object.assign(Object.assign({},t1),{width:r.toString(),height:i.toString(),top:s,left:a}),c=(0,o.z$)().toLowerCase();n&&(l=eu(c)?"_blank":n),ea(c)&&(t=t||"http://localhost",u.scrollbars="yes");let h=Object.entries(u).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,o.z$)()){var t;return ef(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==l)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let 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||"",l),new t2(null);let d=window.open(t||"",l,h);y(d,e,"popup-blocked");try{d.focus()}catch(e){}return new t2(d)}(e,l,tc())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=await t4(e,t,n,b(),r),td().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var n;let{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(n="If manager is not set, promise should be",r||_(n),r)}let r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){let t=await t0(e),n=new tU(e);return t.register("authEvent",t=>(y(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{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(t5,{type:t5},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[t5];void 0!==i&&t(!!i),p(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tH(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return eg()||el()||ef()}}class t8{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return _("unexpected MultiFactorSessionType")}}}class t7 extends t8{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t7(e)}_finalizeEnroll(e,t,n){return T(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return T(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class t9{constructor(){}static assertion(e){return t7._fromCredential(e)}}t9.FACTOR_ID="phone";class ne{static assertionForEnrollment(e,t){return nt._fromSecret(e,t)}static assertionForSignIn(e,t){return nt._fromEnrollmentId(e,t)}static async generateSecret(e){var t,n;y(void 0!==(null===(t=e.user)||void 0===t?void 0:t.auth),"internal-error");let r=await T(n=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",I(n,{idToken:e.credential,totpEnrollmentInfo:{}}));return nn._fromStartTotpMfaEnrollmentResponse(r,e.user.auth)}}ne.FACTOR_ID="totp";class nt extends t8{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new nt(t,void 0,e)}static _fromEnrollmentId(e,t){return new nt(t,e)}async _finalizeEnroll(e,t,n){return y(void 0!==this.secret,e,"argument-error"),T(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){y(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return T(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class nn{constructor(e,t,n,r,i,o,s){this.sessionInfo=o,this.auth=s,this.secretKey=e,this.hashingAlgorithm=t,this.co
1deLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nn(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(nr(e)||nr(t))&&(r=!0),r&&(nr(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),nr(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function nr(e){return void 0===e||(null==e?void 0:e.length)===0}var ni="@firebase/auth",no="1.7.9";class ns{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){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){y(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let na=(0,o.Pz)("authIdTokenMaxAge")||300,nl=null,nu=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>na)return;let i=null==n?void 0:n.token;nl!==i&&(nl=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function nc(e=(0,i.Mq)()){let t=(0,i.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=function(e,t){let n=(0,i.qX)(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if((0,o.vZ)(r,null!=t?t:{}))return e;p(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:t6,persistence:[tS,ta,tl]}),r=(0,o.Pz)("authTokenSyncURL");if(r&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(r,location.origin);if(location.origin===e.origin){var s,a;let t=nu(e.toString());s=()=>t(n.currentUser),(0,o.m9)(n).beforeAuthStateChanged(t,s),a=e=>t(e),(0,o.m9)(n).onIdTokenChanged(a,void 0,void 0)}}let l=(0,o.q4)("auth");return l&&function(e,t,n){let r=ew(e);y(r._canInitEmulator,r,"emulator-config-failed"),y(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=eT(t),{host:o,port:s}=function(e){let t=eT(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:eP(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:eP(t)}}}(t),a=null===s?"":`:${s}`;r.config.emulator={url:`${i}//${o}${a}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:o,port:s,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:!1})}),function(){function e(){let 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())}()}(n,`http://${l}`),n}eC={loadJS:e=>
1new Promise((t,n)=>{var r,i;let o=document.createElement("script");o.setAttribute("src",e),o.onload=t,o.onerror=e=>{let t=f("internal-error");t.customData=e,n(t)},o.type="text/javascript",o.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(o)}),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="},r="Browser",(0,i.Xd)(new l.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=n.options;y(s&&!s.includes(":"),"invalid-api-key",{appName:n.name});let l=new eb(n,i,o,{apiKey:s,authDomain:a,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:em(r)});return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(en);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,i.Xd)(new l.wA("auth-internal",e=>new ns(ew(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,i.KN)(ni,no,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}}(r)),(0,i.KN)(ni,no,"esm2017")},89355:function(e,t,n){"use strict";let r,i,o,s,a,l,u,c,h,d,p;n.d(t,{iU:function(){return rL},EW:function(){return rK},U2:function(){return rj},N8:function(){return rX},jM:function(){return r$},g2:function(){return rB},IO:function(){return rG},iH:function(){return rA},t8:function(){return rD},e0:function(){return rW},Vx:function(){return rM}});var f,g,m=n(32238),v=n(8463),y=n(74444),_=n(53333),b=n(83454);let w="@firebase/database",k="1.0.8",C="";class S{constructor(e){this.domStorage_=e,this.prefix_="firebase:"}set(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),(0,y.Wl)(t))}get(e){let t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:(0,y.cI)(t)}remove(e){this.domStorage_.removeItem(this.prefixedName_(e))}prefixedName_(e){return this.prefix_+e}toString(){return this.domStorage_.toString()}}class E{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t}get(e){return(0,y.r3)(this.cache_,e)?this.cache_[e]:null}remove(e){delete this.cache_[e]}}let x=function(e){try{if("undefined"!=typeof window&&void 0!==window[e]){let t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new S(t)}}catch(e){}return new E},I=x("localStorage"),T=x("sessionStorage"),P=new _.Yd("@firebase/database"),O=(p=1,function(){return p++}),R=function(e){let t=(0,y.dS)(e),n=new y.gQ;n.update(t);let r=n.digest();return y.US.encodeByteArray(r)},N=function(...e){let t="";for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)||r&&"object"==typeof r&&"number"==typeof r.length?t+=N.apply(null,r):"object"==typeof r?t+=(0,y.Wl)(r):t+=r,t+=" "}return t},A=null,L=!0,D=function(e,t){(0,y.hu)(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(P.logLevel=_.in.VERBOSE,A=P.log.bind(P),t&&T.set("logging_enabled",!0)):"function"==typeof e?A=e:(A=null,T.remove("logging_enabled"))},M=function(...e){if(!0===L&&(L=!1,null===A&&!0===T.get("logging_enabled")&&D(!0)),A){let t=N.apply(null,e);A(t)}},j=function(e){return function(...t){M(e,...t)}},F=function(...e){let t="FIREBASE INTERNAL ERROR: "+N(...e);P.error(t)},Z=function(...e){let t=`FIREBASE FATAL ERROR: ${N(...e)}`;throw P.error(t),Error(t)},$=function(...e){let t="FIREBASE WARNING: "+N(...e);P.warn(t)},U=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&$("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},z=function(e){return"number"==typeof e&&(e!=e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},q=function(e){if((0,y.Yr)()||"complete"===document.readyState)e();else{let t=!1,n=function(){if(!document.body){setTimeout(n,Math.floor(10));return}t||(t=!0,e())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}},W="[MIN_NAME]",V="[MAX_NAME]",B=function(e,t){if(e===t)return 0;if(e===W||t===V)return -1;if(t===W||e===V)return 1;{let n=ee(e),r=ee(t);return null!==n?null!==r?n-r==0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1}},H=function(e,t){return e===t?0:e<t?-1:1},K=function(e,t){if(t&&e in t)return t[e];throw Error("Missing required key ("+e+") in object: "+(0,y.Wl)(t))},G=function(e){if("object"!=typeof e||null===e)return(0,y.Wl)(e);let t=[];for(let n in e)t.push(n);
1t.sort();let n="{";for(let r=0;r<t.length;r++)0!==r&&(n+=","),n+=(0,y.Wl)(t[r])+":"+G(e[t[r]]);return n+"}"},Y=function(e,t){let n=e.length;if(n<=t)return[e];let r=[];for(let i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function J(e,t){for(let n in e)e.hasOwnProperty(n)&&t(n,e[n])}let X=function(e){let t,n,r,i,o;(0,y.hu)(!z(e),"Invalid JSON number"),0===e?(n=0,r=0,t=1/e==-1/0?1:0):(t=e<0,(e=Math.abs(e))>=22250738585072014e-324?(n=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),1023))+1023,r=Math.round(e*Math.pow(2,52-i)-4503599627370496)):(n=0,r=Math.round(e/5e-324)));let s=[];for(o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(t?1:0),s.reverse();let a=s.join(""),l="";for(o=0;o<64;o+=8){let e=parseInt(a.substr(o,8),2).toString(16);1===e.length&&(e="0"+e),l+=e}return l.toLowerCase()},Q=RegExp("^-?(0*)\\d{1,10}$"),ee=function(e){if(Q.test(e)){let t=Number(e);if(t>=-2147483648&&t<=2147483647)return t}return null},et=function(e){try{e()}catch(e){setTimeout(()=>{throw $("Exception was thrown by user callback.",e.stack||""),e},Math.floor(0))}},en=function(e,t){let n=setTimeout(e,t);return"number"==typeof n&&"undefined"!=typeof Deno&&Deno.unrefTimer?Deno.unrefTimer(n):"object"==typeof n&&n.unref&&n.unref(),n};class er{constructor(e,t){this.appName_=e,this.appCheckProvider=t,this.appCheck=null==t?void 0:t.getImmediate({optional:!0}),this.appCheck||null==t||t.get().then(e=>this.appCheck=e)}getToken(e){return this.appCheck?this.appCheck.getToken(e):new Promise((t,n)=>{setTimeout(()=>{this.appCheck?this.getToken(e).then(t,n):t(null)},0)})}addTokenChangeListener(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then(t=>t.addTokenListener(e))}notifyForInvalidToken(){$(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}class ei{constructor(e,t,n){this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit(e=>this.auth_=e)}getToken(e){return this.auth_?this.auth_.getToken(e).catch(e=>e&&"auth/token-not-initialized"===e.code?(M("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(e)):new Promise((t,n)=>{setTimeout(()=>{this.auth_?this.getToken(e).then(t,n):t(null)},0)})}addTokenChangeListener(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(t=>t.addAuthTokenListener(e))}removeTokenChangeListener(e){this.authProvider_.get().then(t=>t.removeAuthTokenListener(e))}notifyForInvalidToken(){let e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',$(e)}}class eo{constructor(e){this.accessToken=e}getToken(e){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(e){e(this.accessToken)}removeTokenChangeListener(e){}notifyForInvalidToken(){}}eo.OWNER="owner";let es=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,ea="websocket",el="long_polling";class eu{constructor(e,t,n,r,i=!1,o="",s=!1,a=!1){this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this.isUsingEmulator=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=I.get("host:"+e)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&I.set("host:"+this._host,this.internalHost))}toString(){let e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e}toURLString(){let e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${e}${this.host}/${t}`}}function ec(e,t,n){let r;if((0,y.hu)("string"==typeof t,"typeof type must == string"),(0,y.hu)("object"==typeof n,"typeof params must == object"),t===ea)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===el)r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw Error("Unknown connection type: "+t);(e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams)&&
1(n.ns=e.namespace);let i=[];return J(n,(e,t)=>{i.push(e+"="+t)}),r+i.join("&")}class eh{constructor(){this.counters_={}}incrementCounter(e,t=1){(0,y.r3)(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t}get(){return(0,y.p$)(this.counters_)}}let ed={},ep={};function ef(e){let t=e.toString();return ed[t]||(ed[t]=new eh),ed[t]}class eg{constructor(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(e,t){for(this.pendingResponses[e]=t;this.pendingResponses[this.currentResponseNum];){let e=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let t=0;t<e.length;++t)e[t]&&et(()=>{this.onMessage_(e[t])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}let em="start";class ev{constructor(e,t,n,r,i,o,s){this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.transportSessionId=o,this.lastSessionId=s,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=j(e),this.stats_=ef(t),this.urlFn=e=>(this.appCheckToken&&(e.ac=this.appCheckToken),ec(t,el,e))}open(e,t){this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new eg(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(3e4)),q(()=>{if(this.isClosed_)return;this.scriptTagHolder=new ey((...e)=>{let[t,n,r,i,o]=e;if(this.incrementIncomingBytes_(e),this.scriptTagHolder){if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,t===em)this.id=n,this.password=r;else if("close"===t)n?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(n,()=>{this.onClosed_()})):this.onClosed_();else throw Error("Unrecognized command received: "+t)}},(...e)=>{let[t,n]=e;this.incrementIncomingBytes_(e),this.myPacketOrderer.handleResponse(t,n)},()=>{this.onClosed_()},this.urlFn);let e={};e[em]="t",e.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=this.scriptTagHolder.uniqueCallbackIdentifier),e.v="5",this.transportSessionId&&(e.s=this.transportSessionId),this.lastSessionId&&(e.ls=this.lastSessionId),this.applicationId&&(e.p=this.applicationId),this.appCheckToken&&(e.ac=this.appCheckToken),"undefined"!=typeof location&&location.hostname&&es.test(location.hostname)&&(e.r="f");let t=this.urlFn(e);this.log_("Connecting via long-poll to "+t),this.scriptTagHolder.addTag(t,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){ev.forceAllow_=!0}static forceDisallow(){ev.forceDisallow_=!0}static isAvailable(){return!(0,y.Yr)()&&(!!ev.forceAllow_||!ev.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!("object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"==typeof Windows&&"object"==typeof Windows.UI))}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){!this.isClosed_&&(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(e){let t=(0,y.Wl)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);let n=Y((0,y.h$)(t),1840);for(let e=0;e<n.length;e++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,n.length,n[e]),this.curSegmentNum++}addDisconnectPingFrame(e,t){if((0,y.Yr)())return;this.myDisconnFrame=document.createElement("iframe");let n={};n.dframe="t",n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(e){let t=(0,y.Wl)(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)}}class ey{constructor(e,t,n,r){if(this.onDisconnect=n,this.urlFn=r,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,(0,y.Yr)())this.commandCB=e,this.onMessageCB=t;else{this.uniqueCallbackIdentifier=O(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=t,this.myIFrame=ey.createIFrame_();let n="";this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,11)&&(n='<script>document.domain="'+document.domain+'";</script>');let r="<html><body>"+n+"</body></html>";
1try{this.myIFrame.doc.open(),this.myIFrame.doc.write(r),this.myIFrame.doc.close()}catch(e){M("frame writing exception"),e.stack&&M(e.stack),M(e)}}}static createIFrame_(){let e=document.createElement("iframe");if(e.style.display="none",document.body){document.body.appendChild(e);try{e.contentWindow.document||M("No IE domain setting required")}catch(n){let t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));let e=this.onDisconnect;e&&(this.onDisconnect=null,e())}startLongPoll(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););}newRequest_(){if(!this.alive||!this.sendNewPolls||!(this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)))return!1;{this.currentSerial++;let e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;let t=this.urlFn(e),n="",r=0;for(;this.pendingSegs.length>0;)if(this.pendingSegs[0].d.length+30+n.length<=1870){let e=this.pendingSegs.shift();n=n+"&seg"+r+"="+e.seg+"&ts"+r+"="+e.ts+"&d"+r+"="+e.d,r++}else break;return t+=n,this.addLongPollTag_(t,this.currentSerial),!0}}enqueueSegment(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()}addLongPollTag_(e,t){this.outstandingRequests.add(t);let n=()=>{this.outstandingRequests.delete(t),this.newRequest_()},r=setTimeout(n,Math.floor(25e3));this.addTag(e,()=>{clearTimeout(r),n()})}addTag(e,t){(0,y.Yr)()?this.doNodeLongPoll(e,t):setTimeout(()=>{try{if(!this.sendNewPolls)return;let n=this.myIFrame.doc.createElement("script");n.type="text/javascript",n.async=!0,n.src=e,n.onload=n.onreadystatechange=function(){let e=n.readyState;e&&"loaded"!==e&&"complete"!==e||(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),t())},n.onerror=()=>{M("Long-poll script failed to load: "+e),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(n)}catch(e){}},Math.floor(1))}}let e_=null;"undefined"!=typeof MozWebSocket?e_=MozWebSocket:"undefined"!=typeof WebSocket&&(e_=WebSocket);class eb{constructor(e,t,n,r,i,o,s){this.connId=e,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=j(this.connId),this.stats_=ef(t),this.connURL=eb.connectionURL_(t,o,s,r,n),this.nodeAdmin=t.nodeAdmin}static connectionURL_(e,t,n,r,i){let o={};return o.v="5",!(0,y.Yr)()&&"undefined"!=typeof location&&location.hostname&&es.test(location.hostname)&&(o.r="f"),t&&(o.s=t),n&&(o.ls=n),r&&(o.ac=r),i&&(o.p=i),ec(e,ea,o)}open(e,t){this.onDisconnect=t,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,I.set("previous_websocket_failure",!0);try{let e;if((0,y.Yr)()){let t=this.nodeAdmin?"AdminNode":"Node";e={headers:{"User-Agent":`Firebase/5/${C}/${b.platform}/${t}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(e.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(e.headers["X-Firebase-AppCheck"]=this.appCheckToken);let n=b.env,r=0===this.connURL.indexOf("wss://")?n.HTTPS_PROXY||n.https_proxy:n.HTTP_PROXY||n.http_proxy;r&&(e.proxy={origin:r})}this.mySock=new e_(this.connURL,[],e)}catch(t){this.log_("Error instantiating WebSocket.");let e=t.message||t.data;e&&this.log_(e),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=e=>{this.handleIncomingFrame(e)},this.mySock.onerror=e=>{this.log_("WebSocket error.  Closing connection.");let t=e.message||e.data;t&&this.log_(t),this.onClosed_()}}start(){}static forceDisallow(){eb.forceDisallow_=!0}static isAvailable(){let e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){let t=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);t&&t.length>1&&4.4>parseFloat(t[1])&&(e=!0)}return!e&&null!==e_&&!eb.forceDisallow_}static previouslyFailed(){return I.isInMemoryStorage||!0===I.get("previous_websocket_failure")}markConnectionHealthy(){I.remove("previous_websocket_failure")}appendFrame_(e){if(this.frames.push(e),this.frames.length===this.totalFrames){let e=this.frames.join("");this.frames=null;let t=(0,y.cI)(e);this.onMessage(t)}}handleNewFrameCount_(e){this.totalFrames=e,this.frames=[]}extractFrameCount_(e){if((0,y.hu)(null===this.frames,"We already have a frame buffer"),e.length<=6){let t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e}handleIncomingFrame(e){if(null===this.mySock)return;let t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{let e=this.extractFrameCount_(t);null!==e&&this.appendFrame_(e)}}send(e){this.resetKeepAlive();let t=(0,y.Wl)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);let n=Y(t,16384);n.length>1&&this.sendString_(String(n.length));for(let e=0;e<n.length;e++)this.sendString_(n[e])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){!this.isClosed_&&(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(45e3))}sendString_(e){try{this.mySock.send(e)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}eb.responsesRequiredToBeHealthy=2,eb.healthyTimeout=3e4;class ew{constructor(e){this.initTransports_(e)}static get ALL_TRANSPORTS(){return[ev,eb]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(e){let t=eb&&eb.isAvailable(),n=t&&!eb.previouslyFailed();if(e.webSocketOnly&&(t||$("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),n=!0),n)this.transports_=[eb];else{let e=this.transports_=[];for(let t of ew.ALL_TRANSPORTS)t&&t.isAvailable()&&e.push(t);ew.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}ew.globalTransportInitialized_=!1;class ek{constructor(e,t,n,r,i,o,s,a,l,u){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=i,this.onMessage_=o,this.onReady_=s,this.onDisconnect_=a,this.onKill_=l,this.lastSessionId=u,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=j("c:"+this.id+":"),this.transportManager_=new ew(t),this.log_("Connection created"),this.start_()}start_(){let e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;let t=this.connReceiver_(this.conn_),n=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(t,n)},Math.floor(0));let r=e.healthyTimeout||0;r>0&&(this.healthyTimeout_=en(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes.  Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>10240?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes.  Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(r)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(e){return t=>{e===this.conn_?this.onConnectionLost_(t):e===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(e){return t=>{2!==this.state_&&(e===this.rx_?this.onPrimaryMessageReceived_(t):e===this.secondaryConn_?this.onSecondaryMessageReceived_(t):this.log_("message on old connection"))}}sendRequest(e){this.sendData_({t:"d",d:e})}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(e){if("t"in e){let t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(e){let t=K("t",e),n=K("d",e);if("c"===t)this.onSecondaryControl_(n);else if("d"===t)this.pendingDataMessages.push(n);else throw Error("Unknown protocol layer: "+t)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t
1:"c",d:{t:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(e){let t=K("t",e),n=K("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)}onDataMessage_(e){this.onPrimaryResponse_(),this.onMessage_(e)}onPrimaryResponse_(){!this.isHealthy_&&(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(e){let t=K("t",e);if("d"in e){let n=e.d;if("h"===t){let e=Object.assign({},n);this.repoInfo_.isUsingEmulator&&(e.h=this.repoInfo_.host),this.onHandshake_(e)}else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let e=0;e<this.pendingDataMessages.length;++e)this.onDataMessage_(this.pendingDataMessages[e]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?F("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):F("Unknown control packet command: "+t)}}onHandshake_(e){let t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.host=r,0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),"5"!==n&&$("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){let e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)}startUpgrade_(e){this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;let t=this.connReceiver_(this.secondaryConn_),n=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(t,n),en(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(6e4))}onReset_(e){this.log_("Reset packet received.  New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(e,t){this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):en(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){let e=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===e||this.rx_===e)&&this.close()}onConnectionLost_(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(I.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}onConnectionShutdown_(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)}close(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class eC{put(e,t,n,r){}merge(e,t,n,r){}refreshAuthToken(e){}refreshAppCheckToken(e){}onDisconnectPut(e,t,n){}onDisconnectMerge(e,t,n){}onDisconnectCancel(e,t){}reportStats(e){}}class eS{constructor(e){this.allowedEvents_=e,this.listeners_={},(0,y.hu)(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}trigger(e,...t){if(Array.isArray(this.listeners_[e])){let n=[...this.listeners_[e]];for(let e=0;e<n.length;e++)n[e].callback.apply(n[e].context,t)}}on(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});let r=this.getInitialEvent(e);r&&t.apply(n,r)}off(e,t,n){this.validateEventType_(e);let r=this.listeners_[e]||[];for(let e=0;e<r.length;
1e++)if(r[e].callback===t&&(!n||n===r[e].context)){r.splice(e,1);return}}validateEventType_(e){(0,y.hu)(this.allowedEvents_.find(t=>t===e),"Unknown event: "+e)}}class eE extends eS{constructor(){super(["online"]),this.online_=!0,"undefined"==typeof window||void 0===window.addEventListener||(0,y.uI)()||(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new eE}getInitialEvent(e){return(0,y.hu)("online"===e,"Unknown event type: "+e),[this.online_]}currentlyOnline(){return this.online_}}class ex{constructor(e,t){if(void 0===t){this.pieces_=e.split("/");let t=0;for(let e=0;e<this.pieces_.length;e++)this.pieces_[e].length>0&&(this.pieces_[t]=this.pieces_[e],t++);this.pieces_.length=t,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}toString(){let e="";for(let t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"}}function eI(){return new ex("")}function eT(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function eP(e){return e.pieces_.length-e.pieceNum_}function eO(e){let t=e.pieceNum_;return t<e.pieces_.length&&t++,new ex(e.pieces_,t)}function eR(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function eN(e,t=0){return e.pieces_.slice(e.pieceNum_+t)}function eA(e){if(e.pieceNum_>=e.pieces_.length)return null;let t=[];for(let n=e.pieceNum_;n<e.pieces_.length-1;n++)t.push(e.pieces_[n]);return new ex(t,0)}function eL(e,t){let n=[];for(let t=e.pieceNum_;t<e.pieces_.length;t++)n.push(e.pieces_[t]);if(t instanceof ex)for(let e=t.pieceNum_;e<t.pieces_.length;e++)n.push(t.pieces_[e]);else{let e=t.split("/");for(let t=0;t<e.length;t++)e[t].length>0&&n.push(e[t])}return new ex(n,0)}function eD(e){return e.pieceNum_>=e.pieces_.length}function eM(e,t){let n=eT(e),r=eT(t);if(null===n)return t;if(n===r)return eM(eO(e),eO(t));throw Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function ej(e,t){let n=eN(e,0),r=eN(t,0);for(let e=0;e<n.length&&e<r.length;e++){let t=B(n[e],r[e]);if(0!==t)return t}return n.length===r.length?0:n.length<r.length?-1:1}function eF(e,t){if(eP(e)!==eP(t))return!1;for(let n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function eZ(e,t){let n=e.pieceNum_,r=t.pieceNum_;if(eP(e)>eP(t))return!1;for(;n<e.pieces_.length;){if(e.pieces_[n]!==t.pieces_[r])return!1;++n,++r}return!0}class e${constructor(e,t){this.errorPrefix_=t,this.parts_=eN(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(let e=0;e<this.parts_.length;e++)this.byteLength_+=(0,y.ug)(this.parts_[e]);eU(this)}}function eU(e){if(e.byteLength_>768)throw Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+ez(e))}function ez(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}class eq extends eS{constructor(){let e,t;super(["visible"]),"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(t="visibilitychange",e="hidden"):void 0!==document.mozHidden?(t="mozvisibilitychange",e="mozHidden"):void 0!==document.msHidden?(t="msvisibilitychange",e="msHidden"):void 0!==document.webkitHidden&&(t="webkitvisibilitychange",e="webkitHidden")),this.visible_=!0,t&&document.addEventListener(t,()=>{let t=!document[e];t!==this.visible_&&(this.visible_=t,this.trigger("visible",t))},!1)}static getInstance(){return new eq}getInitialEvent(e){return(0,y.hu)("visible"===e,"Unknown event type: "+e),[this.visible_]}}class eW extends eC{constructor(e,t,n,r,i,o,s,a){if(super(),this.repoInfo_=e,this.applicationId_=t,this.onDataUpdate_=n,this.onConnectStatus_=r,this.onServerInfoUpdate_=i,this.authTokenProvider_=o,this.appCheckTokenProvider_=s,this.authOverride_=a,this.id=eW.nextPersistentConnectionId_++,this.log_=j("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=1e3,this.maxReconnectDelay_=3e5,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,a&&!(0,y.Yr)())throw Error("Auth override specified in options, but not supported on non Node.js platforms");eq.getInstance().on("visible",this.onVisible_,this),-1===e.host.indexOf("fblocal")&&eE.getInstance().on("online",this.onOnline_,this)}sendRequest(e,t,n){let r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_((0,y.Wl)(i)),(0,y.hu)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)}get(e){this.initConnection_();let t=new y.BH,n={p:e._path.toString(),q:e._queryObject};this.outstandingGets_.push({action:"g",request:n,onComplete:e=>{let n=e.d;"ok"===e.s?t.resolve(n):t.reject(n)}}),this.outstandingGetCount_++;let r=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(r),t.promise}listen(e,t,n,r){this.initConnection_();let i=e._queryIdentifier,o=e._path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),(0,y.hu)(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),(0,y.hu)(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");let s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(o).set(i,s),this.connected_&&this.sendListen_(s)}sendGet_(e){let t=this.outstandingGets_[e];this.sendRequest("g",t.request,n=>{delete this.outstandingGets_[e],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),t.onComplete&&t.onComplete(n)})}sendListen_(e){let t=e.query,n=t._path.toString(),r=t._queryIdentifier;this.log_("Listen on "+n+" for "+r);let i={p:n};e.tag&&(i.q=t._queryObject,i.t=e.tag),i.h=e.hashFn(),this.sendRequest("q",i,i=>{let o=i.d,s=i.s;eW.warnOnListenWarnings_(o,t),(this.listens.get(n)&&this.listens.get(n).get(r))===e&&(this.log_("listen response",i),"ok"!==s&&this.removeListen_(n,r),e.onComplete&&e.onComplete(s,o))})}static warnOnListenWarnings_(e,t){if(e&&"object"==typeof e&&(0,y.r3)(e,"w")){let n=(0,y.DV)(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){let e='".indexOn": "'+t._queryParams.getIndex().toString()+'"',n=t._path.toString();$(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${e} at ${n} to your security rules for better performance.`)}}}refreshAuthToken(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(e)}reduceReconnectDelayIfAdminCredential_(e){(e&&40===e.length||(0,y.GJ)(e))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}refreshAppCheckToken(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){let e=this.authToken_,t=(0,y.w9)(e)?"auth":"gauth",n={cred:e};null===this.authOverride_?n.noauth=!0:"object"==typeof this.authOverride_&&(n.authvar=this.authOverride_),this.sendRequest(t,n,t=>{let n=t.s,r=t.d||"error";this.authToken_===e&&("ok"===n?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(n,r))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},e=>{let t=e.s,n=e.d||"error";"ok"===t?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(t,n)})}unlisten(e,t){let n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),(0,y.hu)(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)}sendUnlisten_(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);let i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)}onDisconnectPut(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})}onDisconnectMerge(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})}onDisconnectCancel(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})}sendOnDisconnect_(e,t,n,r){let i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,e=>{r&&setTimeout(()=>{r(e.s,e.d)},Math.floor(0))})}put(e,t,n,r){this.putInternal("p",e,t,n,r)}merge(e,t,n,r){this.putInternal("m",e,t,n,r)}putInternal(e,t,n,r,i){this.initConnection_();let o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;let s=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(s):this.log_("Buffering put: "+t)}sendPut_(e){let t=this.outstandingPuts_[e].action,n=this.outstandingPuts_[e].request,r=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(t,n,n=>{this.log_(t+" response",n),delete this.outstandingPuts_[e],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),r&&r(n.s,n.d)})}reportStats(e){if(this.connected_){let t={c:e};this.log_("reportStats",t),this.sendRequest("s",t,e=>{if("ok"!==e.s){let t=e.d;this.log_("reportStats","Error sending stats: "+t)}})}}onDataMessage_(e){if("r"in e){this.log_("from server: "+(0,y.Wl)(e));let t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else if("error"in e)throw"A server-side error has occurred: "+e.error;else"a"in e&&this.onDataPush_(e.a,e.b)}onDataPush_(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):F("Unrecognized action received from server: "+(0,y.Wl)(e)+"\nAre you using the latest client?")}onReady_(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(e){(0,y.hu)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(e))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(e){!e||this.visible_||this.reconnectDelay_!==this.maxReconnectDelay_||(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)),this.visible_=e}onOnline_(e){e?(this.log_("Browser went online."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=1e3),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());let e=new Date().getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);
1t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;let e=this.onDataMessage_.bind(this),t=this.onReady_.bind(this),n=this.onRealtimeDisconnect_.bind(this),r=this.id+":"+eW.nextConnectionId_++,i=this.lastSessionId,o=!1,s=null,a=function(){s?s.close():(o=!0,n())};this.realtime_={close:a,sendRequest:function(e){(0,y.hu)(s,"sendRequest call when we're not connected not allowed."),s.sendRequest(e)}};let l=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{let[a,u]=await Promise.all([this.authTokenProvider_.getToken(l),this.appCheckTokenProvider_.getToken(l)]);o?M("getToken() completed but was canceled"):(M("getToken() completed. Creating connection."),this.authToken_=a&&a.accessToken,this.appCheckToken_=u&&u.token,s=new ek(r,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,t,n,e=>{$(e+" ("+this.repoInfo_.toString()+")"),this.interrupt("server_kill")},i))}catch(e){this.log_("Failed to get token: "+e),o||(this.repoInfo_.nodeAdmin&&$(e),a())}}}interrupt(e){M("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(e){M("Resuming connection for reason: "+e),delete this.interruptReasons_[e],(0,y.xb)(this.interruptReasons_)&&(this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(e){let t=e-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:t})}cancelSentTransactions_(){for(let e=0;e<this.outstandingPuts_.length;e++){let t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])}onListenRevoked_(e,t){let n;n=t?t.map(e=>G(e)).join("$"):"default";let r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")}removeListen_(e,t){let n;let r=new ex(e).toString();if(this.listens.has(r)){let e=this.listens.get(r);n=e.get(t),e.delete(t),0===e.size&&this.listens.delete(r)}else n=void 0;return n}onAuthRevoked_(e,t){M("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),("invalid_token"===e||"permission_denied"===e)&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(e,t){M("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,("invalid_token"===e||"permission_denied"===e)&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))}restoreState_(){for(let e of(this.tryAuth(),this.tryAppCheck(),this.listens.values()))for(let t of e.values())this.sendListen_(t);for(let e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){let e=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(e.action,e.pathString,e.data,e.onComplete)}for(let e=0;e<this.outstandingGets_.length;e++)this.outstandingGets_[e]&&this.sendGet_(e)}sendConnectStats_(){let e={},t="js";(0,y.Yr)()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+C.replace(/\./g,"-")]=1,(0,y.uI)()?e["framework.cordova"]=1:(0,y.b$)()&&(e["framework.reactnative"]=1),this.reportStats(e)}shouldReconnect_(){let e=eE.getInstance().currentlyOnline();return(0,y.xb)(this.interruptReasons_)&&e}}eW.nextPersistentConnectionId_=0,eW.nextConnectionId_=0;class eV{constructor(e,t){this.name=e,this.node=t}static Wrap(e,t){return new eV(e,t)}}class eB{getCompare(){return this.compare.bind(this)}indexedValueChanged(e,t){let n=new eV(W,e),r=new eV(W,t);return 0!==this.compare(n,r)}
1minPost(){return eV.MIN}}class eH extends eB{static get __EMPTY_NODE(){return r}static set __EMPTY_NODE(e){r=e}compare(e,t){return B(e.name,t.name)}isDefinedOn(e){throw(0,y.g5)("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(e,t){return!1}minPost(){return eV.MIN}maxPost(){return new eV(V,r)}makePost(e,t){return(0,y.hu)("string"==typeof e,"KeyIndex indexValue must always be a string."),new eV(e,r)}toString(){return".key"}}let eK=new eH;class eG{constructor(e,t,n,r,i=null){this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];let o=1;for(;!e.isEmpty();)if(o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else if(0===o){this.nodeStack_.push(e);break}else this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}getNext(){let e;if(0===this.nodeStack_.length)return null;let t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e}hasNext(){return this.nodeStack_.length>0}peek(){if(0===this.nodeStack_.length)return null;let e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}}}class eY{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:eY.RED,this.left=null!=r?r:eX.EMPTY_NODE,this.right=null!=i?i:eX.EMPTY_NODE}copy(e,t,n,r,i){return new eY(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)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,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))).fixUp_()}removeMin_(){if(this.left.isEmpty())return eX.EMPTY_NODE;let e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()}remove(e,t){let n,r;if(n=this,0>t(e,n.key))n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return eX.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.fixUp_()}isRed_(){return this.color}fixUp_(){let e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e}moveRedLeft_(){let e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e}moveRedRight_(){let e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e}rotateLeft_(){let e=this.copy(null,null,eY.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight_(){let e=this.copy(null,null,eY.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip_(){let 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_(){return Math.pow(2,this.check_())<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw Error("Red node has red child("+this.key+","+this.value+")");
1if(this.right.isRed_())throw Error("Right child of ("+this.key+","+this.value+") is red");let e=this.left.check_();if(e===this.right.check_())return e+(this.isRed_()?0:1);throw Error("Black depths differ")}}eY.RED=!0,eY.BLACK=!1;class eJ{copy(e,t,n,r,i){return this}insert(e,t,n){return new eY(e,t,null)}remove(e,t){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class eX{constructor(e,t=eX.EMPTY_NODE){this.comparator_=e,this.root_=t}insert(e,t){return new eX(this.comparator_,this.root_.insert(e,t,this.comparator_).copy(null,null,eY.BLACK,null,null))}remove(e){return new eX(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,eY.BLACK,null,null))}get(e){let t;let n=this.root_;for(;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null}getPredecessorKey(e){let t,n=this.root_,r=null;for(;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty()){if(r)return r.key;return null}for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw Error("Attempted to find predecessor key for a nonexistent key.  What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(e){return this.root_.inorderTraversal(e)}reverseTraversal(e){return this.root_.reverseTraversal(e)}getIterator(e){return new eG(this.root_,null,this.comparator_,!1,e)}getIteratorFrom(e,t){return new eG(this.root_,e,this.comparator_,!1,t)}getReverseIteratorFrom(e,t){return new eG(this.root_,e,this.comparator_,!0,t)}getReverseIterator(e){return new eG(this.root_,null,this.comparator_,!0,e)}}function eQ(e,t){return B(e.name,t.name)}function e0(e,t){return B(e,t)}eX.EMPTY_NODE=new eJ;let e1=function(e){return"number"==typeof e?"number:"+X(e):"string:"+e},e2=function(e){if(e.isLeafNode()){let t=e.val();(0,y.hu)("string"==typeof t||"number"==typeof t||"object"==typeof t&&(0,y.r3)(t,".sv"),"Priority must be a string or number.")}else(0,y.hu)(e===i||e.isEmpty(),"priority of unexpected type.");(0,y.hu)(e===i||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};class e3{constructor(e,t=e3.__childrenNodeConstructor.EMPTY_NODE){this.value_=e,this.priorityNode_=t,this.lazyHash_=null,(0,y.hu)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),e2(this.priorityNode_)}static set __childrenNodeConstructor(e){o=e}static get __childrenNodeConstructor(){return o}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(e){return new e3(this.value_,e)}getImmediateChild(e){return".priority"===e?this.priorityNode_:e3.__childrenNodeConstructor.EMPTY_NODE}getChild(e){return eD(e)?this:".priority"===eT(e)?this.priorityNode_:e3.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(e,t){return null}updateImmediateChild(e,t){return".priority"===e?this.updatePriority(t):t.isEmpty()&&".priority"!==e?this:e3.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,t).updatePriority(this.priorityNode_)}updateChild(e,t){let n=eT(e);return null===n?t:t.isEmpty()&&".priority"!==n?this:((0,y.hu)(".priority"!==n||1===eP(e),".priority must be the last token in a path"),this.updateImmediateChild(n,e3.__childrenNodeConstructor.EMPTY_NODE.updateChild(eO(e),t)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(e,t){return!1}val(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let e="";this.priorityNode_.isEmpty()||(e+="priority:"+e1(this.priorityNode_.val())+":");let t=typeof this.value_;e+=t+":","number"===t?e+=X(this.value_):e+=this.value_,this.lazyHash_=R(e)}return this.lazyHash_}getValue(){return this.value_}compareTo(e){return e===e3.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof e3.__childrenNodeConstructor?-1:((0,y.hu)(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))}compareToLeafNode_(e){let t=typeof e.value_,n=typeof this.value_,r=e3.VALUE_TYPE_ORDER.indexOf(t),i=e3.VALUE_TYPE_ORDER.indexOf(n);return((0,y.hu)(r>=0,"Unknown leaf type: "+t),(0,y.hu)(i>=0,"Unknown leaf type: "+n),r!==i)?i-r:"object"===n?0:this.value_<e.value_?-1:this.value_===e.value_?0:1}withIndex(){return this}isIndexed(){return!0}equals(e){return e===this||!!e.isLeafNode()&&this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}}e3.VALUE_TYPE_ORDER=["object","boolean","number","string"];class e4 extends eB{compare(e,t){let n=e.node.getPriority(),r=t.no
1de.getPriority(),i=n.compareTo(r);return 0===i?B(e.name,t.name):i}isDefinedOn(e){return!e.getPriority().isEmpty()}indexedValueChanged(e,t){return!e.getPriority().equals(t.getPriority())}minPost(){return eV.MIN}maxPost(){return new eV(V,new e3("[PRIORITY-POST]",a))}makePost(e,t){return new eV(t,new e3("[PRIORITY-POST]",s(e)))}toString(){return".priority"}}let e5=new e4,e6=Math.log(2);class e8{constructor(e){this.count=parseInt(Math.log(e+1)/e6,10),this.current_=this.count-1;let t=parseInt(Array(this.count+1).join("1"),2);this.bits_=e+1&t}nextBitIsOne(){let e=!(this.bits_&1<<this.current_);return this.current_--,e}}let e7=function(e,t,n,r){e.sort(t);let i=function(t,r){let o;let s=r-t;if(0===s)return null;if(1===s)return o=e[t],new eY(n?n(o):o,o.node,eY.BLACK,null,null);{let a=parseInt(s/2,10)+t,l=i(t,a),u=i(a+1,r);return o=e[a],new eY(n?n(o):o,o.node,eY.BLACK,l,u)}};return new eX(r||t,function(t){let r=null,o=null,s=e.length,a=function(t,r){let o=s-t,a=s;s-=t;let u=i(o+1,a),c=e[o];l(new eY(n?n(c):c,c.node,r,null,u))},l=function(e){r?r.left=e:o=e,r=e};for(let e=0;e<t.count;++e){let n=t.nextBitIsOne(),r=Math.pow(2,t.count-(e+1));n?a(r,eY.BLACK):(a(r,eY.BLACK),a(r,eY.RED))}return o}(new e8(e.length)))},e9={};class te{constructor(e,t){this.indexes_=e,this.indexSet_=t}static get Default(){return(0,y.hu)(e9&&e5,"ChildrenNode.ts has not been loaded"),l=l||new te({".priority":e9},{".priority":e5})}get(e){let t=(0,y.DV)(this.indexes_,e);if(!t)throw Error("No index defined for "+e);return t instanceof eX?t:null}hasIndex(e){return(0,y.r3)(this.indexSet_,e.toString())}addIndex(e,t){let n;(0,y.hu)(e!==eK,"KeyIndex always exists and isn't meant to be added to the IndexMap.");let r=[],i=!1,o=t.getIterator(eV.Wrap),s=o.getNext();for(;s;)i=i||e.isDefinedOn(s.node),r.push(s),s=o.getNext();n=i?e7(r,e.getCompare()):e9;let a=e.toString(),l=Object.assign({},this.indexSet_);l[a]=e;let u=Object.assign({},this.indexes_);return u[a]=n,new te(u,l)}addToIndexes(e,t){return new te((0,y.UI)(this.indexes_,(n,r)=>{let i=(0,y.DV)(this.indexSet_,r);if((0,y.hu)(i,"Missing index implementation for "+r),n===e9){if(!i.isDefinedOn(e.node))return e9;{let n=[],r=t.getIterator(eV.Wrap),o=r.getNext();for(;o;)o.name!==e.name&&n.push(o),o=r.getNext();return n.push(e),e7(n,i.getCompare())}}{let r=t.get(e.name),i=n;return r&&(i=i.remove(new eV(e.name,r))),i.insert(e,e.node)}}),this.indexSet_)}removeFromIndexes(e,t){return new te((0,y.UI)(this.indexes_,n=>{if(n===e9)return n;{let r=t.get(e.name);return r?n.remove(new eV(e.name,r)):n}}),this.indexSet_)}}class tt{constructor(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&e2(this.priorityNode_),this.children_.isEmpty()&&(0,y.hu)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return u||(u=new tt(new eX(e0),null,te.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||u}updatePriority(e){return this.children_.isEmpty()?this:new tt(this.children_,e,this.indexMap_)}getImmediateChild(e){if(".priority"===e)return this.getPriority();{let t=this.children_.get(e);return null===t?u:t}}getChild(e){let t=eT(e);return null===t?this:this.getImmediateChild(t).getChild(eO(e))}hasChild(e){return null!==this.children_.get(e)}updateImmediateChild(e,t){if((0,y.hu)(t,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(t);{let n,r;let i=new eV(e,t);t.isEmpty()?(n=this.children_.remove(e),r=this.indexMap_.removeFromIndexes(i,this.children_)):(n=this.children_.insert(e,t),r=this.indexMap_.addToIndexes(i,this.children_));let o=n.isEmpty()?u:this.priorityNode_;return new tt(n,o,r)}}updateChild(e,t){let n=eT(e);if(null===n)return t;{(0,y.hu)(".priority"!==eT(e)||1===eP(e),".priority must be the last token in a path");let r=this.getImmediateChild(n).updateChild(eO(e),t);return this.updateImmediateChild(n,r)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(e){if(this.isEmpty())return null;let t={},n=0,r=0,i=!0;if(this.forEachChild(e5,(o,s)=>{t[o]=s.val(e),n++,i&&tt.INTEGER_REGEXP_.test(o)?r=Math.max(r,Number(o)):i=!1}
1),e||!i||!(r<2*n))return e&&!this.getPriority().isEmpty()&&(t[".priority"]=this.getPriority().val()),t;{let e=[];for(let n in t)e[n]=t[n];return e}}hash(){if(null===this.lazyHash_){let e="";this.getPriority().isEmpty()||(e+="priority:"+e1(this.getPriority().val())+":"),this.forEachChild(e5,(t,n)=>{let r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.lazyHash_=""===e?"":R(e)}return this.lazyHash_}getPredecessorChildName(e,t,n){let r=this.resolveIndex_(n);if(!r)return this.children_.getPredecessorKey(e);{let n=r.getPredecessorKey(new eV(e,t));return n?n.name:null}}getFirstChildName(e){let t=this.resolveIndex_(e);if(!t)return this.children_.minKey();{let e=t.minKey();return e&&e.name}}getFirstChild(e){let t=this.getFirstChildName(e);return t?new eV(t,this.children_.get(t)):null}getLastChildName(e){let t=this.resolveIndex_(e);if(!t)return this.children_.maxKey();{let e=t.maxKey();return e&&e.name}}getLastChild(e){let t=this.getLastChildName(e);return t?new eV(t,this.children_.get(t)):null}forEachChild(e,t){let n=this.resolveIndex_(e);return n?n.inorderTraversal(e=>t(e.name,e.node)):this.children_.inorderTraversal(t)}getIterator(e){return this.getIteratorFrom(e.minPost(),e)}getIteratorFrom(e,t){let n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,e=>e);{let n=this.children_.getIteratorFrom(e.name,eV.Wrap),r=n.peek();for(;null!=r&&0>t.compare(r,e);)n.getNext(),r=n.peek();return n}}getReverseIterator(e){return this.getReverseIteratorFrom(e.maxPost(),e)}getReverseIteratorFrom(e,t){let n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,e=>e);{let n=this.children_.getReverseIteratorFrom(e.name,eV.Wrap),r=n.peek();for(;null!=r&&t.compare(r,e)>0;)n.getNext(),r=n.peek();return n}}compareTo(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===tr?-1:0}withIndex(e){if(e===eK||this.indexMap_.hasIndex(e))return this;{let t=this.indexMap_.addIndex(e,this.children_);return new tt(this.children_,this.priorityNode_,t)}}isIndexed(e){return e===eK||this.indexMap_.hasIndex(e)}equals(e){if(e===this)return!0;if(e.isLeafNode()||!this.getPriority().equals(e.getPriority())||this.children_.count()!==e.children_.count())return!1;{let t=this.getIterator(e5),n=e.getIterator(e5),r=t.getNext(),i=n.getNext();for(;r&&i;){if(r.name!==i.name||!r.node.equals(i.node))return!1;r=t.getNext(),i=n.getNext()}return null===r&&null===i}}resolveIndex_(e){return e===eK?null:this.indexMap_.get(e.toString())}}tt.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class tn extends tt{constructor(){super(new eX(e0),tt.EMPTY_NODE,te.Default)}compareTo(e){return e===this?0:1}equals(e){return e===this}getPriority(){return this}getImmediateChild(e){return tt.EMPTY_NODE}isEmpty(){return!1}}let tr=new tn;function ti(e,t=null){if(null===e)return tt.EMPTY_NODE;if("object"==typeof e&&".priority"in e&&(t=e[".priority"]),(0,y.hu)(null===t||"string"==typeof t||"number"==typeof t||"object"==typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"==typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!=typeof e||".sv"in e)return new e3(e,ti(t));if(e instanceof Array){let n=tt.EMPTY_NODE;return J(e,(t,r)=>{if((0,y.r3)(e,t)&&"."!==t.substring(0,1)){let e=ti(r);(e.isLeafNode()||!e.isEmpty())&&(n=n.updateImmediateChild(t,e))}}),n.updatePriority(ti(t))}{let n=[],r=!1;if(J(e,(e,t)=>{if("."!==e.substring(0,1)){let i=ti(t);i.isEmpty()||(r=r||!i.getPriority().isEmpty(),n.push(new eV(e,i)))}}),0===n.length)return tt.EMPTY_NODE;let i=e7(n,eQ,e=>e.name,e0);if(!r)return new tt(i,ti(t),te.Default);{let e=e7(n,e5.getCompare());return new tt(i,ti(t),new te({".priority":e},{".priority":e5}))}}}Object.defineProperties(eV,{MIN:{value:new eV(W,tt.EMPTY_NODE)},MAX:{value:new eV(V,tr)}}),eH.__EMPTY_NODE=tt.EMPTY_NODE,e3.__childrenNodeConstructor=tt,i=tr,a=tr,s=ti;class to extends eB{constructor(e){super(),this.indexPath_=e,(0,y.hu)(!eD(e)&&".priority"!==eT(e),"Can't create PathIndex with empty path or .priority key")}extractChild(e){return e.getChild(this.indexPath_)}isDefinedOn(e){return!e.getChild(this.indexPath_).isEmpty()}compare(e,t){let n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?B(e.name,t.name):i}makePost(e,t){let n=ti(e);return new eV(t,tt.EMPTY_NODE.updateChild(this.indexPath_,n))}maxPost(){return new eV(V,tt.EMPTY_NODE.updateChild(this.indexPath_,tr))}toString(){return eN(this.indexPath_,0).join("/")}}class ts extends eB{compare(e,t){let n=e.node.compareTo(t.node);return 0===n?B(e.name,t.name):n}isDefinedOn(e){return!0}indexedValueChanged(e,t){return!e.equals(t)}
1minPost(){return eV.MIN}maxPost(){return eV.MAX}makePost(e,t){return new eV(t,ti(e))}toString(){return".value"}}let ta=new ts;function tl(e){return{type:"value",snapshotNode:e}}function tu(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function tc(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function th(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}class td{constructor(e){this.index_=e}updateChild(e,t,n,r,i,o){(0,y.hu)(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");let s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=o&&(n.isEmpty()?e.hasChild(t)?o.trackChildChange(tc(t,s)):(0,y.hu)(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?o.trackChildChange(tu(t,n)):o.trackChildChange(th(t,n,s))),e.isLeafNode()&&n.isEmpty())?e:e.updateImmediateChild(t,n).withIndex(this.index_)}updateFullNode(e,t,n){return null==n||(e.isLeafNode()||e.forEachChild(e5,(e,r)=>{t.hasChild(e)||n.trackChildChange(tc(e,r))}),t.isLeafNode()||t.forEachChild(e5,(t,r)=>{if(e.hasChild(t)){let i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(th(t,r,i))}else n.trackChildChange(tu(t,r))})),t.withIndex(this.index_)}updatePriority(e,t){return e.isEmpty()?tt.EMPTY_NODE:e.updatePriority(t)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class tp{constructor(e){this.indexedFilter_=new td(e.getIndex()),this.index_=e.getIndex(),this.startPost_=tp.getStartPost_(e),this.endPost_=tp.getEndPost_(e),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(e){let t=this.startIsInclusive_?0>=this.index_.compare(this.getStartPost(),e):0>this.index_.compare(this.getStartPost(),e),n=this.endIsInclusive_?0>=this.index_.compare(e,this.getEndPost()):0>this.index_.compare(e,this.getEndPost());return t&&n}updateChild(e,t,n,r,i,o){return this.matches(new eV(t,n))||(n=tt.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)}updateFullNode(e,t,n){t.isLeafNode()&&(t=tt.EMPTY_NODE);let r=t.withIndex(this.index_);r=r.updatePriority(tt.EMPTY_NODE);let i=this;return t.forEachChild(e5,(e,t)=>{i.matches(new eV(e,t))||(r=r.updateImmediateChild(e,tt.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(e){if(!e.hasStart())return e.getIndex().minPost();{let t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}}static getEndPost_(e){if(!e.hasEnd())return e.getIndex().maxPost();{let t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}}}class tf{constructor(e){this.withinDirectionalStart=e=>this.reverse_?this.withinEndPost(e):this.withinStartPost(e),this.withinDirectionalEnd=e=>this.reverse_?this.withinStartPost(e):this.withinEndPost(e),this.withinStartPost=e=>{let t=this.index_.compare(this.rangedFilter_.getStartPost(),e);return this.startIsInclusive_?t<=0:t<0},this.withinEndPost=e=>{let t=this.index_.compare(e,this.rangedFilter_.getEndPost());return this.endIsInclusive_?t<=0:t<0},this.rangedFilter_=new tp(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft(),this.startIsInclusive_=!e.startAfterSet_,this.endIsInclusive_=!e.endBeforeSet_}updateChild(e,t,n,r,i,o){return(this.rangedFilter_.matches(new eV(t,n))||(n=tt.EMPTY_NODE),e.getImmediateChild(t).equals(n))?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)}updateFullNode(e,t,n){let r;if(t.isLeafNode()||t.isEmpty())r=tt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){let e;r=tt.EMPTY_NODE.withIndex(this.index_),e=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let n=0;for(;e.hasNext()&&n<this.limit_;){let t=e.getNext();if(this.withinDirectionalStart(t)){if(this.withinDirectionalEnd(t))r=r.updateImmediateChild(t.name,t.node),n++;else break}}}else{let e;r=(r=t.withIndex(this.index_)).updatePriority(tt.EMPTY_NODE),e=this.reverse_?r.getReverseIterator(this.index_):r.getIterator(this.index_);let n=0;for(;e.hasNext();){let t=e.getNext();n<this.limit_&&this.withinDirectionalStart(t)&&this.withinDirectionalEnd(t)?n++:r=r.updateImmediateChild(t.name,tt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)}updatePriority(e,t){return e}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}
1fullLimitUpdateChild_(e,t,n,r,i){let o;if(this.reverse_){let e=this.index_.getCompare();o=(t,n)=>e(n,t)}else o=this.index_.getCompare();(0,y.hu)(e.numChildren()===this.limit_,"");let s=new eV(t,n),a=this.reverse_?e.getFirstChild(this.index_):e.getLastChild(this.index_),l=this.rangedFilter_.matches(s);if(e.hasChild(t)){let u=e.getImmediateChild(t),c=r.getChildAfterChild(this.index_,a,this.reverse_);for(;null!=c&&(c.name===t||e.hasChild(c.name));)c=r.getChildAfterChild(this.index_,c,this.reverse_);let h=null==c?1:o(c,s);if(l&&!n.isEmpty()&&h>=0)return null!=i&&i.trackChildChange(th(t,n,u)),e.updateImmediateChild(t,n);{null!=i&&i.trackChildChange(tc(t,u));let n=e.updateImmediateChild(t,tt.EMPTY_NODE);return null!=c&&this.rangedFilter_.matches(c)?(null!=i&&i.trackChildChange(tu(c.name,c.node)),n.updateImmediateChild(c.name,c.node)):n}}return n.isEmpty()?e:l&&o(a,s)>=0?(null!=i&&(i.trackChildChange(tc(a.name,a.node)),i.trackChildChange(tu(t,n))),e.updateImmediateChild(t,n).updateImmediateChild(a.name,tt.EMPTY_NODE)):e}}class tg{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=e5}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return(0,y.hu)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return((0,y.hu)(this.startSet_,"Only valid if start has been set"),this.startNameSet_)?this.indexStartName_:W}hasEnd(){return this.endSet_}getIndexEndValue(){return(0,y.hu)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return((0,y.hu)(this.endSet_,"Only valid if end has been set"),this.endNameSet_)?this.indexEndName_:V}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return(0,y.hu)(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===e5}copy(){let e=new tg;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.startAfterSet_=this.startAfterSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.endBeforeSet_=this.endBeforeSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e}}function tm(e){let t;let n={};if(e.isDefault())return n;if(e.index_===e5?t="$priority":e.index_===ta?t="$value":e.index_===eK?t="$key":((0,y.hu)(e.index_ instanceof to,"Unrecognized index type!"),t=e.index_.toString()),n.orderBy=(0,y.Wl)(t),e.startSet_){let t=e.startAfterSet_?"startAfter":"startAt";n[t]=(0,y.Wl)(e.indexStartValue_),e.startNameSet_&&(n[t]+=","+(0,y.Wl)(e.indexStartName_))}if(e.endSet_){let t=e.endBeforeSet_?"endBefore":"endAt";n[t]=(0,y.Wl)(e.indexEndValue_),e.endNameSet_&&(n[t]+=","+(0,y.Wl)(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?n.limitToFirst=e.limit_:n.limitToLast=e.limit_),n}function tv(e){let t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==e5&&(t.i=e.index_.toString()),t}class ty extends eC{constructor(e,t,n,r){super(),this.repoInfo_=e,this.onDataUpdate_=t,this.authTokenProvider_=n,this.appCheckTokenProvider_=r,this.log_=j("p:rest:"),this.listens_={}}reportStats(e){throw Error("Method not implemented.")}static getListenId_(e,t){return void 0!==t?"tag$"+t:((0,y.hu)(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())}listen(e,t,n,r){let i=e._path.toString();this.log_("Listen called for "+i+" "+e._queryIdentifier);let o=ty.getListenId_(e,n),s={};this.listens_[o]=s;let a=tm(e._queryParams);this.restRequest_(i+".json",a,(e,t)=>{let a=t;404===e&&(a=null,e=null),null===e&&this.onDataUpdate_(i,a,!1,n),(0,y.DV)(this.listens_,o)===s&&r(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)})}unlisten(e,t){let n=ty.getListenId_(e,t);delete this.listens_[n]}get(e){let t=tm(e._queryParams),n=e._path.toString(),r=new y.BH;return this.restRequest_(n+".json",t,(e,t)=>{let i=t;404===e&&(i=null,e=null),null===e?(this.onDataUpdate_(n,i,!1,null),r.resolve(i)):r.reject(Error(i))}),r.promise}refreshAuthToken(e){}restRequest_(e,t={},n){return t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([r,i])=>{r&&r.accessToken&&(t.auth=r.accessToken),i&&i.token&&(t.ac=i.token);let o=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+e+"?ns="+this.repoInfo_.namespace+(0,y.xO)(t);this.log_("Sending REST request for "+o);let s=new XMLHttpRequest;s.onreadystatechange=()=>{if(n&&4===s.readyState){this.log_("REST Response for "+o+" received. status:",s.status,"response:",s.responseText);let e=null;if(s.status>=200&&s.status<300){try{e=(0,y.cI)(s.responseText)}catch(e){$("Failed to parse JSON response for "+o+": "+s.responseText)}n(null,e)}else 401!==s.status&&404!==s.status&&$("Got unsuccessful REST response for "+o+" Status: "+s.status),n(s.status);n=null}},s.open("GET",o,!0),s.send()})}}class t_{constructor(){this.rootNode_=tt.EMPTY_NODE}getNode(e){return this.rootNode_.getChild(e)}updateSnapshot(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)}}function tb(){return{value:null,children:new Map}}function tw(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEac
1h((e,n)=>{t(n,e)})}(e,(e,r)=>{tw(r,new ex(t.toString()+"/"+e),n)})}class tk{constructor(e){this.collection_=e,this.last_=null}get(){let e=this.collection_.get(),t=Object.assign({},e);return this.last_&&J(this.last_,(e,n)=>{t[e]=t[e]-n}),this.last_=e,t}}class tC{constructor(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new tk(e),en(this.reportStats_.bind(this),Math.floor(1e4+2e4*Math.random()))}reportStats_(){let e=this.statsListener_.get(),t={},n=!1;J(e,(e,r)=>{r>0&&(0,y.r3)(this.statsToReport_,e)&&(t[e]=r,n=!0)}),n&&this.server_.reportStats(t),en(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}function tS(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function tE(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function tx(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}(f=g||(g={}))[f.OVERWRITE=0]="OVERWRITE",f[f.MERGE=1]="MERGE",f[f.ACK_USER_WRITE=2]="ACK_USER_WRITE",f[f.LISTEN_COMPLETE=3]="LISTEN_COMPLETE";class tI{constructor(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=g.ACK_USER_WRITE,this.source=tS()}operationForChild(e){if(!eD(this.path))return(0,y.hu)(eT(this.path)===e,"operationForChild called for unrelated child."),new tI(eO(this.path),this.affectedTree,this.revert);if(null!=this.affectedTree.value)return(0,y.hu)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{let t=this.affectedTree.subtree(new ex(e));return new tI(eI(),t,this.revert)}}}class tT{constructor(e,t){this.source=e,this.path=t,this.type=g.LISTEN_COMPLETE}operationForChild(e){return eD(this.path)?new tT(this.source,eI()):new tT(this.source,eO(this.path))}}class tP{constructor(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=g.OVERWRITE}operationForChild(e){return eD(this.path)?new tP(this.source,eI(),this.snap.getImmediateChild(e)):new tP(this.source,eO(this.path),this.snap)}}class tO{constructor(e,t,n){this.source=e,this.path=t,this.children=n,this.type=g.MERGE}operationForChild(e){if(!eD(this.path))return(0,y.hu)(eT(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new tO(this.source,eO(this.path),this.children);{let t=this.children.subtree(new ex(e));return t.isEmpty()?null:t.value?new tP(this.source,eI(),t.value):new tO(this.source,eI(),t)}}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class tR{constructor(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(e){if(eD(e))return this.isFullyInitialized()&&!this.filtered_;let t=eT(e);return this.isCompleteForChild(t)}isCompleteForChild(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)}getNode(){return this.node_}}class tN{constructor(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()}}function tA(e,t,n,r,i,o){let s=r.filter(e=>e.type===n);s.sort((t,n)=>(function(e,t,n){if(null==t.childName||null==n.childName)throw(0,y.g5)("Should only compare child_ events.");let r=new eV(t.childName,t.snapshotNode),i=new eV(n.childName,n.snapshotNode);return e.index_.compare(r,i)})(e,t,n)),s.forEach(n=>{let r=("value"===n.type||"child_removed"===n.type||(n.prevName=o.getPredecessorChildName(n.childName,n.snapshotNode,e.index_)),n);i.forEach(i=>{i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))})})}function tL(e,t){return{eventCache:e,serverCache:t}}function tD(e,t,n,r){return tL(new tR(t,n,r),e.serverCache)}function tM(e,t,n,r){return tL(e.eventCache,new tR(t,n,r))}function tj(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function tF(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}let tZ=()=>(c||(c=new eX(H)),c);class t${constructor(e,t=tZ()){this.value=e,this.children=t}static fromObject(e){let t=new t$(null);return J(e,(e,n)=>{t=t.set(new ex(e),n)}),t}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(e,t){if(null!=this.value&&t(this.value))return{path:eI(),value:this.value};if(eD(e))return null;{let n=eT(e),r=this.children.get(n);if(null===r)return null;{let i=r.findRootMostMatchingPathAndValue(eO(e),t);return null!=i?{path:eL(new ex(n),i.path),value:i.value}:null}}}findRootMostValueAndPath(e){return this.findRootMostMatchingPathAndValue(e,()=>!0)}subtree(e){if(eD(e))return this;{let t=eT(e),n=this.children.get(t);return null!==n?n.subtree(eO(e)):new t$(null)}}set(e,t){if(eD(e))return new t$(t,this.children);{let n=eT(e),r=(this.children.get(n)||new t$(null)).set(eO(e),t),i=this.children.insert(n,r);return new t$(this.value,i)}}remove(e){if(eD(e))return this.children.isEmpty()?new t$(null):new t$(null,this.children);{let t=eT(e),n=this.children.get(t);if(!n)return this;{let r;let i=n.remove(eO(e));return(r=i.isEmpty()?this.children.remove(t):this.children.insert(t,i),null===this.value&&r.isEmpty())?new t$(null):new t$(this.value,r)}}}get(e){if(eD(e))return this.value;{let t=eT(e),n=this.children.get(t);return n?n.get(eO(e)):null}}setTree(e,t){if(eD(e))return t;{let n;let r=eT(e),i=(this.children.get(r)||new t$(null)).setTree(eO(e),t);return n=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t$(this.value,
1n)}}fold(e){return this.fold_(eI(),e)}fold_(e,t){let n={};return this.children.inorderTraversal((r,i)=>{n[r]=i.fold_(eL(e,r),t)}),t(e,this.value,n)}findOnPath(e,t){return this.findOnPath_(e,eI(),t)}findOnPath_(e,t,n){let r=!!this.value&&n(t,this.value);if(r)return r;if(eD(e))return null;{let r=eT(e),i=this.children.get(r);return i?i.findOnPath_(eO(e),eL(t,r),n):null}}foreachOnPath(e,t){return this.foreachOnPath_(e,eI(),t)}foreachOnPath_(e,t,n){if(eD(e))return this;{this.value&&n(t,this.value);let r=eT(e),i=this.children.get(r);return i?i.foreachOnPath_(eO(e),eL(t,r),n):new t$(null)}}foreach(e){this.foreach_(eI(),e)}foreach_(e,t){this.children.inorderTraversal((n,r)=>{r.foreach_(eL(e,n),t)}),this.value&&t(e,this.value)}foreachChild(e){this.children.inorderTraversal((t,n)=>{n.value&&e(t,n.value)})}}class tU{constructor(e){this.writeTree_=e}static empty(){return new tU(new t$(null))}}function tz(e,t,n){if(eD(t))return new tU(new t$(n));{let r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){let i=r.path,o=r.value,s=eM(i,t);return o=o.updateChild(s,n),new tU(e.writeTree_.set(i,o))}{let r=new t$(n);return new tU(e.writeTree_.setTree(t,r))}}}function tq(e,t,n){let r=e;return J(n,(e,n)=>{r=tz(r,eL(t,e),n)}),r}function tW(e,t){return eD(t)?tU.empty():new tU(e.writeTree_.setTree(t,new t$(null)))}function tV(e,t){return null!=tB(e,t)}function tB(e,t){let n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(eM(n.path,t)):null}function tH(e){let t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(e5,(e,n)=>{t.push(new eV(e,n))}):e.writeTree_.children.inorderTraversal((e,n)=>{null!=n.value&&t.push(new eV(e,n.value))}),t}function tK(e,t){if(eD(t))return e;{let n=tB(e,t);return new tU(null!=n?new t$(n):e.writeTree_.subtree(t))}}function tG(e){return e.writeTree_.isEmpty()}function tY(e,t){return function e(t,n,r){if(null!=n.value)return r.updateChild(t,n.value);{let i=null;return n.children.inorderTraversal((n,o)=>{".priority"===n?((0,y.hu)(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=e(eL(t,n),o,r)}),r.getChild(t).isEmpty()||null===i||(r=r.updateChild(eL(t,".priority"),i)),r}}(eI(),e.writeTree_,t)}function tJ(e){return e.visible}function tX(e,t,n){let r=tU.empty();for(let i=0;i<e.length;++i){let o=e[i];if(t(o)){let e;let t=o.path;if(o.snap)eZ(n,t)?r=tz(r,e=eM(n,t),o.snap):eZ(t,n)&&(e=eM(t,n),r=tz(r,eI(),o.snap.getChild(e)));else if(o.children){if(eZ(n,t))r=tq(r,e=eM(n,t),o.children);else if(eZ(t,n)){if(eD(e=eM(t,n)))r=tq(r,eI(),o.children);else{let t=(0,y.DV)(o.children,eT(e));if(t){let n=t.getChild(eO(e));r=tz(r,eI(),n)}}}}else throw(0,y.g5)("WriteRecord should have .snap or .children")}}return r}function tQ(e,t,n,r,i){if(r||i){let o=tK(e.visibleWrites,t);return!i&&tG(o)?n:i||null!=n||tV(o,eI())?tY(tX(e.allWrites,function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(eZ(e.path,t)||eZ(t,e.path))},t),n||tt.EMPTY_NODE):null}{let r=tB(e.visibleWrites,t);if(null!=r)return r;{let r=tK(e.visibleWrites,t);return tG(r)?n:null!=n||tV(r,eI())?tY(r,n||tt.EMPTY_NODE):null}}}function t0(e,t,n,r){return tQ(e.writeTree,e.treePath,t,n,r)}function t1(e,t){return function(e,t,n){let r=tt.EMPTY_NODE,i=tB(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(e5,(e,t)=>{r=r.updateImmediateChild(e,t)}),r;
1if(!n)return tH(tK(e.visibleWrites,t)).forEach(e=>{r=r.updateImmediateChild(e.name,e.node)}),r;{let i=tK(e.visibleWrites,t);return n.forEachChild(e5,(e,t)=>{let n=tY(tK(i,new ex(e)),t);r=r.updateImmediateChild(e,n)}),tH(i).forEach(e=>{r=r.updateImmediateChild(e.name,e.node)}),r}}(e.writeTree,e.treePath,t)}function t2(e,t,n,r){return function(e,t,n,r,i){(0,y.hu)(r||i,"Either existingEventSnap or existingServerSnap must exist");let o=eL(t,n);if(tV(e.visibleWrites,o))return null;{let t=tK(e.visibleWrites,o);return tG(t)?i.getChild(n):tY(t,i.getChild(n))}}(e.writeTree,e.treePath,t,n,r)}function t3(e,t){var n,r;return n=e.writeTree,r=eL(e.treePath,t),tB(n.visibleWrites,r)}function t4(e,t,n){return function(e,t,n,r){let i=eL(t,n),o=tB(e.visibleWrites,i);return null!=o?o:r.isCompleteForChild(n)?tY(tK(e.visibleWrites,i),r.getNode().getImmediateChild(n)):null}(e.writeTree,e.treePath,t,n)}function t5(e,t){return t6(eL(e.treePath,t),e.writeTree)}function t6(e,t){return{treePath:e,writeTree:t}}class t8{constructor(){this.changeMap=new Map}trackChildChange(e){let t=e.type,n=e.childName;(0,y.hu)("child_added"===t||"child_changed"===t||"child_removed"===t,"Only child changes supported for tracking"),(0,y.hu)(".priority"!==n,"Only non-priority child changes can be tracked.");let r=this.changeMap.get(n);if(r){let i=r.type;if("child_added"===t&&"child_removed"===i)this.changeMap.set(n,th(n,e.snapshotNode,r.snapshotNode));else if("child_removed"===t&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===t&&"child_changed"===i)this.changeMap.set(n,tc(n,r.oldSnap));else if("child_changed"===t&&"child_added"===i)this.changeMap.set(n,tu(n,e.snapshotNode));else if("child_changed"===t&&"child_changed"===i)this.changeMap.set(n,th(n,e.snapshotNode,r.oldSnap));else throw(0,y.g5)("Illegal combination of changes: "+e+" occurred after "+r)}else this.changeMap.set(n,e)}getChanges(){return Array.from(this.changeMap.values())}}class t7{getCompleteChild(e){return null}getChildAfterChild(e,t,n){return null}}let t9=new t7;class ne{constructor(e,t,n=null){this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}getCompleteChild(e){let t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);{let t=null!=this.optCompleteServerCache_?new tR(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return t4(this.writes_,e,t)}}getChildAfterChild(e,t,n){var r;let i=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:tF(this.viewCache_),o=function(e,t,n,r,i,o,s){let a;let l=tK(e.visibleWrites,t),u=tB(l,eI());if(null!=u)a=u;else{if(null==n)return[];a=tY(l,n)}if((a=a.withIndex(s)).isEmpty()||a.isLeafNode())return[];{let e=[],t=s.getCompare(),n=o?a.getReverseIteratorFrom(r,s):a.getIteratorFrom(r,s),i=n.getNext();for(;i&&e.length<1;)0!==t(i,r)&&e.push(i),i=n.getNext();return e}}((r=this.writes_).writeTree,r.treePath,i,t,0,n,e);return 0===o.length?null:o[0]}}function nt(e,t,n,r,i,o){let s=t.eventCache;if(null!=t3(r,n))return t;{let a,l;if(eD(n)){if((0,y.hu)(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){let n=tF(t),i=t1(r,n instanceof tt?n:tt.EMPTY_NODE);a=e.filter.updateFullNode(t.eventCache.getNode(),i,o)}else{let n=t0(r,tF(t));a=e.filter.updateFullNode(t.eventCache.getNode(),n,o)}}else{let u=eT(n);if(".priority"===u){(0,y.hu)(1===eP(n),"Can't have a priority with additional path components");let i=s.getNode(),o=t2(r,n,i,l=t.serverCache.getNode());a=null!=o?e.filter.updatePriority(i,o):s.getNode()}else{let c;let h=eO(n);if(s.isCompleteForChild(u)){l=t.serverCache.getNode();let e=t2(r,n,s.getNode(),l);c=null!=e?s.getNode().getImmediateChild(u).updateChild(h,e):s.getNode().getImmediateChild(u)}else c=t4(r,u,t.serverCache);a=null!=c?e.filter.updateChild(s.getNode(),u,c,h,i,o):s.getNode()}}return tD(t,a,s.isFullyInitialized()||eD(n),e.filter.filtersNodes())}}function nn(e,t,n,r,i,o,s,a){let l;let u=t.serverCache,c=s?e.filter:e.filter.getIndexedFilter();if(eD(n))l=c.updateFullNode(u.getNode(),r,null);else if(c.filtersNodes()&&!u.isFiltered()){let e=u.getNode().updateChild(n,r);l=c.updateFullNode(u.getNode(),e,null)}else{let e=eT(n);if(!u.isCompleteForPath(n)&&eP(n)>1)return t;let i=eO(n),o=u.getNode().getImmediateChild(e).updateChild(i,r);l=".priority"===e?c.updatePriority(u.getNode(),o):c.updateChild(u.getNode(),e,o,i,t9,null)}let h=tM(t,l,u.isFullyInitialized()||eD(n),c.filtersNodes()),d=new ne(i,h,o);return nt(e,h,n,i,d,a)}function nr(e,t,n,r,i,o,s){let a,l;let u=t.eventCache,c=new ne(i,t,o);if(eD(n))l=e.filter.updateFullNode(t.eventCache.getNode(),r,s),a=tD(t,l,!0,e.filter.filtersNodes());else{let i=eT(n);if(".priority"===i)l=e.filter.updatePriority(t.eventCache.getNode(),r),a=tD(t,l,u.isFullyInitialized(),u.isFiltered());else{let o;let l=eO(n),h=u.getNode().getImmediateChild(i);if(eD(l))o=r;else{let e=c.getCompleteChild(i);o=null!=e?".priority"===eR(l)&&e.getChild(eA(l)).isEmpty()?e:e.updateChild(l,r):tt.EMPTY_NODE}a=h.equals(o)?t:tD(t,e.filter.updateChild(u.getNode(),i,o,l,c,s),u.isFullyInitialized(),e.filter.filtersNodes())}}return a}function ni(e,t){return e.eventCache.isCompleteForChild(t)}function no(e,t,n){return n.foreach((e,n)=>{t=t.updateChild(e,n)}),t}function ns(e,t,n,r,i,o,s,a){let l;if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let u=t;l=eD(n)?r:new t$(null).setTree(n,r);let c=t.serverCache.getNode();return l.children.inorderTraversal((n,r)=>{if(c.hasChild(n)){let l=no(e,t.serverCache.getNode().getImmediateChild(n),r);u=nn(e,u,new ex(n),l,i,o,s,a)}}),l.children.inorderTraversal((n,r)=>{let l=!t.serverCache.isCompleteForChild(n)&&null===r.value;if(!c.hasChild(n)&&!l){let l=no(e,t.serverCache.getNode().getImmediateChild(n),r);u=nn(e,u,new ex(n),l,i,o,s,a)}}),u}class na{constructor(e,t){this.query_=e,this.eventRegistrations_=[];let n=this.query_._queryParams,r=new td(n.getIndex()),i=n.loadsAllData()?new td(n.getIndex()):n.hasLimit()?new tf(n):new tp(n);this.processor_={filter:i};let o=t.serverCache,s=t.eventCache,a=r.updateFullNode(tt.EMPTY_NODE,o.getNode(),null),l=i.updateFullNode(tt.EMPTY_NODE,s.getNode(),null),u=new tR(a,o.isFullyInitialized(),r.filtersNodes()),c=new tR(l,s.isFullyInitialized(),i.filtersNodes());this.viewCache_=tL(c,u),this.eventGenerator_=new tN(this.query_)}get query(){return this.query_}}function nl(e){return 0===e.eventRegistrations_.length}function nu(e,t,n){let r=[];if(n){(0,y.hu)(null==t,"A cancel should cancel all event registrations.");let i=e.query._path;
1e.eventRegistrations_.forEach(e=>{let t=e.createCancelEvent(n,i);t&&r.push(t)})}if(t){let n=[];for(let r=0;r<e.eventRegistrations_.length;++r){let i=e.eventRegistrations_[r];if(i.matches(t)){if(t.hasAnyCallback()){n=n.concat(e.eventRegistrations_.slice(r+1));break}}else n.push(i)}e.eventRegistrations_=n}else e.eventRegistrations_=[];return r}function nc(e,t,n,r){var i,o;t.type===g.MERGE&&null!==t.source.queryId&&((0,y.hu)(tF(e.viewCache_),"We should always have a full cache before handling merges"),(0,y.hu)(tj(e.viewCache_),"Missing event cache, even though we have a server cache"));let s=e.viewCache_,a=function(e,t,n,r,i){let o,s;let a=new t8;if(n.type===g.OVERWRITE)n.source.fromUser?o=nr(e,t,n.path,n.snap,r,i,a):((0,y.hu)(n.source.fromServer,"Unknown source."),s=n.source.tagged||t.serverCache.isFiltered()&&!eD(n.path),o=nn(e,t,n.path,n.snap,r,i,s,a));else if(n.type===g.MERGE){var l,u;let c;n.source.fromUser?(l=n.path,u=n.children,c=t,u.foreach((n,o)=>{let s=eL(l,n);ni(t,eT(s))&&(c=nr(e,c,s,o,r,i,a))}),u.foreach((n,o)=>{let s=eL(l,n);ni(t,eT(s))||(c=nr(e,c,s,o,r,i,a))}),o=c):((0,y.hu)(n.source.fromServer,"Unknown source."),s=n.source.tagged||t.serverCache.isFiltered(),o=ns(e,t,n.path,n.children,r,i,s,a))}else if(n.type===g.ACK_USER_WRITE)o=n.revert?function(e,t,n,r,i,o){let s;if(null!=t3(r,n))return t;{let a;let l=new ne(r,t,i),u=t.eventCache.getNode();if(eD(n)||".priority"===eT(n)){let n;if(t.serverCache.isFullyInitialized())n=t0(r,tF(t));else{let e=t.serverCache.getNode();(0,y.hu)(e instanceof tt,"serverChildren would be complete if leaf node"),n=t1(r,e)}a=e.filter.updateFullNode(u,n,o)}else{let i=eT(n),c=t4(r,i,t.serverCache);null==c&&t.serverCache.isCompleteForChild(i)&&(c=u.getImmediateChild(i)),(a=null!=c?e.filter.updateChild(u,i,c,eO(n),l,o):t.eventCache.getNode().hasChild(i)?e.filter.updateChild(u,i,tt.EMPTY_NODE,eO(n),l,o):u).isEmpty()&&t.serverCache.isFullyInitialized()&&(s=t0(r,tF(t))).isLeafNode()&&(a=e.filter.updateFullNode(a,s,o))}return s=t.serverCache.isFullyInitialized()||null!=t3(r,eI()),tD(t,a,s,e.filter.filtersNodes())}}(e,t,n.path,r,i,a):function(e,t,n,r,i,o,s){if(null!=t3(i,n))return t;let a=t.serverCache.isFiltered(),l=t.serverCache;if(null!=r.value){if(eD(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return nn(e,t,n,l.getNode().getChild(n),i,o,a,s);if(!eD(n))return t;{let r=new t$(null);return l.getNode().forEachChild(eK,(e,t)=>{r=r.set(new ex(e),t)}),ns(e,t,n,r,i,o,a,s)}}{let u=new t$(null);return r.foreach((e,t)=>{let r=eL(n,e);l.isCompleteForPath(r)&&(u=u.set(e,l.getNode().getChild(r)))}),ns(e,t,n,u,i,o,a,s)}}(e,t,n.path,n.affectedTree,r,i,a);else if(n.type===g.LISTEN_COMPLETE)o=function(e,t,n,r,i){let o=t.serverCache;return nt(e,tM(t,o.getNode(),o.isFullyInitialized()||eD(n),o.isFiltered()),n,r,t9,i)}(e,t,n.path,r,a);else throw(0,y.g5)("Unknown operation type: "+n.type);let c=a.getChanges();return function(e,t,n){let r=t.eventCache;if(r.isFullyInitialized()){let i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=tj(e);!(n.length>0)&&e.eventCache.isFullyInitialized()&&(!i||r.getNode().equals(o))&&r.getNode().getPriority().equals(o.getPriority())||n.push(tl(tj(t)))}}(t,o,c),{viewCache:o,changes:c}}(e.processor_,s,t,n,r);return i=e.processor_,o=a.viewCache,(0,y.hu)(o.eventCache.getNode().isIndexed(i.filter.getIndex()),"Event snap not indexed"),(0,y.hu)(o.serverCache.getNode().isIndexed(i.filter.getIndex()),"Server snap not indexed"),(0,y.hu)(a.viewCache.serverCache.isFullyInitialized()||!s.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=a.viewCache,nh(e,a.changes,a.viewCache.eventCache.getNode(),null)}function nh(e,t,n,r){let i=r?[r]:e.eventRegistrations_;return function(e,t,n,r){let i=[],o=[];return t.forEach(t=>{if("child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)){var n;o.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))}}),tA(e,i,"child_removed",t,r,n),tA(e,i,"child_added",t,r,n),tA(e,i,"child_moved",o,r,n),tA(e,i,"child_changed",t,r,n),tA(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}class nd{constructor(){this.views=new Map}}function np(e,t,n,r){let i=t.source.queryId;if(null!==i){let o=e.views.get(i);
1return(0,y.hu)(null!=o,"SyncTree gave us an op for an invalid query."),nc(o,t,n,r)}{let i=[];for(let o of e.views.values())i=i.concat(nc(o,t,n,r));return i}}function nf(e,t,n,r,i){let o=t._queryIdentifier,s=e.views.get(o);if(!s){let e=t0(n,i?r:null),o=!1;return e?o=!0:(e=r instanceof tt?t1(n,r):tt.EMPTY_NODE,o=!1),new na(t,tL(new tR(e,o,!1),new tR(r,i,!1)))}return s}function ng(e){let t=[];for(let n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function nm(e,t){let n=null;for(let r of e.views.values())n=n||function(e,t){let n=tF(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!eD(t)&&!n.getImmediateChild(eT(t)).isEmpty())?n.getChild(t):null}(r,t);return n}function nv(e,t){if(t._queryParams.loadsAllData())return n_(e);{let n=t._queryIdentifier;return e.views.get(n)}}function ny(e){return null!=n_(e)}function n_(e){for(let t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}let nb=1;class nw{constructor(e){this.listenProvider_=e,this.syncPointTree_=new t$(null),this.pendingWriteTree_={visibleWrites:tU.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function nk(e,t,n,r,i){var o,s;return(o=e.pendingWriteTree_,s=i,(0,y.hu)(r>o.lastWriteId,"Stacking an older write on top of newer ones"),void 0===s&&(s=!0),o.allWrites.push({path:t,snap:n,writeId:r,visible:s}),s&&(o.visibleWrites=tz(o.visibleWrites,t,n)),o.lastWriteId=r,i)?nP(e,new tP(tS(),t,n)):[]}function nC(e,t,n=!1){let r=function(e,t){for(let n=0;n<e.allWrites.length;n++){let r=e.allWrites[n];if(r.writeId===t)return r}return null}(e.pendingWriteTree_,t);if(!function(e,t){let n=e.allWrites.findIndex(e=>e.writeId===t);(0,y.hu)(n>=0,"removeWrite called with nonexistent writeId.");let r=e.allWrites[n];e.allWrites.splice(n,1);let i=r.visible,o=!1,s=e.allWrites.length-1;for(;i&&s>=0;){let t=e.allWrites[s];t.visible&&(s>=n&&function(e,t){if(e.snap)return eZ(e.path,t);for(let n in e.children)if(e.children.hasOwnProperty(n)&&eZ(eL(e.path,n),t))return!0;return!1}(t,r.path)?i=!1:eZ(r.path,t.path)&&(o=!0)),s--}return!!i&&(o?(e.visibleWrites=tX(e.allWrites,tJ,eI()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1):r.snap?e.visibleWrites=tW(e.visibleWrites,r.path):J(r.children,t=>{e.visibleWrites=tW(e.visibleWrites,eL(r.path,t))}),!0)}(e.pendingWriteTree_,t))return[];{let t=new t$(null);return null!=r.snap?t=t.set(eI(),!0):J(r.children,e=>{t=t.set(new ex(e),!0)}),nP(e,new tI(r.path,t,n))}}function nS(e,t,n){return nP(e,new tP(tE(),t,n))}function nE(e,t,n,r,i=!1){let o=t._path,s=e.syncPointTree_.get(o),a=[];if(s&&("default"===t._queryIdentifier||null!=nv(s,t))){let l=function(e,t,n,r){let i=t._queryIdentifier,o=[],s=[],a=ny(e);if("default"===i)for(let[t,i]of e.views.entries())s=s.concat(nu(i,n,r)),nl(i)&&(e.views.delete(t),i.query._queryParams.loadsAllData()||o.push(i.query));else{let t=e.views.get(i);t&&(s=s.concat(nu(t,n,r)),nl(t)&&(e.views.delete(i),t.query._queryParams.loadsAllData()||o.push(t.query)))}return a&&!ny(e)&&o.push(new((0,y.hu)(h,"Reference.ts has not been loaded"),h)(t._repo,t._path)),{removed:o,events:s}}(s,t,n,r);0===s.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(o));let u=l.removed;if(a=l.events,!i){let n=-1!==u.findIndex(e=>e._queryParams.loadsAllData()),i=e.syncPointTree_.findOnPath(o,(e,t)=>ny(t));if(n&&!i){let t=e.syncPointTree_.subtree(o);if(!t.isEmpty()){let n=t.fold((e,t,n)=>{if(t&&ny(t))return[n_(t)];{let e=[];return t&&(e=ng(t)),J(n,(t,n)=>{e=e.concat(n)}),e}});for(let t=0;t<n.length;++t){let r=n[t],i=r.query,o=nO(e,r);e.listenProvider_.startListening(nM(i),nR(e,i),o.hashFn,o.onComplete)}}}i||!(u.length>0)||r||(n?e.listenProvider_.stopListening(nM(t),null):u.forEach(t=>{let n=e.queryToTagMap.get(nN(t));e.listenProvider_.stopListening(nM(t),n)}))}!function(e,t){for(let n=0;n<t.length;++n){let r=t[n];if(!r._queryParams.loadsAllData()){let t=nN(r),n=e.queryToTagMap.get(t);e.queryToTagMap.delete(t),e.tagToQueryMap.delete(n)}}}(e,u)}return a}function nx(e,t,n,r){let i=nA(e,r);if(null==i)return[];{let r=nL(i),o=r.path,s=r.queryId,a=eM(o,t);return nD(e,o,new tP(tx(s),a,n))}}function nI(e,t,n,r=!1){let i;let o=t._path,s=null,a=!1;e.syncPointTree_.foreachOnPath(o,(e,t)=>{let n=eM(e,o);s=s||nm(t,n),a=a||ny(t)});let l=e.syncPointTree_.get(o);l?(a=a||ny(l),s=s||nm(l,eI())):(l=new nd,e.syncPointTree_=e.syncPointTree_.set(o,l)),null!=s?i=!0:(i=!1,s=tt.EMPTY_NODE,e.syncPointTree_.subtree(o).foreachChild((e,t)=>{let n=nm(t,eI());n&&(s=s.updateImmediateChild(e,n))}));let u=null!=nv(l,t);if(!u&&!t._queryParams.loadsAllData()){let n=nN(t);(0,y.hu)(!e.queryToTagMap.has(n),"View does not exist, but we have a tag");let r=nb++;e.queryToTagMap.set(n,r),e.tagToQueryMap.set(r,n)}let c=function(e,t,n,r,i,o){let s=nf(e,t,r,i,o);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,s),!function(e,t){e.eventRegistrations_.push(t)}(s,n),function(e,t){let n=e.viewCache_.eventCache,r=[];
1return n.getNode().isLeafNode()||n.getNode().forEachChild(e5,(e,t)=>{r.push(tu(e,t))}),n.isFullyInitialized()&&r.push(tl(n.getNode())),nh(e,r,n.getNode(),t)}(s,n)}(l,t,n,t6(o,e.pendingWriteTree_),s,i);if(!u&&!a&&!r){let n=nv(l,t);c=c.concat(function(e,t,n){let r=t._path,i=nR(e,t),o=nO(e,n),s=e.listenProvider_.startListening(nM(t),i,o.hashFn,o.onComplete),a=e.syncPointTree_.subtree(r);if(i)(0,y.hu)(!ny(a.value),"If we're adding a query, it shouldn't be shadowed");else{let t=a.fold((e,t,n)=>{if(!eD(e)&&t&&ny(t))return[n_(t).query];{let e=[];return t&&(e=e.concat(ng(t).map(e=>e.query))),J(n,(t,n)=>{e=e.concat(n)}),e}});for(let n=0;n<t.length;++n){let r=t[n];e.listenProvider_.stopListening(nM(r),nR(e,r))}}return s}(e,t,n))}return c}function nT(e,t,n){let r=e.pendingWriteTree_,i=e.syncPointTree_.findOnPath(t,(e,n)=>{let r=nm(n,eM(e,t));if(r)return r});return tQ(r,t,i,n,!0)}function nP(e,t){var n;return function e(t,n,r,i){if(eD(t.path))return function e(t,n,r,i){let o=n.get(eI());null==r&&null!=o&&(r=nm(o,eI()));let s=[];return n.children.inorderTraversal((n,o)=>{let a=r?r.getImmediateChild(n):null,l=t5(i,n),u=t.operationForChild(n);u&&(s=s.concat(e(u,o,a,l)))}),o&&(s=s.concat(np(o,t,i,r))),s}(t,n,r,i);{let o=n.get(eI());null==r&&null!=o&&(r=nm(o,eI()));let s=[],a=eT(t.path),l=t.operationForChild(a),u=n.children.get(a);if(u&&l){let t=r?r.getImmediateChild(a):null,n=t5(i,a);s=s.concat(e(l,u,t,n))}return o&&(s=s.concat(np(o,t,i,r))),s}}(t,e.syncPointTree_,null,(n=e.pendingWriteTree_,t6(eI(),n)))}function nO(e,t){let n=t.query,r=nR(e,n);return{hashFn:()=>(t.viewCache_.serverCache.getNode()||tt.EMPTY_NODE).hash(),onComplete:t=>{if("ok"===t){var i;return r?function(e,t,n){let r=nA(e,n);if(!r)return[];{let n=nL(r),i=n.path,o=n.queryId,s=eM(i,t);return nD(e,i,new tT(tx(o),s))}}(e,n._path,r):(i=n._path,nP(e,new tT(tE(),i)))}{let r=function(e,t){let n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");let r=Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return nE(e,n,null,r)}}}}function nR(e,t){let n=nN(t);return e.queryToTagMap.get(n)}function nN(e){return e._path.toString()+"$"+e._queryIdentifier}function nA(e,t){return e.tagToQueryMap.get(t)}function nL(e){let t=e.indexOf("$");return(0,y.hu)(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new ex(e.substr(0,t))}}function nD(e,t,n){let r=e.syncPointTree_.get(t);return(0,y.hu)(r,"Missing sync point for query tag that we're tracking"),np(r,n,t6(t,e.pendingWriteTree_),null)}
1function nM(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new((0,y.hu)(d,"Reference.ts has not been loaded"),d)(e._repo,e._path):e}class nj{constructor(e){this.node_=e}getImmediateChild(e){return new nj(this.node_.getImmediateChild(e))}node(){return this.node_}}class nF{constructor(e,t){this.syncTree_=e,this.path_=t}getImmediateChild(e){let t=eL(this.path_,e);return new nF(this.syncTree_,t)}node(){return nT(this.syncTree_,this.path_)}}let nZ=function(e,t,n){return e&&"object"==typeof e?((0,y.hu)(".sv"in e,"Unexpected leaf node or priority contents"),"string"==typeof e[".sv"])?n$(e[".sv"],t,n):"object"==typeof e[".sv"]?nU(e[".sv"],t):void(0,y.hu)(!1,"Unexpected server value: "+JSON.stringify(e,null,2)):e},n$=function(e,t,n){if("timestamp"===e)return n.timestamp;(0,y.hu)(!1,"Unexpected server value: "+e)},nU=function(e,t,n){e.hasOwnProperty("increment")||(0,y.hu)(!1,"Unexpected server value: "+JSON.stringify(e,null,2));let r=e.increment;"number"!=typeof r&&(0,y.hu)(!1,"Unexpected increment value: "+r);let i=t.node();if((0,y.hu)(null!=i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;let o=i.getValue();return"number"!=typeof o?r:o+r},nz=function(e,t,n,r){return nW(t,new nF(n,e),r)},nq=function(e,t,n){return nW(e,new nj(t),n)};function nW(e,t,n){let r;let i=nZ(e.getPriority().val(),t.getImmediateChild(".priority"),n);if(!e.isLeafNode())return r=e,i!==e.getPriority().val()&&(r=r.updatePriority(new e3(i))),e.forEachChild(e5,(e,i)=>{let o=nW(i,t.getImmediateChild(e),n);o!==i&&(r=r.updateImmediateChild(e,o))}),r;{let r=nZ(e.getValue(),t,n);return r!==e.getValue()||i!==e.getPriority().val()?new e3(r,ti(i)):e}}class nV{constructor(e="",t=null,n={children:{},childCount:0}){this.name=e,this.parent=t,this.node=n}}function nB(e,t){let n=t instanceof ex?t:new ex(t),r=e,i=eT(n);for(;null!==i;){let e=(0,y.DV)(r.node.children,i)||{children:{},childCount:0};r=new nV(i,r,e),i=eT(n=eO(n))}return r}function nH(e){return e.node.value}function nK(e,t){e.node.value=t,function e(t){null!==t.parent&&function(t,n,r){let i=void 0===nH(r)&&!nG(r),o=(0,y.r3)(t.node.children,n);i&&o?(delete t.node.children[n],t.node.childCount--,e(t)):i||o||(t.node.children[n]=r.node,t.node.childCount++,e(t))}(t.parent,t.name,t)}(e)}function nG(e){return e.node.childCount>0}function nY(e,t){J(e.node.children,(n,r)=>{t(new nV(n,e,r))})}function nJ(e){return new ex(null===e.parent?e.name:nJ(e.parent)+"/"+e.name)}let nX=/[\[\].#$\/\u0000-\u001F\u007F]/,nQ=/[\[\].#$\u0000-\u001F\u007F]/,n0=function(e){return"string"==typeof e&&0!==e.length&&!nX.test(e)},n1=function(e){return"string"==typeof e&&0!==e.length&&!nQ.test(e)},n2=function(e){return null===e||"string"==typeof e||"number"==typeof e&&!z(e)||e&&"object"==typeof e&&(0,y.r3)(e,".sv")},n3=function(e,t,n,r){r&&void 0===t||n4((0,y.gK)(e,"value"),t,n)},n4=function(e,t,n){let r=n instanceof ex?new e$(n,e):n;if(void 0===t)throw Error(e+"contains undefined "+ez(r));if("function"==typeof t)throw Error(e+"contains a function "+ez(r)+" with contents = "+t.toString());if(z(t))throw Error(e+"contains "+t.toString()+" "+ez(r));if("string"==typeof t&&t.length>3495253.3333333335&&(0,y.ug)(t)>10485760)throw Error(e+"contains a string greater than 10485760 utf8 bytes "+ez(r)+" ('"+t.substring(0,50)+"...')");if(t&&"object"==typeof t){let n=!1,i=!1;if(J(t,(t,o)=>{if(".value"===t)n=!0;else if(".priority"!==t&&".sv"!==t&&(i=!0,!n0(t)))throw Error(e+" contains an invalid key ("+t+") "+ez(r)+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.parts_.length>0&&(r.byteLength_+=1),r.parts_.push(t),r.byteLength_+=(0,y.ug)(t),eU(r),n4(e,o,r),function(e){let t=e.parts_.pop();e.byteLength_-=(0,y.ug)(t),e.parts_.length>0&&(e.byteLength_-=1)}(r)}),n&&i)throw Error(e+' contains ".value" child '+ez(r)+" in addition to actual children.")}},n5=function(e,t){let n,r;for(n=0;n<t.length;n++){let i=eN(r=t[n]);for(let t=0;t<i.length;t++)if(".priority"===i[t]&&t===i.length-1);else if(!n0(i[t]))throw Error(e+"contains an invalid key ("+i[t]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"')}t.sort(ej);let i=null;for(n=0;n<t.length;n++){if(r=t[n],null!==i&&eZ(i,r))throw Error(e+"contains a path "+i.toString()+" that is ancestor of another path "+r.toString());i=r}},n6=function(e,t,n,r){if(r&&void 0===t)return;let i=(0,y.gK)(e,"values");if(!(t&&"object"==typeof t)||Array.isArray(t))throw Error(i+" must be an object c
1ontaining the children to replace.");let o=[];J(t,(e,t)=>{let r=new ex(e);if(n4(i,t,eL(n,r)),".priority"===eR(r)&&!n2(t))throw Error(i+"contains an invalid value for '"+r.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");o.push(r)}),n5(i,o)},n8=function(e,t,n,r){if((!r||void 0!==n)&&!n0(n))throw Error((0,y.gK)(e,t)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},n7=function(e,t,n,r){if((!r||void 0!==n)&&!n1(n))throw Error((0,y.gK)(e,t)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},n9=function(e,t,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),n7(e,t,n,r)},re=function(e,t){if(".info"===eT(t))throw Error(e+" failed = Can't modify data under /.info/")},rt=function(e,t){var n;let r=t.path.toString();if("string"!=typeof t.repoInfo.host||0===t.repoInfo.host.length||!n0(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==r.length&&((n=r)&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),!n1(n)))throw Error((0,y.gK)(e,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')};class rn{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function rr(e,t){let n=null;for(let r=0;r<t.length;r++){let i=t[r],o=i.getPath();null===n||eF(o,n.path)||(e.eventLists_.push(n),n=null),null===n&&(n={events:[],path:o}),n.events.push(i)}n&&e.eventLists_.push(n)}function ri(e,t,n){rr(e,n),rs(e,e=>eF(e,t))}function ro(e,t,n){rr(e,n),rs(e,e=>eZ(e,t)||eZ(t,e))}function rs(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r<e.eventLists_.length;r++){let i=e.eventLists_[r];i&&(t(i.path)?(function(e){for(let t=0;t<e.events.length;t++){let n=e.events[t];if(null!==n){e.events[t]=null;let r=n.getEventRunner();A&&M("event: "+n.toString()),et(r)}}}(e.eventLists_[r]),e.eventLists_[r]=null):n=!1)}n&&(e.eventLists_=[]),e.recursionDepth_--}class ra{constructor(e,t,n,r){this.repoInfo_=e,this.forceRestClient_=t,this.authTokenProvider_=n,this.appCheckProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new rn,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=tb(),this.transactionQueueTree_=new nV,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function rl(e){var t;return(t=t={timestamp:function(e){let t=e.infoData_.getNode(new ex(".info/serverTimeOffset")).val()||0;return new Date().getTime()+t}(e)}).timestamp=t.timestamp||new Date().getTime(),t}function ru(e,t,n,r,i){e.dataUpdateCount++;let o=new ex(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let s=[];if(i){if(r){let t=(0,y.UI)(n,e=>ti(e));s=function(e,t,n,r){let i=nA(e,r);if(!i)return[];{let r=nL(i),o=r.path,s=r.queryId,a=eM(o,t),l=t$.fromObject(n);return nD(e,o,new tO(tx(s),a,l))}}(e.serverSyncTree_,o,t,i)}else{let t=ti(n);s=nx(e.serverSyncTree_,o,t,i)}}else if(r){let t=(0,y.UI)(n,e=>ti(e));s=function(e,t,n){let r=t$.fromObject(n);return nP(e,new tO(tE(),t,r))}(e.serverSyncTree_,o,t)}else{let t=ti(n);s=nS(e.serverSyncTree_,o,t)}let a=o;s.length>0&&(a=rv(e,o)),ro(e.eventQueue_,a,s)}function rc(e,t){rh(e,"connected",t),!1===t&&function(e){rf(e,"onDisconnectEvents");let t=rl(e),n=tb();tw(e.onDisconnect_,eI(),(r,i)=>{let o=nz(r,i,e.serverSyncTree_,t);!function e(t,n,r){if(eD(n))t.value=r,t.children.clear();else if(null!==t.value)t.value=t.value.updateChild(n,r);else{let i=eT(n);t.children.has(i)||t.children.set(i,tb()),e(t.children.get(i),n=eO(n),r)}}(n,r,o)});let r=[];tw(n,eI(),(t,n)=>{r=r.concat(nS(e.serverSyncTree_,t,n));let i=rw(e,t);rv(e,i)}),e.onDisconnect_=tb(),ro(e.eventQueue_,eI(),r)}(e)}function rh(e,t,n){let r=new ex("/.info/"+t),i=ti(n);e.infoData_.updateSnapshot(r,i);let o=nS(e.infoSyncTree_,r,i);ro(e.eventQueue_,r,o)}function rd(e){return e.nextWriteId_++}function rp(e,t,n){let r;r=".info"===eT(t._path)?nE(e.infoSyncTree_,t,n):nE(e.serverSyncTree_,t,n),ri(e.eventQueue_,t._path,r)}function rf(e,...t){let n="";e.persistentConnection_&&(n=e.persistentConnection_.id+":"),M(n,...t)}function rg(e,t,n,r){t&&et(()=>{if("ok"===n)t(null);else{let e=(n||"error").toUpperCase(),i=e;r&&(i+=": "+r);let o=Error(i);o.code=e,t(o)}})}function rm(e,t,n){return nT(e.serverSyncTree_,t,n)||tt.EMPTY_NODE}function rv(e,t){let n=ry(e,t),r=nJ(n),i=r_(e,n);return function(e,t,n){if(0===t.length)return;let r=[],i=[],o=t.filter(e=>0===e.status).map(e=>e.currentWriteId);for(let s=0;s<t.length;s++){let a=t[s],l=eM(n,a.path),u=!1,c;if((0,y.hu)(null!==l,"rerunTransactionsUnderNode_: relativePath should not be null."),4===a.status)u=!0,c=a.abortReason,i=i.concat(nC(e.serverSyncTree_,a.currentWriteId,!0));else if(0===a.status){if(a.retryCount>=25)u=!0,c="maxretry",i=i.concat(nC(e.serverSyncTree_,a.currentWriteId,!0));else{let n=rm(e,a.path,o);a.currentInputSnapshot=n;let r=t[s].update(n.val());if(void 0!==r){n4("transaction failed: Data returned ",r,a.path);let t=ti(r);"object"==typeof r&&null!=r&&(0,y.r3)(r,".priority")||(t=t.updatePriority(n.getPri
1ority()));let s=a.currentWriteId,l=nq(t,n,rl(e));a.currentOutputSnapshotRaw=t,a.currentOutputSnapshotResolved=l,a.currentWriteId=rd(e),o.splice(o.indexOf(s),1),i=(i=i.concat(nk(e.serverSyncTree_,a.path,l,a.currentWriteId,a.applyLocally))).concat(nC(e.serverSyncTree_,s,!0))}else u=!0,c="nodata",i=i.concat(nC(e.serverSyncTree_,a.currentWriteId,!0))}}ro(e.eventQueue_,n,i),i=[],u&&(t[s].status=2,setTimeout(t[s].unwatcher,Math.floor(0)),t[s].onComplete&&("nodata"===c?r.push(()=>t[s].onComplete(null,!1,t[s].currentInputSnapshot)):r.push(()=>t[s].onComplete(Error(c),!1,null))))}rb(e,e.transactionQueueTree_);for(let e=0;e<r.length;e++)et(r[e]);(function e(t,n=t.transactionQueueTree_){if(n||rb(t,n),nH(n)){let r=r_(t,n);(0,y.hu)(r.length>0,"Sending zero length transaction queue"),r.every(e=>0===e.status)&&function(t,n,r){let i=rm(t,n,r.map(e=>e.currentWriteId)),o=i,s=i.hash();for(let e=0;e<r.length;e++){let t=r[e];(0,y.hu)(0===t.status,"tryToSendTransactionQueue_: items in queue should all be run."),t.status=1,t.retryCount++;let i=eM(n,t.path);o=o.updateChild(i,t.currentOutputSnapshotRaw)}let a=o.val(!0);t.server_.put(n.toString(),a,i=>{rf(t,"transaction put response",{path:n.toString(),status:i});let o=[];if("ok"===i){let i=[];for(let e=0;e<r.length;e++)r[e].status=2,o=o.concat(nC(t.serverSyncTree_,r[e].currentWriteId)),r[e].onComplete&&i.push(()=>r[e].onComplete(null,!0,r[e].currentOutputSnapshotResolved)),r[e].unwatcher();rb(t,nB(t.transactionQueueTree_,n)),e(t,t.transactionQueueTree_),ro(t.eventQueue_,n,o);for(let e=0;e<i.length;e++)et(i[e])}else{if("datastale"===i)for(let e=0;e<r.length;e++)3===r[e].status?r[e].status=4:r[e].status=0;else{$("transaction at "+n.toString()+" failed: "+i);for(let e=0;e<r.length;e++)r[e].status=4,r[e].abortReason=i}rv(t,n)}},s)}(t,nJ(n),r)}else nG(n)&&nY(n,n=>{e(t,n)})})(e,e.transactionQueueTree_)}(e,i,r),r}function ry(e,t){let n;let r=e.transactionQueueTree_;for(n=eT(t);null!==n&&void 0===nH(r);)r=nB(r,n),n=eT(t=eO(t));return r}function r_(e,t){let n=[];return function e(t,n,r){let i=nH(n);if(i)for(let e=0;e<i.length;e++)r.push(i[e]);nY(n,n=>{e(t,n,r)})}(e,t,n),n.sort((e,t)=>e.order-t.order),n}function rb(e,t){let n=nH(t);if(n){let e=0;for(let t=0;t<n.length;t++)2!==n[t].status&&(n[e]=n[t],e++);n.length=e,nK(t,n.length>0?n:void 0)}nY(t,t=>{rb(e,t)})}function rw(e,t){let n=nJ(ry(e,t)),r=nB(e.transactionQueueTree_,t);return!function(e,t,n){let r=e.parent;for(;null!==r;){if(t(r))return!0;r=r.parent}}(r,t=>{rk(e,t)}),rk(e,r),!function e(t,n,r,i){r&&!i&&n(t),nY(t,t=>{e(t,n,!0,i)}),r&&i&&n(t)}(r,t=>{rk(e,t)}),n}function rk(e,t){let n=nH(t);if(n){let r=[],i=[],o=-1;for(let t=0;t<n.length;t++)3===n[t].status||(1===n[t].status?((0,y.hu)(o===t-1,"All SENT items should be at beginning of queue."),o=t,n[t].status=3,n[t].abortReason="set"):((0,y.hu)(0===n[t].status,"Unexpected transaction status in abort"),n[t].unwatcher(),i=i.concat(nC(e.serverSyncTree_,n[t].currentWriteId,!0)),n[t].onComplete&&r.push(n[t].onComplete.bind(null,Error("set"),!1,null))));-1===o?nK(t,void 0):n.length=o+1,ro(e.eventQueue_,nJ(t),i);for(let e=0;e<r.length;e++)et(r[e])}}let rC=function(e,t){let n=rS(e),r=n.namespace;"firebase.com"===n.domain&&Z(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||Z("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||U();let i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new eu(n.host,n.secure,r,i,t,"",r!==n.subdomain),path:new ex(n.pathString)}},rS=function(e){let t="",n="",r="",i="",o="",s=!0,a="https",l=443;if("string"==typeof e){let u=e.indexOf("//");u>=0&&(a=e.substring(0,u-1),e=e.substring(u+2));let c=e.indexOf("/");-1===c&&(c=e.length);let h=e.indexOf("?");-1===h&&(h=e.length),t=e.substring(0,Math.min(c,h)),c<h&&(i=function(e){let t="",n=e.split("/");for(let e=0;e<n.length;e++)if(n[e].length>0){let r=n[e];try{r=decodeURIComponent(r.replace(/\+/g," "))}catch(e){}t+="/"+r}return t}(e.substring(c,h)));let d=function(e){let t={};for(let n of("?"===e.charAt(0)&&(e=e.substring(1)),e.split("&"))){if(0===n.length)continue;let r=n.split("=");
12===r.length?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):$(`Invalid query segment '${n}' in query '${e}'`)}return t}(e.substring(Math.min(e.length,h)));(u=t.indexOf(":"))>=0?(s="https"===a||"wss"===a,l=parseInt(t.substring(u+1),10)):u=t.length;let p=t.slice(0,u);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{let e=t.indexOf(".");r=t.substring(0,e).toLowerCase(),n=t.substring(e+1),o=r}"ns"in d&&(o=d.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:s,scheme:a,pathString:i,namespace:o}};class rE{constructor(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}getPath(){let e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+(0,y.Wl)(this.snapshot.exportVal())}}class rx{constructor(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class rI{constructor(e,t){this.snapshotCallback=e,this.cancelCallback=t}onValue(e,t){this.snapshotCallback.call(null,e,t)}onCancel(e){return(0,y.hu)(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)}get hasCancelCallback(){return!!this.cancelCallback}matches(e){return this.snapshotCallback===e.snapshotCallback||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context}}class rT{constructor(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}get key(){return eD(this._path)?null:eR(this._path)}get ref(){return new rR(this._repo,this._path)}get _queryIdentifier(){let e=G(tv(this._queryParams));return"{}"===e?"default":e}get _queryObject(){return tv(this._queryParams)}isEqual(e){if(!((e=(0,y.m9)(e))instanceof rT))return!1;let t=this._repo===e._repo,n=eF(this._path,e._path),r=this._queryIdentifier===e._queryIdentifier;return t&&n&&r}toJSON(){return this.toString()}toString(){return this._repo.toString()+function(e){let t="";for(let n=e.pieceNum_;n<e.pieces_.length;n++)""!==e.pieces_[n]&&(t+="/"+encodeURIComponent(String(e.pieces_[n])));return t||"/"}(this._path)}}function rP(e){let t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===eK){let r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!==W)throw Error(r);if("string"!=typeof t)throw Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!==V)throw Error(r);if("string"!=typeof n)throw Error(i)}}else if(e.getIndex()===e5){if(null!=t&&!n2(t)||null!=n&&!n2(n))throw Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if((0,y.hu)(e.getIndex() instanceof to||e.getIndex()===ta,"unknown index type."),null!=t&&"object"==typeof t||null!=n&&"object"==typeof n)throw Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function rO(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}class rR extends rT{constructor(e,t){super(e,t,new tg,!1)}get parent(){let e=eA(this._path);return null===e?null:new rR(this._repo,e)}get root(){let e=this;for(;null!==e.parent;)e=e.parent;return e}}class rN{constructor(e,t,n){this._node=e,this.ref=t,this._index=n}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(e){let t=new ex(e),n=rL(this.ref,e);return new rN(this._node.getChild(t),n,e5)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(e){return!this._node.isLeafNode()&&!!this._node.forEachChild(this._index,(t,n)=>
1e(new rN(n,rL(this.ref,t),e5)))}hasChild(e){let t=new ex(e);return!this._node.getChild(t).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function rA(e,t){return(e=(0,y.m9)(e))._checkNotDeleted("ref"),void 0!==t?rL(e._root,t):e._root}function rL(e,t){return null===eT((e=(0,y.m9)(e))._path)?n9("child","path",t,!1):n7("child","path",t,!1),new rR(e._repo,eL(e._path,t))}function rD(e,t){re("set",(e=(0,y.m9)(e))._path),n3("set",t,e._path,!1);let n=new y.BH;return!function(e,t,n,r,i){rf(e,"set",{path:t.toString(),value:n,priority:null});let o=rl(e),s=ti(n,null),a=nq(s,nT(e.serverSyncTree_,t),o),l=rd(e),u=nk(e.serverSyncTree_,t,a,l,!0);rr(e.eventQueue_,u),e.server_.put(t.toString(),s.val(!0),(n,r)=>{let o="ok"===n;o||$("set at "+t+" failed: "+n);let s=nC(e.serverSyncTree_,l,!o);ro(e.eventQueue_,t,s),rg(e,i,n,r)});let c=rw(e,t);rv(e,c),ro(e.eventQueue_,c,[])}(e._repo,e._path,t,0,n.wrapCallback(()=>{})),n.promise}function rM(e,t){n6("update",t,e._path,!1);let n=new y.BH;return!function(e,t,n,r){rf(e,"update",{path:t.toString(),value:n});let i=!0,o=rl(e),s={};if(J(n,(n,r)=>{i=!1,s[n]=nz(eL(t,n),ti(r),e.serverSyncTree_,o)}),i)M("update() called with empty data.  Don't do anything."),rg(e,r,"ok",void 0);else{let i=rd(e),o=function(e,t,n,r){var i;i=e.pendingWriteTree_,(0,y.hu)(r>i.lastWriteId,"Stacking an older merge on top of newer ones"),i.allWrites.push({path:t,children:n,writeId:r,visible:!0}),i.visibleWrites=tq(i.visibleWrites,t,n),i.lastWriteId=r;let o=t$.fromObject(n);return nP(e,new tO(tS(),t,o))}(e.serverSyncTree_,t,s,i);rr(e.eventQueue_,o),e.server_.merge(t.toString(),n,(n,o)=>{let s="ok"===n;s||$("update at "+t+" failed: "+n);let a=nC(e.serverSyncTree_,i,!s),l=a.length>0?rv(e,t):t;ro(e.eventQueue_,l,a),rg(e,r,n,o)}),J(n,n=>{let r=rw(e,eL(t,n));rv(e,r)}),ro(e.eventQueue_,t,[])}}(e._repo,e._path,t,n.wrapCallback(()=>{})),n.promise}function rj(e){e=(0,y.m9)(e);let t=new rF(new rI(()=>{}));return(function(e,t,n){let r=function(e,t){var n;let r=t._path,i=null;e.syncPointTree_.foreachOnPath(r,(e,t)=>{let n=eM(e,r);i=i||nm(t,n)});let o=e.syncPointTree_.get(r);o?i=i||nm(o,eI()):(o=new nd,e.syncPointTree_=e.syncPointTree_.set(r,o));let s=null!=i,a=s?new tR(i,!0,!1):null,l=(n=e.pendingWriteTree_,t6(t._path,n));return tj(nf(o,t,l,s?a.getNode():tt.EMPTY_NODE,s).viewCache_)}(e.serverSyncTree_,t);return null!=r?Promise.resolve(r):e.server_.get(t).then(r=>{let i;let o=ti(r).withIndex(t._queryParams.getIndex());if(nI(e.serverSyncTree_,t,n,!0),t._queryParams.loadsAllData())i=nS(e.serverSyncTree_,t._path,o);else{let n=nR(e.serverSyncTree_,t);i=nx(e.serverSyncTree_,t._path,o,n)}return ro(e.eventQueue_,t._path,i),nE(e.serverSyncTree_,t,n,null,!0),o},n=>(rf(e,"get for query "+(0,y.Wl)(t)+" failed: "+n),Promise.reject(Error(n))))})(e._repo,e,t).then(t=>new rN(t,new rR(e._repo,e._path),e._queryParams.getIndex()))}class rF{constructor(e){this.callbackContext=e}respondsTo(e){return"value"===e}createEvent(e,t){let n=t._queryParams.getIndex();return new rE("value",this,new rN(e.snapshotNode,new rR(t._repo,t._path),n))}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,null)}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new rx(this,e,t):null}matches(e){return e instanceof rF&&(!e.callbackContext||!this.callbackContext||e.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class rZ{constructor(e,t){this.eventType=e,this.callbackContext=t}respondsTo(e){let t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t}createCancelEvent(e,t){return this.callbackContext.hasCancelCallback?new rx(this,e,t):null}createEvent(e,t){(0,y.hu)(null!=e.childName,"Child events should have a childName.");let n=rL(new rR(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new rE(e.type,this,new rN(e.snapshotNode,n,r),e.prevName)}getEventRunner(e){return"cancel"===e.getEventType()?()=>this.callbackContext.onCancel(e.error):()=>this.callbackContext.onValue(e.snapshot,e.prevName)}matches(e){return e instanceof rZ&&this.eventType===e.eventType&&(!this.callbackContext||!e.callbackContext||this.callbackContext.matches(e.callbackContext))}hasAnyCallback(){return!!this.callbackContext}}function r$(e,t,n,r){return function(e,t,n,r,i){var o;let s,a;if("object"==typeof r&&(s=void 0,i=r),"function"==typeof r&&(s=r),i&&i.onlyOnce){let t=n,r=(n,r)=>{rp(e._repo,e,u),t(n,r)};r.userCallback=n.userCallback,r.context=n.context,n=r}let l=new rI(n,s||void 0),u="value"===t?new rF(l):new rZ(t,l);return o=e._repo,a=".info"===eT(e._path)?nI(o.infoSyncTree_,e,u):nI(o.serverSyncTree_,e,u),ri(o.eventQueue_,e._path,a),()=>rp(e._repo,e,u)}(e,"value",t,n,r)}class rU{}class rz extends rU{constructor(e,t){super(),this._value=e,this._key=t,this.type="endAt"}_apply(e){n3("endAt",this._value,e._path,!0);let t=function(e,t,n){let r=e.copy();return r.endSet_=!0,void 0===t&&(t=null),r.indexEndValue_=t,void 0!==n?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}(e._queryParams,this._value,this._key);if(rO(t),rP(t),e._queryParams.hasEnd())throw Error("endAt: Starting point was already set 
1(by another call to endAt, endBefore or equalTo).");return new rT(e._repo,e._path,t,e._orderByCalled)}}class rq extends rU{constructor(e,t){super(),this._value=e,this._key=t,this.type="startAt"}_apply(e){n3("startAt",this._value,e._path,!0);let t=function(e,t,n){let r=e.copy();return r.startSet_=!0,void 0===t&&(t=null),r.indexStartValue_=t,null!=n?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}(e._queryParams,this._value,this._key);if(rO(t),rP(t),e._queryParams.hasStart())throw Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new rT(e._repo,e._path,t,e._orderByCalled)}}function rW(e=null,t){return n8("startAt","key",t,!0),new rq(e,t)}class rV extends rU{constructor(e){super(),this._path=e,this.type="orderByChild"}_apply(e){!function(e,t){if(!0===e._orderByCalled)throw Error(t+": You can't combine multiple orderBy calls.")}(e,"orderByChild");let t=new ex(this._path);if(eD(t))throw Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");let n=new to(t),r=function(e,t){let n=e.copy();return n.index_=t,n}(e._queryParams,n);return rP(r),new rT(e._repo,e._path,r,!0)}}function rB(e){if("$key"===e)throw Error('orderByChild: "$key" is invalid.  Use orderByKey() instead.');if("$priority"===e)throw Error('orderByChild: "$priority" is invalid.  Use orderByPriority() instead.');if("$value"===e)throw Error('orderByChild: "$value" is invalid.  Use orderByValue() instead.');return n7("orderByChild","path",e,!1),new rV(e)}class rH extends rU{constructor(e,t){super(),this._value=e,this._key=t,this.type="equalTo"}_apply(e){if(n3("equalTo",this._value,e._path,!1),e._queryParams.hasStart())throw Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(e._queryParams.hasEnd())throw Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new rz(this._value,this._key)._apply(new rq(this._value,this._key)._apply(e))}}function rK(e,t){return n8("equalTo","key",t,!0),new rH(e,t)}function rG(e,...t){let n=(0,y.m9)(e);for(let e of t)n=e._apply(n);return n}(0,y.hu)(!h,"__referenceConstructor has already been defined"),h=rR,(0,y.hu)(!d,"__referenceConstructor has already been defined"),d=rR;let rY={};class rJ{constructor(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(function(e,t,n){if(e.stats_=ef(e.repoInfo_),e.forceRestClient_||("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)e.server_=new ty(e.repoInfo_,(t,n,r,i)=>{ru(e,t,n,r,i)},e.authTokenProvider_,e.appCheckProvider_),setTimeout(()=>rc(e,!0),0);else{if(null!=n){if("object"!=typeof n)throw Error("Only objects are supported for option databaseAuthVariableOverride");try{(0,y.Wl)(n)}catch(e){throw Error("Invalid authOverride provided: "+e)}}e.persistentConnection_=new eW(e.repoInfo_,t,(t,n,r,i)=>{ru(e,t,n,r,i)},t=>{rc(e,t)},t=>{J(t,(t,n)=>{rh(e,t,n)})},e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener(t=>{e.server_.refreshAuthToken(t)}),e.appCheckProvider_.addTokenChangeListener(t=>{e.server_.refreshAppCheckToken(t.token)}),e.statsReporter_=function(e,t){let n=e.toString();return ep[n]||(ep[n]=t()),ep[n]}(e.repoInfo_,()=>new tC(e.stats_,e.server_)),e.infoData_=new t_,e.infoSyncTree_=new nw({startListening:(t,n,r,i)=>{let o=[],s=e.infoData_.getNode(t._path);return s.isEmpty()||(o=nS(e.infoSyncTree_,t._path,s),setTimeout(()=>{i("ok")},0)),o},stopListening:()=>{}}),rh(e,"connected",!1),e.serverSyncTree_=new nw({startListening:(t,n,r,i)=>(e.server_.listen(t,r,n,(n,r)=>{let o=i(n,r);ro(e.eventQueue_,t._path,o)}),[]),stopListening:(t,n)=>{e.server_.unlisten(t,n)}})}(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new rR(this._repo,eI())),this._rootInternal}_delete(){return null!==this._rootInternal&&(function(e,t){let n=rY[t];n&&n[e.key]===e||Z(`Database ${t}(${e.repoInfo_}) has already been deleted.`),e.persistentConnection_&&e.persistentConnection_.interrupt("repo_interrupt"),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(e){null===this._rootInternal&&Z("Cannot call "+e+" on a deleted database.")}}function rX(e=(0,m.Mq)(),t){let n=(0,m.qX)(e,"database").getImmediate({identifier:t});if(!n._instanceStarted){let e=(0,y.P0)("database");e&&function(e,t,n,r={}){var i;let o;(e=(0,y.m9)(e))._checkNotDeleted("useEmulator"),e._instanceStarted&&Z("Cannot call useEmulator() after instance has already been initialized.");let s=e._repoInternal;s.repoInfo_.nodeAdmin?(r.mockUserToken&&Z('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),o=new eo(eo.OWNER)):r.mockUserToken&&(o=new eo("string"==typeof r.mockUserToken?r.mockUserToken:(0,y.Sg)(r.mockUserToken,e.app.options.projectId))),i=o,s.repoInfo_=new eu(`${t}:${n}`,!1,s.repoInfo_.namespace,s.repoInfo_.webSocketOnly,s.repoInfo_.nodeAdmin,s.repoInfo_.persistenceKey,s.repoInfo_.includeNamespaceInQueryParams,!0),i&&(s.authTokenProvider_=i)}(n,...e)}return n}eW.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},eW.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)},C=m.Jn,(0,m.Xd)(new v.wA("database",(e,{instanceIdentifier:t})=>(function(e,t,n,r,i){var o,s;let a,l,u,c,h=r||e.options.databaseURL;
1void 0===h&&(e.options.projectId||Z("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),M("Using default host for project ",e.options.projectId),h=`${e.options.projectId}-default-rtdb.firebaseio.com`);let d=rC(h,void 0),p=d.repoInfo;void 0!==b&&b.env&&(u=b.env.FIREBASE_DATABASE_EMULATOR_HOST),u?(c=!0,p=(d=rC(h=`http://${u}?ns=${p.namespace}`,void 0)).repoInfo):c=!d.repoInfo.secure;let f=new ei(e.name,e.options,t);return rt("Invalid Firebase Database URL",d),eD(d.path)||Z("Database URL must point to the root of a Firebase Database (not including a child path)."),new rJ((o=p,s=new er(e.name,n),(a=rY[e.name])||(a={},rY[e.name]=a),(l=a[o.toURLString()])&&Z("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),l=new ra(o,!1,f,s),a[o.toURLString()]=l,l),e)})(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t),"PUBLIC").setMultipleInstances(!0)),(0,m.KN)(w,k,void 0),(0,m.KN)(w,k,"esm2017")},77004:function(e,t,n){"use strict";n.d(t,{$C:function(){return p}});var r,i=n(32238),o=n(74444),s=n(8463);let a="functions";class l{constructor(e,t,n){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then(e=>this.auth=e,()=>{}),this.messaging||t.get().then(e=>this.messaging=e,()=>{}),this.appCheck||n.get().then(e=>this.appCheck=e,()=>{})}async getAuthToken(){if(this.auth)try{let e=await this.auth.getToken();return null==e?void 0:e.accessToken}catch(e){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch(e){return}}async getAppCheckToken(e){if(this.appCheck){let t=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return t.error?null:t.token}return null}async getContext(e){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken(e)}}}let u="us-central1";class c{constructor(e,t,n,r,i=u,o){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new l(t,n,r),this.cancelAllRequests=new Promise(e=>{this.deleteService=()=>Promise.resolve(e())});try{let e=new URL(i);this.customDomain=e.origin+("/"===e.pathname?"":e.pathname),this.region=u}catch(e){this.customDomain=null,this.region=i}}_delete(){return this.deleteService()}_url(e){let t=this.app.options.projectId;if(null!==this.emulatorOrigin){let n=this.emulatorOrigin;return`${n}/${t}/${this.region}/${e}`}return null!==this.customDomain?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}let h="@firebase/functions",d="0.11.8";function p(e=(0,i.Mq)(),t=u){let n=(0,i.qX)((0,o.m9)(e),a).getImmediate({identifier:t}),r=(0,o.P0)("functions");return r&&function(e,t,n){(0,o.m9)(e).emulatorOrigin=`http://${t}:${n}`}(n,...r),n}r=fetch.bind(self),(0,i.Xd)(new s.wA(a,(e,{instanceIdentifier:t})=>{let n=e.getProvider("app").getImmediate();return new c(n,e.getProvider("auth-internal"),e.getProvider("messaging-internal"),e.getProvider("app-check-internal"),t,r)},"PUBLIC").setMultipleInstances(!0)),(0,i.KN)(h,d,void 0),(0,i.KN)(h,d,"esm2017")},26531:function(e,t,n){"use strict";let r,i,o;n.d(t,{X3:function(){return g}});let s=(e,t)=>t.some(t=>e instanceof t),a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return l.get(e);if("objectStoreNames"===t)return e.objectStoreNames||u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return p(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(p(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&a.set(t,e)}).catch(()=>{}),h.set(t,e),t}(e);if(c.has(e))return c.get(e);let n="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(f(this),e),p(a.get(this))}:function(...e){return p(t.apply(f(this),e))}:function(e,...n){let r=t.call(f(this),e,...n);return u.set(r,e.sort?e.sort():[e]),p(r)}:(t instanceof IDBTransaction&&function(e){if(l.has(e))return;let t=new Promise((t,n)=>{let 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)});l.set(e,t)}(t),s(t,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,d):t;return n!==e&&(c.set(e,n),h.set(n,e)),n}let f=e=>h.get(e);function g(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){let s=indexedDB.open(e,t),a=p(s);return r&&s.addEventListener("upgradeneeded",e=>{r(p(s.result),e.oldVersion,e.newVersion,p(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}let m=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],y=new Map;function _(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(y.get(t))return y.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||m.includes(n)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;
1return r&&(s=s.index(t.shift())),(await Promise.all([s[n](...t),i&&o.done]))[0]};return y.set(t,o),o}d={...o=d,get:(e,t,n)=>_(e,t)||o.get(e,t,n),has:(e,t)=>!!_(e,t)||o.has(e,t)}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(43079)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.