PageSourceSearch

https://grammarxiv.net/_next/static/chunks/1_e4bqmayty0y.js

js grammarxiv.net collected 2026-10-02 01:05:08 UTC 146,775 bytes, 5 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="44d30cf5-67ba-bbff-f5d4-44581017f7a7")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,564376,872940,502967,739693,375984,469914,e=>{"use strict";let t,r,i;var n,s,a,o=e.i(350461);let c=function(e){let t=[],r=0;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:((64512&n)==55296&&i+1<e.length&&(64512&e.charCodeAt(i+1))==56320?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128)}return t},l=function(e){let t=[],r=0,i=0;for(;r<e.length;){let n=e[r++];if(n<128)t[i++]=String.fromCharCode(n);else if(n>191&&n<224){let s=e[r++];t[i++]=String.fromCharCode((31&n)<<6|63&s)}else if(n>239&&n<365){let s=((7&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[i++]=String.fromCharCode(55296+(s>>10)),t[i++]=String.fromCharCode(56320+(1023&s))}else{let s=e[r++],a=e[r++];t[i++]=String.fromCharCode((15&n)<<12|(63&s)<<6|63&a)}}return t.join("")},h={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let t=0;t<e.length;t+=3){let n=e[t],s=t+1<e.length,a=s?e[t+1]:0,o=t+2<e.length,c=o?e[t+2]:0,l=n>>2,h=(3&n)<<4|a>>4,u=(15&a)<<2|c>>6,d=63&c;!o&&(d=64,s||(u=64)),i.push(r[l],r[h],r[u],r[d])}return i.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(c(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):l(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let r=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let t=0;t<e.length;){let n=r[e.charAt(t++)],s=t<e.length?r[e.charAt(t)]:0,a=++t<e.length?r[e.charAt(t)]:64,o=++t<e.length?r[e.charAt(t)]:64;if(++t,null==n||null==s||null==a||null==o)throw new u;let c=n<<2|s>>4;if(i.push(c),64!==a){let e=s<<4&240|a>>2;if(i.push(e),64!==o){let e=a<<6&192|o;i.push(e)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class u extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let d=function(e){let t=c(e);return h.encodeByteArray(t,!0)},p=function(e){return d(e).replace(/\./g,"")},f=function(e){try{return h.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function m(){return"u">typeof self?self:"u">typeof window?window:e.g}let g=()=>{try{return m().__FIREBASE_DEFAULTS__||(()=>{if(void 0===o.default||void 0===o.default.env)return;let e=o.default.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)})()||(()=>{let e;if("u"<typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&f(e[1]);return t&&JSON.parse(t)})()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},v=e=>g()?.emulatorHosts?.[e],_=()=>g()?.config,y=e=>g()?.[`_${e}`];class I{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>
2{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}function w(){return"u">typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function b(){return"u">typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(w())}function T(){return"u">typeof window||E()}function E(){return"u">typeof WorkerGlobalScope&&"u">typeof self&&self instanceof WorkerGlobalScope}function k(){return"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function S(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function C(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function A(){let e=w();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function P(){try{return"object"==typeof indexedDB}catch(e){return!1}}function R(){return new Promise((e,t)=>{try{let r=!0,i="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(i);n.onsuccess=()=>{n.result.close(),r||self.indexedDB.deleteDatabase(i),e(!0)},n.onupgradeneeded=()=>{r=!1},n.onerror=()=>{t(n.error?.message||"")}}catch(e){t(e)}})}class O extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,O.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,N.prototype.create)}}class N{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var r,i;let n=t[0]||{},s=`${this.service}/${e}`,a=this.errors[e],o=a?(r=a,i=n,r.replace(D,(e,t)=>{let r=i[t];return null!=r?String(r):`<${t}?>`})):"Error",c=`${this.serviceName}: ${o} (${s}).`;return new O(s,c,n)}}let D=/\{\$([^}]+)}/g;function L(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function M(e,t){if(e===t)return!0;let r=Object.keys(e),i=Object.keys(t);for(let n of r){if(!i.includes(n))return!1;let r=e[n],s=t[n];if(U(r)&&U(s)){if(!M(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}function U(e){return null!==e&&"object"==typeof e}function F(e){let t=[];for(let[r,i]of Object.entries(e))Array.isArray(i)?i.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(i));return t.length?"&"+t.join("&"):""}function x(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[r,i]=e.split("=");
2t[decodeURIComponent(r)]=decodeURIComponent(i)}}),t}function V(e){let t=e.indexOf("?");if(!t)return"";let r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}function j(e,t){let r=new H(e,t);return r.subscribe.bind(r)}class H{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,r){let i;if(void 0===e&&void 0===t&&void 0===r)throw Error("Missing Observer.");void 0===(i=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:r}:e).next&&(i.next=W),void 0===i.error&&(i.error=W),void 0===i.complete&&(i.complete=W);let n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch(e){}}),this.observers.push(i),n}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){"u">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 W(){}function z(e){return e&&e._delegate?e._delegate:e}function B(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function q(e){return(await fetch(e,{credentials:"include"})).ok}e.s(["Deferred",0,I,"ErrorFactory",0,N,"FirebaseError",0,O,"base64Decode",0,f,"base64urlEncodeWithoutPadding",0,p,"contains",0,function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},"createSubscribe",0,j,"deepEqual",0,M,"deepExtend",0,function e(t,r){if(!(r instanceof Object))return r;switch(r.constructor){case Date:return new Date(r.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return r}for(let i in r)r.hasOwnProperty(i)&&"__proto__"!==i&&(t[i]=e(t[i],r[i]));return t},"extractQuerystring",0,V,"getDefaultAppConfig",0,_,"getDefaultEmulatorHost",0,v,"getExperimentalSetting",0,y,"getGlobal",0,m,"getModularInstance",0,z,"getUA",0,w,"isBrowser",0,T,"isBrowserExtension",0,S,"isCloudWorkstation",0,B,"isCloudflareWorker",0,k,"isEmpty",0,L,"isIE",0,A,"isIndexedDBAvailable",0,P,"isMobileCordova",0,b,"isNode",0,function(){let t=g()?.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(e.g.process)}catch(e){return!1}},"isReactNative",0,C,"isWebWorker",0,E,"pingServer",0,q,"querystring",0,F,"querystringDecode",0,x,"validateIndexedDBOpenable",0,R],872940);class ${constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,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 G="[DEFAULT]";class K{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 I;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(r)return null;throw e}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:G})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=G){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=G){return this.instances.has(e)}getOptions(e=G){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let i=this.getOrInitializeService({instanceIdentifier:r,options:t});for(let[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(i);return i}onInit(e,t){let r=this.normalizeInstanceIdentifier(t),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let n=this.instances.get(r);return n&&e(n,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let r=this.onInitCallbacks.get(t);if(r)for(let i of r)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){var r;let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===G?void 0:r,options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=G){return this.component?this.component.multipleInstances?e:G:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class J{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 K(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}e.s(["Component",0,$,"ComponentContainer",0,J],502967);let Y=[];(n=a||(a={}))[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT";let X={debug:a.DEBUG,verbose:a.VERBOSE,info:a.INFO,warn:a.WARN,error:a.ERROR,silent:a.SILENT},Q=a.INFO,Z={[a.DEBUG]:"log",[a.VERBOSE]:"log",[a.INFO]:"info",[a.WARN]:"warn",[a.ERROR]:"error"},ee=(e,t,...r)=>{if(t<e.logLevel)return;let i=new Date().toISOString(),n=Z[t];if(n)console[n](`[${i}]  ${e.name}:`,...r);
2else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class et{constructor(e){this.name=e,this._logLevel=Q,this._logHandler=ee,this._userLogHandler=null,Y.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in a))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?X[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,a.DEBUG,...e),this._logHandler(this,a.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,a.VERBOSE,...e),this._logHandler(this,a.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,a.INFO,...e),this._logHandler(this,a.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,a.WARN,...e),this._logHandler(this,a.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,a.ERROR,...e),this._logHandler(this,a.ERROR,...e)}}function er(e){Y.forEach(t=>{t.setLogLevel(e)})}function ei(e,t){for(let r of Y){let i=null;t&&t.level&&(i=X[t.level]),null===e?r.userLogHandler=null:r.userLogHandler=(t,r,...n)=>{let s=n.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(e=>e).join(" ");r>=(i??t.logLevel)&&e({level:a[r].toLowerCase(),message:s,args:n,type:t.name})}}}e.s(["LogLevel",0,a,"Logger",0,et,"setLogLevel",0,er,"setUserLogHandler",0,ei],739693);let en=new WeakMap,es=new WeakMap,ea=new WeakMap,eo=new WeakMap,ec=new WeakMap,el={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return es.get(e);if("objectStoreNames"===t)return e.objectStoreNames||ea.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return eh(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function eh(e){if(e instanceof IDBRequest){let t;return(t=new Promise((t,r)=>{let i=()=>{e.removeEventListener("success",n),e.removeEventListener("error",s)},n=()=>{t(eh(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",n),e.addEventListener("error",s)})).then(t=>{t instanceof IDBCursor&&en.set(t,e)}).catch(()=>{}),ec.set(t,e),t}if(eo.has(e))return eo.get(e);let i=function(e){if("function"==typeof e)return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(eu(this),t),eh(en.get(this))}:function(...t){return eh(e.apply(eu(this),t))}:function(t,...r){let i=e.call(eu(this),t,...r);return ea.set(i,t.sort?t.sort():[t]),eh(i)};return e instanceof IDBTransaction&&function(e){if(es.has(e))return;let t=new Promise((t,r)=>{let i=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",s),e.removeEventListener("abort",s)},n=()=>{t(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",n),e.addEventListener("error",s),e.addEventListener("abort",s)});es.set(e,t)}(e),(t||(t=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(e,el):e}(e);return i!==e&&(eo.set(e,i),ec.set(i,e)),i}let eu=e=>ec.get(e),ed=["get","getKey","getAll","getAllKeys","count"],ep=["put","add","delete","clear"],ef=new Map;function em(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(ef.get(t))return ef.get(t);let r=t.replace(/FromIndex$/,""),i=t!==r,n=ep.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||ed.includes(r)))return;let s=async function(e,...t){let s=this.transaction(e,n?"readwrite":"readonly"),a=s.store;
2return i&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),n&&s.done]))[0]};return ef.set(t,s),s}el={...i=el,get:(e,t,r)=>em(e,t)||i.get(e,t,r),has:(e,t)=>!!em(e,t)||i.has(e,t)};class eg{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{let t;if(t=e.getComponent(),t?.type!=="VERSION")return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let ev="@firebase/app",e_="0.15.1",ey=new et("@firebase/app"),eI="[DEFAULT]",ew={[ev]:"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/ai":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},eb=new Map,eT=new Map,eE=new Map;function ek(e,t){try{e.container.addComponent(t)}catch(r){ey.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function eS(e){let t=e.name;if(eE.has(t))return ey.debug(`There were multiple attempts to register component ${t}.`),!1;for(let r of(eE.set(t,e),eb.values()))ek(r,e);for(let t of eT.values())ek(t,e);return!0}function eC(e,t){let r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function eA(e){return void 0!==e.options}function eP(e){return!eA(e)&&("authIdToken"in e||"appCheckToken"in e||"releaseOnDeref"in e||"automaticDataCollectionEnabled"in e)}function eR(e){return null!=e&&void 0!==e.settings}let eO=new N("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.","invali
2d-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 eN{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new $("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 eO.create("app-deleted",{appName:this._name})}}function eD(e,t){let r=f(e.split(".")[1]);null===r?console.error(`FirebaseServerApp ${t} is invalid: second part could not be parsed.`):void 0===JSON.parse(r).exp?console.error(`FirebaseServerApp ${t} is invalid: expiration claim could not be parsed`):1e3*JSON.parse(r).exp-new Date().getTime()<=0&&console.error(`FirebaseServerApp ${t} is invalid: the token has expired.`)}
2class eL extends eN{constructor(e,t,r,i){const n=void 0===t.automaticDataCollectionEnabled||t.automaticDataCollectionEnabled,s={name:r,automaticDataCollectionEnabled:n};void 0!==e.apiKey?super(e,s,i):super(e.options,s,i),this._serverConfig={automaticDataCollectionEnabled:n,...t},this._serverConfig.authIdToken&&eD(this._serverConfig.authIdToken,"authIdToken"),this._serverConfig.appCheckToken&&eD(this._serverConfig.appCheckToken,"appCheckToken"),this._finalizationRegistry=null,"u">typeof FinalizationRegistry&&(this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()})),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,t.releaseOnDeref=void 0,eV(ev,e_,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,void 0!==e&&null!==this._finalizationRegistry&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){ex(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw eO.create("server-app-deleted")}}let eM="12.16.0";function eU(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});let i={name:eI,automaticDataCollectionEnabled:!0,...t},n=i.name;if("string"!=typeof n||!n)throw eO.create("bad-app-name",{appName:String(n)});if(r||(r=_()),!r)throw eO.create("no-options");let s=eb.get(n);if(s)if(M(r,s.options)&&M(i,s.config))return s;else throw eO.create("duplicate-app",{appName:n});let a=new J(n);for(let e of eE.values())a.addComponent(e);let o=new eN(r,i,a);return eb.set(n,o),o}function eF(e=eI){let t=eb.get(e);if(!t&&e===eI&&_())return eU();if(!t)throw eO.create("no-app",{appName:e});return t}async function ex(e){let t=!1,r=e.name;eb.has(r)?(t=!0,eb.delete(r)):eT.has(r)&&0>=e.decRefCount()&&(eT.delete(r),t=!0),t&&(await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function eV(e,t,r){let i=ew[e]??e;r&&(i+=`-${r}`);let n=i.match(/\s|\//),s=t.match(/\s|\//);if(n||s){let e=[`Unable to register library "${i}" with version "${t}":`];n&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),n&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),ey.warn(e.join(" "));return}eS(new $(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let ej="firebase-heartbeat-store",eH=null;function eW(){return eH||(eH=(function(e,{blocked:t,upgrade:r,blocking:i,terminated:n}={}){let s=indexedDB.open(e,1),a=eh(s);return r&&s.addEventListener("upgradeneeded",e=>{r(eh(s.result),e.oldVersion,e.newVersion,eh(s.transaction),e)}),t&&s.addEventListener("blocked",e=>t(e.oldVersion,e.newVersion,e)),a.then(e=>{n&&e.addEventListener("close",()=>n()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",{upgrade:(e,t)=>
2{if(0===t)try{e.createObjectStore(ej)}catch(e){console.warn(e)}}}).catch(e=>{throw eO.create("idb-open",{originalErrorMessage:e.message})})),eH}async function ez(e){try{let t=(await eW()).transaction(ej),r=await t.objectStore(ej).get(eq(e));return await t.done,r}catch(e){if(e instanceof O)ey.warn(e.message);else{let t=eO.create("idb-get",{originalErrorMessage:e?.message});ey.warn(t.message)}}}async function eB(e,t){try{let r=(await eW()).transaction(ej,"readwrite"),i=r.objectStore(ej);await i.put(t,eq(e)),await r.done}catch(e){if(e instanceof O)ey.warn(e.message);else{let t=eO.create("idb-set",{originalErrorMessage:e?.message});ey.warn(t.message)}}}function eq(e){return`${e.name}!${e.options.appId}`}class e${constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new eK(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=eG();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>30){let e=function(e){if(0===e.length)return -1;let t=0,r=e[0].date;for(let i=1;i<e.length;i++)e[i].date<r&&(r=e[i].date,t=i);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){ey.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=eG(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){let r=[],i=e.slice();for(let n of e){let e=r.find(e=>e.agent===n.agent);if(e){if(e.dates.push(n.date),eJ(r)>t){e.dates.pop();break}}else if(r.push({agent:n.agent,dates:[n.date]}),eJ(r)>t){r.pop();break}i=i.slice(1)}return{heartbeatsToSend:r,unsentEntries:i}}(this._heartbeatsCache.heartbeats),i=p(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,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 ey.warn(e),""}}}function eG(){return new Date().toISOString().substring(0,10)}class eK{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!P()&&R().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await ez(this.app);return e?.heartbeats?e:{heartbeats:[]}}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eB(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eB(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function eJ(e){return p(JSON.stringify({version:2,heartbeats:e})).length}function eY(){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."}}eS(new $("platform-logger",e=>new eg(e),"PRIVATE")),eS(new $("heartbeat",e=>new e$(e),"PRIVATE")),eV(ev,e_,""),eV(ev,e_,"esm2020"),eV("fire-js",""),e.s(["SDK_VERSION",0,eM,"_DEFAULT_ENTRY_NAME",0,eI,"_addComponent",0,ek,"_addOrOverwriteComponent",0,function(e,t){e.container.addOrOverwriteComponent(t)},"_apps",0,eb,"_clearComponents",0,function(){eE.clear()},"_components",0,eE,"_getProvider",0,eC,"_isFirebaseApp",0,eA,"_isFirebaseServerApp",0,eR,"_isFirebaseServerAppSettings",0,eP,"_registerComponent",0,eS,"_removeServiceInstance",0,function(e,t,r=eI){eC(e,t).clearInstance(r)},"_serverApps",0,eT,"deleteApp",0,ex,"getApp",0,eF,"getApps",0,function(){return Array.from(eb.values())},"initializeApp",0,eU,"initializeServerApp",0,function(e,t={}){let r;if(T()&&!E())throw eO.create("invalid-server-app-environment");let i=t||{};if(e&&(eA(e)?r=e.options:eP(e)?i=e:r=e),void 0===i.automaticDataCollectionEnabled&&(i.automaticDataCollectionEnabled=!0),r||(r=_()),!r)throw eO.create("no-options");let n={...i,...r};if(void 0!==n.releaseOnDeref&&delete n.releaseOnDeref,void 0!==i.releaseOnDeref&&"u"<typeof FinalizationRegistry)throw eO.create("finalization-registry-not-supported",{});let s=""+[...JSON.stringify(n)].reduce((e,t)=>
2Math.imul(31,e)+t.charCodeAt(0)|0,0),a=eT.get(s);if(a)return a.incRefCount(i.releaseOnDeref),a;let o=new J(s);for(let e of eE.values())o.addComponent(e);let c=new eL(r,i,s,o);return eT.set(s,c),c},"onLog",0,function(e,t){if(null!==e&&"function"!=typeof e)throw eO.create("invalid-log-argument");ei(e,t)},"registerVersion",0,eV,"setLogLevel",0,function(e){er(e)}],375984);let eX=new N("auth","Firebase",eY()),eQ=new et("@firebase/auth");function eZ(e,...t){eQ.logLevel<=a.ERROR&&eQ.error(`Auth (${eM}): ${e}`,...t)}function e0(e,...t){throw e3(e,...t)}function e1(e,...t){return e3(e,...t)}function e4(e,t,r){return new N("auth","Firebase",{...eY(),[t]:r}).create(t,{appName:e.name})}function e2(e){return e4(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function e6(e,t,r){if(!(t instanceof r))throw r.name!==t.constructor.name&&e0(e,"argument-error"),e4(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function e3(e,...t){if("string"!=typeof e){let r=t[0],i=[...t.slice(1)];return i[0]&&(i[0].appName=e.name),e._errorFactory.create(r,...i)}return eX.create(e,...t)}function e9(e,t,...r){if(!e)throw e3(t,...r)}function e5(e){let t="INTERNAL ASSERTION FAILED: "+e;throw eZ(t),Error(t)}function e8(e,t){e||e5(t)}function e7(){return"u">typeof self&&self.location?.href||""}function te(){return"http:"===tt()||"https:"===tt()}function tt(){return"u">typeof self&&self.location?.protocol||null}class tr{constructor(e,t){this.shortDelay=e,this.longDelay=t,e8(t>e,"Short delay should be less than long delay!"),this.isMobile=b()||C()}get(){return!("u">typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(te()||S()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function ti(e,t){e8(e.emulator,"Emulator should always be set here");let{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}class tn{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"u">typeof self&&"fetch"in self?self.fetch:"u">typeof globalThis&&globalThis.fetch?globalThis.fetch:"u">typeof fetch?fetch:void e5("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"u">typeof self&&"Headers"in self?self.Headers:"u">typeof globalThis&&globalThis.Headers?globalThis.Headers:"u">typeof Headers?Headers:void e5("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"u">typeof self&&"Response"in self?self.Response:"u">typeof globalThis&&globalThis.Response?globalThis.Response:"u">typeof Response?Response:void e5("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let ts={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-rec
2aptcha-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"},ta=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],to=new tr(3e4,6e4);function tc(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function tl(e,t,r,i,n={}){return th(e,n,async()=>{let n={},s={};i&&("GET"===t?s=i:n={body:JSON.stringify(i)});let a=F({...s,key:e.config.apiKey}).slice(1),o=await e._getAdditionalHeaders();o["Content-Type"]="application/json",e.languageCode&&(o["X-Firebase-Locale"]=e.languageCode);let c={method:t,headers:o,...n};return k()||(c.referrerPolicy="strict-origin-when-cross-origin"),e.emulatorConfig&&B(e.emulatorConfig.host)&&(c.credentials="include"),tn.fetch()(await td(e,e.config.apiHost,r,a),c)})}async function th(e,t,r){e._canInitEmulator=!1;let i={...ts,...t};try{let t=new tp(e),n=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();let s=await n.json();if("needConfirmation"in s)throw tf(e,"account-exists-with-different-credential",s);if(n.ok&&!("errorMessage"in s))return s;{let[t,r]=(n.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw tf(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw tf(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw tf(e,"user-disabled",s);let a=i[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(r)throw e4(e,a,r);e0(e,a)}}catch(t){if(t instanceof O)throw t;e0(e,"network-request-failed",{message:String(t)})}}async function tu(e,t,r,i,n={}){let s=await tl(e,t,r,i,n);return"mfaPendingCredential"in s&&e0(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function td(e,t,r,i){let n=`${t}${r}?${i}`,s=e.config.emulator?ti(e.config,n):`${e.config.apiScheme}://${n}`;return ta.includes(r)&&(await e._persistenceManagerAvailable,"COOKIE"===e._getPersistenceType())?e._getPersistence()._getFinalTarget(s).toString():s}class tp{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(e1(this.auth,"network-request-failed")),to.get())})}}function tf(e,t,r){let i={appName:e.name};r.email&&(i.email=r.email),r.phoneNumber&&(i.phoneNumber=r.phoneNumber);let n=e1(e,t,i);return n.customData._tokenResponse=r,n}function tm(e){return void 0!==e&&void 0!==e.getResponse}function tg(e){return void 0!==e&&void 0!==e.enterprise}class tv{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)switch(t.enforcementState){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function t_(e){return(await tl(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function ty(e,t){return tl(e,"GET","/v2/recaptchaConfig",tc(e,t))}async function tI(e,t){return tl(e,"POST","/v1/accounts:delete",t)}async function tw(e,t){return tl(e,"POST","/v1/accounts:update",t)}async function tb(e,t){return tl(e,"POST","/v1/accounts:lookup",t)}function tT(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function tE(e,t=!1){let r=z(e),i=await r.getIdToken(t),n=tS(i);e9(n&&n.exp&&n.auth_time&&n.iat,r.auth,"internal-error");let s="object"==typeof n.firebase?n.firebase:void 0,a=s?.sign_in_provider;return{claims:n,token:i,authTime:tT(tk(n.auth_time)),issuedAtTime:tT(tk(n.iat)),expirationTime:tT(tk(n.exp)),signInProvider:a||null,signInSecondFactor:s?.sign_in_second_factor||null}}function tk(e){return 1e3*Number(e)}function tS(e){let[t,r,i]=e.split(".");if(void 0===t||void 0===r||void 0===i)return eZ("JWT malformed, contained fewer than 3 sections"),null;try{let e=f(r);if(!e)return eZ("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return eZ("Caught error parsing JWT payload as JSON",e?.toString()),null}}function tC(e){let t=tS(e);return e9(t,"internal-error"),e9(void 0!==t.exp,"internal-error"),e9(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function tA(e,t,r=!1){if(r)return t;try{return await t}catch(t){throw t instanceof O&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class tP{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){if(!e)return this.errorBackoff=3e4,Math.max(0,(this.user.stsTokenManager.expirationTime??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){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class tR{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=tT(this.lastLoginAt),this.creationTime=tT(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function tO(e){var t,r;let i=e.auth,n=await e.getIdToken(),s=await tA(e,tb(i,{idToken:n}));e9(s?.users.length,i,"internal-error");let a=s.users[0];e._notifyReloadListener(a);let o=a.providerUserInfo?.length?tD(a.providerUserInfo):[],c=(t=e.providerData,r=o,[...t.filter(e=>!r.some(t=>t.providerId===e.providerId)),...r]),l=e.isAnonymous,h=!(e.email&&a.passwordHash)&&!c?.length;Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:c,metadata:new tR(a.createdAt,a.lastLoginAt),isAnonymous:!!l&&h})}async function tN(e){let t=z(e);await tO(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function tD(e){return e.map(({providerId:e,...t})=>
2({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function tL(e,t){let r=await th(e,{},async()=>{let r=F({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:n}=e.config,s=await td(e,i,"/v1/token",`key=${n}`),a=await e._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let o={method:"POST",headers:a,body:r};return e.emulatorConfig&&B(e.emulatorConfig.host)&&(o.credentials="include"),tn.fetch()(s,o)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function tM(e,t){return tl(e,"POST","/v2/accounts:revokeToken",tc(e,t))}class tU{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){e9(e.idToken,"internal-error"),e9(void 0!==e.idToken,"internal-error"),e9(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):tC(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){e9(0!==e.length,"internal-error");let t=tC(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(e9(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:r,refreshToken:i,expiresIn:n}=await tL(e,t);this.updateTokensAndExpiration(r,i,Number(n))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){let{refreshToken:r,accessToken:i,expirationTime:n}=t,s=new tU;return r&&(e9("string"==typeof r,"internal-error",{appName:e}),s.refreshToken=r),i&&(e9("string"==typeof i,"internal-error",{appName:e}),s.accessToken=i),n&&(e9("number"==typeof n,"internal-error",{appName:e}),s.expirationTime=n),s}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 tU,this.toJSON())}_performRefresh(){return e5("not implemented")}}function tF(e,t){e9("string"==typeof e||void 0===e,"internal-error",{appName:t})}class tx{constructor({uid:e,auth:t,stsTokenManager:r,...i}){this.providerId="firebase",this.proactiveRefresh=new tP(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,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 tR(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await tA(this,this.stsTokenManager.getToken(this.auth,e));return e9(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return tE(this,e)}reload(){return tN(this)}_assign(e){this!==e&&(e9(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=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new tx({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){e9(!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 r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await tO(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(eR(this.auth.app))return Promise.reject(e2(this.auth));let e=await this.getIdToken();return await tA(this,tI(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
2nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...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){let r=t.displayName??void 0,i=t.email??void 0,n=t.phoneNumber??void 0,s=t.photoURL??void 0,a=t.tenantId??void 0,o=t._redirectEventId??void 0,c=t.createdAt??void 0,l=t.lastLoginAt??void 0,{uid:h,emailVerified:u,isAnonymous:d,providerData:p,stsTokenManager:f}=t;e9(h&&f,e,"internal-error");let m=tU.fromJSON(this.name,f);e9("string"==typeof h,e,"internal-error"),tF(r,e.name),tF(i,e.name),e9("boolean"==typeof u,e,"internal-error"),e9("boolean"==typeof d,e,"internal-error"),tF(n,e.name),tF(s,e.name),tF(a,e.name),tF(o,e.name),tF(c,e.name),tF(l,e.name);let g=new tx({uid:h,auth:e,email:i,emailVerified:u,displayName:r,isAnonymous:d,photoURL:s,phoneNumber:n,tenantId:a,stsTokenManager:m,createdAt:c,lastLoginAt:l});return p&&Array.isArray(p)&&(g.providerData=p.map(e=>({...e}))),o&&(g._redirectEventId=o),g}static async _fromIdTokenResponse(e,t,r=!1){let i=new tU;i.updateFromServerResponse(t);let n=new tx({uid:t.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await tO(n),n}static async _fromGetAccountInfoResponse(e,t,r){let i=t.users[0];e9(void 0!==i.localId,"internal-error");let n=void 0!==i.providerUserInfo?tD(i.providerUserInfo):[],s=!(i.email&&i.passwordHash)&&!n?.length,a=new tU;a.updateFromIdToken(r);let o=new tx({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:s});return Object.assign(o,{uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:n,metadata:new tR(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!n?.length}),o}}let tV=new Map;function tj(e){e8(e instanceof Function,"Expected a class definition");let t=tV.get(e);return t?e8(t instanceof e,"Instance stored in cache mismatched with class"):(t=new e,tV.set(e,t)),t}class tH{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 tW(e,t,r){return`firebase:${e}:${t}:${r}`}tH.type="NONE";class tz{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:i,name:n}=this.auth;this.fullUserKey=tW(this.userKey,i.apiKey,n),this.fullPersistenceKey=tW("persistence",i.apiKey,n),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);if(!e)return null;if("string"==typeof e){let t=await tb(this.auth,{idToken:e}).catch(()=>void 0);return t?tx._fromGetAccountInfoResponse(this.auth,t,e):null}return tx._fromJSON(this.auth,e)}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,r="authUser"){if(!t.length)return new tz(tj(tH),e,r);let i=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),n=i[0]||tj(tH),s=tW(r,e.config.apiKey,e.name),a=null;for(let r of t)try{let t=await r._get(s);if(t){let i;if("string"==typeof t){let r=await tb(e,{idToken:t}).catch(()=>void 0);if(!r)break;i=await tx._fromGetAccountInfoResponse(e,r,t)}else i=tx._fromJSON(e,t);r!==n&&(a=i),n=r;break}}catch{}let o=i.filter(e=>e._shouldAllowMigration);return n._shouldAllowMigration&&o.length&&(n=o[0],a&&await n._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==n)try{await e._remove(s)}catch{}}))),new tz(n,e,r)}}function tB(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";{if(tK(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(tq(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(tY(t))return"Blackberry";if(tX(t))return"Webos";if(t$(t))return"Safari";if((t.includes("chrome/")||tG(t))&&!t.includes("edge/"))return"Chrome";if(tJ(t))return"Android";let r=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(r?.length===2)return r[1]}return"Other"}function tq(e=w()){return/firefox\//i.test(e)}function t$(e=w()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function tG(e=w()){return/crios\//i.test(e)}function tK(e=w()){return/iemobile/i.test(e)}function tJ(e=w()){return/android/i.test(e)}function tY(e=w()){return/blackberry/i.test(e)}function tX(e=w()){return/webos/i.test(e)}function tQ(e=w()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function tZ(e=w()){return tQ(e)||tJ(e)||tX(e)||tY(e)||/windows phone/i.test(e)||tK(e)}function t0(e,t=[]){let r;switch(e){case"Browser":r=tB(w());break;case"Worker":r=`${tB(w())}-${e}`;break;default:r=e}let i=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${eM}/${i}`}class t1{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let r=t=>new Promise((r,i)=>{try{let i=e(t);r(i)}catch(e){i(e)}});r.onAbort=t,this.queue.push(r);let i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}async function t4(e,t={}){return tl(e,"GET","/v2/passwordPolicy",tc(e,t))}class t2{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&
vendor: 1,345 bytes, line 2
2(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),i&&(t.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,i,n){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=n))}}
2class t6{constructor(e,t,r,i){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new t9(this),this.idTokenSubscription=new t9(this),this.beforeStateQueue=new t1(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=eX,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=tj(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted){if(this.persistenceManager=await tz.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.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 tb(this,{idToken:e}),r=await tx._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(eR(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),r=t,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,n=r?._redirectEventId,s=await this.tryRedirectSignIn(e);(!t||t===n)&&s?.user&&(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(e9(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 tO(e)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("u"<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(eR(this.app))return Promise.reject(e2(this));let t=e?z(e):null;return t&&e9(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&&e9(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 eR(this.app)?Promise.reject(e2(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return eR(this.app)?Promise.reject(e2(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(tj(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 t2(await t4(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new N("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>
2{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),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 tM(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&tj(e)||this._popupRedirectResolver;e9(t,this,"argument-error"),this.redirectPersistenceManager=await tz.create(this,[tj(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e)?this._currentUser:this.redirectUser?._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(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,i){if(this._deleted)return()=>{};let n="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(e9(a,this,"internal-error"),a.then(()=>{s||n(this.currentUser)}),"function"==typeof t){let n=e.addObserver(t,r,i);return()=>{s=!0,n()}}{let r=e.addObserver(t);return()=>{s=!0,r()}}}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 e9(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=t0(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e["X-Firebase-Client"]=t);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(eR(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&function(e,...t){eQ.logLevel<=a.WARN&&eQ.warn(`Auth (${eM}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}function t3(e){return z(e)}class t9{constructor(e){this.auth=e,this.observer=null,this.addObserver=j(e=>this.observer=e)}get next(){return e9(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let t5={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function t8(e){return t5.loadJS(e)}function t7(e){return`__${e}${Math.floor(1e6*Math.random())}`}class re{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let r=this.counter;return this._widgets.set(r,new ri(e,this.auth.name,t||{})),this.counter++,r}reset(e){let t=e||1e12;this._widgets.get(t)?.delete(),this._widgets.delete(t)}getResponse(e){return this._widgets.get(e||1e12)?.getResponse()||""}async execute(e){return this._widgets.get(e||1e12)?.execute(),""}}class rt{constructor(){this.enterprise=new rr}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class rr{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class ri{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i="string"==typeof e?document.getElementById(e):e;e9(i,"argument-error",{appName:t}),this.container=i,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(){let e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<50;r++)e.push(t.charAt(Math.floor(Math.random()*t.length)));return e.join("")}();let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}let rn="NO_RECAPTCHA",rs="onFirebaseAuthREInstanceReady";class ra{constructor(e){this.type="recaptcha-enterprise",this.auth=t3(e)}async verify(e="verify",t=!1){async function r(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,r)=>
2{ty(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(i=>{if(void 0===i.recaptchaKey)r(Error("recaptcha Enterprise site key undefined"));else{let r=new tv(i);return null==e.tenantId?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,t(r.siteKey)}}).catch(e=>{r(e)})})}function i(t,r,i){let n=window.grecaptcha;tg(n)?n.enterprise.ready(()=>{n.enterprise.execute(t,{action:e}).then(e=>{r(e)}).catch(()=>{r(rn)})}):i(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new rt().execute("siteKey",{action:"verify"}):new Promise((e,n)=>{r(this.auth).then(async r=>{if(!t&&tg(window.grecaptcha)&&ra.scriptInjectionDeferred)await ra.scriptInjectionDeferred.promise,i(r,e,n);else{if("u"<typeof window)return void n(Error("RecaptchaVerifier is only supported in browser"));let t=t5.recaptchaEnterpriseScript;0!==t.length&&(t+=r+`&onload=${rs}`),ra.scriptInjectionDeferred=new I,window[rs]=()=>{ra.scriptInjectionDeferred?.resolve()},t8(t).then(()=>ra.scriptInjectionDeferred?.promise).then(()=>{i(r,e,n)}).catch(e=>{n(e)})}}).catch(e=>{n(e)})})}}async function ro(e,t,r,i=!1,n=!1){let s,a=new ra(e);if(n)s=rn;else try{s=await a.verify(r)}catch(e){s=await a.verify(r,!0)}let o={...t};if("mfaSmsEnrollment"===r||"mfaSmsSignIn"===r){if("phoneEnrollmentInfo"in o){let e=o.phoneEnrollmentInfo.phoneNumber,t=o.phoneEnrollmentInfo.recaptchaToken;Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in o){let e=o.phoneSignInInfo.recaptchaToken;Object.assign(o,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return o}return i?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function rc(e,t,r,i,n){if("EMAIL_PASSWORD_PROVIDER"===n)if(!e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return i(e,t).catch(async n=>{if("auth/missing-recaptcha-token"!==n.code)return Promise.reject(n);{console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let n=await ro(e,t,r,"getOobCode"===r);return i(e,n)}});else{let n=await ro(e,t,r,"getOobCode"===r);return i(e,n)}if("PHONE_PROVIDER"!==n)return Promise.reject(n+" provider is not supported.");if(e._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let n=await ro(e,t,r);return i(e,n).catch(async n=>{if(e._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===n.code||"auth/invalid-app-credential"===n.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${r} flow.`);let n=await ro(e,t,r,!1,!0);return i(e,n)}return Promise.reject(n)})}{let n=await ro(e,t,r,!1,!0);return i(e,n)}}async function rl(e){let t=t3(e),r=new tv(await ty(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()&&new ra(t).verify()}function rh(e,t,r){let i=t3(e);e9(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");let n=!!r?.disableWarnings,s=ru(t),{host:a,port:o}=function(e){let t=ru(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};let i=r[2].split("@").pop()||"",n=/^(\[[^\]]+\])(:|$)/.exec(i);if(n){let e=n[1];return{host:e,port:rd(i.substr(e.length+1))}}{let[e,t]=i.split(":");return{host:e,port:rd(t)}}}(t),c=null===o?"":`:${o}`,l={url:`${s}//${a}${c}/`},h=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:n})});if(!i._canInitEmulator){e9(i.config.emulator&&i.emulatorConfig,i,"emulator-config-failed"),e9(M(l,i.config.emulator)&&M(h,i.emulatorConfig),i,"emulator-config-failed");return}i.config.emulator=l,i.emulatorConfig=h,i.settings.appVerificationDisabledForTesting=!0,B(a)?q(`${s}//${a}${c}`):n||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)}"u">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."),"u">typeof window&&"u">typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function ru(e){let t=e.indexOf(":");
2return t<0?"":e.substr(0,t+1)}function rd(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}ra.scriptInjectionDeferred=null;class rp{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return e5("not implemented")}_getIdTokenResponse(e){return e5("not implemented")}_linkToIdToken(e,t){return e5("not implemented")}_getReauthenticationResolver(e){return e5("not implemented")}}async function rf(e,t){return tl(e,"POST","/v1/accounts:resetPassword",tc(e,t))}async function rm(e,t){return tl(e,"POST","/v1/accounts:update",t)}async function rg(e,t){return tl(e,"POST","/v1/accounts:signUp",t)}async function rv(e,t){return tl(e,"POST","/v1/accounts:update",tc(e,t))}async function r_(e,t){return tu(e,"POST","/v1/accounts:signInWithPassword",tc(e,t))}async function ry(e,t){return tl(e,"POST","/v1/accounts:sendOobCode",tc(e,t))}async function rI(e,t){return ry(e,t)}async function rw(e,t){return ry(e,t)}async function rb(e,t){return ry(e,t)}async function rT(e,t){return ry(e,t)}async function rE(e,t){return tu(e,"POST","/v1/accounts:signInWithEmailLink",tc(e,t))}async function rk(e,t){return tu(e,"POST","/v1/accounts:signInWithEmailLink",tc(e,t))}class rS extends rp{constructor(e,t,r,i=null){super("password",r),this._email=e,this._password=t,this._tenantId=i}static _fromEmailAndPassword(e,t){return new rS(e,t,"password")}static _fromEmailAndCode(e,t,r=null){return new rS(e,t,"emailLink",r)}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(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);else if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return rc(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",r_,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return rE(e,{email:this._email,oobCode:this._password});default:e0(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return rc(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rg,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return rk(e,{idToken:t,email:this._email,oobCode:this._password});default:e0(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function rC(e,t){return tu(e,"POST","/v1/accounts:signInWithIdp",tc(e,t))}class rA extends rp{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new rA(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):e0("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let{providerId:t,signInMethod:r,...i}="string"==typeof e?JSON.parse(e):e;if(!t||!r)return null;let n=new rA(t,r);return n.idToken=i.idToken||void 0,n.accessToken=i.accessToken||void 0,n.secret=i.secret,n.nonce=i.nonce,n.pendingToken=i.pendingToken||null,n}_getIdTokenResponse(e){return rC(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,rC(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,rC(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=F(t)}return e}}async function rP(e,t){return tl(e,"POST","/v1/accounts:sendVerificationCode",tc(e,t))}async function rR(e,t){return tu(e,"POST","/v1/accounts:signInWithPhoneNumber",tc(e,t))}async function rO(e,t){let r=await tu(e,"POST","/v1/accounts:signInWithPhoneNumber",tc(e,t));if(r.temporaryProof)throw tf(e,"account-exists-with-different-credential",r);return r}let rN={USER_NOT_FOUND:"user-not-found"};async function rD(e,t){return tu(e,"POST","/v1/accounts:signInWithPhoneNumber",tc(e,{...t,operation:"REAUTH"}),rN)}class rL extends rp{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new rL({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new rL({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return rR(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return rO(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return rD(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:i}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:i}}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:r,phoneNumber:i,temporaryProof:n}=e;return r||t||i||n?new rL({verificationId:t,verificationCode:r,phoneNumber:i,temporaryProof:n}):null}}class rM{constructor(e){const t=x(V(e)),r=t.apiKey??null,i=t.oobCode??null,n=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}}(t.mode??null);e9(r&&i&&n,"argument-error"),this.apiKey=r,this.operation=n,this.code=i,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){let t,r,i,n=(r=(t=x(V(e)).link)?x(V(t)).deep_link_id:null,((i=x(V(e)).deep_link_id)?x(V(i)).link:null)||i||r||t||e);try{return new rM(n)}catch{return null}}}class rU{constructor(){this.providerId=rU.PROVIDER_ID}static credential(e,t){return rS._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let r=rM.parseLink(t);return e9(r,"argument-error"),rS._fromEmailAndCode(e,r.code,r.tenantId)}}rU.PROVIDER_ID="password",rU.EMAIL_PASSWORD_SIGN_IN_METHOD="password",rU.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class rF{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 rx extends rF{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class rV extends rx{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return e9("providerId"in t&&"signInMethod"in t,"argument-error"),rA._fromParams(t)}credential(e){return this._credential({...e,nonce:e.rawNonce})}_credential(e){return e9(e.idToken||e.accessToken,"argument-error"),rA._fromParams({...e,providerId:this.providerId,sign
2InMethod:this.providerId})}static credentialFromResult(e){return rV.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return rV.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:n,nonce:s,providerId:a}=e;if(!r&&!i&&!t&&!n||!a)return null;try{return new rV(a)._credential({idToken:t,accessToken:r,nonce:s,pendingToken:n})}catch(e){return null}}}class rj extends rx{constructor(){super("facebook.com")}static credential(e){return rA._fromParams({providerId:rj.PROVIDER_ID,signInMethod:rj.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rj.credentialFromTaggedObject(e)}static credentialFromError(e){return rj.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rj.credential(e.oauthAccessToken)}catch{return null}}}rj.FACEBOOK_SIGN_IN_METHOD="facebook.com",rj.PROVIDER_ID="facebook.com";class rH extends rx{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return rA._fromParams({providerId:rH.PROVIDER_ID,signInMethod:rH.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return rH.credentialFromTaggedObject(e)}static credentialFromError(e){return rH.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return rH.credential(t,r)}catch{return null}}}rH.GOOGLE_SIGN_IN_METHOD="google.com",rH.PROVIDER_ID="google.com";class rW extends rx{constructor(){super("github.com")}static credential(e){return rA._fromParams({providerId:rW.PROVIDER_ID,signInMethod:rW.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rW.credentialFromTaggedObject(e)}static credentialFromError(e){return rW.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rW.credential(e.oauthAccessToken)}catch{return null}}}rW.GITHUB_SIGN_IN_METHOD="github.com",rW.PROVIDER_ID="github.com";class rz extends rp{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){return rC(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,rC(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,rC(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let{providerId:t,signInMethod:r,pendingToken:i}="string"==typeof e?JSON.parse(e):e;return t&&r&&i&&t===r?new rz(t,i):null}static _create(e,t){return new rz(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class rB extends rF{constructor(e){e9(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return rB.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return rB.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=rz.fromJSON(e);return e9(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:r}=e;if(!t||!r)return null;try{return rz._create(r,t)}catch(e){return null}}}class rq extends rx{constructor(){super("twitter.com")}static credential(e,t){return rA._fromParams({providerId:rq.PROVIDER_ID,signInMethod:rq.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return rq.credentialFromTaggedObject(e)}static credentialFromError(e){return rq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return rq.credential(t,r)}catch{return null}}}async function r$(e,t){return tu(e,"POST","/v1/accounts:signUp",tc(e,t))}rq.TWITTER_SIGN_IN_METHOD="twitter.com",rq.PROVIDER_ID="twitter.com";class rG{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,i=!1){return new rG({user:await tx._fromIdTokenResponse(e,r,i),providerId:rK(r),_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){return await e._updateTokensIfNecessary(r,!0),new rG({user:e,providerId:rK(r),_tokenResponse:r,operationType:t})}}function rK(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function rJ(e){if(eR(e.app))return Promise.reject(e2(e));let t=t3(e);if(await t._initializationPromise,t.currentUser?.isAnonymous)return new rG({user:t.currentUser,providerId:null,operationType:"signIn"});let r=await r$(t,{returnSecureToken:!0}),i=await rG._fromIdTokenResponse(t,"signIn",r,!0);return await t._updateCurrentUser(i.user),i}
2class rY extends O{constructor(e,t,r,i){super(t.code,t.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,rY.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,i){return new rY(e,t,r,i)}}function rX(e,t,r,i){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(r=>{if("auth/multi-factor-auth-required"===r.code)throw rY._fromErrorAndOperation(e,r,t,i);throw r})}function rQ(e){return new Set(e.map(({providerId:e})=>e).filter(e=>!!e))}async function rZ(e,t){let r=z(e);await r1(!0,r,t);let{providerUserInfo:i}=await tw(r.auth,{idToken:await r.getIdToken(),deleteProvider:[t]}),n=rQ(i||[]);return r.providerData=r.providerData.filter(e=>n.has(e.providerId)),n.has("phone")||(r.phoneNumber=null),await r.auth._persistUserIfCurrent(r),r}async function r0(e,t,r=!1){let i=await tA(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return rG._forOperation(e,"link",i)}async function r1(e,t,r){await tO(t),e9(rQ(t.providerData).has(r)===e,t.auth,!1===e?"provider-already-linked":"no-such-provider")}async function r4(e,t,r=!1){let{auth:i}=e;if(eR(i.app))return Promise.reject(e2(i));let n="reauthenticate";try{let s=await tA(e,rX(i,n,t,e),r);e9(s.idToken,i,"internal-error");let a=tS(s.idToken);e9(a,i,"internal-error");let{sub:o}=a;return e9(e.uid===o,i,"user-mismatch"),rG._forOperation(e,n,s)}catch(e){throw e?.code==="auth/user-not-found"&&e0(i,"user-mismatch"),e}}async function r2(e,t,r=!1){if(eR(e.app))return Promise.reject(e2(e));let i="signIn",n=await rX(e,i,t),s=await rG._fromIdTokenResponse(e,i,n);return r||await e._updateCurrentUser(s.user),s}async function r6(e,t){return r2(t3(e),t)}async function r3(e,t){let r=z(e);return await r1(!1,r,t.providerId),r0(r,t)}async function r9(e,t){return r4(z(e),t)}async function r5(e,t){return tu(e,"POST","/v1/accounts:signInWithCustomToken",tc(e,t))}async function r8(e,t){if(eR(e.app))return Promise.reject(e2(e));let r=t3(e),i=await r5(r,{token:t,returnSecureToken:!0}),n=await rG._fromIdTokenResponse(r,"signIn",i);return await r._updateCurrentUser(n.user),n}class r7{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?ie._fromServerResponse(e,t):"totpInfo"in t?it._fromServerResponse(e,t):e0(e,"internal-error")}}class ie extends r7{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new ie(t)}}class it extends r7{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new it(t)}}function ir(e,t,r){e9(r.url?.length>0,e,"invalid-continue-uri"),e9(void 0===r.dynamicLinkDomain||r.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),e9(void 0===r.linkDomain||r.linkDomain.length>0,e,"invalid-hosting-link-domain"),t.continueUrl=r.url,t.dynamicLinkDomain=r.dynamicLinkDomain,t.linkDomain=r.linkDomain,t.canHandleCodeInApp=r.handleCodeInApp,r.iOS&&(e9(r.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=r.iOS.bundleId),r.android&&(e9(r.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=r.android.installApp,t.androidMinimumVersionCode=r.android.minimumVersion,t.androidPackageName=r.android.packageName)}async function ii(e){let t=t3(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function is(e,t,r){let i=t3(e),n={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};r&&ir(i,n,r),await rc(i,n,"getOobCode",rw,"EMAIL_PASSWORD_PROVIDER")}async function ia(e,t,r){await rf(z(e),{oobCode:t,newPassword:r}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&ii(e),t})}async function io(e,t){await rv(z(e),{oobCode:t})}async function ic(e,t){let r=z(e),i=await rf(r,{oobCode:t}),n=i.requestType;switch(e9(n,r,"internal-error"),n){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":e9(i.newEmail,r,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":e9(i.mfaInfo,r,"internal-error");default:e9(i.email,r,"internal-error")}let s=null;return i.mfaInfo&&(s=r7._fromServerResponse(t3(r),i.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.newEmail:i.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.email:i.newEmail)||null,multiFactorInfo:s},operation:n}}async function il(e,t){let{data:r}=await ic(z(e),t);return r.email}async function ih(e,t,r){if(eR(e.app))return Promise.reject(e2(e));let i=t3(e),n=rc(i,{returnSecureToken:!0,email:t,password:r,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",r$,"EMAIL_PASSWORD_PROVIDER"),s=await n.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&ii(e),t}),a=await rG._fromIdTokenResponse(i,"signIn",s);return await i._updateCurrentUser(a.user),a}async function iu(e,t,r){let i=t3(e),n={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};e9(r.handleCodeInApp,i,"argument-error"),r&&ir(i,n,r),await rc(i,n,"getOobCode",rb,"EMAIL_PASSWORD_PROVIDER")}async function id(e,t,r){if(eR(e.app))return Promise.reject(e2(e));let i=z(e),n=rU.credentialWithLink(t,r||e7());return e9(n._tenantId===(i.tenantId||null),i,"tenant-id-mismatch"),r6(i,n)}async function ip(e,t){return tl(e,"POST","/v1/accounts:createAuthUri",tc(e,t))}async function im(e,t){let r=te()?e7():"http://localhost",{signinMethods:i}=await ip(z(e),{identifier:t,continueUri:r});return i||[]}async function ig(e,t){let r=z(e),i={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&ir(r.auth,i,t);let{email:n}=await rI(r.auth,i);n!==e.email&&await e.reload()}async function iv(e,t,r){let i=z(e),n={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await e.getIdToken(),newEmail:t};r&&ir(i.auth,n,r);let{email:s}=await rT(i.auth,n);s!==e.email&&await e.reload()}async function i_(e,t){return tl(e,"POST","/v1/accounts:update",t)}async function iy(e,{displayName:t,photoURL:r}
2){if(void 0===t&&void 0===r)return;let i=z(e),n=await i.getIdToken(),s=await tA(i,i_(i.auth,{idToken:n,displayName:t,photoUrl:r,returnSecureToken:!0}));i.displayName=s.displayName||null,i.photoURL=s.photoUrl||null;let a=i.providerData.find(({providerId:e})=>"password"===e);a&&(a.displayName=i.displayName,a.photoURL=i.photoURL),await i._updateTokensIfNecessary(s)}async function iI(e,t,r){let{auth:i}=e,n={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(n.email=t),r&&(n.password=r);let s=await tA(e,rm(i,n));await e._updateTokensIfNecessary(s,!0)}class iw{constructor(e,t,r={}){this.isNewUser=e,this.providerId=t,this.profile=r}}class ib extends iw{constructor(e,t,r,i){super(e,t,r),this.username=i}}class iT extends iw{constructor(e,t){super(e,"facebook.com",t)}}class iE extends ib{constructor(e,t){super(e,"github.com",t,"string"==typeof t?.login?t?.login:null)}}class ik extends iw{constructor(e,t){super(e,"google.com",t)}}class iS extends ib{constructor(e,t,r){super(e,"twitter.com",t,r)}}function iC(e,t,r,i){return z(e).onIdTokenChanged(t,r,i)}class iA{constructor(e,t,r){this.type=e,this.credential=t,this.user=r}static _fromIdtoken(e,t){return new iA("enroll",e,t)}static _fromMfaPendingCredential(e){return new iA("signin",e)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){if(e?.multiFactorSession){if(e.multiFactorSession?.pendingCredential)return iA._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);else if(e.multiFactorSession?.idToken)return iA._fromIdtoken(e.multiFactorSession.idToken)}return null}}class iP{constructor(e,t,r){this.session=e,this.hints=t,this.signInResolver=r}static _fromError(e,t){let r=t3(e),i=t.customData._serverResponse,n=(i.mfaInfo||[]).map(e=>r7._fromServerResponse(r,e));e9(i.mfaPendingCredential,r,"internal-error");let s=iA._fromMfaPendingCredential(i.mfaPendingCredential);return new iP(s,n,async e=>{let n=await e._process(r,s);delete i.mfaInfo,delete i.mfaPendingCredential;let a={...i,idToken:n.idToken,refreshToken:n.refreshToken};switch(t.operationType){case"signIn":let o=await rG._fromIdTokenResponse(r,t.operationType,a);return await r._updateCurrentUser(o.user),o;case"reauthenticate":return e9(t.user,r,"internal-error"),rG._forOperation(t.user,t.operationType,a);default:e0(r,"internal-error")}})}async resolveSignIn(e){return this.signInResolver(e)}}function iR(e,t){return tl(e,"POST","/v2/accounts/mfaEnrollment:start",tc(e,t))}class iO{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(t=>r7._fromServerResponse(e.auth,t)))})}static _fromUser(e){return new iO(e)}async getSession(){return iA._fromIdtoken(await this.user.getIdToken(),this.user)}
2async enroll(e,t){let r=await this.getSession(),i=await tA(this.user,e._process(this.user.auth,r,t));return await this.user._updateTokensIfNecessary(i),this.user.reload()}async unenroll(e){let t="string"==typeof e?e:e.uid,r=await this.user.getIdToken();try{var i,n;let e=await tA(this.user,(i=this.user.auth,n={idToken:r,mfaEnrollmentId:t},tl(i,"POST","/v2/accounts/mfaEnrollment:withdraw",tc(i,n))));this.enrolledFactors=this.enrolledFactors.filter(({uid:e})=>e!==t),await this.user._updateTokensIfNecessary(e),await this.user.reload()}catch(e){throw e}}}let iN=new WeakMap,iD="__sak";class iL{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(iD,"1"),this.storage.removeItem(iD),Promise.resolve(!0)}catch{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 iM extends iL{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=tZ(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let r=this.storage.getItem(t),i=this.localCache[t];r!==i&&e(t,i,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys((e,t,r)=>{this.notifyListeners(e,r)});let r=e.key;t?this.detachListener():this.stopPolling();let i=()=>{let e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},n=this.storage.getItem(r);A()&&10===document.documentMode&&n!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!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]}}iM.type="LOCAL";class iU extends iL{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}iU.type="SESSION";class iF{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 r=new iF(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:r,data:i}=e.data,n=this.handlersMap[r];if(!n?.size)return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:r});let s=Array.from(n).map(async t=>t(e.origin,i)),a=await Promise.all(s.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:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}
2function ix(e="",t=10){let r="";for(let e=0;e<t;e++)r+=Math.floor(10*Math.random());return e+r}iF.receivers=[];class iV{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,r=50){let i,n,s="u">typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((a,o)=>{let c=ix("",20);s.port1.start();let l=setTimeout(()=>{o(Error("unsupported_event"))},r);n={messageChannel:s,onMessage(e){if(e.data.eventId===c)switch(e.data.status){case"ack":clearTimeout(l),i=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(e.data.response);break;default:clearTimeout(l),clearTimeout(i),o(Error("invalid_response"))}}},this.handlers.add(n),s.port1.addEventListener("message",n.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[s.port2])}).finally(()=>{n&&this.removeMessageHandler(n)})}}function ij(){return window}function iH(){return void 0!==ij().WorkerGlobalScope&&"function"==typeof ij().importScripts}async function iW(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}let iz="firebaseLocalStorageDb",iB="firebaseLocalStorage",iq="fbase_key";class i${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 iG(e,t){return e.transaction([iB],t?"readwrite":"readonly").objectStore(iB)}async function iK(e,t,r){return new i$(iG(e,!0).put({[iq]:t,value:r})).toPromise()}async function iJ(e,t){let r=iG(e,!1).get(t),i=await new i$(r).toPromise();return void 0===i?null:i.value}function iY(e,t){return new i$(iG(e,!0).delete(t)).toPromise()}class iX{constructor(){this.type="LOCAL",this.dbPromise=null,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.dbPromise||(this.dbPromise=function e(){let t=indexedDB.open(iz,1);return new Promise((r,i)=>{t.addEventListener("error",()=>{i(t.error)}),t.addEventListener("upgradeneeded",()=>{let e=t.result;try{e.createObjectStore(iB,{keyPath:iq})}catch(e){i(e)}}),t.addEventListener("success",async()=>{let i=t.result;i.objectStoreNames.contains(iB)?r(i):(i.close(),await new i$(indexedDB.deleteDatabase(iz)).toPromise(),r(await e()))})})}(),this.dbPromise.catch(()=>{this.dbPromise=null})),this.dbPromise}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.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return iH()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iF._getInstance(iH()?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(){if(this.activeServiceWorker=await iW(),!this.activeServiceWorker)return;this.sender=new iV(this.activeServiceWorker);let e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;return await this._withRetries(async e=>{await iK(e,iD,"1"),await iY(e,iD)}),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>iK(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>iJ(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iY(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new i$(iG(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],r=new Set;if(0!==e.length)for(let{fbase_key:i,value:n}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(n)&&(this.notifyListeners(i,n),t.push(i));for(let e of Object.keys(this.localCache))this.localCache[e]&&!r.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))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()}}function iQ(e,t){return tl(e,"POST","/v2/accounts/mfaSignIn:start",tc(e,t))}iX.type="LOCAL";let iZ=t7("rcb"),i0=new tr(3e4,6e4);class i1{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!ij().grecaptcha?.render}load(e,t=""){var r;return(e9((r=t).length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(r),e,"argument-error"),this.shouldResolveImmediately(t)&&tm(ij().grecaptcha))?Promise.resolve(ij().grecaptcha):new Promise((r,i)=>{let n=ij().setTimeout(()=>{i(e1(e,"network-request-failed"))},i0.get());ij()[iZ]=()=>{ij().clearTimeout(n),delete ij()[iZ];let s=ij().grecaptcha;if(!s||!tm(s))return void i(e1(e,"internal-error"));let a=s.render;s.render=(e,t)=>{let r=a(e,t);return this.counter++,r},this.hostLanguage=t,r(s)},t8(`${t5.recaptchaV2Script}?${F({onload:iZ,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(n),i(e1(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!ij().grecaptcha?.render&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class i4{async load(e){return new re(e)}clearedOneInstance(){}}let i2="recaptcha",i6={theme:"light",type:"image"};class i3{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=rL._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function i9(e,t,r){if(eR(e.app))return Promise.reject(e2(e));let i=t3(e);return new i3(await i7(i,t,z(r)),e=>r6(i,e))}async function i5(e,t,r){let i=z(e);
2return await r1(!1,i,"phone"),new i3(await i7(i.auth,t,z(r)),e=>r3(i,e))}async function i8(e,t,r){let i=z(e);return eR(i.auth.app)?Promise.reject(e2(i.auth)):new i3(await i7(i.auth,t,z(r)),e=>r9(i,e))}async function i7(e,t,r){if(!e._getRecaptchaConfig())try{await rl(e)}catch(e){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let i;if(i="string"==typeof t?{phoneNumber:t}:t,"session"in i){let t=i.session;if("phoneNumber"in i){e9("enroll"===t.type,e,"internal-error");let n={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},s=async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===rn){e9(r?.type===i2,e,"argument-error");let i=await nt(e,t,r);return iR(e,i)}return iR(e,t)},a=rc(e,n,"mfaSmsEnrollment",s,"PHONE_PROVIDER");return(await a.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{e9("signin"===t.type,e,"internal-error");let n=i.multiFactorHint?.uid||i.multiFactorUid;e9(n,e,"missing-multi-factor-info");let s={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===rn){e9(r?.type===i2,e,"argument-error");let i=await nt(e,t,r);return iQ(e,i)}return iQ(e,t)},o=rc(e,s,"mfaSmsSignIn",a,"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{let t={phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"},n=async(e,t)=>{if(t.captchaResponse===rn){e9(r?.type===i2,e,"argument-error");let i=await nt(e,t,r);return rP(e,i)}return rP(e,t)},s=rc(e,t,"sendVerificationCode",n,"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).sessionInfo}}finally{r?._reset()}}async function ne(e,t){let r=z(e);if(eR(r.auth.app))return Promise.reject(e2(r.auth));await r0(r,t)}async function nt(e,t,r){e9(r.type===i2,e,"argument-error");let i=await r.verify();e9("string"==typeof i,e,"argument-error");let n={...t};if("phoneEnrollmentInfo"in n){let e=n.phoneEnrollmentInfo.phoneNumber,t=n.phoneEnrollmentInfo.captchaResponse,r=n.phoneEnrollmentInfo.clientType,s=n.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(n,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:i,captchaResponse:t,clientType:r,recaptchaVersion:s}}),n}if(!("phoneSignInInfo"in n))return Object.assign(n,{recaptchaToken:i}),n;{let e=n.phoneSignInInfo.captchaResponse,t=n.phoneSignInInfo.clientType,r=n.phoneSignInInfo.recaptchaVersion;return Object.assign(n,{phoneSignInInfo:{recaptchaToken:i,captchaResponse:e,clientType:t,recaptchaVersion:r}}),n}}class nr{constructor(e){this.providerId=nr.PROVIDER_ID,this.auth=t3(e)}verifyPhoneNumber(e,t){return i7(this.auth,e,z(t))}static credential(e,t){return rL._fromVerification(e,t)}static credentialFromResult(e){return nr.credentialFromTaggedObject(e)}static credentialFromError(e){return nr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:r}=e;return t&&r?rL._fromTokenResponse(t,r):null}}function ni(e,t){return t?tj(t):(e9(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}nr.PROVIDER_ID="phone",nr.PHONE_SIGN_IN_METHOD="phone";class nn extends rp{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return rC(e,this._buildIdpRequest())}_linkToIdToken(e,t){return rC(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return rC(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 ns(e){return r2(e.auth,new nn(e),e.bypassAuthState)}function na(e){let{auth:t,user:r}=e;return e9(r,t,"internal-error"),r4(r,new nn(e),e.bypassAuthState)}async function no(e){let{auth:t,user:r}=e;return e9(r,t,"internal-error"),r0(r,new nn(e),e.bypassAuthState)}class nc{constructor(e,t,r,i,n=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=n,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:r,postBody:i,tenantId:n,error:s,type:a}=e;if(s)return void this.reject(s);let o={auth:this.auth,requestUri:t,sessionId:r,tenantId:n||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return ns;case"linkViaPopup":case"linkViaRedirect":return no;case"reauthViaPopup":case"reauthViaRedirect":return na;default:e0(this.auth,"internal-error")}}resolve(e){e8(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){e8(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let nl=new tr(2e3,1e4);async function nh(e,t,r){if(eR(e.app))return Promise.reject(e1(e,"operation-not-supported-in-this-environment"));let i=t3(e);e6(e,t,rF);let n=ni(i,r);return new np(i,"signInViaPopup",t,n).executeNotNull()}async function nu(e,t,r){let i=z(e);if(eR(i.auth.app))return Promise.reject(e1(i.auth,"operation-not-supported-in-this-environment"));e6(i.auth,t,rF);let n=ni(i.auth,r);return new np(i.auth,"reauthViaPopup",t,n,i).executeNotNull()}
2async function nd(e,t,r){let i=z(e);e6(i.auth,t,rF);let n=ni(i.auth,r);return new np(i.auth,"linkViaPopup",t,n,i).executeNotNull()}class np extends nc{constructor(e,t,r,i,n){super(e,t,i,n),this.provider=r,this.authWindow=null,this.pollId=null,np.currentPopupAction&&np.currentPopupAction.cancel(),np.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return e9(e,this.auth,"internal-error"),e}async onExecution(){e8(1===this.filter.length,"Popup operations only handle one event");let e=ix();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(e1(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(e1(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,np.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(e1(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,nl.get())};e()}}np.currentPopupAction=null;let nf=new Map;class nm extends nc{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=nf.get(this.auth._key());if(!e){try{let t=await ng(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}nf.set(this.auth._key(),e)}return this.bypassAuthState||nf.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type)return void this.resolve(null);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 ng(e,t){let r=nI(t),i=ny(e);if(!await i._isAvailable())return!1;let n=await i._get(r)==="true";return await i._remove(r),n}async function nv(e,t){return ny(e)._set(nI(t),"true")}function n_(e,t){nf.set(e._key(),t)}function ny(e){return tj(e._redirectPersistence)}function nI(e){return tW("pendingRedirect",e.config.apiKey,e.name)}async function nw(e,t,r){if(eR(e.app))return Promise.reject(e2(e));let i=t3(e);e6(e,t,rF),await i._initializationPromise;let n=ni(i,r);return await nv(n,i),n._openRedirect(i,t,"signInViaRedirect")}async function nb(e,t,r){let i=z(e);if(e6(i.auth,t,rF),eR(i.auth.app))return Promise.reject(e2(i.auth));await i.auth._initializationPromise;let n=ni(i.auth,r);await nv(n,i.auth);let s=await nS(i);return n._openRedirect(i.auth,t,"reauthViaRedirect",s)}async function nT(e,t,r){let i=z(e);e6(i.auth,t,rF),await i.auth._initializationPromise;let n=ni(i.auth,r);await r1(!1,i,t.providerId),await nv(n,i.auth);let s=await nS(i);return n._openRedirect(i.auth,t,"linkViaRedirect",s)}async function nE(e,t){return await t3(e)._initializationPromise,nk(e,t,!1)}async function nk(e,t,r=!1){if(eR(e.app))return Promise.reject(e2(e));let i=t3(e),n=ni(i,t),s=new nm(i,n,r),a=await s.execute();return a&&!r&&(delete a.user._redirectEventId,await i._persistUserIfCurrent(a.user),await i._setRedirectUser(null,t)),a}async function nS(e){let t=ix(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class nC{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;
2return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return nP(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!nP(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";t.onError(e1(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(nA(e))}saveEventToCache(e){this.cachedEventUids.add(nA(e)),this.lastProcessedEventTime=Date.now()}}function nA(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function nP({type:e,error:t}){return"unknown"===e&&t?.code==="auth/no-auth-event"}async function nR(e,t={}){return tl(e,"GET","/v1/projects",t)}let nO=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nN=/^https?/;async function nD(e){if(e.config.emulator)return;let{authorizedDomains:t}=await nR(e);for(let e of t)try{if(function(e){let t=e7(),{protocol:r,hostname:i}=new URL(t);if(e.startsWith("chrome-extension://")){let n=new URL(e);return""===n.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&n.hostname===i}if(!nN.test(r))return!1;if(nO.test(e))return i===e;let n=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+n+"|"+n+")$","i").test(i)}(e))return}catch{}e0(e,"unauthorized-domain")}let nL=new tr(3e4,6e4);function nM(){let e=ij().___jsl;if(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 nU=null,nF=new tr(5e3,15e3),nx={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},nV=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function nj(e){let t,r,i,n,s,a=await (nU=nU||new Promise((t,r)=>{function i(){nM(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{nM(),r(e1(e,"network-request-failed"))},timeout:nL.get()})}if(ij().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(ij().gapi?.load)i();else{let t=t7("iframefcb");return ij()[t]=()=>{gapi.load?i():r(e1(e,"network-request-failed"))},t8(`${t5.gapiScript}?onload=${t}`).catch(e=>r(e))}}).catch(e=>{throw nU=null,e})),o=ij().gapi;return e9(o,e,"internal-error"),a.open({where:document.body,url:(e9((t=e.config).authDomain,e,"auth-domain-config-required"),r=t.emulator?ti(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,i={apiKey:t.apiKey,appName:e.name,v:eM},(n=nV.get(e.config.apiHost))&&(i.eid=n),(s=e._getFrameworks()).length&&(i.fw=s.join(",")),`${r}?${F(i).slice(1)}`),messageHandlersFilter:o.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nx,dontclear:!0},t=>new Promise(async(r,i)=>{await t.restyle({setHideOnLeave:!1});let n=e1(e,"network-request-failed"),s=ij().setTimeout(()=>{i(n)},nF.get());function a(){ij().clearTimeout(s),r(t)}t.ping(a).then(a,()=>{i(n)})}))}let nH={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class nW{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let nz=encodeURIComponent("fac");async function nB(e,t,r,i,n,s){e9(e.config.authDomain,e,"auth-domain-config-required"),e9(e.config.apiKey,e,"invalid-api-key");let a={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:i,v:eM,eventId:n};if(t instanceof rF)for(let[r,i]of(t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",L(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(s||{})))a[r]=i;if(t instanceof rx){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(a.scopes=e.join(","))}for(let t of(e.tenantId&&(a.tid=e.tenantId),Object.keys(a)))void 0===a[t]&&delete a[t];let o=await e._getAppCheckToken(),c=o?`#${nz}=${encodeURIComponent(o)}`:"";return`${function({config:e}){return e.emulator?ti(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${F(a).slice(1)}${c}`}let nq="webStorageSupport",n$=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=iU,this._completeRedirectFn=nk,this._overrideRedirectResult=n_}async _openPopup(e,t,r,i){e8(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");let n=await nB(e,t,r,e7(),i);return function(e,t,r,i=500,n=600){let s=Math.max((window.screen.availHeight-n)/2,0).toString(),a=Math.max((window.screen.availWi
2dth-i)/2,0).toString(),o="",c={...nH,width:i.toString(),height:n.toString(),top:s,left:a},l=w().toLowerCase();r&&(o=tG(l)?"_blank":r),tq(l)&&(t=t||"http://localhost",c.scrollbars="yes");let h=Object.entries(c).reduce((e,[t,r])=>`${e}${t}=${r},`,"");if(function(e=w()){return tQ(e)&&!!window.navigator?.standalone}(l)&&"_self"!==o){var u,d;let e,r;return u=t||"",d=o,(e=document.createElement("a")).href=u,e.target=d,(r=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(r),new nW(null)}let p=window.open(t||"",o,h);e9(p,e,"popup-blocked");try{p.focus()}catch(e){}return new nW(p)}(e,n,ix())}async _openRedirect(e,t,r,i){var n;return await this._originValidation(e),n=await nB(e,t,r,e7(),i),ij().location.href=n,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(e8(r,"If manager is not set, promise should be"),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 nj(e),r=new nC(e);return t.register("authEvent",t=>(e9(t?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nq,{type:nq},r=>{let i=r?.[0]?.[nq];void 0!==i&&t(!!i),e0(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nD(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return tZ()||t$()||tQ()}};class nG{constructor(e){this.factorId=e}_process(e,t,r){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,r);case"signin":return this._finalizeSignIn(e,t.credential);default:return e5("unexpected MultiFactorSessionType")}}}class nK extends nG{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nK(e)}_finalizeEnroll(e,t,r){return tl(e,"POST","/v2/accounts/mfaEnrollment:finalize",tc(e,{idToken:t,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return tl(e,"POST","/v2/accounts/mfaSignIn:finalize",tc(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nJ{static assertion(e){return nK._fromCredential(e)}}nJ.FACTOR_ID="phone";var nY="@firebase/auth",nX="1.13.3";class nQ{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.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(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(){e9(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let nZ=y("authIdTokenMaxAge")||300,n0=null;t5={loadJS:e=>new Promise((t,r)=>{let i=document.createElement("script");i.setAttribute("src",e),i.onload=t,i.onerror=e=>{let t=e1("internal-error");t.customData=e,r(t)},i.type="text/javascript",i.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(i)}),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="},s="Browser",eS(new $("auth",(e,{options:t})=>{let r,i,n=e.getProvider("app").getImmediate(),a=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),{apiKey:c,authDomain:l}=n.options;e9(c&&!c.includes(":"),"invalid-api-key",{appName:n.name});let h=new t6(n,a,o,{apiKey:c,authDomain:l,clientPlatform:s,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:t0(s)});return i=(Array.isArray(r=t?.persistence||[])?r:[r]).map(tj),t?.errorMap&&h._updateErrorMap(t.errorMap),h._initializeWithPersistence(i,t?.popupRedirectResolver),h},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),eS(new $("auth-internal",e=>new nQ(t3(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),eV(nY,nX,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}}(s)),eV(nY,nX,"esm2020"),e.s(["$",0,rB,"A",0,{EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"},"H",0,function
vendor: 12,062 bytes, line 2
2(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","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.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registered for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is incorrect, malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend.","unsupported-password-policy-schema-version":"The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.","password-does-not-meet-requirements":"The password does not meet the requirements.","invalid-hosting-link-domain":"The provided Hosting link domain is not configured in Firebase Hosting or is not owned by the current project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`)."}},
2"L",0,rh,"M",0,rp,"P",0,nr,"Q",0,rA,"R",0,class{constructor(e,t,r={...i6}){this.parameters=r,this.type=i2,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=t3(e),this.isInvisible="invisible"===this.parameters.size,e9("u">typeof document,this.auth,"operation-not-supported-in-this-environment");const i="string"==typeof t?document.getElementById(t):t;e9(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new i4:new i1,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise(r=>{let i=e=>{e&&(this.tokenChangeListeners.delete(i),r(e))};this.tokenChangeListeners.add(i),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){e9(!this.parameters.sitekey,this.auth,"argument-error"),e9(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),e9("u">typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let r=ij()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){e9(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}
2async init(){let e;e9(te()&&!iH(),this.auth,"internal-error"),await (e=null,new Promise(t=>{"complete"===document.readyState?t():(e=()=>t(),window.addEventListener("load",e))}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await t_(this.auth);e9(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return e9(this.recaptcha,this.auth,"internal-error"),this.recaptcha}},"V",0,tH,"W",0,rU,"X",0,rj,"Y",0,rH,"Z",0,rW,"_",0,rV,"a0",0,rq,"a1",0,rJ,"a2",0,r6,"a3",0,r3,"a4",0,r9,"a5",0,r8,"a6",0,is,"a7",0,ia,"a8",0,io,"a9",0,ic,"aA",0,nR,"aB",0,function(e=w()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)},"aC",0,e1,"aD",0,e9,"aE",0,nC,"aF",0,tj,"aG",0,tW,"aH",0,nk,"aI",0,n_,"aJ",0,function(){nf.clear()},"aK",0,t3,"aO",0,ix,"aR",0,rz,"aa",0,il,"ab",0,ih,"ac",0,function(e,t,r){return eR(e.app)?Promise.reject(e2(e)):r6(z(e),rU.credential(t,r)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&ii(e),t})},"ad",0,iu,"ae",0,function(e,t){let r=rM.parseLink(t);return r?.operation==="EMAIL_SIGNIN"},"af",0,id,"ag",0,im,"ah",0,ig,"ai",0,iv,"al",0,iy,"am",0,function(e,t){let r=z(e);return eR(r.auth.app)?Promise.reject(e2(r.auth)):iI(r,t,null)},"an",0,function(e,t){return iI(z(e),null,t)},"ao",0,function(e,t=!1){return z(e).getIdToken(t)},"aq",0,rZ,"ar",0,function(e){let{user:t,_tokenResponse:r}=e;return t.isAnonymous&&!r?{providerId:null,isNewUser:!1,profile:null}:function(e){if(!e)return null;let{providerId:t}=e,r=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},i=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!t&&e?.idToken){let t=tS(e.idToken)?.firebase?.sign_in_provider;if(t)return new iw(i,"anonymous"!==t&&"custom"!==t?t:null)}if(!t)return null;switch(t){case"facebook.com":return new iT(i,r);case"github.com":return new iE(i,r);case"google.com":return new ik(i,r);case"twitter.com":return new iS(i,r,e.screenName||null);case"custom":case"anonymous":return new iw(i,null);default:return new iw(i,t,r)}}(r)},"at",0,function(e,t){let r=z(e);return e9(t.customData.operationType,r,"argument-error"),e9(t.customData._serverResponse?.mfaPendingCredential,r,"argument-error"),iP._fromError(r,t)},"au",0,function(e){let t=z(e);return iN.has(t)||iN.set(t,iO._fromUser(t)),iN.get(t)},"av",0,e8,"aw",0,tQ,"ax",0,tJ,"ay",0,e0,"az",0,nB,"b",0,iM,"c",0,iU,"d",0,nh,"e",0,nd,"f",0,nu,"g",0,function(e,t,r){return nw(e,t,r)},"h",0,function(e,t,r){return nT(e,t,r)},"i",0,iX,"j",0,function(e,t,r){return nb(e,t,r)},"k",0,nE,"l",0,i5,"m",0,n$,"n",0,nJ,"p",0,function(e=eF()){let t=eC(e,"auth");if(t.isInitialized())return t.getImmediate();let r=function(e,t){let r=eC(e,"auth");if(r.isInitialized()){let e=r.getImmediate();if(M(r.getOptions(),t??{}))return e;e0(e,"already-initialized")}return r.initialize({options:t})}(e,{popupRedirectResolver:n$,persistence:[iX,iM,iU]}),i=y("authTokenSyncURL");if(i&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(i,location.origin);if(location.origin===e.origin){let t,i=(t=e.toString(),async e=>{let r=e&&await e.getIdTokenResult(),i=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(i&&i>nZ)return;let n=r?.token;n0!==n&&(n0=n,await fetch(t,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});z(r).beforeAuthStateChanged(i,()=>i(r.currentUser)),iC(r,e=>i(e))}}let n=v("auth");return n&&rh(r,`http://${n}`),r},"q",0,{FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},"r",0,i8,"s",0,i9,"u",0,ne,"x",0,iC,"z",0,function(e,t,r,i){return z(e).onAuthStateChanged(t,r,i)}],469914),e.s([],564376)},875058,e=>{"use strict";var t=e.i(469914);e.s(["linkWithCredential",()=>t.a3])},952131,e=>{"use strict";var t=e.i(469914);e.s(["updatePassword",()=>t.an])},868478,e=>{"use strict";var t=e.i(469914);e.s(["updateEmail",()=>t.am])},548349,e=>{"use strict";var t=e.i(469914);e.s(["sendPasswordResetEmail",()=>t.a6])},290049,e=>{"use strict";var t=e.i(469914);e.s(["GoogleAuthProvider",()=>t.Y])},955851,e=>{"use strict";var t=e.i(469914);e.s(["EmailAuthProvider",()=>t.W])},44472,263574,e=>{"use strict";var t=e.i(469914);e.s(["linkWithPopup",()=>t.e],44472),e.s(["unlink",()=>t.aq],263574)},591559,e=>{"use strict";var t=e.i(469914);e.s(["onAuthStateChanged",()=>t.z])},499047,e=>{"use strict";var t=e.i(469914);e.s(["getRedirectResult",()=>t.k])}]);
3
4//# debugId=44d30cf5-67ba-bbff-f5d4-44581017f7a7
5//# sourceMappingURL=1n8pzjl5_gflh.js.map

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.