!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 zl=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,Q=/"/g,tt=/'/g,et=/\x00/g,nt=/[\x00&<>"']/;function it(t,e){return-1!=t.indexOf(e)}function rt(t,e){return t"}else r=void 0===t?"undefined":null===t?"null":typeof t;D("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,r)}}function dt(t,e){this.a=t===gt&&e||"",this.b=mt}function pt(t){return t instanceof dt&&t.constructor===dt&&t.b===mt?t.a:(D("expected object of type Const, got '"+t+"'"),"type_error:Const")}dt.prototype.sa=!0,dt.prototype.ra=function(){return this.a},dt.prototype.toString=function(){return"Const{"+this.a+"}"};var vt,mt={},gt={};function bt(){if(void 0===vt){var t=null,e=l.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:I,createScript:I,createScriptURL:I})}catch(t){l.console&&l.console.error(t.message)}vt=t}else vt=t}return vt}function yt(t,e){this.a=e===At?t:""}function wt(t){return t instanceof yt&&t.constructor===yt?t.a:(D("expected object of type TrustedResourceUrl, got '"+t+"' of type "+d(t)),"type_error:TrustedResourceUrl")}function It(t,n){var e,i=pt(t);if(!Et.test(i))throw Error("Invalid TrustedResourceUrl format: "+i);return t=i.replace(Tt,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 dt?pt(t):encodeURIComponent(String(t))}),e=t,t=bt(),new yt(e=t?t.createScriptURL(e):e,At)}yt.prototype.sa=!0,yt.prototype.ra=function(){return this.a.toString()},yt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Tt=/%{(\w+)}/g,Et=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,At={};function kt(t,e){this.a=e===Dt?t:""}function St(t){return t instanceof kt&&t.constructor===kt?t.a:(D("expected object of type SafeUrl, got '"+t+"' of type "+d(t)),"type_error:SafeUrl")}kt.prototype.sa=!0,kt.prototype.ra=function(){return this.a.toString()},kt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Nt=/^(?: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,_t=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Ot=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Ct(t){return t instanceof kt?t:(t="object"==typeof t&&t.sa?t.ra():String(t),t=Ot.test(t)||(e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(_t))&&Nt.test(e[1])?new kt(t,Dt):null);var e}function Rt(t){return t instanceof kt?t:(t="object"==typeof t&&t.sa?t.ra():String(t),new kt(t=!Ot.test(t)?"about:invalid#zClosurez":t,Dt))}var Dt={},Pt=new kt("about:invalid#zClosurez",Dt);function Lt(t,e,n){this.a=n===xt?t:""}Lt.prototype.sa=!0,Lt.prototype.ra=function(){return this.a.toString()},Lt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var xt={};function Mt(t,e,n,i){return t=t instanceof kt?t:Rt(t),e=e||l,n=n instanceof dt?pt(n):n||"",e.open(St(t),n,i,void 0)}function jt(t){for(var e=t.split("%s"),n="",i=Array.prototype.slice.call(arguments,1);i.length&&1")?t.replace(Z,">"):t).indexOf('"')?t.replace(Q,"""):t).indexOf("'")?t.replace(tt,"'"):t).indexOf("\0")&&(t=t.replace(et,"�"))),t}function Vt(t){return Vt[" "](t),t}Vt[" "]=a;var Ft,qt=at("Opera"),Ht=at("Trident")||at("MSIE"),Kt=at("Edge"),Gt=Kt||Ht,Bt=at("Gecko")&&!(it(J.toLowerCase(),"webkit")&&!at("Edge"))&&!(at("Trident")||at("MSIE"))&&!at("Edge"),Wt=it(J.toLowerCase(),"webkit")&&!at("Edge");function Xt(){var t=l.document;return t?t.documentMode:void 0}t:{var Jt="",Yt=(Yt=J,Bt?/rv:([^\);]+)(\)|;)/.exec(Yt):Kt?/Edge\/([\d\.]+)/.exec(Yt):Ht?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Yt):Wt?/WebKit\/(\S+)/.exec(Yt):qt?/(?:Version)[ \/]?(\S+)/.exec(Yt):void 0);if(Yt&&(Jt=Yt?Yt[1]:""),Ht){Yt=Xt();if(null!=Yt&&Yt>parseFloat(Jt)){Ft=String(Yt);break t}}Ft=Jt}var zt={};function $t(s){return t=s,e=function(){for(var t=0,e=Y(String(Ft)).split("."),n=Y(String(s)).split("."),i=Math.max(e.length,n.length),r=0;0==t&&r"),i=i.join("")),i=ae(n,i),r&&("string"==typeof r?i.className=r:Array.isArray(r)?i.className=r.join(" "):ee(i,r)),2>>0);function hn(e){return v(e)?e:(e[cn]||(e[cn]=function(t){return e.handleEvent(t)}),e[cn])}function ln(){Pe.call(this),this.v=new Xe(this),(this.ac=this).gb=null}function fn(t,e,n,i,r){t.v.add(String(e),n,!1,i,r)}function dn(t,e,n,i,r){t.v.add(String(e),n,!0,i,r)}function pn(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)}En.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Dn(e,Ln,!0),":");var n=this.a;return!n&&"file"!=e||(t.push("//"),(e=this.l)&&t.push(Dn(e,Ln,!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(Dn(n,"/"==n.charAt(0)?Mn:xn,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Dn(n,Un)),t.join("")},En.prototype.resolve=function(t){var e=new En(this),n=!!t.c;n?An(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=t.f;if(n)kn(e,t.g);else if(n=!!t.f)if("/"!=i.charAt(0)&&(this.a&&!this.f?i="/"+i:-1!=(r=e.f.lastIndexOf("/"))&&(i=e.f.substr(0,r+1)+i)),".."==(r=i)||"."==r)i="";else if(it(r,"./")||it(r,"/.")){for(var i=0==r.lastIndexOf("/",0),r=r.split("/"),o=[],a=0;a2*t.c&&wn(t)))}function Kn(t,e){return Fn(t),e=Wn(t,e),In(t.a.b,e)}function Gn(t,e,n){Hn(t,e),0',t=new Lt(t=(i=bt())?i.createHTML(t):t,0,xt),i=a.document)&&(i.write((o=t)instanceof Lt&&o.constructor===Lt?o.a:(D("expected object of type SafeHtml, got '"+o+"' of type "+d(o)),"type_error:SafeHtml")),i.close())):(a=Mt(e,i,n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var ri=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,oi=/^[^@]+@[^@]+$/;function ai(){var e=null;return new fe(function(t){"complete"==l.document.readyState?t():(e=function(){t()},tn(window,"load",e))}).o(function(t){throw en(window,"load",e),t})}function si(t){return t=t||gi(),!("file:"!==Ti()&&"ionic:"!==Ti()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function ui(){var t=l.window;try{return t&&t!=t.top}catch(t){return}}function ci(){return void 0!==l.WorkerGlobalScope&&"function"==typeof l.importScripts}function hi(){return zl.default.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":zl.default.INTERNAL.hasOwnProperty("node")?"Node":ci()?"Worker":"Browser"}function li(){var t=hi();return"ReactNative"===t||"Node"===t}var fi="Firefox",di="Chrome";function pi(t){var e=t.toLowerCase();return it(e,"opera/")||it(e,"opr/")||it(e,"opios/")?"Opera":it(e,"iemobile")?"IEMobile":it(e,"msie")||it(e,"trident/")?"IE":it(e,"edge/")?"Edge":it(e,"firefox/")?fi:it(e,"silk/")?"Silk":it(e,"blackberry")?"Blackberry":it(e,"webos")?"Webos":!it(e,"safari/")||it(e,"chrome/")||it(e,"crios/")||it(e,"android")?!it(e,"chrome/")&&!it(e,"crios/")||it(e,"edge/")?it(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":di:"Safari"}var vi={md:"FirebaseCore-web",od:"FirebaseUI-web"};function mi(t,e){e=e||[];var n,i=[],r={};for(n in vi)r[vi[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 Dr(t){var e=Lr(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 Pr(t){try{return new Dr(t)}catch(t){return null}}function Lr(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}Dr.prototype.T=function(){return this.f},Dr.prototype.l=function(){return this.c},Dr.prototype.toString=function(){return this.h};var xr="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Mr=["client_id","response_type","scope","redirect_uri","state"],jr={nd:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Xa:Mr},pd:{Ja:null,ua:500,ta:750,fa:"github.com",Xa:Mr},qd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Xa:Mr},wd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Xa:xr},kd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Xa:[]}};function Ur(t){for(var e in jr)if(jr[e].fa==t)return jr[e];return null}function Vr(t){var e={};e["facebook.com"]=Gr,e["google.com"]=Wr,e["github.com"]=Br,e["twitter.com"]=Xr;var n=t&&t[qr];try{if(n)return new(e[n]||Kr)(t);if(void 0!==t[Fr])return new Hr(t)}catch(t){}return null}var Fr="idToken",qr="providerId";function Hr(t){var e,n=t[qr];if(n||!t[Fr]||(e=Pr(t[Fr]))&&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),Vi(this,"providerId",n),Vi(this,"isNewUser",e)}function Kr(t){Hr.call(this,t),Vi(this,"profile",Hi((t=Si(t.rawUserInfo||"{}"))||{}))}function Gr(t){if(Kr.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Br(t){if(Kr.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Vi(this,"username",this.profile&&this.profile.login||null)}function Wr(t){if(Kr.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Xr(t){if(Kr.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Vi(this,"username",t.screenName||null)}function Jr(t){var e=_n(i=On(t),"link"),n=_n(On(e),"link"),i=_n(i,"deep_link_id");return _n(On(i),"link")||i||n||e||t}function Yr(t,e){if(!t&&!e)throw new T("internal-error","Internal assert: no raw session string available");if(t&&e)throw new T("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?zr:$r}w(Kr,Hr),w(Gr,Kr),w(Br,Kr),w(Wr,Kr),w(Xr,Kr);var zr="enroll",$r="signin";function Zr(){}function Qr(t,n){return t.then(function(t){if(t[Ha]){var e=Pr(t[Ha]);if(!e||n!=e.i)throw new T("user-mismatch");return t}throw new T("user-mismatch")}).o(function(t){throw t&&t.code&&t.code==k+"user-not-found"?new T("user-mismatch"):t})}function to(t,e){if(!e)throw new T("internal-error","failed to construct a credential");this.a=e,Vi(this,"providerId",t),Vi(this,"signInMethod",t)}function eo(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function no(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new to(t.providerId,t.pendingToken)}catch(t){}return null}function io(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Vi(this,"idToken",e.idToken),e.accessToken&&Vi(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Vi(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new T("internal-error","failed to construct a credential");Vi(this,"accessToken",e.oauthToken),Vi(this,"secret",e.oauthTokenSecret)}Vi(this,"providerId",t),Vi(this,"signInMethod",n)}function ro(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:qn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function oo(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 io(t.providerId,e,t.signInMethod)}catch(t){}}return null}function ao(t,e){this.Qc=e||[],Fi(this,{providerId:t,isOAuthProvider:!0}),this.Ib={},this.pb=(Ur(t)||{}).Ja||null,this.ob=null}function so(t){if("string"!=typeof t||0!=t.indexOf("saml."))throw new T("argument-error",'SAML provider IDs must be prefixed with "saml."');ao.call(this,t,[])}function uo(t){ao.call(this,t,Mr),this.a=[]}function co(){uo.call(this,"facebook.com")}function ho(t){if(!t)throw new T("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new co).credential({accessToken:e})}function lo(){uo.call(this,"github.com")}function fo(t){if(!t)throw new T("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new lo).credential({accessToken:e})}function po(){uo.call(this,"google.com"),this.Ca("profile")}function vo(t,e){var n=t;return m(t)&&(n=t.idToken,e=t.accessToken),(new po).credential({idToken:n,accessToken:e})}function mo(){ao.call(this,"twitter.com",xr)}function go(t,e){var n=t;if(!(n=!m(n)?{oauthToken:t,oauthTokenSecret:e}:n).oauthToken||!n.oauthTokenSecret)throw new T("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new io("twitter.com",n,"twitter.com")}function bo(t,e,n){this.a=t,this.f=e,Vi(this,"providerId","password"),Vi(this,"signInMethod",n===wo.EMAIL_LINK_SIGN_IN_METHOD?wo.EMAIL_LINK_SIGN_IN_METHOD:wo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function yo(t){return t&&t.email&&t.password?new bo(t.email,t.password,t.signInMethod):null}function wo(){Fi(this,{providerId:"password",isOAuthProvider:!1})}function Io(t,e){if(!(e=To(e)))throw new T("argument-error","Invalid email link!");return new bo(t,e.code,wo.EMAIL_LINK_SIGN_IN_METHOD)}function To(t){return(t=br(t=Jr(t)))&&t.operation===Zi?t:null}function Eo(t){if(!(t.eb&&t.cb||t.La&&t.ea))throw new T("internal-error");this.a=t,Vi(this,"providerId","phone"),this.fa="phone",Vi(this,"signInMethod","phone")}function Ao(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var n={};return V(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(t){e[t]&&(n[t]=e[t])}),new Eo(n)}return null}function ko(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 So(t){try{this.a=t||zl.default.auth()}catch(t){throw new T("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().")}Fi(this,{providerId:"phone",isOAuthProvider:!1})}function No(t,e){if(!t)throw new T("missing-verification-id");if(!e)throw new T("missing-verification-code");return new Eo({eb:t,cb:e})}function _o(t){if(t.temporaryProof&&t.phoneNumber)return new Eo({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 vo(o,n);case"facebook.com":return ho(n);case"github.com":return fo(n);case"twitter.com":return go(n,i);default:return n||i||o||a?a?0==e.indexOf("saml.")?new to(e,a):new io(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new uo(e).credential({idToken:o,accessToken:n,rawNonce:r}):null}}catch(t){return null}}function Oo(t){if(!t.isOAuthProvider)throw new T("invalid-oauth-provider")}function Co(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 T("invalid-auth-event");if(this.g&&this.a)throw new T("invalid-auth-event");if(this.g&&!this.f)throw new T("invalid-auth-event")}function Ro(t){return(t=t||{}).type?new Co(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&E(t.error),t.postBody,t.tenantId):null}function Do(){this.b=null,this.a=[]}Yr.prototype.Ha=function(){return this.a?ye(this.a):ye(this.b)},Yr.prototype.w=function(){return this.type==zr?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},Zr.prototype.ka=function(){},Zr.prototype.b=function(){},Zr.prototype.c=function(){},Zr.prototype.w=function(){},to.prototype.ka=function(t){return hs(t,eo(this))},to.prototype.b=function(t,e){var n=eo(this);return n.idToken=e,ls(t,n)},to.prototype.c=function(t,e){return Qr(fs(t,eo(this)),e)},to.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},io.prototype.ka=function(t){return hs(t,ro(this))},io.prototype.b=function(t,e){var n=ro(this);return n.idToken=e,ls(t,n)},io.prototype.c=function(t,e){return Qr(fs(t,ro(this)),e)},io.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},ao.prototype.Ka=function(t){return this.Ib=ct(t),this},w(so,ao),w(uo,ao),uo.prototype.Ca=function(t){return K(this.a,t)||this.a.push(t),this},uo.prototype.Qb=function(){return X(this.a)},uo.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 T("argument-error","credential failed: must provide the ID token and/or the access token.");return new io(this.providerId,e,this.providerId)},w(co,uo),Vi(co,"PROVIDER_ID","facebook.com"),Vi(co,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),w(lo,uo),Vi(lo,"PROVIDER_ID","github.com"),Vi(lo,"GITHUB_SIGN_IN_METHOD","github.com"),w(po,uo),Vi(po,"PROVIDER_ID","google.com"),Vi(po,"GOOGLE_SIGN_IN_METHOD","google.com"),w(mo,ao),Vi(mo,"PROVIDER_ID","twitter.com"),Vi(mo,"TWITTER_SIGN_IN_METHOD","twitter.com"),bo.prototype.ka=function(t){return this.signInMethod==wo.EMAIL_LINK_SIGN_IN_METHOD?Xs(t,ws,{email:this.a,oobCode:this.f}):Xs(t,Hs,{email:this.a,password:this.f})},bo.prototype.b=function(t,e){return this.signInMethod==wo.EMAIL_LINK_SIGN_IN_METHOD?Xs(t,Is,{idToken:e,email:this.a,oobCode:this.f}):Xs(t,Ls,{idToken:e,email:this.a,password:this.f})},bo.prototype.c=function(t,e){return Qr(this.ka(t),e)},bo.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Fi(wo,{PROVIDER_ID:"password"}),Fi(wo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Fi(wo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Eo.prototype.ka=function(t){return t.fb(ko(this))},Eo.prototype.b=function(t,e){var n=ko(this);return n.idToken=e,Xs(t,Gs,n)},Eo.prototype.c=function(t,e){var n=ko(this);return n.operation="REAUTH",Qr(t=Xs(t,Bs,n),e)},Eo.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},So.prototype.fb=function(i,r){var o=this.a.a;return ye(r.verify()).then(function(n){if("string"!=typeof n)throw new T("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 T("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==zr?t.Ha().then(function(t){return Xs(o,Ms,{idToken:t,phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:n}}).then(function(t){return t.phoneSessionInfo.sessionInfo})}):t&&t.type==$r?t.Ha().then(function(t){return e=o,t={mfaPendingCredential:t,mfaEnrollmentId:i.multiFactorHint&&i.multiFactorHint.uid||i.multiFactorUid,phoneSignInInfo:{recaptchaToken:n}},Xs(e,js,t).then(function(t){return t.phoneResponseInfo.sessionInfo});var e}):Xs(o,Ds,{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})})},Fi(So,{PROVIDER_ID:"phone"}),Fi(So,{PHONE_SIGN_IN_METHOD:"phone"}),Co.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("-")},Co.prototype.T=function(){return this.h},Co.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 Po,Lo=null;function xo(t){var e="unauthorized-domain",n=void 0,i=On(t);t=i.a,"chrome-extension"==(i=i.c)?n=jt("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=jt("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",T.call(this,e,n)}function Mo(t,e,n){T.call(this,t,n),(t=e||{}).Jb&&Vi(this,"email",t.Jb),t.ea&&Vi(this,"phoneNumber",t.ea),t.credential&&Vi(this,"credential",t.credential),t.Zb&&Vi(this,"tenantId",t.Zb)}function jo(t){if(t.code){var e=t.code||"";0==e.indexOf(k)&&(e=e.substring(k.length));var n={credential:_o(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 T(e,t.message||void 0);return new Mo(e,n,t.message)}return null}function Uo(){}function Vo(t){return t.c||(t.c=t.b())}function Fo(){}function qo(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):(D("Root logger has no level set."),null))}(this).value)for(v(e)&&(e=e()),t=new Bo(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var Zo,Qo={},ta=null;function ea(t){var e,n,i;return ta||(ta=new Wo(""),(Qo[""]=ta).c=zo),(e=Qo[t])||(e=new Wo(t),i=t.lastIndexOf("."),n=t.substr(i+1),(i=ea(t.substr(0,i))).b||(i.b={}),(i.b[n]=e).a=i,Qo[t]=e),e}function na(t,e){t&&t.log($o,e,void 0)}function ia(t){this.f=t}function ra(t){ln.call(this),this.u=t,this.h=void 0,this.readyState=oa,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=ea("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}w(ia,Uo),ia.prototype.a=function(){return new ra(this.f)},ia.prototype.b=(Zo={},function(){return Zo}),w(ra,ln);var oa=0;function aa(t){t.c.read().then(t.pc.bind(t)).catch(t.Ua.bind(t))}function sa(t){t.readyState=4,t.g=null,t.c=null,t.m=null,ua(t)}function ua(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function ca(t){ln.call(this),this.headers=new yn,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=ha,this.u=this.S=!1}(t=ra.prototype).open=function(t,e){if(this.readyState!=oa)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,ua(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,sa(this)),this.readyState=oa},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,ua(this)),this.a&&(this.readyState=3,ua(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,aa(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?sa:ua)(this),3==this.readyState&&aa(this))},t.tc=function(t){this.a&&(this.response=this.responseText=t,sa(this))},t.sc=function(t){this.a&&(this.response=t,sa(this))},t.Ua=function(t){var e=this.i;e&&e.log(Yo,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&sa(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(Yo,"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(Yo,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}for(var t=[],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(ra.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(t){this.h=t?"include":"same-origin"}}),w(ca,ln);var ha="";ca.prototype.b=ea("goog.net.XhrIo");var la=/^https?$/i,fa=["POST","PUT"];function da(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||Po).a(),e.C=e.D?Vo(e.D):Vo(Po),e.a.onreadystatechange=b(e.Vb,e);try{na(e.b,Ta(e,"Opening Xhr")),e.O=!0,e.a.open(n,String(t),!0),e.O=!1}catch(t){return na(e.b,Ta(e,"Error opening Xhr: "+t.message)),void va(e,t)}t=i||"";var o,a=new yn(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)V(t,e,void 0);else for(var n=bn(t),i=gn(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|$u[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 sc(t,e,n){void 0===n&&(n=e.length);var i=0,r=t.c;if("string"==typeof e)for(;i>r&255;return q(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}function pc(t,e){for(var n=0;nt.f&&(t.a=t.f),e)}function rh(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function oh(t,e){void 0===e&&(e=t.b?(e=t.b).a-e.g:0),t.c=Date.now()+1e3*e}function ah(t,e){t.b=Pr(e[Ha]||""),t.a=e.refreshToken,oh(t,void 0!==(e=e.expiresIn)?Number(e):void 0)}function sh(e,t){return i=e.f,r=t,new fe(function(e,n){"refresh_token"==r.grant_type&&r.refresh_token||"authorization_code"==r.grant_type&&r.code?$a(i,i.l+"?key="+encodeURIComponent(i.c),function(t){t?t.error?n(Ys(t)):t.access_token&&t.refresh_token?e(t):n(new T("internal-error")):n(new T("network-request-failed"))},"POST",qn(r).toString(),i.g,i.m.get()):n(new T("internal-error"))}).then(function(t){return e.b=Pr(t.access_token),e.a=t.refresh_token,oh(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 uh(t,e){this.a=t||null,this.b=e||null,Fi(this,{lastSignInTime:Pi(e||null),creationTime:Pi(t||null)})}function ch(t,e,n,i,r,o){Fi(this,{uid:t,displayName:i||null,photoURL:r||null,email:n||null,phoneNumber:o||null,providerId:e})}function hh(t,e,n){this.J=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var i,r=zl.default.SDK_VERSION?mi(zl.default.SDK_VERSION):null;this.a=new Fa(this.l,_(A),r),t.emulatorConfig&&Ja(this.a,t.emulatorConfig),this.b=new rh(this.a),bh(this,e[Ha]),ah(this.b,e),Vi(this,"refreshToken",this.b.a),Ih(this,n||{}),ln.call(this),this.R=!1,this.s&&wi()&&(this.i=Lc(this.s,this.l,this.m)),this.S=[],this.h=null,this.u=(i=this,new nh(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?sh(this,{grant_type:"refresh_token",refresh_token:this.a}):ye(null):ye({accessToken:this.b.toString(),refreshToken:this.a})},uh.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},w(hh,ln),hh.prototype.wa=function(t){this.ya=t,Xa(this.a,t)},hh.prototype.la=function(){return this.ya},hh.prototype.Ga=function(){return X(this.$)},hh.prototype.hb=function(){this.u.b&&(this.u.stop(),this.u.start())},Vi(hh.prototype,"providerId","firebase"),(t=hh.prototype).reload=function(){var t=this;return jh(this,Eh(this).then(function(){return Oh(t).then(function(){return yh(t)}).then(Th)}))},t.oc=function(t){return this.I(t).then(function(t){return new Gc(t)})},t.I=function(t){var e=this;return jh(this,Eh(this).then(function(){return e.b.getToken(t)}).then(function(t){if(!t)throw new T("internal-error");return t.accessToken!=e.za&&(bh(e,t.accessToken),e.dispatchEvent(new Qc("tokenChanged"))),Nh(e,"refreshToken",t.refreshToken),t.accessToken}))},t.Kc=function(t){if(!(t=t.users)||!t.length)throw new T("internal-error");Ih(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?q(e,function(t){return new ch(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[],i=0;i=Pl.length)throw new T("internal-error","Argument validator received an unsupported number of arguments.");n=Pl[r],i=(i?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}i=null}}if(i)throw new T("argument-error",t+" failed: "+i)}(t=El.prototype).Ia=function(){var e=this;return this.f||(this.f=Ol(this,ye().then(function(){if(Ii()&&!ci())return ai();throw new T("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,Xs(e.s,Cs,{})}).then(function(t){e.a[Sl]=t.recaptchaSiteKey}).o(function(t){throw e.f=null,t})))},t.render=function(){Cl(this);var n=this;return Ol(this,this.Ia().then(function(){var t,e;return null===n.c&&(e=n.v,n.i||(t=te(e),e=oe("DIV"),t.appendChild(e)),n.c=n.g.render(e,n.a)),n.c}))},t.verify=function(){Cl(this);var r=this;return Ol(this,this.render().then(function(e){return new fe(function(n){var i,t=r.g.getResponse(e);t?n(t):(i=function(t){var e;t&&(e=i,B(r.l,function(t){return t==e}),n(t))},r.l.push(i),r.i&&r.g.execute(r.c))})}))},t.reset=function(){Cl(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Cl(this),this.D=!0,this.m.c();for(var t,e=0;e