!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).firebase)}(this,function(e){"use strict";try{(function(){function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var $l=t(e);(function(){var t,o="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};var u=function(t){t=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,t];for(var e=0;e>>0),i=0;function r(t,e,n){return t.call.apply(t.bind,arguments)}function g(e,n,t){if(!e)throw Error();if(2/g,tt=/"/g,et=/'/g,nt=/\x00/g,it=/[\x00&<>"']/;function rt(t,e){return-1!=t.indexOf(e)}function ot(t,e){return t"}else r=void 0===t?"undefined":null===t?"null":typeof t;P("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,r)}}function pt(t,e){this.a=t===bt&&e||"",this.b=gt}function vt(t){return t instanceof pt&&t.constructor===pt&&t.b===gt?t.a:(P("expected object of type Const, got '"+t+"'"),"type_error:Const")}pt.prototype.sa=!0,pt.prototype.ra=function(){return this.a},pt.prototype.toString=function(){return"Const{"+this.a+"}"};var mt,gt={},bt={};function yt(){if(void 0===mt){var t=null,e=l.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:T,createScript:T,createScriptURL:T})}catch(t){l.console&&l.console.error(t.message)}mt=t}else mt=t}return mt}function wt(t,e){this.a=e===kt?t:""}function It(t){return t instanceof wt&&t.constructor===wt?t.a:(P("expected object of type TrustedResourceUrl, got '"+t+"' of type "+d(t)),"type_error:TrustedResourceUrl")}function Tt(t,n){var e,i=vt(t);if(!At.test(i))throw Error("Invalid TrustedResourceUrl format: "+i);return t=i.replace(Et,function(t,e){if(!Object.prototype.hasOwnProperty.call(n,e))throw Error('Found marker, "'+e+'", in format string, "'+i+'", but no valid label mapping found in args: '+JSON.stringify(n));return(t=n[e])instanceof pt?vt(t):encodeURIComponent(String(t))}),e=t,t=yt(),new wt(e=t?t.createScriptURL(e):e,kt)}wt.prototype.sa=!0,wt.prototype.ra=function(){return this.a.toString()},wt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Et=/%{(\w+)}/g,At=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,kt={};function St(t,e){this.a=e===Pt?t:""}function Nt(t){return t instanceof St&&t.constructor===St?t.a:(P("expected object of type SafeUrl, got '"+t+"' of type "+d(t)),"type_error:SafeUrl")}St.prototype.sa=!0,St.prototype.ra=function(){return this.a.toString()},St.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var _t=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Ot=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Ct=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Rt(t){return t instanceof St?t:(t="object"==typeof t&&t.sa?t.ra():String(t),t=Ct.test(t)||(e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(Ot))&&_t.test(e[1])?new St(t,Pt):null);var e}function Dt(t){return t instanceof St?t:(t="object"==typeof t&&t.sa?t.ra():String(t),new St(t=!Ct.test(t)?"about:invalid#zClosurez":t,Pt))}var Pt={},Lt=new St("about:invalid#zClosurez",Pt);function xt(t,e,n){this.a=n===Mt?t:""}xt.prototype.sa=!0,xt.prototype.ra=function(){return this.a.toString()},xt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Mt={};function jt(t,e,n,i){return t=t instanceof St?t:Dt(t),e=e||l,n=n instanceof pt?vt(n):n||"",e.open(Nt(t),n,i,void 0)}function Ut(t){for(var e=t.split("%s"),n="",i=Array.prototype.slice.call(arguments,1);i.length&&1")?t.replace(Q,">"):t).indexOf('"')?t.replace(tt,"""):t).indexOf("'")?t.replace(et,"'"):t).indexOf("\0")&&(t=t.replace(nt,"�"))),t}function Ft(t){return Ft[" "](t),t}Ft[" "]=a;var qt,Ht=st("Opera"),Kt=st("Trident")||st("MSIE"),Gt=st("Edge"),Bt=Gt||Kt,Wt=st("Gecko")&&!(rt(Y.toLowerCase(),"webkit")&&!st("Edge"))&&!(st("Trident")||st("MSIE"))&&!st("Edge"),Xt=rt(Y.toLowerCase(),"webkit")&&!st("Edge");function Jt(){var t=l.document;return t?t.documentMode:void 0}t:{var Yt="",zt=(zt=Y,Wt?/rv:([^\);]+)(\)|;)/.exec(zt):Gt?/Edge\/([\d\.]+)/.exec(zt):Kt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(zt):Xt?/WebKit\/(\S+)/.exec(zt):Ht?/(?:Version)[ \/]?(\S+)/.exec(zt):void 0);if(zt&&(Yt=zt?zt[1]:""),Kt){zt=Jt();if(null!=zt&&zt>parseFloat(Yt)){qt=String(zt);break t}}qt=Yt}var $t={};function Zt(s){return t=s,e=function(){for(var t=0,e=z(String(qt)).split("."),n=z(String(s)).split("."),i=Math.max(e.length,n.length),r=0;0==t&&r"),i=i.join("")),i=se(n,i),r&&("string"==typeof r?i.className=r:Array.isArray(r)?i.className=r.join(" "):ne(i,r)),2>>0);function ln(e){return v(e)?e:(e[hn]||(e[hn]=function(t){return e.handleEvent(t)}),e[hn])}function fn(){Le.call(this),this.v=new Je(this),(this.ac=this).gb=null}function dn(t,e,n,i,r){t.v.add(String(e),n,!1,i,r)}function pn(t,e,n,i,r){t.v.add(String(e),n,!0,i,r)}function vn(t,e,n,i){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var r=!0,o=0;o>4&15).toString(16)+(15&t).toString(16)}An.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Pn(e,xn,!0),":");var n=this.a;return!n&&"file"!=e||(t.push("//"),(e=this.l)&&t.push(Pn(e,xn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&t.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&t.push("/"),t.push(Pn(n,"/"==n.charAt(0)?jn:Mn,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Pn(n,Vn)),t.join("")},An.prototype.resolve=function(t){var e=new An(this),n=!!t.c;n?kn(e,t.c):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var i,r=t.f;if(n)Sn(e,t.g);else if(n=!!t.f)if("/"!=r.charAt(0)&&(this.a&&!this.f?r="/"+r:-1!=(i=e.f.lastIndexOf("/"))&&(r=e.f.substr(0,i+1)+r)),".."==(i=r)||"."==i)r="";else if(rt(i,"./")||rt(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a2*t.c&&In(t)))}function Gn(t,e){return qn(t),e=Xn(t,e),Tn(t.a.b,e)}function Bn(t,e,n){Kn(t,e),0',t=new xt(t=(i=yt())?i.createHTML(t):t,0,Mt),i=a.document)&&(i.write((o=t)instanceof xt&&o.constructor===xt?o.a:(P("expected object of type SafeHtml, got '"+o+"' of type "+d(o)),"type_error:SafeHtml")),i.close())):(a=jt(e,i,n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var oi=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ai=/^[^@]+@[^@]+$/;function si(){var e=null;return new de(function(t){"complete"==l.document.readyState?t():(e=function(){t()},en(window,"load",e))}).o(function(t){throw nn(window,"load",e),t})}function ui(t){return t=t||bi(),!("file:"!==Ei()&&"ionic:"!==Ei()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function ci(){var t=l.window;try{return t&&t!=t.top}catch(t){return}}function hi(){return void 0!==l.WorkerGlobalScope&&"function"==typeof l.importScripts}function li(){return $l.default.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":$l.default.INTERNAL.hasOwnProperty("node")?"Node":hi()?"Worker":"Browser"}function fi(){var t=li();return"ReactNative"===t||"Node"===t}var di="Firefox",pi="Chrome";function vi(t){var e=t.toLowerCase();return rt(e,"opera/")||rt(e,"opr/")||rt(e,"opios/")?"Opera":rt(e,"iemobile")?"IEMobile":rt(e,"msie")||rt(e,"trident/")?"IE":rt(e,"edge/")?"Edge":rt(e,"firefox/")?di:rt(e,"silk/")?"Silk":rt(e,"blackberry")?"Blackberry":rt(e,"webos")?"Webos":!rt(e,"safari/")||rt(e,"chrome/")||rt(e,"crios/")||rt(e,"android")?!rt(e,"chrome/")&&!rt(e,"crios/")||rt(e,"edge/")?rt(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":pi:"Safari"}var mi={md:"FirebaseCore-web",od:"FirebaseUI-web"};function gi(t,e){e=e||[];var n,i=[],r={};for(n in mi)r[mi[n]]=!0;for(n=0;n>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(t,function(t){e.push(t)}),e}function Pr(t){var e=xr(t);if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.h=t,this.a=e.exp,this.i=e.sub,t=Date.now()/1e3,this.g=e.iat||(t>this.a?this.a:t),this.b=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.c=!!e.is_anonymous||"anonymous"==this.b}function Lr(t){try{return new Pr(t)}catch(t){return null}}function xr(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n>10)),t[n++]=String.fromCharCode(56320+(1023&a))):(r=i[e++],o=i[e++],t[n++]=String.fromCharCode((15&s)<<12|(63&r)<<6|63&o))}return JSON.parse(t.join(""))}catch(t){}return null}Pr.prototype.T=function(){return this.f},Pr.prototype.l=function(){return this.c},Pr.prototype.toString=function(){return this.h};var Mr="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),jr=["client_id","response_type","scope","redirect_uri","state"],Ur={nd:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Xa:jr},pd:{Ja:null,ua:500,ta:750,fa:"github.com",Xa:jr},qd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Xa:jr},wd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Xa:Mr},kd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Xa:[]}};function Vr(t){for(var e in Ur)if(Ur[e].fa==t)return Ur[e];return null}function Fr(t){var e={};e["facebook.com"]=Br,e["google.com"]=Xr,e["github.com"]=Wr,e["twitter.com"]=Jr;var n=t&&t[Hr];try{if(n)return new(e[n]||Gr)(t);if(void 0!==t[qr])return new Kr(t)}catch(t){}return null}var qr="idToken",Hr="providerId";function Kr(t){var e,n=t[Hr];if(n||!t[qr]||(e=Lr(t[qr]))&&e.b&&(n=e.b),!n)throw Error("Invalid additional user info!");"anonymous"!=n&&"custom"!=n||(n=null),e=!1,void 0!==t.isNewUser?e=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(e=!0),Fi(this,"providerId",n),Fi(this,"isNewUser",e)}function Gr(t){Kr.call(this,t),Fi(this,"profile",Ki((t=Ni(t.rawUserInfo||"{}"))||{}))}function Br(t){if(Gr.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Wr(t){if(Gr.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Fi(this,"username",this.profile&&this.profile.login||null)}function Xr(t){if(Gr.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Jr(t){if(Gr.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Fi(this,"username",t.screenName||null)}function Yr(t){var e=On(i=Cn(t),"link"),n=On(Cn(e),"link"),i=On(i,"deep_link_id");return On(Cn(i),"link")||i||n||e||t}function zr(t,e){if(!t&&!e)throw new E("internal-error","Internal assert: no raw session string available");if(t&&e)throw new E("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?$r:Zr}I(Gr,Kr),I(Br,Gr),I(Wr,Gr),I(Xr,Gr),I(Jr,Gr);var $r="enroll",Zr="signin";function Qr(){}function to(t,n){return t.then(function(t){if(t[Ka]){var e=Lr(t[Ka]);if(!e||n!=e.i)throw new E("user-mismatch");return t}throw new E("user-mismatch")}).o(function(t){throw t&&t.code&&t.code==S+"user-not-found"?new E("user-mismatch"):t})}function eo(t,e){if(!e)throw new E("internal-error","failed to construct a credential");this.a=e,Fi(this,"providerId",t),Fi(this,"signInMethod",t)}function no(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function io(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new eo(t.providerId,t.pendingToken)}catch(t){}return null}function ro(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Fi(this,"idToken",e.idToken),e.accessToken&&Fi(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Fi(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new E("internal-error","failed to construct a credential");Fi(this,"accessToken",e.oauthToken),Fi(this,"secret",e.oauthTokenSecret)}Fi(this,"providerId",t),Fi(this,"signInMethod",n)}function oo(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Hn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function ao(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new ro(t.providerId,e,t.signInMethod)}catch(t){}}return null}function so(t,e){this.Qc=e||[],qi(this,{providerId:t,isOAuthProvider:!0}),this.Ib={},this.pb=(Vr(t)||{}).Ja||null,this.ob=null}function uo(t){if("string"!=typeof t||0!=t.indexOf("saml."))throw new E("argument-error",'SAML provider IDs must be prefixed with "saml."');so.call(this,t,[])}function co(t){so.call(this,t,jr),this.a=[]}function ho(){co.call(this,"facebook.com")}function lo(t){if(!t)throw new E("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new ho).credential({accessToken:e})}function fo(){co.call(this,"github.com")}function po(t){if(!t)throw new E("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new fo).credential({accessToken:e})}function vo(){co.call(this,"google.com"),this.Ca("profile")}function mo(t,e){var n=t;return m(t)&&(n=t.idToken,e=t.accessToken),(new vo).credential({idToken:n,accessToken:e})}function go(){so.call(this,"twitter.com",Mr)}function bo(t,e){var n=t;if(!(n=!m(n)?{oauthToken:t,oauthTokenSecret:e}:n).oauthToken||!n.oauthTokenSecret)throw new E("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new ro("twitter.com",n,"twitter.com")}function yo(t,e,n){this.a=t,this.f=e,Fi(this,"providerId","password"),Fi(this,"signInMethod",n===Io.EMAIL_LINK_SIGN_IN_METHOD?Io.EMAIL_LINK_SIGN_IN_METHOD:Io.EMAIL_PASSWORD_SIGN_IN_METHOD)}function wo(t){return t&&t.email&&t.password?new yo(t.email,t.password,t.signInMethod):null}function Io(){qi(this,{providerId:"password",isOAuthProvider:!1})}function To(t,e){if(!(e=Eo(e)))throw new E("argument-error","Invalid email link!");return new yo(t,e.code,Io.EMAIL_LINK_SIGN_IN_METHOD)}function Eo(t){return(t=yr(t=Yr(t)))&&t.operation===Qi?t:null}function Ao(t){if(!(t.eb&&t.cb||t.La&&t.ea))throw new E("internal-error");this.a=t,Fi(this,"providerId","phone"),this.fa="phone",Fi(this,"signInMethod","phone")}function ko(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var n={};return F(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(t){e[t]&&(n[t]=e[t])}),new Ao(n)}return null}function So(t){return t.a.La&&t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.eb,code:t.a.cb}}function No(t){try{this.a=t||$l.default.auth()}catch(t){throw new E("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}qi(this,{providerId:"phone",isOAuthProvider:!1})}function _o(t,e){if(!t)throw new E("missing-verification-id");if(!e)throw new E("missing-verification-code");return new Ao({eb:t,cb:e})}function Oo(t){if(t.temporaryProof&&t.phoneNumber)return new Ao({La:t.temporaryProof,ea:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,i=t&&t.oauthTokenSecret,r=t&&t.nonce,o=t&&t.oauthIdToken,a=t&&t.pendingToken;try{switch(e){case"google.com":return mo(o,n);case"facebook.com":return lo(n);case"github.com":return po(n);case"twitter.com":return bo(n,i);default:return n||i||o||a?a?0==e.indexOf("saml.")?new eo(e,a):new ro(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new co(e).credential({idToken:o,accessToken:n,rawNonce:r}):null}}catch(t){return null}}function Co(t){if(!t.isOAuthProvider)throw new E("invalid-oauth-provider")}function Ro(t,e,n,i,r,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=i||null,this.i=o||null,this.h=a||null,this.a=r||null,!this.g&&!this.a)throw new E("invalid-auth-event");if(this.g&&this.a)throw new E("invalid-auth-event");if(this.g&&!this.f)throw new E("invalid-auth-event")}function Do(t){return(t=t||{}).type?new Ro(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&A(t.error),t.postBody,t.tenantId):null}function Po(){this.b=null,this.a=[]}zr.prototype.Ha=function(){return this.a?we(this.a):we(this.b)},zr.prototype.w=function(){return this.type==$r?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},Qr.prototype.ka=function(){},Qr.prototype.b=function(){},Qr.prototype.c=function(){},Qr.prototype.w=function(){},eo.prototype.ka=function(t){return ls(t,no(this))},eo.prototype.b=function(t,e){var n=no(this);return n.idToken=e,fs(t,n)},eo.prototype.c=function(t,e){return to(ds(t,no(this)),e)},eo.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},ro.prototype.ka=function(t){return ls(t,oo(this))},ro.prototype.b=function(t,e){var n=oo(this);return n.idToken=e,fs(t,n)},ro.prototype.c=function(t,e){return to(ds(t,oo(this)),e)},ro.prototype.w=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},so.prototype.Ka=function(t){return this.Ib=ht(t),this},I(uo,so),I(co,so),co.prototype.Ca=function(t){return G(this.a,t)||this.a.push(t),this},co.prototype.Qb=function(){return J(this.a)},co.prototype.credential=function(t,e){e=m(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null};if(!e.idToken&&!e.accessToken)throw new E("argument-error","credential failed: must provide the ID token and/or the access token.");return new ro(this.providerId,e,this.providerId)},I(ho,co),Fi(ho,"PROVIDER_ID","facebook.com"),Fi(ho,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),I(fo,co),Fi(fo,"PROVIDER_ID","github.com"),Fi(fo,"GITHUB_SIGN_IN_METHOD","github.com"),I(vo,co),Fi(vo,"PROVIDER_ID","google.com"),Fi(vo,"GOOGLE_SIGN_IN_METHOD","google.com"),I(go,so),Fi(go,"PROVIDER_ID","twitter.com"),Fi(go,"TWITTER_SIGN_IN_METHOD","twitter.com"),yo.prototype.ka=function(t){return this.signInMethod==Io.EMAIL_LINK_SIGN_IN_METHOD?Js(t,Is,{email:this.a,oobCode:this.f}):Js(t,Ks,{email:this.a,password:this.f})},yo.prototype.b=function(t,e){return this.signInMethod==Io.EMAIL_LINK_SIGN_IN_METHOD?Js(t,Ts,{idToken:e,email:this.a,oobCode:this.f}):Js(t,xs,{idToken:e,email:this.a,password:this.f})},yo.prototype.c=function(t,e){return to(this.ka(t),e)},yo.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},qi(Io,{PROVIDER_ID:"password"}),qi(Io,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),qi(Io,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Ao.prototype.ka=function(t){return t.fb(So(this))},Ao.prototype.b=function(t,e){var n=So(this);return n.idToken=e,Js(t,Bs,n)},Ao.prototype.c=function(t,e){var n=So(this);return n.operation="REAUTH",to(t=Js(t,Ws,n),e)},Ao.prototype.w=function(){var t={providerId:"phone"};return this.a.eb&&(t.verificationId=this.a.eb),this.a.cb&&(t.verificationCode=this.a.cb),this.a.La&&(t.temporaryProof=this.a.La),this.a.ea&&(t.phoneNumber=this.a.ea),t},No.prototype.fb=function(i,r){var o=this.a.a;return we(r.verify()).then(function(n){if("string"!=typeof n)throw new E("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");if("recaptcha"!==r.type)throw new E("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.');var t=m(i)?i.session:null,e=m(i)?i.phoneNumber:i,t=t&&t.type==$r?t.Ha().then(function(t){return Js(o,js,{idToken:t,phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:n}}).then(function(t){return t.phoneSessionInfo.sessionInfo})}):t&&t.type==Zr?t.Ha().then(function(t){return e=o,t={mfaPendingCredential:t,mfaEnrollmentId:i.multiFactorHint&&i.multiFactorHint.uid||i.multiFactorUid,phoneSignInInfo:{recaptchaToken:n}},Js(e,Us,t).then(function(t){return t.phoneResponseInfo.sessionInfo});var e}):Js(o,Ps,{phoneNumber:e,recaptchaToken:n});return t.then(function(t){return"function"==typeof r.reset&&r.reset(),t},function(t){throw"function"==typeof r.reset&&r.reset(),t})})},qi(No,{PROVIDER_ID:"phone"}),qi(No,{PHONE_SIGN_IN_METHOD:"phone"}),Ro.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.h&&t.push(this.h),t.join("-")},Ro.prototype.T=function(){return this.h},Ro.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var Lo,xo=null;function Mo(t){var e="unauthorized-domain",n=void 0,i=Cn(t);t=i.a,"chrome-extension"==(i=i.c)?n=Ut("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==i||"https"==i?n=Ut("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",E.call(this,e,n)}function jo(t,e,n){E.call(this,t,n),(t=e||{}).Jb&&Fi(this,"email",t.Jb),t.ea&&Fi(this,"phoneNumber",t.ea),t.credential&&Fi(this,"credential",t.credential),t.Zb&&Fi(this,"tenantId",t.Zb)}function Uo(t){if(t.code){var e=t.code||"";0==e.indexOf(S)&&(e=e.substring(S.length));var n={credential:Oo(t),Zb:t.tenantId};if(t.email)n.Jb=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new E(e,t.message||void 0);return new jo(e,n,t.message)}return null}function Vo(){}function Fo(t){return t.c||(t.c=t.b())}function qo(){}function Ho(t){if(t.f||"undefined"!=typeof XMLHttpRequest||"undefined"==typeof ActiveXObject)return t.f;for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n=function t(e){return e.c||(e.a?t(e.a):(P("Root logger has no level set."),null))}(this).value)for(v(e)&&(e=e()),t=new Wo(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var Qo,ta={},ea=null;function na(t){var e,n,i;return ea||(ea=new Xo(""),(ta[""]=ea).c=$o),(e=ta[t])||(e=new Xo(t),i=t.lastIndexOf("."),n=t.substr(i+1),(i=na(t.substr(0,i))).b||(i.b={}),(i.b[n]=e).a=i,ta[t]=e),e}function ia(t,e){t&&t.log(Zo,e,void 0)}function ra(t){this.f=t}function oa(t){fn.call(this),this.u=t,this.h=void 0,this.readyState=aa,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=na("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}I(ra,Vo),ra.prototype.a=function(){return new oa(this.f)},ra.prototype.b=(Qo={},function(){return Qo}),I(oa,fn);var aa=0;function sa(t){t.c.read().then(t.pc.bind(t)).catch(t.Ua.bind(t))}function ua(t){t.readyState=4,t.g=null,t.c=null,t.m=null,ca(t)}function ca(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function ha(t){fn.call(this),this.headers=new wn,this.D=t||null,this.c=!1,this.C=this.a=null,this.h=this.R=this.l="",this.f=this.O=this.i=this.J=!1,this.g=0,this.s=null,this.m=la,this.u=this.S=!1}(t=oa.prototype).open=function(t,e){if(this.readyState!=aa)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,ca(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.l,method:this.s,credentials:this.h,cache:void 0};t&&(e.body=t),this.u.fetch(new Request(this.f,e)).then(this.uc.bind(this),this.Ua.bind(this))},t.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,ua(this)),this.readyState=aa},t.uc=function(t){this.a&&(this.g=t,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=t.headers,this.readyState=2,ca(this)),this.a&&(this.readyState=3,ca(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.sc.bind(this),this.Ua.bind(this)):void 0!==l.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.m=new TextDecoder,sa(this)):t.text().then(this.tc.bind(this),this.Ua.bind(this)))))},t.pc=function(t){var e;this.a&&((e=this.m.decode(t.value||new Uint8Array(0),{stream:!t.done}))&&(this.response=this.responseText+=e),(t.done?ua:ca)(this),3==this.readyState&&sa(this))},t.tc=function(t){this.a&&(this.response=this.responseText=t,ua(this))},t.sc=function(t){this.a&&(this.response=t,ua(this))},t.Ua=function(t){var e=this.i;e&&e.log(zo,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&ua(this)},t.setRequestHeader=function(t,e){this.l.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.i)&&t.log(zo,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.i;return t&&t.log(zo,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(oa.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(t){this.h=t?"include":"same-origin"}}),I(ha,fn);var la="";ha.prototype.b=na("goog.net.XhrIo");var fa=/^https?$/i,da=["POST","PUT"];function pa(e,t,n,i,r){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.R=n,e.J=!1,e.c=!0,e.a=(e.D||Lo).a(),e.C=e.D?Fo(e.D):Fo(Lo),e.a.onreadystatechange=b(e.Vb,e);try{ia(e.b,Ea(e,"Opening Xhr")),e.O=!0,e.a.open(n,String(t),!0),e.O=!1}catch(t){return ia(e.b,Ea(e,"Error opening Xhr: "+t.message)),void ma(e,t)}t=i||"";var o,a=new wn(e.headers);r&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(p(t)||"string"==typeof t)F(t,e,void 0);else for(var n=yn(t),i=bn(t),r=i.length,o=0;o>>7|r<<25)^(r>>>18|r<<14)^r>>>3)|0,a=(0|n[e-7])+((i>>>17|i<<15)^(i>>>19|i<<13)^i>>>10)|0;n[e]=o+a|0}i=0|t.a[0],r=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],h=0|t.a[5],l=0|t.a[6];for(o=0|t.a[7],e=0;e<64;e++){var f=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&r^i&s^r&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&h^~c&l)+(0|Zu[e])|0)+(0|n[e])|0)|0,o=l,l=h,h=c,c=u+a|0,u=s,s=r,r=i,i=a+f|0}t.a[0]=t.a[0]+i|0,t.a[1]=t.a[1]+r|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+h|0,t.a[6]=t.a[6]+l|0,t.a[7]=t.a[7]+o|0}function uc(t,e,n){void 0===n&&(n=e.length);var i=0,r=t.c;if("string"==typeof e)for(;i>r&255;return H(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}function vc(t,e){for(var n=0;nt.f&&(t.a=t.f),e)}function oh(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function ah(t,e){void 0===e&&(e=t.b?(e=t.b).a-e.g:0),t.c=Date.now()+1e3*e}function sh(t,e){t.b=Lr(e[Ka]||""),t.a=e.refreshToken,ah(t,void 0!==(e=e.expiresIn)?Number(e):void 0)}function uh(e,t){return i=e.f,r=t,new de(function(e,n){"refresh_token"==r.grant_type&&r.refresh_token||"authorization_code"==r.grant_type&&r.code?Za(i,i.l+"?key="+encodeURIComponent(i.c),function(t){t?t.error?n(zs(t)):t.access_token&&t.refresh_token?e(t):n(new E("internal-error")):n(new E("network-request-failed"))},"POST",Hn(r).toString(),i.g,i.m.get()):n(new E("internal-error"))}).then(function(t){return e.b=Lr(t.access_token),e.a=t.refresh_token,ah(e,t.expires_in),{accessToken:e.b.toString(),refreshToken:e.a}}).o(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t});var i,r}function ch(t,e){this.a=t||null,this.b=e||null,qi(this,{lastSignInTime:Li(e||null),creationTime:Li(t||null)})}function hh(t,e,n,i,r,o){qi(this,{uid:t,displayName:i||null,photoURL:r||null,email:n||null,phoneNumber:o||null,providerId:e})}function lh(t,e,n){this.J=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var i,r=$l.default.SDK_VERSION?gi($l.default.SDK_VERSION):null;this.a=new qa(this.l,O(k),r),t.emulatorConfig&&Ya(this.a,t.emulatorConfig),this.b=new oh(this.a),yh(this,e[Ka]),sh(this.b,e),Fi(this,"refreshToken",this.b.a),Th(this,n||{}),fn.call(this),this.R=!1,this.s&&Ii()&&(this.i=xc(this.s,this.l,this.m)),this.S=[],this.h=null,this.u=(i=this,new ih(function(){return i.I(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var t=i.b.c-Date.now()-3e5;return 0this.c-3e4?this.a?uh(this,{grant_type:"refresh_token",refresh_token:this.a}):we(null):we({accessToken:this.b.toString(),refreshToken:this.a})},ch.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},I(lh,fn),lh.prototype.wa=function(t){this.ya=t,Ja(this.a,t)},lh.prototype.la=function(){return this.ya},lh.prototype.Ga=function(){return J(this.$)},lh.prototype.hb=function(){this.u.b&&(this.u.stop(),this.u.start())},Fi(lh.prototype,"providerId","firebase"),(t=lh.prototype).reload=function(){var t=this;return Uh(this,Ah(this).then(function(){return Ch(t).then(function(){return wh(t)}).then(Eh)}))},t.oc=function(t){return this.I(t).then(function(t){return new Bc(t)})},t.I=function(t){var e=this;return Uh(this,Ah(this).then(function(){return e.b.getToken(t)}).then(function(t){if(!t)throw new E("internal-error");return t.accessToken!=e.za&&(yh(e,t.accessToken),e.dispatchEvent(new th("tokenChanged"))),_h(e,"refreshToken",t.refreshToken),t.accessToken}))},t.Kc=function(t){if(!(t=t.users)||!t.length)throw new E("internal-error");Th(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e,n=(e=(e=t).providerUserInfo)&&e.length?H(e,function(t){return new hh(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[],i=0;i=Ll.length)throw new E("internal-error","Argument validator received an unsupported number of arguments.");n=Ll[r],i=(i?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}i=null}}if(i)throw new E("argument-error",t+" failed: "+i)}(t=Al.prototype).Ia=function(){var e=this;return this.f||(this.f=Cl(this,we().then(function(){if(Ti()&&!hi())return si();throw new E("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return e.m.g(e.u())}).then(function(t){return e.g=t,Js(e.s,Rs,{})}).then(function(t){e.a[Nl]=t.recaptchaSiteKey}).o(function(t){throw e.f=null,t})))},t.render=function(){Rl(this);var n=this;return Cl(this,this.Ia().then(function(){var t,e;return null===n.c&&(e=n.v,n.i||(t=ee(e),e=ae("DIV"),t.appendChild(e)),n.c=n.g.render(e,n.a)),n.c}))},t.verify=function(){Rl(this);var r=this;return Cl(this,this.render().then(function(e){return new de(function(n){var i,t=r.g.getResponse(e);t?n(t):(i=function(t){var e;t&&(e=i,W(r.l,function(t){return t==e}),n(t))},r.l.push(i),r.i&&r.g.execute(r.c))})}))},t.reset=function(){Rl(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Rl(this),this.D=!0,this.m.c();for(var t,e=0;e