@blinkk/root-cms 2.1.2-alpha.0 → 2.2.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/signin.js CHANGED
@@ -12,1466 +12,4 @@
12
12
  <clipPath id="clip0_6083_34804">
13
13
  <rect width="24" height="24" fill="white"/>
14
14
  </clipPath>
15
- </defs>`,g.innerText="Preview backend running in this workspace."),g.setAttribute("id",f)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",l):l()}function S(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ir(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(S())}function sr(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function or(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function ar(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function cr(){let t=S();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function ur(){try{return typeof indexedDB=="object"}catch{return!1}}function lr(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{e(i.error?.message||"")}}catch(n){e(n)}})}var us="FirebaseError",P=class t extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=us,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,V.prototype.create)}},V=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){let r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?ls(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new P(i,a,r)}};function ls(t,e){return t.replace(ds,(n,r)=>{let i=e[r];return i!=null?String(i):`<${r}?>`})}var ds=/\{\$([^}]+)}/g;function dr(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function z(t,e){if(t===e)return!0;let n=Object.keys(t),r=Object.keys(e);for(let i of n){if(!r.includes(i))return!1;let s=t[i],o=e[i];if(Qn(s)&&Qn(o)){if(!z(s,o))return!1}else if(s!==o)return!1}for(let i of r)if(!n.includes(i))return!1;return!0}function Qn(t){return t!==null&&typeof t=="object"}function ce(t){let e=[];for(let[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function ue(t){let e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){let[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function le(t){let e=t.indexOf("?");if(!e)return"";let n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function hr(t,e){let n=new Ft(t,e);return n.subscribe.bind(n)}var Ft=class{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");hs(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Ut),i.error===void 0&&(i.error=Ut),i.complete===void 0&&(i.complete=Ut);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function hs(t,e){if(typeof t!="object"||t===null)return!1;for(let n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function Ut(){}var Rc=4*60*60*1e3;function j(t){return t&&t._delegate?t._delegate:t}var M=class{constructor(e,n,r){this.name=e,this.instanceFactory=n,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}};var Y="[DEFAULT]";var $t=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){let r=new ze;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){let n=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ps(e))try{this.getOrInitializeService({instanceIdentifier:Y})}catch{}for(let[n,r]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(n);try{let s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Y){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(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Y){return this.instances.has(e)}getOptions(e=Y){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:n={}}=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:n});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){let r=this.normalizeInstanceIdentifier(n),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,n){let r=this.onInitCallbacks.get(n);if(r)for(let i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:fs(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Y){return this.component?this.component.multipleInstances?e:Y:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function fs(t){return t===Y?void 0:t}function ps(t){return t.instantiationMode==="EAGER"}var qe=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.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 n=new $t(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}};var _s=[],E;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(E||(E={}));var ms={debug:E.DEBUG,verbose:E.VERBOSE,info:E.INFO,warn:E.WARN,error:E.ERROR,silent:E.SILENT},gs=E.INFO,Is={[E.DEBUG]:"log",[E.VERBOSE]:"log",[E.INFO]:"info",[E.WARN]:"warn",[E.ERROR]:"error"},Es=(t,e,...n)=>{if(e<t.logLevel)return;let r=new Date().toISOString(),i=Is[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},de=class{constructor(e){this.name=e,this._logLevel=gs,this._logHandler=Es,this._userLogHandler=null,_s.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in E))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?ms[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,E.DEBUG,...e),this._logHandler(this,E.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,E.VERBOSE,...e),this._logHandler(this,E.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,E.INFO,...e),this._logHandler(this,E.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,E.WARN,...e),this._logHandler(this,E.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,E.ERROR,...e),this._logHandler(this,E.ERROR,...e)}};var ys=(t,e)=>e.some(n=>t instanceof n),fr,pr;function vs(){return fr||(fr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ws(){return pr||(pr=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var _r=new WeakMap,jt=new WeakMap,mr=new WeakMap,zt=new WeakMap,Gt=new WeakMap;function Ts(t){let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(U(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&_r.set(n,t)}).catch(()=>{}),Gt.set(e,t),e}function bs(t){if(jt.has(t))return;let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});jt.set(t,e)}var qt={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return jt.get(t);if(e==="objectStoreNames")return t.objectStoreNames||mr.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return U(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function gr(t){qt=t(qt)}function As(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){let r=t.call(Ge(this),e,...n);return mr.set(r,e.sort?e.sort():[e]),U(r)}:ws().includes(t)?function(...e){return t.apply(Ge(this),e),U(_r.get(this))}:function(...e){return U(t.apply(Ge(this),e))}}function Ss(t){return typeof t=="function"?As(t):(t instanceof IDBTransaction&&bs(t),ys(t,vs())?new Proxy(t,qt):t)}function U(t){if(t instanceof IDBRequest)return Ts(t);if(zt.has(t))return zt.get(t);let e=Ss(t);return e!==t&&(zt.set(t,e),Gt.set(e,t)),e}var Ge=t=>Gt.get(t);function Er(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(t,e),a=U(o);return r&&o.addEventListener("upgradeneeded",u=>{r(U(o.result),u.oldVersion,u.newVersion,U(o.transaction),u)}),n&&o.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),a.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}var ks=["get","getKey","getAll","getAllKeys","count"],Cs=["put","add","delete","clear"],Kt=new Map;function Ir(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Kt.get(e))return Kt.get(e);let n=e.replace(/FromIndex$/,""),r=e!==n,i=Cs.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ks.includes(n)))return;let s=async function(o,...a){let u=this.transaction(o,i?"readwrite":"readonly"),c=u.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),i&&u.done]))[0]};return Kt.set(e,s),s}gr(t=>({...t,get:(e,n,r)=>Ir(e,n)||t.get(e,n,r),has:(e,n)=>!!Ir(e,n)||t.has(e,n)}));var Yt=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Rs(n)){let r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}};function Rs(t){return t.getComponent()?.type==="VERSION"}var Xt="@firebase/app",yr="0.14.2";var H=new de("@firebase/app"),Ps="@firebase/app-compat",Ns="@firebase/analytics-compat",Os="@firebase/analytics",Ds="@firebase/app-check-compat",Ls="@firebase/app-check",Ms="@firebase/auth",Us="@firebase/auth-compat",xs="@firebase/database",Fs="@firebase/data-connect",Vs="@firebase/database-compat",Hs="@firebase/functions",Ws="@firebase/functions-compat",Bs="@firebase/installations",$s="@firebase/installations-compat",zs="@firebase/messaging",js="@firebase/messaging-compat",qs="@firebase/performance",Gs="@firebase/performance-compat",Ks="@firebase/remote-config",Js="@firebase/remote-config-compat",Ys="@firebase/storage",Xs="@firebase/storage-compat",Qs="@firebase/firestore",Zs="@firebase/ai",eo="@firebase/firestore-compat",to="firebase",no="12.2.0";var Qt="[DEFAULT]",ro={[Xt]:"fire-core",[Ps]:"fire-core-compat",[Os]:"fire-analytics",[Ns]:"fire-analytics-compat",[Ls]:"fire-app-check",[Ds]:"fire-app-check-compat",[Ms]:"fire-auth",[Us]:"fire-auth-compat",[xs]:"fire-rtdb",[Fs]:"fire-data-connect",[Vs]:"fire-rtdb-compat",[Hs]:"fire-fn",[Ws]:"fire-fn-compat",[Bs]:"fire-iid",[$s]:"fire-iid-compat",[zs]:"fire-fcm",[js]:"fire-fcm-compat",[qs]:"fire-perf",[Gs]:"fire-perf-compat",[Ks]:"fire-rc",[Js]:"fire-rc-compat",[Ys]:"fire-gcs",[Xs]:"fire-gcs-compat",[Qs]:"fire-fst",[eo]:"fire-fst-compat",[Zs]:"fire-vertex","fire-js":"fire-js",[to]:"fire-js-all"};var Ke=new Map,io=new Map,Zt=new Map;function vr(t,e){try{t.container.addComponent(e)}catch(n){H.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function he(t){let e=t.name;if(Zt.has(e))return H.debug(`There were multiple attempts to register component ${e}.`),!1;Zt.set(e,t);for(let n of Ke.values())vr(n,t);for(let n of io.values())vr(n,t);return!0}function rn(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function N(t){return t==null?!1:t.settings!==void 0}var so={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},q=new V("app","Firebase",so);var en=class{constructor(e,n,r){this._isDeleted=!1,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new M("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 q.create("app-deleted",{appName:this._name})}};var fe=no;function sn(t,e={}){let n=t;typeof e!="object"&&(e={name:e});let r={name:Qt,automaticDataCollectionEnabled:!0,...e},i=r.name;if(typeof i!="string"||!i)throw q.create("bad-app-name",{appName:String(i)});if(n||(n=Wt()),!n)throw q.create("no-options");let s=Ke.get(i);if(s){if(z(n,s.options)&&z(r,s.config))return s;throw q.create("duplicate-app",{appName:i})}let o=new qe(i);for(let u of Zt.values())o.addComponent(u);let a=new en(n,r,o);return Ke.set(i,a),a}function Ar(t=Qt){let e=Ke.get(t);if(!e&&t===Qt&&Wt())return sn();if(!e)throw q.create("no-app",{appName:t});return e}function G(t,e,n){let r=ro[t]??t;n&&(r+=`-${n}`);let i=r.match(/\s|\//),s=e.match(/\s|\//);if(i||s){let o=[`Unable to register library "${r}" with version "${e}":`];i&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&s&&o.push("and"),s&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),H.warn(o.join(" "));return}he(new M(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}var oo="firebase-heartbeat-database",ao=1,we="firebase-heartbeat-store",Jt=null;function Sr(){return Jt||(Jt=Er(oo,ao,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(we)}catch(n){console.warn(n)}}}}).catch(t=>{throw q.create("idb-open",{originalErrorMessage:t.message})})),Jt}async function co(t){try{let n=(await Sr()).transaction(we),r=await n.objectStore(we).get(kr(t));return await n.done,r}catch(e){if(e instanceof P)H.warn(e.message);else{let n=q.create("idb-get",{originalErrorMessage:e?.message});H.warn(n.message)}}}async function wr(t,e){try{let r=(await Sr()).transaction(we,"readwrite");await r.objectStore(we).put(e,kr(t)),await r.done}catch(n){if(n instanceof P)H.warn(n.message);else{let r=q.create("idb-set",{originalErrorMessage:n?.message});H.warn(r.message)}}}function kr(t){return`${t.name}!${t.options.appId}`}var uo=1024,lo=30,tn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let n=this.container.getProvider("app").getImmediate();this._storage=new nn(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Tr();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>lo){let i=fo(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){H.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=Tr(),{heartbeatsToSend:n,unsentEntries:r}=ho(this._heartbeatsCache.heartbeats),i=Vt(JSON.stringify({version:2,heartbeats:n}));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 H.warn(e),""}}};function Tr(){return new Date().toISOString().substring(0,10)}function ho(t,e=uo){let n=[],r=t.slice();for(let i of t){let s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),br(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),br(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var nn=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ur()?lr().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let n=await co(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return wr(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return wr(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}};function br(t){return Vt(JSON.stringify({version:2,heartbeats:t})).length}function fo(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}function po(t){he(new M("platform-logger",e=>new Yt(e),"PRIVATE")),he(new M("heartbeat",e=>new tn(e),"PRIVATE")),G(Xt,yr,t),G(Xt,yr,"esm2020"),G("fire-js","")}po("");var _o="firebase",mo="12.2.1";G(_o,mo,"app");function qr(){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."}}var Gr=qr,Kr=new V("auth","Firebase",qr());var tt=new de("@firebase/auth");function go(t,...e){tt.logLevel<=E.WARN&&tt.warn(`Auth (${fe}): ${t}`,...e)}function Ye(t,...e){tt.logLevel<=E.ERROR&&tt.error(`Auth (${fe}): ${t}`,...e)}function R(t,...e){throw Pn(t,...e)}function O(t,...e){return Pn(t,...e)}function Rn(t,e,n){let r={...Gr(),[e]:n};return new V("auth","Firebase",r).create(e,{appName:t.name})}function X(t){return Rn(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Io(t,e,n){let r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&R(t,"argument-error"),Rn(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Pn(t,...e){if(typeof t!="string"){let n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return Kr.create(t,...e)}function p(t,e,...n){if(!t)throw Pn(e,...n)}function x(t){let e="INTERNAL ASSERTION FAILED: "+t;throw Ye(e),new Error(e)}function B(t,e){t||x(e)}function dn(){return typeof self<"u"&&self.location?.href||""}function Eo(){return Cr()==="http:"||Cr()==="https:"}function Cr(){return typeof self<"u"&&self.location?.protocol||null}function yo(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Eo()||or()||"connection"in navigator)?navigator.onLine:!0}function vo(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var Q=class{constructor(e,n){this.shortDelay=e,this.longDelay=n,B(n>e,"Short delay should be less than long delay!"),this.isMobile=ir()||ar()}get(){return yo()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Nn(t,e){B(t.emulator,"Emulator should always be set here");let{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}var nt=class{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;x("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;x("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;x("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var wo={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var To=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],bo=new Q(3e4,6e4);function b(t,e){return t.tenantId&&!e.tenantId?{...e,tenantId:t.tenantId}:e}async function k(t,e,n,r,i={}){return Jr(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});let a=ce({key:t.config.apiKey,...o}).slice(1),u=await t._getAdditionalHeaders();u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode);let c={method:e,headers:u,...s};return sr()||(c.referrerPolicy="no-referrer"),t.emulatorConfig&&ve(t.emulatorConfig.host)&&(c.credentials="include"),nt.fetch()(await Yr(t,t.config.apiHost,n,a),c)})}async function Jr(t,e,n){t._canInitEmulator=!1;let r={...wo,...e};try{let i=new hn(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();let o=await s.json();if("needConfirmation"in o)throw be(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[u,c]=a.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw be(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw be(t,"email-already-in-use",o);if(u==="USER_DISABLED")throw be(t,"user-disabled",o);let h=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw Rn(t,h,c);R(t,h)}}catch(i){if(i instanceof P)throw i;R(t,"network-request-failed",{message:String(i)})}}async function ie(t,e,n,r,i={}){let s=await k(t,e,n,r,i);return"mfaPendingCredential"in s&&R(t,"multi-factor-auth-required",{_serverResponse:s}),s}async function Yr(t,e,n,r){let i=`${e}${n}?${r}`,s=t,o=s.config.emulator?Nn(t.config,i):`${t.config.apiScheme}://${i}`;return To.includes(n)&&(await s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(o).toString():o}function Ao(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}var hn=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(O(this.auth,"network-request-failed")),bo.get())})}};function be(t,e,n){let r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=O(t,e,r);return i.customData._tokenResponse=n,i}function Rr(t){return t!==void 0&&t.enterprise!==void 0}var rt=class{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(let n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return Ao(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}};async function Xr(t,e){return k(t,"GET","/v2/recaptchaConfig",b(t,e))}async function So(t,e){return k(t,"POST","/v1/accounts:delete",e)}async function it(t,e){return k(t,"POST","/v1/accounts:lookup",e)}function Ae(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function Qr(t,e=!1){let n=j(t),r=await n.getIdToken(e),i=On(r);p(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let s=typeof i.firebase=="object"?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:Ae(on(i.auth_time)),issuedAtTime:Ae(on(i.iat)),expirationTime:Ae(on(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}}function on(t){return Number(t)*1e3}function On(t){let[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Ye("JWT malformed, contained fewer than 3 sections"),null;try{let i=je(n);return i?JSON.parse(i):(Ye("Failed to decode base64 JWT payload"),null)}catch(i){return Ye("Caught error parsing JWT payload as JSON",i?.toString()),null}}function Pr(t){let e=On(t);return p(e,"internal-error"),p(typeof e.exp<"u","internal-error"),p(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}async function Re(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof P&&ko(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function ko({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var fn=class{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,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}};var Pe=class{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Ae(this.lastLoginAt),this.creationTime=Ae(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};async function st(t){let e=t.auth,n=await t.getIdToken(),r=await Re(t,it(e,{idToken:n}));p(r?.users.length,e,"internal-error");let i=r.users[0];t._notifyReloadListener(i);let s=i.providerUserInfo?.length?ei(i.providerUserInfo):[],o=Co(t.providerData,s),a=t.isAnonymous,u=!(t.email&&i.passwordHash)&&!o?.length,c=a?u:!1,h={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:o,metadata:new Pe(i.createdAt,i.lastLoginAt),isAnonymous:c};Object.assign(t,h)}async function Zr(t){let e=j(t);await st(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function Co(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function ei(t){return t.map(({providerId:e,...n})=>({providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}async function Ro(t,e){let n=await Jr(t,{},async()=>{let r=ce({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=await Yr(t,i,"/v1/token",`key=${s}`),a=await t._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let u={method:"POST",headers:a,body:r};return t.emulatorConfig&&ve(t.emulatorConfig.host)&&(u.credentials="include"),nt.fetch()(o,u)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function Po(t,e){return k(t,"POST","/v2/accounts:revokeToken",b(t,e))}var Se=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){p(e.idToken,"internal-error"),p(typeof e.idToken<"u","internal-error"),p(typeof e.refreshToken<"u","internal-error");let n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Pr(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){p(e.length!==0,"internal-error");let n=Pr(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(p(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){let{accessToken:r,refreshToken:i,expiresIn:s}=await Ro(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){let{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new t;return r&&(p(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(p(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(p(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return x("not implemented")}};function K(t,e){p(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var J=class t{constructor({uid:e,auth:n,stsTokenManager:r,...i}){this.providerId="firebase",this.proactiveRefresh=new fn(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Pe(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let n=await Re(this,this.stsTokenManager.getToken(this.auth,e));return p(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return Qr(this,e)}reload(){return Zr(this)}_assign(e){this!==e&&(p(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(n=>({...n})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let n=new t({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){p(!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,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await st(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(N(this.auth.app))return Promise.reject(X(this.auth));let e=await this.getIdToken();return await Re(this,So(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,isAnonymous: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,n){let r=n.displayName??void 0,i=n.email??void 0,s=n.phoneNumber??void 0,o=n.photoURL??void 0,a=n.tenantId??void 0,u=n._redirectEventId??void 0,c=n.createdAt??void 0,h=n.lastLoginAt??void 0,{uid:l,emailVerified:d,isAnonymous:f,providerData:g,stsTokenManager:A}=n;p(l&&A,e,"internal-error");let y=Se.fromJSON(this.name,A);p(typeof l=="string",e,"internal-error"),K(r,e.name),K(i,e.name),p(typeof d=="boolean",e,"internal-error"),p(typeof f=="boolean",e,"internal-error"),K(s,e.name),K(o,e.name),K(a,e.name),K(u,e.name),K(c,e.name),K(h,e.name);let _=new t({uid:l,auth:e,email:i,emailVerified:d,displayName:r,isAnonymous:f,photoURL:o,phoneNumber:s,tenantId:a,stsTokenManager:y,createdAt:c,lastLoginAt:h});return g&&Array.isArray(g)&&(_.providerData=g.map(m=>({...m}))),u&&(_._redirectEventId=u),_}static async _fromIdTokenResponse(e,n,r=!1){let i=new Se;i.updateFromServerResponse(n);let s=new t({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await st(s),s}static async _fromGetAccountInfoResponse(e,n,r){let i=n.users[0];p(i.localId!==void 0,"internal-error");let s=i.providerUserInfo!==void 0?ei(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!s?.length,a=new Se;a.updateFromIdToken(r);let u=new t({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:o}),c={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:s,metadata:new Pe(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!s?.length};return Object.assign(u,c),u}};var Nr=new Map;function W(t){B(t instanceof Function,"Expected a class definition");let e=Nr.get(t);return e?(B(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Nr.set(t,e),e)}var ot=class{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){let n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}};ot.type="NONE";var pn=ot;function Xe(t,e,n){return`firebase:${t}:${e}:${n}`}var at=class t{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;let{config:i,name:s}=this.auth;this.fullUserKey=Xe(this.userKey,i.apiKey,s),this.fullPersistenceKey=Xe("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),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(typeof e=="string"){let n=await it(this.auth,{idToken:e}).catch(()=>{});return n?J._fromGetAccountInfoResponse(this.auth,n,e):null}return J._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 n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new t(W(pn),e,r);let i=(await Promise.all(n.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c),s=i[0]||W(pn),o=Xe(r,e.config.apiKey,e.name),a=null;for(let c of n)try{let h=await c._get(o);if(h){let l;if(typeof h=="string"){let d=await it(e,{idToken:h}).catch(()=>{});if(!d)break;l=await J._fromGetAccountInfoResponse(e,d,h)}else l=J._fromJSON(e,h);c!==s&&(a=l),s=c;break}}catch{}let u=i.filter(c=>c._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new t(s,e,r):(s=u[0],a&&await s._set(o,a.toJSON()),await Promise.all(n.map(async c=>{if(c!==s)try{await c._remove(o)}catch{}})),new t(s,e,r))}};function Or(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(ii(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(ti(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(oi(e))return"Blackberry";if(ai(e))return"Webos";if(ni(e))return"Safari";if((e.includes("chrome/")||ri(e))&&!e.includes("edge/"))return"Chrome";if(si(e))return"Android";{let n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if(r?.length===2)return r[1]}return"Other"}function ti(t=S()){return/firefox\//i.test(t)}function ni(t=S()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function ri(t=S()){return/crios\//i.test(t)}function ii(t=S()){return/iemobile/i.test(t)}function si(t=S()){return/android/i.test(t)}function oi(t=S()){return/blackberry/i.test(t)}function ai(t=S()){return/webos/i.test(t)}function Dn(t=S()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function No(t=S()){return Dn(t)&&!!window.navigator?.standalone}function Oo(){return cr()&&document.documentMode===10}function ci(t=S()){return Dn(t)||si(t)||ai(t)||oi(t)||/windows phone/i.test(t)||ii(t)}function ui(t,e=[]){let n;switch(t){case"Browser":n=Or(S());break;case"Worker":n=`${Or(S())}-${t}`;break;default:n=t}let r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${fe}/${r}`}var _n=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){let r=s=>new Promise((o,a)=>{try{let u=e(s);o(u)}catch(u){a(u)}});r.onAbort=n,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 n=[];try{for(let r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(let i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}}};async function Do(t,e={}){return k(t,"GET","/v2/passwordPolicy",b(t,e))}var Lo=6,mn=class{constructor(e){let n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??Lo,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(e,n){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var gn=class{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ct(this),this.idTokenSubscription=new ct(this),this.beforeStateQueue=new _n(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=Kr,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(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=W(n)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await at.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),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 n=await it(this,{idToken:e}),r=await J._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(N(this.app)){let s=this.app.settings.authIdToken;return s?new Promise(o=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(s).then(o,o))}):this.directlySetCurrentUser(null)}let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let s=this.redirectUser?._redirectEventId,o=r?._redirectEventId,a=await this.tryRedirectSignIn(e);(!s||s===o)&&a?.user&&(r=a.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(s){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return p(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 n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await st(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=vo()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(N(this.app))return Promise.reject(X(this));let n=e?j(e):null;return n&&p(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&p(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return N(this.app)?Promise.reject(X(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return N(this.app)?Promise.reject(X(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(W(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=await Do(this),n=new mn(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new V("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){let n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await Po(this,r)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,n){let r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let n=e&&W(e)||this._popupRedirectResolver;p(n,this,"argument-error"),this.redirectPersistenceManager=await at.create(this,[W(n._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,n,r,i){if(this._deleted)return()=>{};let s=typeof n=="function"?n:n.next.bind(n),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(p(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof n=="function"){let u=e.addObserver(n,r,i);return()=>{o=!0,u()}}else{let u=e.addObserver(n);return()=>{o=!0,u()}}}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 p(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ui(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 n=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(N(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&go(`Error while retrieving App Check token: ${e.error}`),e?.token}};function se(t){return j(t)}var ct=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=hr(n=>this.observer=n)}get next(){return p(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var St={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Mo(t){St=t}function li(t){return St.loadJS(t)}function Uo(){return St.recaptchaEnterpriseScript}function xo(){return St.gapiScript}function di(t){return`__${t}${Math.floor(Math.random()*1e6)}`}var In=class{constructor(){this.enterprise=new En}ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}},En=class{ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}};var Fo="recaptcha-enterprise",ke="NO_RECAPTCHA",ut=class{constructor(e){this.type=Fo,this.auth=se(e)}async verify(e="verify",n=!1){async function r(s){if(!n){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,a)=>{Xr(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(u=>{if(u.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{let c=new rt(u);return s.tenantId==null?s._agentRecaptchaConfig=c:s._tenantRecaptchaConfigs[s.tenantId]=c,o(c.siteKey)}}).catch(u=>{a(u)})})}function i(s,o,a){let u=window.grecaptcha;Rr(u)?u.enterprise.ready(()=>{u.enterprise.execute(s,{action:e}).then(c=>{o(c)}).catch(()=>{o(ke)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new In().execute("siteKey",{action:"verify"}):new Promise((s,o)=>{r(this.auth).then(a=>{if(!n&&Rr(window.grecaptcha))i(a,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let u=Uo();u.length!==0&&(u+=a),li(u).then(()=>{i(a,s,o)}).catch(c=>{o(c)})}}).catch(a=>{o(a)})})}};async function Te(t,e,n,r=!1,i=!1){let s=new ut(t),o;if(i)o=ke;else try{o=await s.verify(n)}catch{o=await s.verify(n,!0)}let a={...e};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in a){let u=a.phoneEnrollmentInfo.phoneNumber,c=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:u,recaptchaToken:c,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){let u=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:u,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function Ce(t,e,n,r,i){if(i==="EMAIL_PASSWORD_PROVIDER")if(t._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){let s=await Te(t,e,n,n==="getOobCode");return r(t,s)}else return r(t,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let o=await Te(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(s)});else if(i==="PHONE_PROVIDER")if(t._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let s=await Te(t,e,n);return r(t,s).catch(async o=>{if(t._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&(o.code==="auth/missing-recaptcha-token"||o.code==="auth/invalid-app-credential")){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`);let a=await Te(t,e,n,!1,!0);return r(t,a)}return Promise.reject(o)})}else{let s=await Te(t,e,n,!1,!0);return r(t,s)}else return Promise.reject(i+" provider is not supported.")}async function Vo(t){let e=se(t),n=await Xr(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new rt(n);e.tenantId==null?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,r.isAnyProviderEnabled()&&new ut(e).verify()}function hi(t,e){let n=rn(t,"auth");if(n.isInitialized()){let i=n.getImmediate(),s=n.getOptions();if(z(s,e??{}))return i;R(i,"already-initialized")}return n.initialize({options:e})}function Ho(t,e){let n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(W);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}function fi(t,e,n){let r=se(t);p(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");let i=!!n?.disableWarnings,s=pi(e),{host:o,port:a}=Wo(e),u=a===null?"":`:${a}`,c={url:`${s}//${o}${u}/`},h=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){p(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),p(z(c,r.config.emulator)&&z(h,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=c,r.emulatorConfig=h,r.settings.appVerificationDisabledForTesting=!0,ve(o)?(nr(`${s}//${o}${u}`),rr("Auth",!0)):i||Bo()}function pi(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function Wo(t){let e=pi(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let s=i[1];return{host:s,port:Dr(r.substr(s.length+1))}}else{let[s,o]=r.split(":");return{host:s,port:Dr(o)}}}function Dr(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function Bo(){function t(){let e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}var Z=class{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return x("not implemented")}_getIdTokenResponse(e){return x("not implemented")}_linkToIdToken(e,n){return x("not implemented")}_getReauthenticationResolver(e){return x("not implemented")}};async function $o(t,e){return k(t,"POST","/v1/accounts:signUp",e)}async function zo(t,e){return ie(t,"POST","/v1/accounts:signInWithPassword",b(t,e))}async function jo(t,e){return ie(t,"POST","/v1/accounts:signInWithEmailLink",b(t,e))}async function qo(t,e){return ie(t,"POST","/v1/accounts:signInWithEmailLink",b(t,e))}var Ne=class t extends Z{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new t(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new t(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let n=typeof e=="string"?JSON.parse(e):e;if(n?.email&&n?.password){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ce(e,n,"signInWithPassword",zo,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return jo(e,{email:this._email,oobCode:this._password});default:R(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":let r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ce(e,r,"signUpPassword",$o,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return qo(e,{idToken:n,email:this._email,oobCode:this._password});default:R(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}};async function pe(t,e){return ie(t,"POST","/v1/accounts:signInWithIdp",b(t,e))}var Go="http://localhost",ee=class t extends Z{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let n=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):R("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i,...s}=n;if(!r||!i)return null;let o=new t(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){let n=this.buildRequest();return pe(e,n)}_linkToIdToken(e,n){let r=this.buildRequest();return r.idToken=n,pe(e,r)}_getReauthenticationResolver(e){let n=this.buildRequest();return n.autoCreate=!1,pe(e,n)}buildRequest(){let e={requestUri:Go,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=ce(n)}return e}};async function Lr(t,e){return k(t,"POST","/v1/accounts:sendVerificationCode",b(t,e))}async function Ko(t,e){return ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,e))}async function Jo(t,e){let n=await ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,e));if(n.temporaryProof)throw be(t,"account-exists-with-different-credential",n);return n}var Yo={USER_NOT_FOUND:"user-not-found"};async function Xo(t,e){let n={...e,operation:"REAUTH"};return ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,n),Yo)}var Oe=class t extends Z{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,n){return new t({verificationId:e,verificationCode:n})}static _fromTokenResponse(e,n){return new t({phoneNumber:e,temporaryProof:n})}_getIdTokenResponse(e){return Ko(e,this._makeVerificationRequest())}_linkToIdToken(e,n){return Jo(e,{idToken:n,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return Xo(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:n,verificationId:r,verificationCode:i}=this.params;return e&&n?{temporaryProof:e,phoneNumber:n}:{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){typeof e=="string"&&(e=JSON.parse(e));let{verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s}=e;return!r&&!n&&!i&&!s?null:new t({verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s})}};function Qo(t){switch(t){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}}function Zo(t){let e=ue(le(t)).link,n=e?ue(le(e)).deep_link_id:null,r=ue(le(t)).deep_link_id;return(r?ue(le(r)).link:null)||r||n||e||t}var lt=class t{constructor(e){let n=ue(le(e)),r=n.apiKey??null,i=n.oobCode??null,s=Qo(n.mode??null);p(r&&i&&s,"argument-error"),this.apiKey=r,this.operation=s,this.code=i,this.continueUrl=n.continueUrl??null,this.languageCode=n.lang??null,this.tenantId=n.tenantId??null}static parseLink(e){let n=Zo(e);try{return new t(n)}catch{return null}}};var _e=class t{constructor(){this.providerId=t.PROVIDER_ID}static credential(e,n){return Ne._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){let r=lt.parseLink(n);return p(r,"argument-error"),Ne._fromEmailAndCode(e,r.code,r.tenantId)}};_e.PROVIDER_ID="password";_e.EMAIL_PASSWORD_SIGN_IN_METHOD="password";_e.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var De=class{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}};var te=class extends De{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}};var Le=class t extends te{constructor(){super("facebook.com")}static credential(e){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return t.credential(e.oauthAccessToken)}catch{return null}}};Le.FACEBOOK_SIGN_IN_METHOD="facebook.com";Le.PROVIDER_ID="facebook.com";var ne=class t extends te{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return t.credential(n,r)}catch{return null}}};ne.GOOGLE_SIGN_IN_METHOD="google.com";ne.PROVIDER_ID="google.com";var Me=class t extends te{constructor(){super("github.com")}static credential(e){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return t.credential(e.oauthAccessToken)}catch{return null}}};Me.GITHUB_SIGN_IN_METHOD="github.com";Me.PROVIDER_ID="github.com";var Ue=class t extends te{constructor(){super("twitter.com")}static credential(e,n){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return t.credential(n,r)}catch{return null}}};Ue.TWITTER_SIGN_IN_METHOD="twitter.com";Ue.PROVIDER_ID="twitter.com";var xe=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){let s=await J._fromIdTokenResponse(e,r,i),o=Mr(r);return new t({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);let i=Mr(r);return new t({user:e,providerId:i,_tokenResponse:r,operationType:n})}};function Mr(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}var yn=class t extends P{constructor(e,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new t(e,n,r,i)}};function _i(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?yn._fromErrorAndOperation(t,s,e,r):s})}async function ea(t,e,n=!1){let r=await Re(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return xe._forOperation(t,"link",r)}async function ta(t,e,n=!1){let{auth:r}=t;if(N(r.app))return Promise.reject(X(r));let i="reauthenticate";try{let s=await Re(t,_i(r,i,e,t),n);p(s.idToken,r,"internal-error");let o=On(s.idToken);p(o,r,"internal-error");let{sub:a}=o;return p(t.uid===a,r,"user-mismatch"),xe._forOperation(t,i,s)}catch(s){throw s?.code==="auth/user-not-found"&&R(r,"user-mismatch"),s}}async function na(t,e,n=!1){if(N(t.app))return Promise.reject(X(t));let r="signIn",i=await _i(t,r,e),s=await xe._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}function mi(t,e,n,r){return j(t).onIdTokenChanged(e,n,r)}function gi(t,e,n){return j(t).beforeAuthStateChanged(e,n)}function Ur(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:start",b(t,e))}function ra(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:finalize",b(t,e))}function ia(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:start",b(t,e))}function sa(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:finalize",b(t,e))}var dt="__sak";var ht=class{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(dt,"1"),this.storage.removeItem(dt),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){let n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};var oa=1e3,aa=10,ft=class extends ht{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=ci(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,u)=>{this.notifyListeners(o,u)});return}let r=e.key;n?this.detachListener():this.stopPolling();let i=()=>{let o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);Oo()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,aa):i()}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},oa)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(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(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){let n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}};ft.type="LOCAL";var Ii=ft;var ca=1e3;function an(t){let e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=RegExp(`${e}=([^;]+)`);return document.cookie.match(n)?.[1]??null}function cn(t){return`${window.location.protocol==="http:"?"__dev_":"__HOST-"}FIREBASE_${t.split(":")[3]}`}var vn=class{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(typeof window===void 0)return e;let n=new URL(`${window.location.origin}/__cookies__`);return n.searchParams.set("finalTarget",e),n}async _isAvailable(){return typeof isSecureContext=="boolean"&&!isSecureContext||typeof navigator>"u"||typeof document>"u"?!1:navigator.cookieEnabled??!0}async _set(e,n){}async _get(e){if(!this._isAvailable())return null;let n=cn(e);return window.cookieStore?(await window.cookieStore.get(n))?.value:an(n)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;let r=cn(e);document.cookie=`${r}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch(()=>{})}_addListener(e,n){if(!this._isAvailable())return;let r=cn(e);if(window.cookieStore){let a=c=>{let h=c.changed.find(d=>d.name===r);h&&n(h.value),c.deleted.find(d=>d.name===r)&&n(null)},u=()=>window.cookieStore.removeEventListener("change",a);return this.listenerUnsubscribes.set(n,u),window.cookieStore.addEventListener("change",a)}let i=an(r),s=setInterval(()=>{let a=an(r);a!==i&&(n(a),i=a)},ca),o=()=>clearInterval(s);this.listenerUnsubscribes.set(n,o)}_removeListener(e,n){let r=this.listenerUnsubscribes.get(n);r&&(r(),this.listenerUnsubscribes.delete(n))}};vn.type="COOKIE";var pt=class extends ht{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}};pt.type="SESSION";var Ln=pt;function ua(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}var _t=class t{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;let r=new t(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!o?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});let a=Array.from(o).map(async c=>c(n.origin,s)),u=await ua(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}};_t.receivers=[];function Mn(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}var wn=class{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,n,r=50){let i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((a,u)=>{let c=Mn("",20);i.port1.start();let h=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(l){let d=l;if(d.data.eventId===c)switch(d.data.status){case"ack":clearTimeout(h),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(d.data.response);break;default:clearTimeout(h),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}};function F(){return window}function la(t){F().location.href=t}function Ei(){return typeof F().WorkerGlobalScope<"u"&&typeof F().importScripts=="function"}async function da(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function ha(){return navigator?.serviceWorker?.controller||null}function fa(){return Ei()?self:null}var yi="firebaseLocalStorageDb",pa=1,mt="firebaseLocalStorage",vi="fbase_key",re=class{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}};function kt(t,e){return t.transaction([mt],e?"readwrite":"readonly").objectStore(mt)}function _a(){let t=indexedDB.deleteDatabase(yi);return new re(t).toPromise()}function Tn(){let t=indexedDB.open(yi,pa);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{let r=t.result;try{r.createObjectStore(mt,{keyPath:vi})}catch(i){n(i)}}),t.addEventListener("success",async()=>{let r=t.result;r.objectStoreNames.contains(mt)?e(r):(r.close(),await _a(),e(await Tn()))})})}async function xr(t,e,n){let r=kt(t,!0).put({[vi]:e,value:n});return new re(r).toPromise()}async function ma(t,e){let n=kt(t,!1).get(e),r=await new re(n).toPromise();return r===void 0?null:r.value}function Fr(t,e){let n=kt(t,!0).delete(e);return new re(n).toPromise()}var ga=800,Ia=3,gt=class{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Tn(),this.db)}async _withRetries(e){let n=0;for(;;)try{let r=await this._openDb();return await e(r)}catch(r){if(n++>Ia)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Ei()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=_t._getInstance(fa()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await da(),!this.activeServiceWorker)return;this.sender=new wn(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||ha()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await Tn();return await xr(e,dt,"1"),await Fr(e,dt),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>xr(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){let n=await this._withRetries(r=>ma(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Fr(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(i=>{let s=kt(i,!1).getAll();return new re(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(e.length!==0)for(let{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(let i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),ga)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}};gt.type="LOCAL";var wi=gt;function Vr(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:start",b(t,e))}function Ea(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:finalize",b(t,e))}function ya(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:finalize",b(t,e))}var tu=di("rcb"),nu=new Q(3e4,6e4);var Qe="recaptcha";async function va(t,e,n){if(!t._getRecaptchaConfig())try{await Vo(t)}catch{console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let r;if(typeof e=="string"?r={phoneNumber:e}:r=e,"session"in r){let i=r.session;if("phoneNumber"in r){p(i.type==="enroll",t,"internal-error");let s={idToken:i.credential,phoneEnrollmentInfo:{phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"}};return(await Ce(t,s,"mfaSmsEnrollment",async(c,h)=>{if(h.phoneEnrollmentInfo.captchaResponse===ke){p(n?.type===Qe,c,"argument-error");let l=await un(c,h,n);return Ur(c,l)}return Ur(c,h)},"PHONE_PROVIDER").catch(c=>Promise.reject(c))).phoneSessionInfo.sessionInfo}else{p(i.type==="signin",t,"internal-error");let s=r.multiFactorHint?.uid||r.multiFactorUid;p(s,t,"missing-multi-factor-info");let o={mfaPendingCredential:i.credential,mfaEnrollmentId:s,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}};return(await Ce(t,o,"mfaSmsSignIn",async(h,l)=>{if(l.phoneSignInInfo.captchaResponse===ke){p(n?.type===Qe,h,"argument-error");let d=await un(h,l,n);return Vr(h,d)}return Vr(h,l)},"PHONE_PROVIDER").catch(h=>Promise.reject(h))).phoneResponseInfo.sessionInfo}}else{let i={phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"};return(await Ce(t,i,"sendVerificationCode",async(u,c)=>{if(c.captchaResponse===ke){p(n?.type===Qe,u,"argument-error");let h=await un(u,c,n);return Lr(u,h)}return Lr(u,c)},"PHONE_PROVIDER").catch(u=>Promise.reject(u))).sessionInfo}}finally{n?._reset()}}async function un(t,e,n){p(n.type===Qe,t,"argument-error");let r=await n.verify();p(typeof r=="string",t,"argument-error");let i={...e};if("phoneEnrollmentInfo"in i){let s=i.phoneEnrollmentInfo.phoneNumber,o=i.phoneEnrollmentInfo.captchaResponse,a=i.phoneEnrollmentInfo.clientType,u=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:s,recaptchaToken:r,captchaResponse:o,clientType:a,recaptchaVersion:u}}),i}else if("phoneSignInInfo"in i){let s=i.phoneSignInInfo.captchaResponse,o=i.phoneSignInInfo.clientType,a=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:s,clientType:o,recaptchaVersion:a}}),i}else return Object.assign(i,{recaptchaToken:r}),i}var Fe=class t{constructor(e){this.providerId=t.PROVIDER_ID,this.auth=se(e)}verifyPhoneNumber(e,n){return va(this.auth,e,j(n))}static credential(e,n){return Oe._fromVerification(e,n)}static credentialFromResult(e){let n=e;return t.credentialFromTaggedObject(n)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:n,temporaryProof:r}=e;return n&&r?Oe._fromTokenResponse(n,r):null}};Fe.PROVIDER_ID="phone";Fe.PHONE_SIGN_IN_METHOD="phone";function Ti(t,e){return e?W(e):(p(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Ve=class extends Z{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return pe(e,this._buildIdpRequest())}_linkToIdToken(e,n){return pe(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return pe(e,this._buildIdpRequest())}_buildIdpRequest(e){let n={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&&(n.idToken=e),n}};function wa(t){return na(t.auth,new Ve(t),t.bypassAuthState)}function Ta(t){let{auth:e,user:n}=t;return p(n,e,"internal-error"),ta(n,new Ve(t),t.bypassAuthState)}async function ba(t){let{auth:e,user:n}=t;return p(n,e,"internal-error"),ea(n,new Ve(t),t.bypassAuthState)}var It=class{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){let{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}let u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(u))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return wa;case"linkViaPopup":case"linkViaRedirect":return ba;case"reauthViaPopup":case"reauthViaRedirect":return Ta;default:R(this.auth,"internal-error")}}resolve(e){B(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){B(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()}};var Aa=new Q(2e3,1e4);async function Un(t,e,n){if(N(t.app))return Promise.reject(O(t,"operation-not-supported-in-this-environment"));let r=se(t);Io(t,e,De);let i=Ti(r,n);return new Et(r,"signInViaPopup",e,i).executeNotNull()}var Et=class t extends It{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,t.currentPopupAction&&t.currentPopupAction.cancel(),t.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return p(e,this.auth,"internal-error"),e}async onExecution(){B(this.filter.length===1,"Popup operations only handle one event");let e=Mn();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(O(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(O(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,t.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(O(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,Aa.get())};e()}};Et.currentPopupAction=null;var Sa="pendingRedirect",Ze=new Map,bn=class extends It{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=Ze.get(this.auth._key());if(!e){try{let r=await ka(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}Ze.set(this.auth._key(),e)}return this.bypassAuthState||Ze.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}};async function ka(t,e){let n=Pa(e),r=Ra(t);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function Ca(t,e){Ze.set(t._key(),e)}function Ra(t){return W(t._redirectPersistence)}function Pa(t){return Xe(Sa,t.config.apiKey,t.name)}async function Na(t,e,n=!1){if(N(t.app))return Promise.reject(X(t));let r=se(t),i=Ti(r,e),o=await new bn(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}var Oa=10*60*1e3,An=class{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 n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!Da(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){if(e.error&&!bi(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";n.onError(O(this.auth,r))}else n.onAuthEvent(e)}isEventForConsumer(e,n){let r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=Oa&&this.cachedEventUids.clear(),this.cachedEventUids.has(Hr(e))}saveEventToCache(e){this.cachedEventUids.add(Hr(e)),this.lastProcessedEventTime=Date.now()}};function Hr(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function bi({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function Da(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return bi(t);default:return!1}}async function La(t,e={}){return k(t,"GET","/v1/projects",e)}var Ma=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Ua=/^https?/;async function xa(t){if(t.config.emulator)return;let{authorizedDomains:e}=await La(t);for(let n of e)try{if(Fa(n))return}catch{}R(t,"unauthorized-domain")}function Fa(t){let e=dn(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){let o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!Ua.test(n))return!1;if(Ma.test(t))return r===t;let i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}var Va=new Q(3e4,6e4);function Wr(){let t=F().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function Ha(t){return new Promise((e,n)=>{function r(){Wr(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Wr(),n(O(t,"network-request-failed"))},timeout:Va.get()})}if(F().gapi?.iframes?.Iframe)e(gapi.iframes.getContext());else if(F().gapi?.load)r();else{let i=di("iframefcb");return F()[i]=()=>{gapi.load?r():n(O(t,"network-request-failed"))},li(`${xo()}?onload=${i}`).catch(s=>n(s))}}).catch(e=>{throw et=null,e})}var et=null;function Wa(t){return et=et||Ha(t),et}var Ba=new Q(5e3,15e3),$a="__/auth/iframe",za="emulator/auth/iframe",ja={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},qa=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Ga(t){let e=t.config;p(e.authDomain,t,"auth-domain-config-required");let n=e.emulator?Nn(e,za):`https://${t.config.authDomain}/${$a}`,r={apiKey:e.apiKey,appName:t.name,v:fe},i=qa.get(t.config.apiHost);i&&(r.eid=i);let s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${ce(r).slice(1)}`}async function Ka(t){let e=await Wa(t),n=F().gapi;return p(n,t,"internal-error"),e.open({where:document.body,url:Ga(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ja,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});let o=O(t,"network-request-failed"),a=F().setTimeout(()=>{s(o)},Ba.get());function u(){F().clearTimeout(a),i(r)}r.ping(u).then(u,()=>{s(o)})}))}var Ja={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Ya=500,Xa=600,Qa="_blank",Za="http://localhost",yt=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function ec(t,e,n,r=Ya,i=Xa){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),a="",u={...Ja,width:r.toString(),height:i.toString(),top:s,left:o},c=S().toLowerCase();n&&(a=ri(c)?Qa:n),ti(c)&&(e=e||Za,u.scrollbars="yes");let h=Object.entries(u).reduce((d,[f,g])=>`${d}${f}=${g},`,"");if(No(c)&&a!=="_self")return tc(e||"",a),new yt(null);let l=window.open(e||"",a,h);p(l,t,"popup-blocked");try{l.focus()}catch{}return new yt(l)}function tc(t,e){let n=document.createElement("a");n.href=t,n.target=e;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var nc="__/auth/handler",rc="emulator/auth/handler",ic=encodeURIComponent("fac");async function Br(t,e,n,r,i,s){p(t.config.authDomain,t,"auth-domain-config-required"),p(t.config.apiKey,t,"invalid-api-key");let o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:fe,eventId:i};if(e instanceof De){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",dr(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[h,l]of Object.entries(s||{}))o[h]=l}if(e instanceof te){let h=e.getScopes().filter(l=>l!=="");h.length>0&&(o.scopes=h.join(","))}t.tenantId&&(o.tid=t.tenantId);let a=o;for(let h of Object.keys(a))a[h]===void 0&&delete a[h];let u=await t._getAppCheckToken(),c=u?`#${ic}=${encodeURIComponent(u)}`:"";return`${sc(t)}?${ce(a).slice(1)}${c}`}function sc({config:t}){return t.emulator?Nn(t,rc):`https://${t.authDomain}/${nc}`}var ln="webStorageSupport",Sn=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ln,this._completeRedirectFn=Na,this._overrideRedirectResult=Ca}async _openPopup(e,n,r,i){B(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");let s=await Br(e,n,r,dn(),i);return ec(e,s,Mn())}async _openRedirect(e,n,r,i){await this._originValidation(e);let s=await Br(e,n,r,dn(),i);return la(s),new Promise(()=>{})}_initialize(e){let n=e._key();if(this.eventManagers[n]){let{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(B(s,"If manager is not set, promise should be"),s)}let r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){let n=await Ka(e),r=new An(e);return n.register("authEvent",i=>(p(i?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(ln,{type:ln},i=>{let s=i?.[0]?.[ln];s!==void 0&&n(!!s),R(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=xa(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return ci()||ni()||Dn()}},Ai=Sn,vt=class{constructor(e){this.factorId=e}_process(e,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(e,n.credential,r);case"signin":return this._finalizeSignIn(e,n.credential);default:return x("unexpected MultiFactorSessionType")}}},kn=class t extends vt{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t(e)}_finalizeEnroll(e,n,r){return ra(e,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,n){return Ea(e,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},wt=class{constructor(){}static assertion(e){return kn._fromCredential(e)}};wt.FACTOR_ID="phone";var Tt=class{static assertionForEnrollment(e,n){return bt._fromSecret(e,n)}static assertionForSignIn(e,n){return bt._fromEnrollmentId(e,n)}static async generateSecret(e){let n=e;p(typeof n.user?.auth<"u","internal-error");let r=await ia(n.user.auth,{idToken:n.credential,totpEnrollmentInfo:{}});return At._fromStartTotpMfaEnrollmentResponse(r,n.user.auth)}};Tt.FACTOR_ID="totp";var bt=class t extends vt{constructor(e,n,r){super("totp"),this.otp=e,this.enrollmentId=n,this.secret=r}static _fromSecret(e,n){return new t(n,void 0,e)}static _fromEnrollmentId(e,n){return new t(n,e)}async _finalizeEnroll(e,n,r){return p(typeof this.secret<"u",e,"argument-error"),sa(e,{idToken:n,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)})}async _finalizeSignIn(e,n){p(this.enrollmentId!==void 0&&this.otp!==void 0,e,"argument-error");let r={verificationCode:this.otp};return ya(e,{mfaPendingCredential:n,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r})}},At=class t{constructor(e,n,r,i,s,o,a){this.sessionInfo=o,this.auth=a,this.secretKey=e,this.hashingAlgorithm=n,this.codeLength=r,this.codeIntervalSeconds=i,this.enrollmentCompletionDeadline=s}static _fromStartTotpMfaEnrollmentResponse(e,n){return new t(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,n)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,n){let r=!1;return(Je(e)||Je(n))&&(r=!0),r&&(Je(e)&&(e=this.auth.currentUser?.email||"unknownuser"),Je(n)&&(n=this.auth.name)),`otpauth://totp/${n}:${e}?secret=${this.secretKey}&issuer=${n}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}};function Je(t){return typeof t>"u"||t?.length===0}var $r="@firebase/auth",zr="1.11.0";var Cn=class{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 n=this.auth.onIdTokenChanged(r=>{e(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){p(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function oc(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function ac(t){he(new M("auth",(e,{options:n})=>{let r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;p(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});let u={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ui(t)},c=new gn(r,i,s,u);return Ho(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),he(new M("auth-internal",e=>{let n=se(e.getProvider("auth").getImmediate());return(r=>new Cn(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),G($r,zr,oc(t)),G($r,zr,"esm2020")}var cc=5*60,uc=Bt("authIdTokenMaxAge")||cc,jr=null,lc=t=>async e=>{let n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>uc)return;let i=n?.token;jr!==i&&(jr=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function xn(t=Ar()){let e=rn(t,"auth");if(e.isInitialized())return e.getImmediate();let n=hi(t,{popupRedirectResolver:Ai,persistence:[wi,Ii,Ln]}),r=Bt("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(r,location.origin);if(location.origin===s.origin){let o=lc(s.toString());gi(n,o,()=>o(n.currentUser)),mi(n,a=>o(a))}}let i=tr("auth");return i&&fi(n,`http://${i}`),n}function dc(){return document.getElementsByTagName("head")?.[0]??document}Mo({loadJS(t){return new Promise((e,n)=>{let r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{let s=O("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",dc().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});ac("Browser");var Ot,I,Pi,hc,oe,Si,Ni,Oi,Di,Wn,Fn,Vn,fc,He={},Li=[],pc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Dt=Array.isArray;function $(t,e){for(var n in e)t[n]=e[n];return t}function Bn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _c(t,e,n){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Ot.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return Rt(t,o,r,i,null)}function Rt(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Pi,__i:-1,__u:0};return i==null&&I.vnode!=null&&I.vnode(s),s}function ge(t){return t.children}function Pt(t,e){this.props=t,this.context=e}function me(t,e){if(e==null)return t.__?me(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?me(t):null}function Mi(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Mi(t)}}function ki(t){(!t.__d&&(t.__d=!0)&&oe.push(t)&&!Nt.__r++||Si!=I.debounceRendering)&&((Si=I.debounceRendering)||Ni)(Nt)}function Nt(){for(var t,e,n,r,i,s,o,a=1;oe.length;)oe.length>a&&oe.sort(Oi),t=oe.shift(),a=oe.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,s=[],o=[],e.__P&&((n=$({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),$n(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,s,i??me(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,Fi(s,n,o),n.__e!=i&&Mi(n)));Nt.__r=0}function Ui(t,e,n,r,i,s,o,a,u,c,h){var l,d,f,g,A,y,_,m=r&&r.__k||Li,C=e.length;for(u=mc(n,e,m,u,C),l=0;l<C;l++)(f=n.__k[l])!=null&&(d=f.__i==-1?He:m[f.__i]||He,f.__i=l,y=$n(t,f,d,i,s,o,a,u,c,h),g=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&zn(d.ref,null,f),h.push(f.ref,f.__c||g,f)),A==null&&g!=null&&(A=g),(_=!!(4&f.__u))||d.__k===f.__k?u=xi(f,u,t,_):typeof f.type=="function"&&y!==void 0?u=y:g&&(u=g.nextSibling),f.__u&=-7);return n.__e=A,u}function mc(t,e,n,r,i){var s,o,a,u,c,h=n.length,l=h,d=0;for(t.__k=new Array(i),s=0;s<i;s++)(o=e[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=s+d,(o=t.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Rt(null,o,null,null,null):Dt(o)?Rt(ge,{children:o},null,null,null):o.constructor==null&&o.__b>0?Rt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,a=null,(c=o.__i=gc(o,n,u,l))!=-1&&(l--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(i>h?d--:i<h&&d++),typeof o.type!="function"&&(o.__u|=4)):c!=u&&(c==u-1?d--:c==u+1?d++:(c>u?d--:d++,o.__u|=4))):t.__k[s]=null;if(l)for(s=0;s<h;s++)(a=n[s])!=null&&!(2&a.__u)&&(a.__e==r&&(r=me(a)),Hi(a,a));return r}function xi(t,e,n,r){var i,s;if(typeof t.type=="function"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=xi(i[s],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=me(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function gc(t,e,n,r){var i,s,o,a=t.key,u=t.type,c=e[n],h=c!=null&&(2&c.__u)==0;if(c===null&&t.key==null||h&&a==c.key&&u==c.type)return n;if(r>(h?1:0)){for(i=n-1,s=n+1;i>=0||s<e.length;)if((c=e[o=i>=0?i--:s++])!=null&&!(2&c.__u)&&a==c.key&&u==c.type)return o}return-1}function Ci(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||pc.test(e)?n:n+"px"}function Ct(t,e,n,r,i){var s,o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ci(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ci(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Di,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=Wn,t.addEventListener(e,s?Vn:Fn,s)):t.removeEventListener(e,s?Vn:Fn,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ri(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Wn++;else if(e.t<n.u)return;return n(I.event?I.event(e):e)}}}function $n(t,e,n,r,i,s,o,a,u,c){var h,l,d,f,g,A,y,_,m,C,D,Be,Ie,Jn,$e,Ee,Mt,L=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=e.__e=n.__e]),(h=I.__b)&&h(e);e:if(typeof L=="function")try{if(_=e.props,m="prototype"in L&&L.prototype.render,C=(h=L.contextType)&&r[h.__c],D=h?C?C.props.value:h.__:r,n.__c?y=(l=e.__c=n.__c).__=l.__E:(m?e.__c=l=new L(_,D):(e.__c=l=new Pt(_,D),l.constructor=L,l.render=Ec),C&&C.sub(l),l.props=_,l.state||(l.state={}),l.context=D,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),m&&l.__s==null&&(l.__s=l.state),m&&L.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$({},l.__s)),$(l.__s,L.getDerivedStateFromProps(_,l.__s))),f=l.props,g=l.state,l.__v=e,d)m&&L.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),m&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(m&&L.getDerivedStateFromProps==null&&_!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,D),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,D)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(ae){ae&&(ae.__=e)}),Be=0;Be<l._sb.length;Be++)l.__h.push(l._sb[Be]);l._sb=[],l.__h.length&&o.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,D),m&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,g,A)})}if(l.context=D,l.props=_,l.__P=t,l.__e=!1,Ie=I.__r,Jn=0,m){for(l.state=l.__s,l.__d=!1,Ie&&Ie(e),h=l.render(l.props,l.state,l.context),$e=0;$e<l._sb.length;$e++)l.__h.push(l._sb[$e]);l._sb=[]}else do l.__d=!1,Ie&&Ie(e),h=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++Jn<25);l.state=l.__s,l.getChildContext!=null&&(r=$($({},r),l.getChildContext())),m&&!d&&l.getSnapshotBeforeUpdate!=null&&(A=l.getSnapshotBeforeUpdate(f,g)),Ee=h,h!=null&&h.type===ge&&h.key==null&&(Ee=Vi(h.props.children)),a=Ui(t,Dt(Ee)?Ee:[Ee],e,n,r,i,s,o,a,u,c),l.base=e.__e,e.__u&=-161,l.__h.length&&o.push(l),y&&(l.__E=l.__=null)}catch(ae){if(e.__v=null,u||s!=null)if(ae.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(Mt=s.length;Mt--;)Bn(s[Mt]);Hn(e)}else e.__e=n.__e,e.__k=n.__k,ae.then||Hn(e);I.__e(ae,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Ic(n.__e,e,n,r,i,s,o,u,c);return(h=I.diffed)&&h(e),128&e.__u?void 0:a}function Hn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Hn)}function Fi(t,e,n){for(var r=0;r<n.length;r++)zn(n[r],n[++r],n[++r]);I.__c&&I.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){I.__e(s,i.__v)}})}function Vi(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Dt(t)?t.map(Vi):$({},t)}function Ic(t,e,n,r,i,s,o,a,u){var c,h,l,d,f,g,A,y=n.props,_=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!m&&(m?f.localName==m:f.nodeType==3)){t=f,s[c]=null;break}}if(t==null){if(m==null)return document.createTextNode(_);t=document.createElementNS(i,m,_.is&&_),a&&(I.__m&&I.__m(e,s),a=!1),s=null}if(m==null)y===_||a&&t.data==_||(t.data=_);else{if(s=s&&Ot.call(t.childNodes),y=n.props||He,!a&&s!=null)for(y={},c=0;c<t.attributes.length;c++)y[(f=t.attributes[c]).name]=f.value;for(c in y)if(f=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")l=f;else if(!(c in _)){if(c=="value"&&"defaultValue"in _||c=="checked"&&"defaultChecked"in _)continue;Ct(t,c,null,f,i)}}for(c in _)f=_[c],c=="children"?d=f:c=="dangerouslySetInnerHTML"?h=f:c=="value"?g=f:c=="checked"?A=f:a&&typeof f!="function"||y[c]===f||Ct(t,c,f,y[c],i);if(h)a||l&&(h.__html==l.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(l&&(t.innerHTML=""),Ui(e.type=="template"?t.content:t,Dt(d)?d:[d],e,n,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&me(n,0),a,u),s!=null)for(c=s.length;c--;)Bn(s[c]);a||(c="value",m=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[c]||m=="progress"&&!g||m=="option"&&g!=y[c])&&Ct(t,c,g,y[c],i),c="checked",A!=null&&A!=t[c]&&Ct(t,c,A,y[c],i))}return t}function zn(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){I.__e(i,n)}}function Hi(t,e,n){var r,i;if(I.unmount&&I.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||zn(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){I.__e(s,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Hi(r[i],e,n||typeof t.type!="function");n||Bn(t.__e),t.__c=t.__=t.__e=void 0}function Ec(t,e,n){return this.constructor(t,n)}function Wi(t,e,n){var r,i,s,o;e==document&&(e=document.documentElement),I.__&&I.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,s=[],o=[],$n(e,t=(!r&&n||e).__k=_c(ge,null,[t]),i||He,He,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Ot.call(e.childNodes):null,s,!r&&n?n:i?i.__e:e.firstChild,r,o),Fi(s,t,o)}Ot=Li.slice,I={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},Pi=0,hc=function(t){return t!=null&&t.constructor==null},Pt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$({},this.state),typeof t=="function"&&(t=t($({},n),this.props)),t&&$(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ki(this))},Pt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ki(this))},Pt.prototype.render=ge,oe=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oi=function(t,e){return t.__v.__b-e.__v.__b},Nt.__r=0,Di=/(PointerCapture)$|Capture$/i,Wn=0,Fn=Ri(!1),Vn=Ri(!0),fc=0;var qn,v,jn,Bi,Gn=0,Yi=[],T=I,$i=T.__b,zi=T.__r,ji=T.diffed,qi=T.__c,Gi=T.unmount,Ki=T.__;function yc(t,e){T.__h&&T.__h(v,t,Gn||e),Gn=0;var n=v.__H||(v.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Xi(t){return Gn=1,vc(Qi,t)}function vc(t,e,n){var r=yc(qn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Qi(void 0,e),function(a){var u=r.__N?r.__N[0]:r.__[0],c=r.t(u,a);u!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=v,!v.__f)){var i=function(a,u,c){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(d){return!!d.__c});if(h.every(function(d){return!d.__N}))return!s||s.call(this,a,u,c);var l=r.__c.props!==a;return h.forEach(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(l=!0)}}),s&&s.call(this,a,u,c)||l};v.__f=!0;var s=v.shouldComponentUpdate,o=v.componentWillUpdate;v.componentWillUpdate=function(a,u,c){if(this.__e){var h=s;s=void 0,i(a,u,c),s=h}o&&o.call(this,a,u,c)},v.shouldComponentUpdate=i}return r.__N||r.__}function wc(){for(var t;t=Yi.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Lt),t.__H.__h.forEach(Kn),t.__H.__h=[]}catch(e){t.__H.__h=[],T.__e(e,t.__v)}}T.__b=function(t){v=null,$i&&$i(t)},T.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ki&&Ki(t,e)},T.__r=function(t){zi&&zi(t),qn=0;var e=(v=t.__c).__H;e&&(jn===v?(e.__h=[],v.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Lt),e.__h.forEach(Kn),e.__h=[],qn=0)),jn=v},T.diffed=function(t){ji&&ji(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Yi.push(e)!==1&&Bi===T.requestAnimationFrame||((Bi=T.requestAnimationFrame)||Tc)(wc)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),jn=v=null},T.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Lt),n.__h=n.__h.filter(function(r){return!r.__||Kn(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],T.__e(r,n.__v)}}),qi&&qi(t,e)},T.unmount=function(t){Gi&&Gi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Lt(r)}catch(i){e=i}}),n.__H=void 0,e&&T.__e(e,n.__v))};var Ji=typeof requestAnimationFrame=="function";function Tc(t){var e,n=function(){clearTimeout(r),Ji&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Ji&&(e=requestAnimationFrame(n))}function Lt(t){var e=v,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),v=e}function Kn(t){var e=v;t.__c=t.__(),v=e}function Qi(t,e){return typeof e=="function"?e(t):e}var bc=0,Tl=Array.isArray;function w(t,e,n,r,i,s){e||(e={});var o,a,u=e;if("ref"in u)for(a in u={},e)a=="ref"?o=e[a]:u[a]=e[a];var c={type:t,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--bc,__i:-1,__u:0,__source:i,__self:s};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)u[a]===void 0&&(u[a]=o[a]);return I.vnode&&I.vnode(c),c}function We(){let[t,e]=Xi(""),n=window.__ROOT_CTX.name;function r(i){e(i)}return w("div",{className:"signin",children:[w("div",{className:"signin__headline",children:[n&&w("h1",{className:"signin__headline__title",children:n}),w("p",{className:"signin__headline__body",children:n?`Sign in to continue to ${n}`:"Sign in to continue"})]}),w(We.Button,{onError:r}),t&&w("p",{className:"signin__error",children:t})]})}We.Button=t=>{async function e(r){try{return await r.json()}catch(i){console.error(i)}return{}}async function n(){let r=new ne;r.addScope("profile"),r.addScope("email");let s=(await Un(window.firebase.auth,r)).user,o=await s.getIdToken(),a=await fetch("/cms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:o})}),u=await e(a);if(a.status===401){let c=s?.email||"(no email)";u.reason?t.onError(`Login failed for: ${c}. Reason: ${u.reason}. If you believe this is a mistake, please contact a developer to help resolve the issue.`):t.onError(`Login failed for: ${c}. If you believe this is a mistake, please contact a developer to help resolve the issue.`);return}if(a.status!==200){console.error("login failed"),console.log(a.status,u),t.onError("An unknown error has occurred.");return}if(!u.success){console.error("login failed"),console.log(a.status,u),u.reason?t.onError(`Login failed. Reason: ${u.reason}`):t.onError("Login failed.");return}Ac()}return w("button",{className:"signin__button",onClick:n,children:[w("div",{className:"signin__button__icon",children:w(We.GLogo,{})}),w("div",{className:"signin__button__label",children:"Sign in with Google"})]})};We.GLogo=()=>w("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:w("g",{children:[w("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),w("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),w("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),w("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),w("path",{fill:"none",d:"M0 0h48v48H0z"})]})});function Ac(){let e=new URLSearchParams(window.location.search).get("continue");(!e||!e.startsWith("/")||e.startsWith("/cms/login"))&&(e="/cms"),window.location.replace(e)}var Zi=sn(window.__ROOT_CTX.firebaseConfig),Sc=xn(Zi);window.firebase={app:Zi,auth:Sc};var es=document.getElementById("root");es.innerHTML="";Wi(w(We,{}),es);})();
16
- /*! Bundled license information:
17
-
18
- @firebase/util/dist/index.esm.js:
19
- (**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- *
23
- * Licensed under the Apache License, Version 2.0 (the "License");
24
- * you may not use this file except in compliance with the License.
25
- * You may obtain a copy of the License at
26
- *
27
- * http://www.apache.org/licenses/LICENSE-2.0
28
- *
29
- * Unless required by applicable law or agreed to in writing, software
30
- * distributed under the License is distributed on an "AS IS" BASIS,
31
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
- * See the License for the specific language governing permissions and
33
- * limitations under the License.
34
- *)
35
-
36
- @firebase/util/dist/index.esm.js:
37
- (**
38
- * @license
39
- * Copyright 2017 Google LLC
40
- *
41
- * Licensed under the Apache License, Version 2.0 (the "License");
42
- * you may not use this file except in compliance with the License.
43
- * You may obtain a copy of the License at
44
- *
45
- * http://www.apache.org/licenses/LICENSE-2.0
46
- *
47
- * Unless required by applicable law or agreed to in writing, software
48
- * distributed under the License is distributed on an "AS IS" BASIS,
49
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50
- * See the License for the specific language governing permissions and
51
- * limitations under the License.
52
- *)
53
-
54
- @firebase/util/dist/index.esm.js:
55
- (**
56
- * @license
57
- * Copyright 2017 Google LLC
58
- *
59
- * Licensed under the Apache License, Version 2.0 (the "License");
60
- * you may not use this file except in compliance with the License.
61
- * You may obtain a copy of the License at
62
- *
63
- * http://www.apache.org/licenses/LICENSE-2.0
64
- *
65
- * Unless required by applicable law or agreed to in writing, software
66
- * distributed under the License is distributed on an "AS IS" BASIS,
67
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68
- * See the License for the specific language governing permissions and
69
- * limitations under the License.
70
- *)
71
-
72
- @firebase/util/dist/index.esm.js:
73
- (**
74
- * @license
75
- * Copyright 2022 Google LLC
76
- *
77
- * Licensed under the Apache License, Version 2.0 (the "License");
78
- * you may not use this file except in compliance with the License.
79
- * You may obtain a copy of the License at
80
- *
81
- * http://www.apache.org/licenses/LICENSE-2.0
82
- *
83
- * Unless required by applicable law or agreed to in writing, software
84
- * distributed under the License is distributed on an "AS IS" BASIS,
85
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
86
- * See the License for the specific language governing permissions and
87
- * limitations under the License.
88
- *)
89
-
90
- @firebase/util/dist/index.esm.js:
91
- (**
92
- * @license
93
- * Copyright 2017 Google LLC
94
- *
95
- * Licensed under the Apache License, Version 2.0 (the "License");
96
- * you may not use this file except in compliance with the License.
97
- * You may obtain a copy of the License at
98
- *
99
- * http://www.apache.org/licenses/LICENSE-2.0
100
- *
101
- * Unless required by applicable law or agreed to in writing, software
102
- * distributed under the License is distributed on an "AS IS" BASIS,
103
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104
- * See the License for the specific language governing permissions and
105
- * limitations under the License.
106
- *)
107
- (**
108
- * @license
109
- * Copyright 2025 Google LLC
110
- *
111
- * Licensed under the Apache License, Version 2.0 (the "License");
112
- * you may not use this file except in compliance with the License.
113
- * You may obtain a copy of the License at
114
- *
115
- * http://www.apache.org/licenses/LICENSE-2.0
116
- *
117
- * Unless required by applicable law or agreed to in writing, software
118
- * distributed under the License is distributed on an "AS IS" BASIS,
119
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120
- * See the License for the specific language governing permissions and
121
- * limitations under the License.
122
- *)
123
- (**
124
- * @license
125
- * Copyright 2021 Google LLC
126
- *
127
- * Licensed under the Apache License, Version 2.0 (the "License");
128
- * you may not use this file except in compliance with the License.
129
- * You may obtain a copy of the License at
130
- *
131
- * http://www.apache.org/licenses/LICENSE-2.0
132
- *
133
- * Unless required by applicable law or agreed to in writing, software
134
- * distributed under the License is distributed on an "AS IS" BASIS,
135
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136
- * See the License for the specific language governing permissions and
137
- * limitations under the License.
138
- *)
139
-
140
- @firebase/util/dist/index.esm.js:
141
- (**
142
- * @license
143
- * Copyright 2017 Google LLC
144
- *
145
- * Licensed under the Apache License, Version 2.0 (the "License");
146
- * you may not use this file except in compliance with the License.
147
- * You may obtain a copy of the License at
148
- *
149
- * http://www.apache.org/licenses/LICENSE-2.0
150
- *
151
- * Unless required by applicable law or agreed to in writing, software
152
- * distributed under the License is distributed on an "AS IS" BASIS,
153
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154
- * See the License for the specific language governing permissions and
155
- * limitations under the License.
156
- *)
157
-
158
- @firebase/util/dist/index.esm.js:
159
- (**
160
- * @license
161
- * Copyright 2017 Google LLC
162
- *
163
- * Licensed under the Apache License, Version 2.0 (the "License");
164
- * you may not use this file except in compliance with the License.
165
- * You may obtain a copy of the License at
166
- *
167
- * http://www.apache.org/licenses/LICENSE-2.0
168
- *
169
- * Unless required by applicable law or agreed to in writing, software
170
- * distributed under the License is distributed on an "AS IS" BASIS,
171
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
172
- * See the License for the specific language governing permissions and
173
- * limitations under the License.
174
- *)
175
-
176
- @firebase/util/dist/index.esm.js:
177
- (**
178
- * @license
179
- * Copyright 2017 Google LLC
180
- *
181
- * Licensed under the Apache License, Version 2.0 (the "License");
182
- * you may not use this file except in compliance with the License.
183
- * You may obtain a copy of the License at
184
- *
185
- * http://www.apache.org/licenses/LICENSE-2.0
186
- *
187
- * Unless required by applicable law or agreed to in writing, software
188
- * distributed under the License is distributed on an "AS IS" BASIS,
189
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
- * See the License for the specific language governing permissions and
191
- * limitations under the License.
192
- *)
193
-
194
- @firebase/util/dist/index.esm.js:
195
- (**
196
- * @license
197
- * Copyright 2017 Google LLC
198
- *
199
- * Licensed under the Apache License, Version 2.0 (the "License");
200
- * you may not use this file except in compliance with the License.
201
- * You may obtain a copy of the License at
202
- *
203
- * http://www.apache.org/licenses/LICENSE-2.0
204
- *
205
- * Unless required by applicable law or agreed to in writing, software
206
- * distributed under the License is distributed on an "AS IS" BASIS,
207
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
208
- * See the License for the specific language governing permissions and
209
- * limitations under the License.
210
- *)
211
-
212
- @firebase/util/dist/index.esm.js:
213
- (**
214
- * @license
215
- * Copyright 2022 Google LLC
216
- *
217
- * Licensed under the Apache License, Version 2.0 (the "License");
218
- * you may not use this file except in compliance with the License.
219
- * You may obtain a copy of the License at
220
- *
221
- * http://www.apache.org/licenses/LICENSE-2.0
222
- *
223
- * Unless required by applicable law or agreed to in writing, software
224
- * distributed under the License is distributed on an "AS IS" BASIS,
225
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
226
- * See the License for the specific language governing permissions and
227
- * limitations under the License.
228
- *)
229
-
230
- @firebase/util/dist/index.esm.js:
231
- (**
232
- * @license
233
- * Copyright 2017 Google LLC
234
- *
235
- * Licensed under the Apache License, Version 2.0 (the "License");
236
- * you may not use this file except in compliance with the License.
237
- * You may obtain a copy of the License at
238
- *
239
- * http://www.apache.org/licenses/LICENSE-2.0
240
- *
241
- * Unless required by applicable law or agreed to in writing, software
242
- * distributed under the License is distributed on an "AS IS" BASIS,
243
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
244
- * See the License for the specific language governing permissions and
245
- * limitations under the License.
246
- *)
247
-
248
- @firebase/util/dist/index.esm.js:
249
- (**
250
- * @license
251
- * Copyright 2017 Google LLC
252
- *
253
- * Licensed under the Apache License, Version 2.0 (the "License");
254
- * you may not use this file except in compliance with the License.
255
- * You may obtain a copy of the License at
256
- *
257
- * http://www.apache.org/licenses/LICENSE-2.0
258
- *
259
- * Unless required by applicable law or agreed to in writing, software
260
- * distributed under the License is distributed on an "AS IS" BASIS,
261
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
262
- * See the License for the specific language governing permissions and
263
- * limitations under the License.
264
- *)
265
-
266
- @firebase/util/dist/index.esm.js:
267
- (**
268
- * @license
269
- * Copyright 2017 Google LLC
270
- *
271
- * Licensed under the Apache License, Version 2.0 (the "License");
272
- * you may not use this file except in compliance with the License.
273
- * You may obtain a copy of the License at
274
- *
275
- * http://www.apache.org/licenses/LICENSE-2.0
276
- *
277
- * Unless required by applicable law or agreed to in writing, software
278
- * distributed under the License is distributed on an "AS IS" BASIS,
279
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
280
- * See the License for the specific language governing permissions and
281
- * limitations under the License.
282
- *)
283
-
284
- @firebase/util/dist/index.esm.js:
285
- (**
286
- * @license
287
- * Copyright 2019 Google LLC
288
- *
289
- * Licensed under the Apache License, Version 2.0 (the "License");
290
- * you may not use this file except in compliance with the License.
291
- * You may obtain a copy of the License at
292
- *
293
- * http://www.apache.org/licenses/LICENSE-2.0
294
- *
295
- * Unless required by applicable law or agreed to in writing, software
296
- * distributed under the License is distributed on an "AS IS" BASIS,
297
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
298
- * See the License for the specific language governing permissions and
299
- * limitations under the License.
300
- *)
301
-
302
- @firebase/util/dist/index.esm.js:
303
- (**
304
- * @license
305
- * Copyright 2020 Google LLC
306
- *
307
- * Licensed under the Apache License, Version 2.0 (the "License");
308
- * you may not use this file except in compliance with the License.
309
- * You may obtain a copy of the License at
310
- *
311
- * http://www.apache.org/licenses/LICENSE-2.0
312
- *
313
- * Unless required by applicable law or agreed to in writing, software
314
- * distributed under the License is distributed on an "AS IS" BASIS,
315
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
316
- * See the License for the specific language governing permissions and
317
- * limitations under the License.
318
- *)
319
-
320
- @firebase/util/dist/index.esm.js:
321
- (**
322
- * @license
323
- * Copyright 2021 Google LLC
324
- *
325
- * Licensed under the Apache License, Version 2.0 (the "License");
326
- * you may not use this file except in compliance with the License.
327
- * You may obtain a copy of the License at
328
- *
329
- * http://www.apache.org/licenses/LICENSE-2.0
330
- *
331
- * Unless required by applicable law or agreed to in writing, software
332
- * distributed under the License is distributed on an "AS IS" BASIS,
333
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
334
- * See the License for the specific language governing permissions and
335
- * limitations under the License.
336
- *)
337
-
338
- @firebase/component/dist/esm/index.esm.js:
339
- (**
340
- * @license
341
- * Copyright 2019 Google LLC
342
- *
343
- * Licensed under the Apache License, Version 2.0 (the "License");
344
- * you may not use this file except in compliance with the License.
345
- * You may obtain a copy of the License at
346
- *
347
- * http://www.apache.org/licenses/LICENSE-2.0
348
- *
349
- * Unless required by applicable law or agreed to in writing, software
350
- * distributed under the License is distributed on an "AS IS" BASIS,
351
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
352
- * See the License for the specific language governing permissions and
353
- * limitations under the License.
354
- *)
355
-
356
- @firebase/logger/dist/esm/index.esm.js:
357
- (**
358
- * @license
359
- * Copyright 2017 Google LLC
360
- *
361
- * Licensed under the Apache License, Version 2.0 (the "License");
362
- * you may not use this file except in compliance with the License.
363
- * You may obtain a copy of the License at
364
- *
365
- * http://www.apache.org/licenses/LICENSE-2.0
366
- *
367
- * Unless required by applicable law or agreed to in writing, software
368
- * distributed under the License is distributed on an "AS IS" BASIS,
369
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
370
- * See the License for the specific language governing permissions and
371
- * limitations under the License.
372
- *)
373
-
374
- @firebase/app/dist/esm/index.esm.js:
375
- (**
376
- * @license
377
- * Copyright 2019 Google LLC
378
- *
379
- * Licensed under the Apache License, Version 2.0 (the "License");
380
- * you may not use this file except in compliance with the License.
381
- * You may obtain a copy of the License at
382
- *
383
- * http://www.apache.org/licenses/LICENSE-2.0
384
- *
385
- * Unless required by applicable law or agreed to in writing, software
386
- * distributed under the License is distributed on an "AS IS" BASIS,
387
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
388
- * See the License for the specific language governing permissions and
389
- * limitations under the License.
390
- *)
391
-
392
- @firebase/app/dist/esm/index.esm.js:
393
- (**
394
- * @license
395
- * Copyright 2019 Google LLC
396
- *
397
- * Licensed under the Apache License, Version 2.0 (the "License");
398
- * you may not use this file except in compliance with the License.
399
- * You may obtain a copy of the License at
400
- *
401
- * http://www.apache.org/licenses/LICENSE-2.0
402
- *
403
- * Unless required by applicable law or agreed to in writing, software
404
- * distributed under the License is distributed on an "AS IS" BASIS,
405
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
406
- * See the License for the specific language governing permissions and
407
- * limitations under the License.
408
- *)
409
- (**
410
- * @license
411
- * Copyright 2023 Google LLC
412
- *
413
- * Licensed under the Apache License, Version 2.0 (the "License");
414
- * you may not use this file except in compliance with the License.
415
- * You may obtain a copy of the License at
416
- *
417
- * http://www.apache.org/licenses/LICENSE-2.0
418
- *
419
- * Unless required by applicable law or agreed to in writing, software
420
- * distributed under the License is distributed on an "AS IS" BASIS,
421
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
422
- * See the License for the specific language governing permissions and
423
- * limitations under the License.
424
- *)
425
-
426
- @firebase/app/dist/esm/index.esm.js:
427
- (**
428
- * @license
429
- * Copyright 2019 Google LLC
430
- *
431
- * Licensed under the Apache License, Version 2.0 (the "License");
432
- * you may not use this file except in compliance with the License.
433
- * You may obtain a copy of the License at
434
- *
435
- * http://www.apache.org/licenses/LICENSE-2.0
436
- *
437
- * Unless required by applicable law or agreed to in writing, software
438
- * distributed under the License is distributed on an "AS IS" BASIS,
439
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
440
- * See the License for the specific language governing permissions and
441
- * limitations under the License.
442
- *)
443
-
444
- @firebase/app/dist/esm/index.esm.js:
445
- (**
446
- * @license
447
- * Copyright 2021 Google LLC
448
- *
449
- * Licensed under the Apache License, Version 2.0 (the "License");
450
- * you may not use this file except in compliance with the License.
451
- * You may obtain a copy of the License at
452
- *
453
- * http://www.apache.org/licenses/LICENSE-2.0
454
- *
455
- * Unless required by applicable law or agreed to in writing, software
456
- * distributed under the License is distributed on an "AS IS" BASIS,
457
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
458
- * See the License for the specific language governing permissions and
459
- * limitations under the License.
460
- *)
461
- (**
462
- * @license
463
- * Copyright 2019 Google LLC
464
- *
465
- * Licensed under the Apache License, Version 2.0 (the "License");
466
- * you may not use this file except in compliance with the License.
467
- * You may obtain a copy of the License at
468
- *
469
- * http://www.apache.org/licenses/LICENSE-2.0
470
- *
471
- * Unless required by applicable law or agreed to in writing, software
472
- * distributed under the License is distributed on an "AS IS" BASIS,
473
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
474
- * See the License for the specific language governing permissions and
475
- * limitations under the License.
476
- *)
477
-
478
- firebase/app/dist/esm/index.esm.js:
479
- (**
480
- * @license
481
- * Copyright 2020 Google LLC
482
- *
483
- * Licensed under the Apache License, Version 2.0 (the "License");
484
- * you may not use this file except in compliance with the License.
485
- * You may obtain a copy of the License at
486
- *
487
- * http://www.apache.org/licenses/LICENSE-2.0
488
- *
489
- * Unless required by applicable law or agreed to in writing, software
490
- * distributed under the License is distributed on an "AS IS" BASIS,
491
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
492
- * See the License for the specific language governing permissions and
493
- * limitations under the License.
494
- *)
495
-
496
- @firebase/auth/dist/esm/index-9ccb475d.js:
497
- (**
498
- * @license
499
- * Copyright 2021 Google LLC
500
- *
501
- * Licensed under the Apache License, Version 2.0 (the "License");
502
- * you may not use this file except in compliance with the License.
503
- * You may obtain a copy of the License at
504
- *
505
- * http://www.apache.org/licenses/LICENSE-2.0
506
- *
507
- * Unless required by applicable law or agreed to in writing, software
508
- * distributed under the License is distributed on an "AS IS" BASIS,
509
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
510
- * See the License for the specific language governing permissions and
511
- * limitations under the License.
512
- *)
513
-
514
- @firebase/auth/dist/esm/index-9ccb475d.js:
515
- (**
516
- * @license
517
- * Copyright 2020 Google LLC
518
- *
519
- * Licensed under the Apache License, Version 2.0 (the "License");
520
- * you may not use this file except in compliance with the License.
521
- * You may obtain a copy of the License at
522
- *
523
- * http://www.apache.org/licenses/LICENSE-2.0
524
- *
525
- * Unless required by applicable law or agreed to in writing, software
526
- * distributed under the License is distributed on an "AS IS" BASIS,
527
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
528
- * See the License for the specific language governing permissions and
529
- * limitations under the License.
530
- *)
531
-
532
- @firebase/auth/dist/esm/index-9ccb475d.js:
533
- (**
534
- * @license
535
- * Copyright 2020 Google LLC
536
- *
537
- * Licensed under the Apache License, Version 2.0 (the "License");
538
- * you may not use this file except in compliance with the License.
539
- * You may obtain a copy of the License at
540
- *
541
- * http://www.apache.org/licenses/LICENSE-2.0
542
- *
543
- * Unless required by applicable law or agreed to in writing, software
544
- * distributed under the License is distributed on an "AS IS" BASIS,
545
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
546
- * See the License for the specific language governing permissions and
547
- * limitations under the License.
548
- *)
549
-
550
- @firebase/auth/dist/esm/index-9ccb475d.js:
551
- (**
552
- * @license
553
- * Copyright 2020 Google LLC
554
- *
555
- * Licensed under the Apache License, Version 2.0 (the "License");
556
- * you may not use this file except in compliance with the License.
557
- * You may obtain a copy of the License at
558
- *
559
- * http://www.apache.org/licenses/LICENSE-2.0
560
- *
561
- * Unless required by applicable law or agreed to in writing, software
562
- * distributed under the License is distributed on an "AS IS" BASIS,
563
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
564
- * See the License for the specific language governing permissions and
565
- * limitations under the License.
566
- *)
567
-
568
- @firebase/auth/dist/esm/index-9ccb475d.js:
569
- (**
570
- * @license
571
- * Copyright 2020 Google LLC
572
- *
573
- * Licensed under the Apache License, Version 2.0 (the "License");
574
- * you may not use this file except in compliance with the License.
575
- * You may obtain a copy of the License at
576
- *
577
- * http://www.apache.org/licenses/LICENSE-2.0
578
- *
579
- * Unless required by applicable law or agreed to in writing, software
580
- * distributed under the License is distributed on an "AS IS" BASIS,
581
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
582
- * See the License for the specific language governing permissions and
583
- * limitations under the License.
584
- *)
585
-
586
- @firebase/auth/dist/esm/index-9ccb475d.js:
587
- (**
588
- * @license
589
- * Copyright 2020 Google LLC
590
- *
591
- * Licensed under the Apache License, Version 2.0 (the "License");
592
- * you may not use this file except in compliance with the License.
593
- * You may obtain a copy of the License at
594
- *
595
- * http://www.apache.org/licenses/LICENSE-2.0
596
- *
597
- * Unless required by applicable law or agreed to in writing, software
598
- * distributed under the License is distributed on an "AS IS" BASIS,
599
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
600
- * See the License for the specific language governing permissions and
601
- * limitations under the License.
602
- *)
603
-
604
- @firebase/auth/dist/esm/index-9ccb475d.js:
605
- (**
606
- * @license
607
- * Copyright 2020 Google LLC
608
- *
609
- * Licensed under the Apache License, Version 2.0 (the "License");
610
- * you may not use this file except in compliance with the License.
611
- * You may obtain a copy of the License at
612
- *
613
- * http://www.apache.org/licenses/LICENSE-2.0
614
- *
615
- * Unless required by applicable law or agreed to in writing, software
616
- * distributed under the License is distributed on an "AS IS" BASIS,
617
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
618
- * See the License for the specific language governing permissions and
619
- * limitations under the License.
620
- *)
621
- (**
622
- * @license
623
- * Copyright 2019 Google LLC
624
- *
625
- * Licensed under the Apache License, Version 2.0 (the "License");
626
- * you may not use this file except in compliance with the License.
627
- * You may obtain a copy of the License at
628
- *
629
- * http://www.apache.org/licenses/LICENSE-2.0
630
- *
631
- * Unless required by applicable law or agreed to in writing, software
632
- * distributed under the License is distributed on an "AS IS" BASIS,
633
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
634
- * See the License for the specific language governing permissions and
635
- * limitations under the License.
636
- *)
637
-
638
- @firebase/auth/dist/esm/index-9ccb475d.js:
639
- (**
640
- * @license
641
- * Copyright 2020 Google LLC
642
- *
643
- * Licensed under the Apache License, Version 2.0 (the "License");
644
- * you may not use this file except in compliance with the License.
645
- * You may obtain a copy of the License at
646
- *
647
- * http://www.apache.org/licenses/LICENSE-2.0
648
- *
649
- * Unless required by applicable law or agreed to in writing, software
650
- * distributed under the License is distributed on an "AS IS" BASIS,
651
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
652
- * See the License for the specific language governing permissions and
653
- * limitations under the License.
654
- *)
655
- (**
656
- * @license
657
- * Copyright 2022 Google LLC
658
- *
659
- * Licensed under the Apache License, Version 2.0 (the "License");
660
- * you may not use this file except in compliance with the License.
661
- * You may obtain a copy of the License at
662
- *
663
- * http://www.apache.org/licenses/LICENSE-2.0
664
- *
665
- * Unless required by applicable law or agreed to in writing, software
666
- * distributed under the License is distributed on an "AS IS" BASIS,
667
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
668
- * See the License for the specific language governing permissions and
669
- * limitations under the License.
670
- *)
671
- (**
672
- * @license
673
- * Copyright 2023 Google LLC
674
- *
675
- * Licensed under the Apache License, Version 2.0 (the "License");
676
- * you may not use this file except in compliance with the License.
677
- * You may obtain a copy of the License at
678
- *
679
- * http://www.apache.org/licenses/LICENSE-2.0
680
- *
681
- * Unless required by applicable law or agreed to in writing, software
682
- * distributed under the License is distributed on an "AS IS" BASIS,
683
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
684
- * See the License for the specific language governing permissions and
685
- * limitations under the License.
686
- *)
687
-
688
- @firebase/auth/dist/esm/index-9ccb475d.js:
689
- (**
690
- * @license
691
- * Copyright 2020 Google LLC
692
- *
693
- * Licensed under the Apache License, Version 2.0 (the "License");
694
- * you may not use this file except in compliance with the License.
695
- * You may obtain a copy of the License at
696
- *
697
- * http://www.apache.org/licenses/LICENSE-2.0
698
- *
699
- * Unless required by applicable law or agreed to in writing, software
700
- * distributed under the License is distributed on an "AS IS" BASIS,
701
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
702
- * See the License for the specific language governing permissions and
703
- * limitations under the License.
704
- *)
705
-
706
- @firebase/auth/dist/esm/index-9ccb475d.js:
707
- (**
708
- * @license
709
- * Copyright 2020 Google LLC
710
- *
711
- * Licensed under the Apache License, Version 2.0 (the "License");
712
- * you may not use this file except in compliance with the License.
713
- * You may obtain a copy of the License at
714
- *
715
- * http://www.apache.org/licenses/LICENSE-2.0
716
- *
717
- * Unless required by applicable law or agreed to in writing, software
718
- * distributed under the License is distributed on an "AS IS" BASIS,
719
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
720
- * See the License for the specific language governing permissions and
721
- * limitations under the License.
722
- *)
723
-
724
- @firebase/auth/dist/esm/index-9ccb475d.js:
725
- (**
726
- * @license
727
- * Copyright 2020 Google LLC
728
- *
729
- * Licensed under the Apache License, Version 2.0 (the "License");
730
- * you may not use this file except in compliance with the License.
731
- * You may obtain a copy of the License at
732
- *
733
- * http://www.apache.org/licenses/LICENSE-2.0
734
- *
735
- * Unless required by applicable law or agreed to in writing, software
736
- * distributed under the License is distributed on an "AS IS" BASIS,
737
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
738
- * See the License for the specific language governing permissions and
739
- * limitations under the License.
740
- *)
741
-
742
- @firebase/auth/dist/esm/index-9ccb475d.js:
743
- (**
744
- * @license
745
- * Copyright 2020 Google LLC
746
- *
747
- * Licensed under the Apache License, Version 2.0 (the "License");
748
- * you may not use this file except in compliance with the License.
749
- * You may obtain a copy of the License at
750
- *
751
- * http://www.apache.org/licenses/LICENSE-2.0
752
- *
753
- * Unless required by applicable law or agreed to in writing, software
754
- * distributed under the License is distributed on an "AS IS" BASIS,
755
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
756
- * See the License for the specific language governing permissions and
757
- * limitations under the License.
758
- *)
759
-
760
- @firebase/auth/dist/esm/index-9ccb475d.js:
761
- (**
762
- * @license
763
- * Copyright 2020 Google LLC
764
- *
765
- * Licensed under the Apache License, Version 2.0 (the "License");
766
- * you may not use this file except in compliance with the License.
767
- * You may obtain a copy of the License at
768
- *
769
- * http://www.apache.org/licenses/LICENSE-2.0
770
- *
771
- * Unless required by applicable law or agreed to in writing, software
772
- * distributed under the License is distributed on an "AS IS" BASIS,
773
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
774
- * See the License for the specific language governing permissions and
775
- * limitations under the License.
776
- *)
777
- (**
778
- * @license
779
- * Copyright 2019 Google LLC
780
- *
781
- * Licensed under the Apache License, Version 2.0 (the "License");
782
- * you may not use this file except in compliance with the License.
783
- * You may obtain a copy of the License at
784
- *
785
- * http://www.apache.org/licenses/LICENSE-2.0
786
- *
787
- * Unless required by applicable law or agreed to in writing, software
788
- * distributed under the License is distributed on an "AS IS" BASIS,
789
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
790
- * See the License for the specific language governing permissions and
791
- * limitations under the License.
792
- *)
793
-
794
- @firebase/auth/dist/esm/index-9ccb475d.js:
795
- (**
796
- * @license
797
- * Copyright 2020 Google LLC
798
- *
799
- * Licensed under the Apache License, Version 2.0 (the "License");
800
- * you may not use this file except in compliance with the License.
801
- * You may obtain a copy of the License at
802
- *
803
- * http://www.apache.org/licenses/LICENSE-2.0
804
- *
805
- * Unless required by applicable law or agreed to in writing, software
806
- * distributed under the License is distributed on an "AS IS" BASIS,
807
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
808
- * See the License for the specific language governing permissions and
809
- * limitations under the License.
810
- *)
811
-
812
- @firebase/auth/dist/esm/index-9ccb475d.js:
813
- (**
814
- * @license
815
- * Copyright 2020 Google LLC
816
- *
817
- * Licensed under the Apache License, Version 2.0 (the "License");
818
- * you may not use this file except in compliance with the License.
819
- * You may obtain a copy of the License at
820
- *
821
- * http://www.apache.org/licenses/LICENSE-2.0
822
- *
823
- * Unless required by applicable law or agreed to in writing, software
824
- * distributed under the License is distributed on an "AS IS" BASIS,
825
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
826
- * See the License for the specific language governing permissions and
827
- * limitations under the License.
828
- *)
829
-
830
- @firebase/auth/dist/esm/index-9ccb475d.js:
831
- (**
832
- * @license
833
- * Copyright 2020 Google LLC
834
- *
835
- * Licensed under the Apache License, Version 2.0 (the "License");
836
- * you may not use this file except in compliance with the License.
837
- * You may obtain a copy of the License at
838
- *
839
- * http://www.apache.org/licenses/LICENSE-2.0
840
- *
841
- * Unless required by applicable law or agreed to in writing, software
842
- * distributed under the License is distributed on an "AS IS" BASIS,
843
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
844
- * See the License for the specific language governing permissions and
845
- * limitations under the License.
846
- *)
847
-
848
- @firebase/auth/dist/esm/index-9ccb475d.js:
849
- (**
850
- * @license
851
- * Copyright 2020 Google LLC
852
- *
853
- * Licensed under the Apache License, Version 2.0 (the "License");
854
- * you may not use this file except in compliance with the License.
855
- * You may obtain a copy of the License at
856
- *
857
- * http://www.apache.org/licenses/LICENSE-2.0
858
- *
859
- * Unless required by applicable law or agreed to in writing, software
860
- * distributed under the License is distributed on an "AS IS" BASIS,
861
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
862
- * See the License for the specific language governing permissions and
863
- * limitations under the License.
864
- *)
865
-
866
- @firebase/auth/dist/esm/index-9ccb475d.js:
867
- (**
868
- * @license
869
- * Copyright 2020 Google LLC
870
- *
871
- * Licensed under the Apache License, Version 2.0 (the "License");
872
- * you may not use this file except in compliance with the License.
873
- * You may obtain a copy of the License at
874
- *
875
- * http://www.apache.org/licenses/LICENSE-2.0
876
- *
877
- * Unless required by applicable law or agreed to in writing, software
878
- * distributed under the License is distributed on an "AS IS" BASIS,
879
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
880
- * See the License for the specific language governing permissions and
881
- * limitations under the License.
882
- *)
883
-
884
- @firebase/auth/dist/esm/index-9ccb475d.js:
885
- (**
886
- * @license
887
- * Copyright 2019 Google LLC
888
- *
889
- * Licensed under the Apache License, Version 2.0 (the "License");
890
- * you may not use this file except in compliance with the License.
891
- * You may obtain a copy of the License at
892
- *
893
- * http://www.apache.org/licenses/LICENSE-2.0
894
- *
895
- * Unless required by applicable law or agreed to in writing, software
896
- * distributed under the License is distributed on an "AS IS" BASIS,
897
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
898
- * See the License for the specific language governing permissions and
899
- * limitations under the License.
900
- *)
901
-
902
- @firebase/auth/dist/esm/index-9ccb475d.js:
903
- (**
904
- * @license
905
- * Copyright 2019 Google LLC
906
- *
907
- * Licensed under the Apache License, Version 2.0 (the "License");
908
- * you may not use this file except in compliance with the License.
909
- * You may obtain a copy of the License at
910
- *
911
- * http://www.apache.org/licenses/LICENSE-2.0
912
- *
913
- * Unless required by applicable law or agreed to in writing, software
914
- * distributed under the License is distributed on an "AS IS" BASIS,
915
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
916
- * See the License for the specific language governing permissions and
917
- * limitations under the License.
918
- *)
919
- (**
920
- * @license
921
- * Copyright 2020 Google LLC
922
- *
923
- * Licensed under the Apache License, Version 2.0 (the "License");
924
- * you may not use this file except in compliance with the License.
925
- * You may obtain a copy of the License at
926
- *
927
- * http://www.apache.org/licenses/LICENSE-2.0
928
- *
929
- * Unless required by applicable law or agreed to in writing, software
930
- * distributed under the License is distributed on an "AS IS" BASIS,
931
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
932
- * See the License for the specific language governing permissions and
933
- * limitations under the License.
934
- *)
935
-
936
- @firebase/auth/dist/esm/index-9ccb475d.js:
937
- (**
938
- * @license
939
- * Copyright 2020 Google LLC
940
- *
941
- * Licensed under the Apache License, Version 2.0 (the "License");
942
- * you may not use this file except in compliance with the License.
943
- * You may obtain a copy of the License at
944
- *
945
- * http://www.apache.org/licenses/LICENSE-2.0
946
- *
947
- * Unless required by applicable law or agreed to in writing, software
948
- * distributed under the License is distributed on an "AS IS" BASIS,
949
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
950
- * See the License for the specific language governing permissions and
951
- * limitations under the License.
952
- *)
953
-
954
- @firebase/auth/dist/esm/index-9ccb475d.js:
955
- (**
956
- * @license
957
- * Copyright 2020 Google LLC
958
- *
959
- * Licensed under the Apache License, Version 2.0 (the "License");
960
- * you may not use this file except in compliance with the License.
961
- * You may obtain a copy of the License at
962
- *
963
- * http://www.apache.org/licenses/LICENSE-2.0
964
- *
965
- * Unless required by applicable law or agreed to in writing, software
966
- * distributed under the License is distributed on an "AS IS" BASIS,
967
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
968
- * See the License for the specific language governing permissions and
969
- * limitations under the License.
970
- *)
971
-
972
- @firebase/auth/dist/esm/index-9ccb475d.js:
973
- (**
974
- * @license
975
- * Copyright 2020 Google LLC
976
- *
977
- * Licensed under the Apache License, Version 2.0 (the "License");
978
- * you may not use this file except in compliance with the License.
979
- * You may obtain a copy of the License at
980
- *
981
- * http://www.apache.org/licenses/LICENSE-2.0
982
- *
983
- * Unless required by applicable law or agreed to in writing, software
984
- * distributed under the License is distributed on an "AS IS" BASIS,
985
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
986
- * See the License for the specific language governing permissions and
987
- * limitations under the License.
988
- *)
989
-
990
- @firebase/auth/dist/esm/index-9ccb475d.js:
991
- (**
992
- * @license
993
- * Copyright 2020 Google LLC
994
- *
995
- * Licensed under the Apache License, Version 2.0 (the "License");
996
- * you may not use this file except in compliance with the License.
997
- * You may obtain a copy of the License at
998
- *
999
- * http://www.apache.org/licenses/LICENSE-2.0
1000
- *
1001
- * Unless required by applicable law or agreed to in writing, software
1002
- * distributed under the License is distributed on an "AS IS" BASIS,
1003
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1004
- * See the License for the specific language governing permissions and
1005
- * limitations under the License.
1006
- *)
1007
-
1008
- @firebase/auth/dist/esm/index-9ccb475d.js:
1009
- (**
1010
- * @license
1011
- * Copyright 2020 Google LLC
1012
- *
1013
- * Licensed under the Apache License, Version 2.0 (the "License");
1014
- * you may not use this file except in compliance with the License.
1015
- * You may obtain a copy of the License at
1016
- *
1017
- * http://www.apache.org/licenses/LICENSE-2.0
1018
- *
1019
- * Unless required by applicable law or agreed to in writing, software
1020
- * distributed under the License is distributed on an "AS IS" BASIS,
1021
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1022
- * See the License for the specific language governing permissions and
1023
- * limitations under the License.
1024
- *)
1025
-
1026
- @firebase/auth/dist/esm/index-9ccb475d.js:
1027
- (**
1028
- * @license
1029
- * Copyright 2020 Google LLC
1030
- *
1031
- * Licensed under the Apache License, Version 2.0 (the "License");
1032
- * you may not use this file except in compliance with the License.
1033
- * You may obtain a copy of the License at
1034
- *
1035
- * http://www.apache.org/licenses/LICENSE-2.0
1036
- *
1037
- * Unless required by applicable law or agreed to in writing, software
1038
- * distributed under the License is distributed on an "AS IS" BASIS,
1039
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1040
- * See the License for the specific language governing permissions and
1041
- * limitations under the License.
1042
- *)
1043
-
1044
- @firebase/auth/dist/esm/index-9ccb475d.js:
1045
- (**
1046
- * @license
1047
- * Copyright 2020 Google LLC
1048
- *
1049
- * Licensed under the Apache License, Version 2.0 (the "License");
1050
- * you may not use this file except in compliance with the License.
1051
- * You may obtain a copy of the License at
1052
- *
1053
- * http://www.apache.org/licenses/LICENSE-2.0
1054
- *
1055
- * Unless required by applicable law or agreed to in writing, software
1056
- * distributed under the License is distributed on an "AS IS" BASIS,
1057
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1058
- * See the License for the specific language governing permissions and
1059
- * limitations under the License.
1060
- *)
1061
-
1062
- @firebase/auth/dist/esm/index-9ccb475d.js:
1063
- (**
1064
- * @license
1065
- * Copyright 2020 Google LLC
1066
- *
1067
- * Licensed under the Apache License, Version 2.0 (the "License");
1068
- * you may not use this file except in compliance with the License.
1069
- * You may obtain a copy of the License at
1070
- *
1071
- * http://www.apache.org/licenses/LICENSE-2.0
1072
- *
1073
- * Unless required by applicable law or agreed to in writing, software
1074
- * distributed under the License is distributed on an "AS IS" BASIS,
1075
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1076
- * See the License for the specific language governing permissions and
1077
- * limitations under the License.
1078
- *)
1079
-
1080
- @firebase/auth/dist/esm/index-9ccb475d.js:
1081
- (**
1082
- * @license
1083
- * Copyright 2020 Google LLC
1084
- *
1085
- * Licensed under the Apache License, Version 2.0 (the "License");
1086
- * you may not use this file except in compliance with the License.
1087
- * You may obtain a copy of the License at
1088
- *
1089
- * http://www.apache.org/licenses/LICENSE-2.0
1090
- *
1091
- * Unless required by applicable law or agreed to in writing, software
1092
- * distributed under the License is distributed on an "AS IS" BASIS,
1093
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1094
- * See the License for the specific language governing permissions and
1095
- * limitations under the License.
1096
- *)
1097
-
1098
- @firebase/auth/dist/esm/index-9ccb475d.js:
1099
- (**
1100
- * @license
1101
- * Copyright 2020 Google LLC
1102
- *
1103
- * Licensed under the Apache License, Version 2.0 (the "License");
1104
- * you may not use this file except in compliance with the License.
1105
- * You may obtain a copy of the License at
1106
- *
1107
- * http://www.apache.org/licenses/LICENSE-2.0
1108
- *
1109
- * Unless required by applicable law or agreed to in writing, software
1110
- * distributed under the License is distributed on an "AS IS" BASIS,
1111
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1112
- * See the License for the specific language governing permissions and
1113
- * limitations under the License.
1114
- *)
1115
-
1116
- @firebase/auth/dist/esm/index-9ccb475d.js:
1117
- (**
1118
- * @license
1119
- * Copyright 2019 Google LLC
1120
- *
1121
- * Licensed under the Apache License, Version 2.0 (the "License");
1122
- * you may not use this file except in compliance with the License.
1123
- * You may obtain a copy of the License at
1124
- *
1125
- * http://www.apache.org/licenses/LICENSE-2.0
1126
- *
1127
- * Unless required by applicable law or agreed to in writing, software
1128
- * distributed under the License is distributed on an "AS IS" BASIS,
1129
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1130
- * See the License for the specific language governing permissions and
1131
- * limitations under the License.
1132
- *)
1133
-
1134
- @firebase/auth/dist/esm/index-9ccb475d.js:
1135
- (**
1136
- * @license
1137
- * Copyright 2020 Google LLC
1138
- *
1139
- * Licensed under the Apache License, Version 2.0 (the "License");
1140
- * you may not use this file except in compliance with the License.
1141
- * You may obtain a copy of the License at
1142
- *
1143
- * http://www.apache.org/licenses/LICENSE-2.0
1144
- *
1145
- * Unless required by applicable law or agreed to in writing, software
1146
- * distributed under the License is distributed on an "AS IS" BASIS,
1147
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1148
- * See the License for the specific language governing permissions and
1149
- * limitations under the License.
1150
- *)
1151
-
1152
- @firebase/auth/dist/esm/index-9ccb475d.js:
1153
- (**
1154
- * @license
1155
- * Copyright 2020 Google LLC
1156
- *
1157
- * Licensed under the Apache License, Version 2.0 (the "License");
1158
- * you may not use this file except in compliance with the License.
1159
- * You may obtain a copy of the License at
1160
- *
1161
- * http://www.apache.org/licenses/LICENSE-2.0
1162
- *
1163
- * Unless required by applicable law or agreed to in writing, software
1164
- * distributed under the License is distributed on an "AS IS" BASIS,
1165
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1166
- * See the License for the specific language governing permissions and
1167
- * limitations under the License.
1168
- *)
1169
-
1170
- @firebase/auth/dist/esm/index-9ccb475d.js:
1171
- (**
1172
- * @license
1173
- * Copyright 2020 Google LLC
1174
- *
1175
- * Licensed under the Apache License, Version 2.0 (the "License");
1176
- * you may not use this file except in compliance with the License.
1177
- * You may obtain a copy of the License at
1178
- *
1179
- * http://www.apache.org/licenses/LICENSE-2.0
1180
- *
1181
- * Unless required by applicable law or agreed to in writing, software
1182
- * distributed under the License is distributed on an "AS IS" BASIS,
1183
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1184
- * See the License for the specific language governing permissions and
1185
- * limitations under the License.
1186
- *)
1187
-
1188
- @firebase/auth/dist/esm/index-9ccb475d.js:
1189
- (**
1190
- * @license
1191
- * Copyright 2020 Google LLC
1192
- *
1193
- * Licensed under the Apache License, Version 2.0 (the "License");
1194
- * you may not use this file except in compliance with the License.
1195
- * You may obtain a copy of the License at
1196
- *
1197
- * http://www.apache.org/licenses/LICENSE-2.0
1198
- *
1199
- * Unless required by applicable law or agreed to in writing, software
1200
- * distributed under the License is distributed on an "AS IS" BASIS,
1201
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1202
- * See the License for the specific language governing permissions and
1203
- * limitations under the License.
1204
- *)
1205
-
1206
- @firebase/auth/dist/esm/index-9ccb475d.js:
1207
- (**
1208
- * @license
1209
- * Copyright 2019 Google LLC
1210
- *
1211
- * Licensed under the Apache License, Version 2.0 (the "License");
1212
- * you may not use this file except in compliance with the License.
1213
- * You may obtain a copy of the License at
1214
- *
1215
- * http://www.apache.org/licenses/LICENSE-2.0
1216
- *
1217
- * Unless required by applicable law or agreed to in writing, software
1218
- * distributed under the License is distributed on an "AS IS" BASIS,
1219
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1220
- * See the License for the specific language governing permissions and
1221
- * limitations under the License.
1222
- *)
1223
- (**
1224
- * @license
1225
- * Copyright 2020 Google LLC
1226
- *
1227
- * Licensed under the Apache License, Version 2.0 (the "License");
1228
- * you may not use this file except in compliance with the License.
1229
- * You may obtain a copy of the License at
1230
- *
1231
- * http://www.apache.org/licenses/LICENSE-2.0
1232
- *
1233
- * Unless required by applicable law or agreed to in writing, software
1234
- * distributed under the License is distributed on an "AS IS" BASIS,
1235
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1236
- * See the License for the specific language governing permissions and
1237
- * limitations under the License.
1238
- *)
1239
- (**
1240
- * @license
1241
- * Copyright 2025 Google LLC
1242
- *
1243
- * Licensed under the Apache License, Version 2.0 (the "License");
1244
- * you may not use this file except in compliance with the License.
1245
- * You may obtain a copy of the License at
1246
- *
1247
- * http://www.apache.org/licenses/LICENSE-2.0
1248
- *
1249
- * Unless required by applicable law or agreed to in writing, software
1250
- * distributed under the License is distributed on an "AS IS" BASIS,
1251
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1252
- * See the License for the specific language governing permissions and
1253
- * limitations under the License.
1254
- *)
1255
-
1256
- @firebase/auth/dist/esm/index-9ccb475d.js:
1257
- (**
1258
- * @license
1259
- * Copyright 2020 Google LLC
1260
- *
1261
- * Licensed under the Apache License, Version 2.0 (the "License");
1262
- * you may not use this file except in compliance with the License.
1263
- * You may obtain a copy of the License at
1264
- *
1265
- * http://www.apache.org/licenses/LICENSE-2.0
1266
- *
1267
- * Unless required by applicable law or agreed to in writing, software
1268
- * distributed under the License is distributed on an "AS IS" BASIS,
1269
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1270
- * See the License for the specific language governing permissions and
1271
- * limitations under the License.
1272
- *)
1273
- (**
1274
- * @license
1275
- * Copyright 2019 Google LLC
1276
- *
1277
- * Licensed under the Apache License, Version 2.0 (the "License");
1278
- * you may not use this file except in compliance with the License.
1279
- * You may obtain a copy of the License at
1280
- *
1281
- * http://www.apache.org/licenses/LICENSE-2.0
1282
- *
1283
- * Unless required by applicable law or agreed to in writing, software
1284
- * distributed under the License is distributed on an "AS IS" BASIS,
1285
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1286
- * See the License for the specific language governing permissions and
1287
- * limitations under the License.
1288
- *)
1289
- (**
1290
- * @license
1291
- * Copyright 2020 Google LLC.
1292
- *
1293
- * Licensed under the Apache License, Version 2.0 (the "License");
1294
- * you may not use this file except in compliance with the License.
1295
- * You may obtain a copy of the License at
1296
- *
1297
- * http://www.apache.org/licenses/LICENSE-2.0
1298
- *
1299
- * Unless required by applicable law or agreed to in writing, software
1300
- * distributed under the License is distributed on an "AS IS" BASIS,
1301
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1302
- * See the License for the specific language governing permissions and
1303
- * limitations under the License.
1304
- *)
1305
-
1306
- @firebase/auth/dist/esm/index-9ccb475d.js:
1307
- (**
1308
- * @license
1309
- * Copyright 2020 Google LLC
1310
- *
1311
- * Licensed under the Apache License, Version 2.0 (the "License");
1312
- * you may not use this file except in compliance with the License.
1313
- * You may obtain a copy of the License at
1314
- *
1315
- * http://www.apache.org/licenses/LICENSE-2.0
1316
- *
1317
- * Unless required by applicable law or agreed to in writing, software
1318
- * distributed under the License is distributed on an "AS IS" BASIS,
1319
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1320
- * See the License for the specific language governing permissions and
1321
- * limitations under the License.
1322
- *)
1323
-
1324
- @firebase/auth/dist/esm/index-9ccb475d.js:
1325
- (**
1326
- * @license
1327
- * Copyright 2020 Google LLC
1328
- *
1329
- * Licensed under the Apache License, Version 2.0 (the "License");
1330
- * you may not use this file except in compliance with the License.
1331
- * You may obtain a copy of the License at
1332
- *
1333
- * http://www.apache.org/licenses/LICENSE-2.0
1334
- *
1335
- * Unless required by applicable law or agreed to in writing, software
1336
- * distributed under the License is distributed on an "AS IS" BASIS,
1337
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1338
- * See the License for the specific language governing permissions and
1339
- * limitations under the License.
1340
- *)
1341
-
1342
- @firebase/auth/dist/esm/index-9ccb475d.js:
1343
- (**
1344
- * @license
1345
- * Copyright 2020 Google LLC
1346
- *
1347
- * Licensed under the Apache License, Version 2.0 (the "License");
1348
- * you may not use this file except in compliance with the License.
1349
- * You may obtain a copy of the License at
1350
- *
1351
- * http://www.apache.org/licenses/LICENSE-2.0
1352
- *
1353
- * Unless required by applicable law or agreed to in writing, software
1354
- * distributed under the License is distributed on an "AS IS" BASIS,
1355
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1356
- * See the License for the specific language governing permissions and
1357
- * limitations under the License.
1358
- *)
1359
- (**
1360
- * @license
1361
- * Copyright 2021 Google LLC
1362
- *
1363
- * Licensed under the Apache License, Version 2.0 (the "License");
1364
- * you may not use this file except in compliance with the License.
1365
- * You may obtain a copy of the License at
1366
- *
1367
- * http://www.apache.org/licenses/LICENSE-2.0
1368
- *
1369
- * Unless required by applicable law or agreed to in writing, software
1370
- * distributed under the License is distributed on an "AS IS" BASIS,
1371
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1372
- * See the License for the specific language governing permissions and
1373
- * limitations under the License.
1374
- *)
1375
- (**
1376
- * @license
1377
- * Copyright 2019 Google LLC
1378
- *
1379
- * Licensed under the Apache License, Version 2.0 (the "License");
1380
- * you may not use this file except in compliance with the License.
1381
- * You may obtain a copy of the License at
1382
- *
1383
- * http://www.apache.org/licenses/LICENSE-2.0
1384
- *
1385
- * Unless required by applicable law or agreed to in writing, software
1386
- * distributed under the License is distributed on an "AS IS" BASIS,
1387
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1388
- * See the License for the specific language governing permissions and
1389
- * limitations under the License.
1390
- *)
1391
-
1392
- @firebase/auth/dist/esm/index-9ccb475d.js:
1393
- (**
1394
- * @license
1395
- * Copyright 2020 Google LLC
1396
- *
1397
- * Licensed under the Apache License, Version 2.0 (the "License");
1398
- * you may not use this file except in compliance with the License.
1399
- * You may obtain a copy of the License at
1400
- *
1401
- * http://www.apache.org/licenses/LICENSE-2.0
1402
- *
1403
- * Unless required by applicable law or agreed to in writing, software
1404
- * distributed under the License is distributed on an "AS IS" BASIS,
1405
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1406
- * See the License for the specific language governing permissions and
1407
- * limitations under the License.
1408
- *)
1409
-
1410
- @firebase/auth/dist/esm/index-9ccb475d.js:
1411
- (**
1412
- * @license
1413
- * Copyright 2020 Google LLC
1414
- *
1415
- * Licensed under the Apache License, Version 2.0 (the "License");
1416
- * you may not use this file except in compliance with the License.
1417
- * You may obtain a copy of the License at
1418
- *
1419
- * http://www.apache.org/licenses/LICENSE-2.0
1420
- *
1421
- * Unless required by applicable law or agreed to in writing, software
1422
- * distributed under the License is distributed on an "AS IS" BASIS,
1423
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1424
- * See the License for the specific language governing permissions and
1425
- * limitations under the License.
1426
- *)
1427
-
1428
- @firebase/auth/dist/esm/index-9ccb475d.js:
1429
- (**
1430
- * @license
1431
- * Copyright 2020 Google LLC
1432
- *
1433
- * Licensed under the Apache License, Version 2.0 (the "License");
1434
- * you may not use this file except in compliance with the License.
1435
- * You may obtain a copy of the License at
1436
- *
1437
- * http://www.apache.org/licenses/LICENSE-2.0
1438
- *
1439
- * Unless required by applicable law or agreed to in writing, software
1440
- * distributed under the License is distributed on an "AS IS" BASIS,
1441
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1442
- * See the License for the specific language governing permissions and
1443
- * limitations under the License.
1444
- *)
1445
- (**
1446
- * @license
1447
- * Copyright 2020 Google LLC.
1448
- *
1449
- * Licensed under the Apache License, Version 2.0 (the "License");
1450
- * you may not use this file except in compliance with the License.
1451
- * You may obtain a copy of the License at
1452
- *
1453
- * http://www.apache.org/licenses/LICENSE-2.0
1454
- *
1455
- * Unless required by applicable law or agreed to in writing, software
1456
- * distributed under the License is distributed on an "AS IS" BASIS,
1457
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1458
- * See the License for the specific language governing permissions and
1459
- * limitations under the License.
1460
- *)
1461
- (**
1462
- * @license
1463
- * Copyright 2021 Google LLC
1464
- *
1465
- * Licensed under the Apache License, Version 2.0 (the "License");
1466
- * you may not use this file except in compliance with the License.
1467
- * You may obtain a copy of the License at
1468
- *
1469
- * http://www.apache.org/licenses/LICENSE-2.0
1470
- *
1471
- * Unless required by applicable law or agreed to in writing, software
1472
- * distributed under the License is distributed on an "AS IS" BASIS,
1473
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1474
- * See the License for the specific language governing permissions and
1475
- * limitations under the License.
1476
- *)
1477
- */
15
+ </defs>`,g.innerText="Preview backend running in this workspace."),g.setAttribute("id",f)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",l):l()}function S(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function ir(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(S())}function sr(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function or(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function ar(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function cr(){let t=S();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function ur(){try{return typeof indexedDB=="object"}catch{return!1}}function lr(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{e(i.error?.message||"")}}catch(n){e(n)}})}var us="FirebaseError",P=class t extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=us,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,V.prototype.create)}},V=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){let r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?ls(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new P(i,a,r)}};function ls(t,e){return t.replace(ds,(n,r)=>{let i=e[r];return i!=null?String(i):`<${r}?>`})}var ds=/\{\$([^}]+)}/g;function dr(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function z(t,e){if(t===e)return!0;let n=Object.keys(t),r=Object.keys(e);for(let i of n){if(!r.includes(i))return!1;let s=t[i],o=e[i];if(Qn(s)&&Qn(o)){if(!z(s,o))return!1}else if(s!==o)return!1}for(let i of r)if(!n.includes(i))return!1;return!0}function Qn(t){return t!==null&&typeof t=="object"}function ce(t){let e=[];for(let[n,r]of Object.entries(t))Array.isArray(r)?r.forEach(i=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return e.length?"&"+e.join("&"):""}function ue(t){let e={};return t.replace(/^\?/,"").split("&").forEach(r=>{if(r){let[i,s]=r.split("=");e[decodeURIComponent(i)]=decodeURIComponent(s)}}),e}function le(t){let e=t.indexOf("?");if(!e)return"";let n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function hr(t,e){let n=new Ft(t,e);return n.subscribe.bind(n)}var Ft=class{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(r=>{this.error(r)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,r){let i;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");hs(e,["next","error","complete"])?i=e:i={next:e,error:n,complete:r},i.next===void 0&&(i.next=Ut),i.error===void 0&&(i.error=Ut),i.complete===void 0&&(i.complete=Ut);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function hs(t,e){if(typeof t!="object"||t===null)return!1;for(let n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function Ut(){}var Rc=14400*1e3;function j(t){return t&&t._delegate?t._delegate:t}var M=class{constructor(e,n,r){this.name=e,this.instanceFactory=n,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}};var Y="[DEFAULT]";var $t=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){let r=new ze;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){let n=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ps(e))try{this.getOrInitializeService({instanceIdentifier:Y})}catch{}for(let[n,r]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(n);try{let s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Y){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(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Y){return this.instances.has(e)}getOptions(e=Y){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:n={}}=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:n});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){let r=this.normalizeInstanceIdentifier(n),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,n){let r=this.onInitCallbacks.get(n);if(r)for(let i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:fs(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Y){return this.component?this.component.multipleInstances?e:Y:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function fs(t){return t===Y?void 0:t}function ps(t){return t.instantiationMode==="EAGER"}var qe=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.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 n=new $t(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}};var _s=[],E;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(E||(E={}));var ms={debug:E.DEBUG,verbose:E.VERBOSE,info:E.INFO,warn:E.WARN,error:E.ERROR,silent:E.SILENT},gs=E.INFO,Is={[E.DEBUG]:"log",[E.VERBOSE]:"log",[E.INFO]:"info",[E.WARN]:"warn",[E.ERROR]:"error"},Es=(t,e,...n)=>{if(e<t.logLevel)return;let r=new Date().toISOString(),i=Is[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},de=class{constructor(e){this.name=e,this._logLevel=gs,this._logHandler=Es,this._userLogHandler=null,_s.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in E))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?ms[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,E.DEBUG,...e),this._logHandler(this,E.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,E.VERBOSE,...e),this._logHandler(this,E.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,E.INFO,...e),this._logHandler(this,E.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,E.WARN,...e),this._logHandler(this,E.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,E.ERROR,...e),this._logHandler(this,E.ERROR,...e)}};var ys=(t,e)=>e.some(n=>t instanceof n),fr,pr;function vs(){return fr||(fr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ws(){return pr||(pr=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var _r=new WeakMap,jt=new WeakMap,mr=new WeakMap,zt=new WeakMap,Gt=new WeakMap;function Ts(t){let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(U(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&_r.set(n,t)}).catch(()=>{}),Gt.set(e,t),e}function bs(t){if(jt.has(t))return;let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});jt.set(t,e)}var qt={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return jt.get(t);if(e==="objectStoreNames")return t.objectStoreNames||mr.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return U(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function gr(t){qt=t(qt)}function As(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){let r=t.call(Ge(this),e,...n);return mr.set(r,e.sort?e.sort():[e]),U(r)}:ws().includes(t)?function(...e){return t.apply(Ge(this),e),U(_r.get(this))}:function(...e){return U(t.apply(Ge(this),e))}}function Ss(t){return typeof t=="function"?As(t):(t instanceof IDBTransaction&&bs(t),ys(t,vs())?new Proxy(t,qt):t)}function U(t){if(t instanceof IDBRequest)return Ts(t);if(zt.has(t))return zt.get(t);let e=Ss(t);return e!==t&&(zt.set(t,e),Gt.set(e,t)),e}var Ge=t=>Gt.get(t);function Er(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(t,e),a=U(o);return r&&o.addEventListener("upgradeneeded",u=>{r(U(o.result),u.oldVersion,u.newVersion,U(o.transaction),u)}),n&&o.addEventListener("blocked",u=>n(u.oldVersion,u.newVersion,u)),a.then(u=>{s&&u.addEventListener("close",()=>s()),i&&u.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}var ks=["get","getKey","getAll","getAllKeys","count"],Cs=["put","add","delete","clear"],Kt=new Map;function Ir(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Kt.get(e))return Kt.get(e);let n=e.replace(/FromIndex$/,""),r=e!==n,i=Cs.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ks.includes(n)))return;let s=async function(o,...a){let u=this.transaction(o,i?"readwrite":"readonly"),c=u.store;return r&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),i&&u.done]))[0]};return Kt.set(e,s),s}gr(t=>({...t,get:(e,n,r)=>Ir(e,n)||t.get(e,n,r),has:(e,n)=>!!Ir(e,n)||t.has(e,n)}));var Yt=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Rs(n)){let r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}};function Rs(t){return t.getComponent()?.type==="VERSION"}var Xt="@firebase/app",yr="0.14.2";var H=new de("@firebase/app"),Ps="@firebase/app-compat",Ns="@firebase/analytics-compat",Os="@firebase/analytics",Ds="@firebase/app-check-compat",Ls="@firebase/app-check",Ms="@firebase/auth",Us="@firebase/auth-compat",xs="@firebase/database",Fs="@firebase/data-connect",Vs="@firebase/database-compat",Hs="@firebase/functions",Ws="@firebase/functions-compat",Bs="@firebase/installations",$s="@firebase/installations-compat",zs="@firebase/messaging",js="@firebase/messaging-compat",qs="@firebase/performance",Gs="@firebase/performance-compat",Ks="@firebase/remote-config",Js="@firebase/remote-config-compat",Ys="@firebase/storage",Xs="@firebase/storage-compat",Qs="@firebase/firestore",Zs="@firebase/ai",eo="@firebase/firestore-compat",to="firebase",no="12.2.0";var Qt="[DEFAULT]",ro={[Xt]:"fire-core",[Ps]:"fire-core-compat",[Os]:"fire-analytics",[Ns]:"fire-analytics-compat",[Ls]:"fire-app-check",[Ds]:"fire-app-check-compat",[Ms]:"fire-auth",[Us]:"fire-auth-compat",[xs]:"fire-rtdb",[Fs]:"fire-data-connect",[Vs]:"fire-rtdb-compat",[Hs]:"fire-fn",[Ws]:"fire-fn-compat",[Bs]:"fire-iid",[$s]:"fire-iid-compat",[zs]:"fire-fcm",[js]:"fire-fcm-compat",[qs]:"fire-perf",[Gs]:"fire-perf-compat",[Ks]:"fire-rc",[Js]:"fire-rc-compat",[Ys]:"fire-gcs",[Xs]:"fire-gcs-compat",[Qs]:"fire-fst",[eo]:"fire-fst-compat",[Zs]:"fire-vertex","fire-js":"fire-js",[to]:"fire-js-all"};var Ke=new Map,io=new Map,Zt=new Map;function vr(t,e){try{t.container.addComponent(e)}catch(n){H.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function he(t){let e=t.name;if(Zt.has(e))return H.debug(`There were multiple attempts to register component ${e}.`),!1;Zt.set(e,t);for(let n of Ke.values())vr(n,t);for(let n of io.values())vr(n,t);return!0}function rn(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function N(t){return t==null?!1:t.settings!==void 0}var so={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},q=new V("app","Firebase",so);var en=class{constructor(e,n,r){this._isDeleted=!1,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new M("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 q.create("app-deleted",{appName:this._name})}};var fe=no;function sn(t,e={}){let n=t;typeof e!="object"&&(e={name:e});let r={name:Qt,automaticDataCollectionEnabled:!0,...e},i=r.name;if(typeof i!="string"||!i)throw q.create("bad-app-name",{appName:String(i)});if(n||(n=Wt()),!n)throw q.create("no-options");let s=Ke.get(i);if(s){if(z(n,s.options)&&z(r,s.config))return s;throw q.create("duplicate-app",{appName:i})}let o=new qe(i);for(let u of Zt.values())o.addComponent(u);let a=new en(n,r,o);return Ke.set(i,a),a}function Ar(t=Qt){let e=Ke.get(t);if(!e&&t===Qt&&Wt())return sn();if(!e)throw q.create("no-app",{appName:t});return e}function G(t,e,n){let r=ro[t]??t;n&&(r+=`-${n}`);let i=r.match(/\s|\//),s=e.match(/\s|\//);if(i||s){let o=[`Unable to register library "${r}" with version "${e}":`];i&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&s&&o.push("and"),s&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),H.warn(o.join(" "));return}he(new M(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}var oo="firebase-heartbeat-database",ao=1,we="firebase-heartbeat-store",Jt=null;function Sr(){return Jt||(Jt=Er(oo,ao,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(we)}catch(n){console.warn(n)}}}}).catch(t=>{throw q.create("idb-open",{originalErrorMessage:t.message})})),Jt}async function co(t){try{let n=(await Sr()).transaction(we),r=await n.objectStore(we).get(kr(t));return await n.done,r}catch(e){if(e instanceof P)H.warn(e.message);else{let n=q.create("idb-get",{originalErrorMessage:e?.message});H.warn(n.message)}}}async function wr(t,e){try{let r=(await Sr()).transaction(we,"readwrite");await r.objectStore(we).put(e,kr(t)),await r.done}catch(n){if(n instanceof P)H.warn(n.message);else{let r=q.create("idb-set",{originalErrorMessage:n?.message});H.warn(r.message)}}}function kr(t){return`${t.name}!${t.options.appId}`}var uo=1024,lo=30,tn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let n=this.container.getProvider("app").getImmediate();this._storage=new nn(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Tr();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>lo){let i=fo(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){H.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=Tr(),{heartbeatsToSend:n,unsentEntries:r}=ho(this._heartbeatsCache.heartbeats),i=Vt(JSON.stringify({version:2,heartbeats:n}));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 H.warn(e),""}}};function Tr(){return new Date().toISOString().substring(0,10)}function ho(t,e=uo){let n=[],r=t.slice();for(let i of t){let s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),br(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),br(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var nn=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return ur()?lr().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let n=await co(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return wr(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return wr(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}};function br(t){return Vt(JSON.stringify({version:2,heartbeats:t})).length}function fo(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}function po(t){he(new M("platform-logger",e=>new Yt(e),"PRIVATE")),he(new M("heartbeat",e=>new tn(e),"PRIVATE")),G(Xt,yr,t),G(Xt,yr,"esm2020"),G("fire-js","")}po("");var _o="firebase",mo="12.2.1";G(_o,mo,"app");function qr(){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."}}var Gr=qr,Kr=new V("auth","Firebase",qr());var tt=new de("@firebase/auth");function go(t,...e){tt.logLevel<=E.WARN&&tt.warn(`Auth (${fe}): ${t}`,...e)}function Ye(t,...e){tt.logLevel<=E.ERROR&&tt.error(`Auth (${fe}): ${t}`,...e)}function R(t,...e){throw Pn(t,...e)}function O(t,...e){return Pn(t,...e)}function Rn(t,e,n){let r={...Gr(),[e]:n};return new V("auth","Firebase",r).create(e,{appName:t.name})}function X(t){return Rn(t,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Io(t,e,n){let r=n;if(!(e instanceof r))throw r.name!==e.constructor.name&&R(t,"argument-error"),Rn(t,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Pn(t,...e){if(typeof t!="string"){let n=e[0],r=[...e.slice(1)];return r[0]&&(r[0].appName=t.name),t._errorFactory.create(n,...r)}return Kr.create(t,...e)}function p(t,e,...n){if(!t)throw Pn(e,...n)}function x(t){let e="INTERNAL ASSERTION FAILED: "+t;throw Ye(e),new Error(e)}function B(t,e){t||x(e)}function dn(){return typeof self<"u"&&self.location?.href||""}function Eo(){return Cr()==="http:"||Cr()==="https:"}function Cr(){return typeof self<"u"&&self.location?.protocol||null}function yo(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Eo()||or()||"connection"in navigator)?navigator.onLine:!0}function vo(){if(typeof navigator>"u")return null;let t=navigator;return t.languages&&t.languages[0]||t.language||null}var Q=class{constructor(e,n){this.shortDelay=e,this.longDelay=n,B(n>e,"Short delay should be less than long delay!"),this.isMobile=ir()||ar()}get(){return yo()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Nn(t,e){B(t.emulator,"Emulator should always be set here");let{url:n}=t.emulator;return e?`${n}${e.startsWith("/")?e.slice(1):e}`:n}var nt=class{static initialize(e,n,r){this.fetchImpl=e,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;x("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;x("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;x("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var wo={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var To=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],bo=new Q(3e4,6e4);function b(t,e){return t.tenantId&&!e.tenantId?{...e,tenantId:t.tenantId}:e}async function k(t,e,n,r,i={}){return Jr(t,i,async()=>{let s={},o={};r&&(e==="GET"?o=r:s={body:JSON.stringify(r)});let a=ce({key:t.config.apiKey,...o}).slice(1),u=await t._getAdditionalHeaders();u["Content-Type"]="application/json",t.languageCode&&(u["X-Firebase-Locale"]=t.languageCode);let c={method:e,headers:u,...s};return sr()||(c.referrerPolicy="no-referrer"),t.emulatorConfig&&ve(t.emulatorConfig.host)&&(c.credentials="include"),nt.fetch()(await Yr(t,t.config.apiHost,n,a),c)})}async function Jr(t,e,n){t._canInitEmulator=!1;let r={...wo,...e};try{let i=new hn(t),s=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();let o=await s.json();if("needConfirmation"in o)throw be(t,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[u,c]=a.split(" : ");if(u==="FEDERATED_USER_ID_ALREADY_LINKED")throw be(t,"credential-already-in-use",o);if(u==="EMAIL_EXISTS")throw be(t,"email-already-in-use",o);if(u==="USER_DISABLED")throw be(t,"user-disabled",o);let h=r[u]||u.toLowerCase().replace(/[_\s]+/g,"-");if(c)throw Rn(t,h,c);R(t,h)}}catch(i){if(i instanceof P)throw i;R(t,"network-request-failed",{message:String(i)})}}async function ie(t,e,n,r,i={}){let s=await k(t,e,n,r,i);return"mfaPendingCredential"in s&&R(t,"multi-factor-auth-required",{_serverResponse:s}),s}async function Yr(t,e,n,r){let i=`${e}${n}?${r}`,s=t,o=s.config.emulator?Nn(t.config,i):`${t.config.apiScheme}://${i}`;return To.includes(n)&&(await s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(o).toString():o}function Ao(t){switch(t){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}var hn=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(O(this.auth,"network-request-failed")),bo.get())})}};function be(t,e,n){let r={appName:t.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=O(t,e,r);return i.customData._tokenResponse=n,i}function Rr(t){return t!==void 0&&t.enterprise!==void 0}var rt=class{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(let n of this.recaptchaEnforcementState)if(n.provider&&n.provider===e)return Ao(n.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}};async function Xr(t,e){return k(t,"GET","/v2/recaptchaConfig",b(t,e))}async function So(t,e){return k(t,"POST","/v1/accounts:delete",e)}async function it(t,e){return k(t,"POST","/v1/accounts:lookup",e)}function Ae(t){if(t)try{let e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function Qr(t,e=!1){let n=j(t),r=await n.getIdToken(e),i=On(r);p(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");let s=typeof i.firebase=="object"?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:Ae(on(i.auth_time)),issuedAtTime:Ae(on(i.iat)),expirationTime:Ae(on(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}}function on(t){return Number(t)*1e3}function On(t){let[e,n,r]=t.split(".");if(e===void 0||n===void 0||r===void 0)return Ye("JWT malformed, contained fewer than 3 sections"),null;try{let i=je(n);return i?JSON.parse(i):(Ye("Failed to decode base64 JWT payload"),null)}catch(i){return Ye("Caught error parsing JWT payload as JSON",i?.toString()),null}}function Pr(t){let e=On(t);return p(e,"internal-error"),p(typeof e.exp<"u","internal-error"),p(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}async function Re(t,e,n=!1){if(n)return e;try{return await e}catch(r){throw r instanceof P&&ko(r)&&t.auth.currentUser===t&&await t.auth.signOut(),r}}function ko({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}var fn=class{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,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){if(e){let n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;let r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let n=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}};var Pe=class{constructor(e,n){this.createdAt=e,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Ae(this.lastLoginAt),this.creationTime=Ae(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};async function st(t){let e=t.auth,n=await t.getIdToken(),r=await Re(t,it(e,{idToken:n}));p(r?.users.length,e,"internal-error");let i=r.users[0];t._notifyReloadListener(i);let s=i.providerUserInfo?.length?ei(i.providerUserInfo):[],o=Co(t.providerData,s),a=t.isAnonymous,u=!(t.email&&i.passwordHash)&&!o?.length,c=a?u:!1,h={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:o,metadata:new Pe(i.createdAt,i.lastLoginAt),isAnonymous:c};Object.assign(t,h)}async function Zr(t){let e=j(t);await st(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function Co(t,e){return[...t.filter(r=>!e.some(i=>i.providerId===r.providerId)),...e]}function ei(t){return t.map(({providerId:e,...n})=>({providerId:e,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}async function Ro(t,e){let n=await Jr(t,{},async()=>{let r=ce({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:s}=t.config,o=await Yr(t,i,"/v1/token",`key=${s}`),a=await t._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let u={method:"POST",headers:a,body:r};return t.emulatorConfig&&ve(t.emulatorConfig.host)&&(u.credentials="include"),nt.fetch()(o,u)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function Po(t,e){return k(t,"POST","/v2/accounts:revokeToken",b(t,e))}var Se=class t{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){p(e.idToken,"internal-error"),p(typeof e.idToken<"u","internal-error"),p(typeof e.refreshToken<"u","internal-error");let n="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Pr(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,n)}updateFromIdToken(e){p(e.length!==0,"internal-error");let n=Pr(e);this.updateTokensAndExpiration(e,null,n)}async getToken(e,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(p(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(e,n){let{accessToken:r,refreshToken:i,expiresIn:s}=await Ro(e,n);this.updateTokensAndExpiration(r,i,Number(s))}updateTokensAndExpiration(e,n,r){this.refreshToken=n||null,this.accessToken=e||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(e,n){let{refreshToken:r,accessToken:i,expirationTime:s}=n,o=new t;return r&&(p(typeof r=="string","internal-error",{appName:e}),o.refreshToken=r),i&&(p(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),s&&(p(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new t,this.toJSON())}_performRefresh(){return x("not implemented")}};function K(t,e){p(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}var J=class t{constructor({uid:e,auth:n,stsTokenManager:r,...i}){this.providerId="firebase",this.proactiveRefresh=new fn(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Pe(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let n=await Re(this,this.stsTokenManager.getToken(this.auth,e));return p(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(e){return Qr(this,e)}reload(){return Zr(this)}_assign(e){this!==e&&(p(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(n=>({...n})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let n=new t({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(e){p(!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,n=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),n&&await st(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(N(this.auth.app))return Promise.reject(X(this.auth));let e=await this.getIdToken();return await Re(this,So(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,isAnonymous: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,n){let r=n.displayName??void 0,i=n.email??void 0,s=n.phoneNumber??void 0,o=n.photoURL??void 0,a=n.tenantId??void 0,u=n._redirectEventId??void 0,c=n.createdAt??void 0,h=n.lastLoginAt??void 0,{uid:l,emailVerified:d,isAnonymous:f,providerData:g,stsTokenManager:A}=n;p(l&&A,e,"internal-error");let y=Se.fromJSON(this.name,A);p(typeof l=="string",e,"internal-error"),K(r,e.name),K(i,e.name),p(typeof d=="boolean",e,"internal-error"),p(typeof f=="boolean",e,"internal-error"),K(s,e.name),K(o,e.name),K(a,e.name),K(u,e.name),K(c,e.name),K(h,e.name);let _=new t({uid:l,auth:e,email:i,emailVerified:d,displayName:r,isAnonymous:f,photoURL:o,phoneNumber:s,tenantId:a,stsTokenManager:y,createdAt:c,lastLoginAt:h});return g&&Array.isArray(g)&&(_.providerData=g.map(m=>({...m}))),u&&(_._redirectEventId=u),_}static async _fromIdTokenResponse(e,n,r=!1){let i=new Se;i.updateFromServerResponse(n);let s=new t({uid:n.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await st(s),s}static async _fromGetAccountInfoResponse(e,n,r){let i=n.users[0];p(i.localId!==void 0,"internal-error");let s=i.providerUserInfo!==void 0?ei(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!s?.length,a=new Se;a.updateFromIdToken(r);let u=new t({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:o}),c={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:s,metadata:new Pe(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!s?.length};return Object.assign(u,c),u}};var Nr=new Map;function W(t){B(t instanceof Function,"Expected a class definition");let e=Nr.get(t);return e?(B(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,Nr.set(t,e),e)}var ot=class{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,n){this.storage[e]=n}async _get(e){let n=this.storage[e];return n===void 0?null:n}async _remove(e){delete this.storage[e]}_addListener(e,n){}_removeListener(e,n){}};ot.type="NONE";var pn=ot;function Xe(t,e,n){return`firebase:${t}:${e}:${n}`}var at=class t{constructor(e,n,r){this.persistence=e,this.auth=n,this.userKey=r;let{config:i,name:s}=this.auth;this.fullUserKey=Xe(this.userKey,i.apiKey,s),this.fullPersistenceKey=Xe("persistence",i.apiKey,s),this.boundEventHandler=n._onStorageEvent.bind(n),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(typeof e=="string"){let n=await it(this.auth,{idToken:e}).catch(()=>{});return n?J._fromGetAccountInfoResponse(this.auth,n,e):null}return J._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 n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,n,r="authUser"){if(!n.length)return new t(W(pn),e,r);let i=(await Promise.all(n.map(async c=>{if(await c._isAvailable())return c}))).filter(c=>c),s=i[0]||W(pn),o=Xe(r,e.config.apiKey,e.name),a=null;for(let c of n)try{let h=await c._get(o);if(h){let l;if(typeof h=="string"){let d=await it(e,{idToken:h}).catch(()=>{});if(!d)break;l=await J._fromGetAccountInfoResponse(e,d,h)}else l=J._fromJSON(e,h);c!==s&&(a=l),s=c;break}}catch{}let u=i.filter(c=>c._shouldAllowMigration);return!s._shouldAllowMigration||!u.length?new t(s,e,r):(s=u[0],a&&await s._set(o,a.toJSON()),await Promise.all(n.map(async c=>{if(c!==s)try{await c._remove(o)}catch{}})),new t(s,e,r))}};function Or(t){let e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(ii(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(ti(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(oi(e))return"Blackberry";if(ai(e))return"Webos";if(ni(e))return"Safari";if((e.includes("chrome/")||ri(e))&&!e.includes("edge/"))return"Chrome";if(si(e))return"Android";{let n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=t.match(n);if(r?.length===2)return r[1]}return"Other"}function ti(t=S()){return/firefox\//i.test(t)}function ni(t=S()){let e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function ri(t=S()){return/crios\//i.test(t)}function ii(t=S()){return/iemobile/i.test(t)}function si(t=S()){return/android/i.test(t)}function oi(t=S()){return/blackberry/i.test(t)}function ai(t=S()){return/webos/i.test(t)}function Dn(t=S()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function No(t=S()){return Dn(t)&&!!window.navigator?.standalone}function Oo(){return cr()&&document.documentMode===10}function ci(t=S()){return Dn(t)||si(t)||ai(t)||oi(t)||/windows phone/i.test(t)||ii(t)}function ui(t,e=[]){let n;switch(t){case"Browser":n=Or(S());break;case"Worker":n=`${Or(S())}-${t}`;break;default:n=t}let r=e.length?e.join(","):"FirebaseCore-web";return`${n}/JsCore/${fe}/${r}`}var _n=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,n){let r=s=>new Promise((o,a)=>{try{let u=e(s);o(u)}catch(u){a(u)}});r.onAbort=n,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 n=[];try{for(let r of this.queue)await r(e),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(let i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}}};async function Do(t,e={}){return k(t,"GET","/v2/passwordPolicy",b(t,e))}var Lo=6,mn=class{constructor(e){let n=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??Lo,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,n),this.validatePasswordCharacterOptions(e,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(e,n){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=e.length>=r),i&&(n.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let r;for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,n,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var gn=class{constructor(e,n,r,i){this.app=e,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ct(this),this.idTokenSubscription=new ct(this),this.beforeStateQueue=new _n(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=Kr,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(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(e,n){return n&&(this._popupRedirectResolver=W(n)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await at.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),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 n=await it(this,{idToken:e}),r=await J._fromGetAccountInfoResponse(this,n,e);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(N(this.app)){let s=this.app.settings.authIdToken;return s?new Promise(o=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(s).then(o,o))}):this.directlySetCurrentUser(null)}let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let s=this.redirectUser?._redirectEventId,o=r?._redirectEventId,a=await this.tryRedirectSignIn(e);(!s||s===o)&&a?.user&&(r=a.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(s){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return p(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 n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(e){try{await st(e)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=vo()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(N(this.app))return Promise.reject(X(this));let n=e?j(e):null;return n&&p(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(e,n=!1){if(!this._deleted)return e&&p(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return N(this.app)?Promise.reject(X(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return N(this.app)?Promise.reject(X(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(W(e))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(e)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=await Do(this),n=new mn(e);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new V("auth","Firebase",e())}onAuthStateChanged(e,n,r){return this.registerStateListener(this.authStateSubscription,e,n,r)}beforeAuthStateChanged(e,n){return this.beforeStateQueue.pushCallback(e,n)}onIdTokenChanged(e,n,r){return this.registerStateListener(this.idTokenSubscription,e,n,r)}authStateReady(){return new Promise((e,n)=>{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},n)}})}async revokeAccessToken(e){if(this.currentUser){let n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await Po(this,r)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,n){let r=await this.getOrInitRedirectPersistenceManager(n);return e===null?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let n=e&&W(e)||this._popupRedirectResolver;p(n,this,"argument-error"),this.redirectPersistenceManager=await at.create(this,[W(n._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,n,r,i){if(this._deleted)return()=>{};let s=typeof n=="function"?n:n.next.bind(n),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(p(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof n=="function"){let u=e.addObserver(n,r,i);return()=>{o=!0,u()}}else{let u=e.addObserver(n);return()=>{o=!0,u()}}}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 p(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ui(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 n=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(e["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(N(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&go(`Error while retrieving App Check token: ${e.error}`),e?.token}};function se(t){return j(t)}var ct=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=hr(n=>this.observer=n)}get next(){return p(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var St={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Mo(t){St=t}function li(t){return St.loadJS(t)}function Uo(){return St.recaptchaEnterpriseScript}function xo(){return St.gapiScript}function di(t){return`__${t}${Math.floor(Math.random()*1e6)}`}var In=class{constructor(){this.enterprise=new En}ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}},En=class{ready(e){e()}execute(e,n){return Promise.resolve("token")}render(e,n){return""}};var Fo="recaptcha-enterprise",ke="NO_RECAPTCHA",ut=class{constructor(e){this.type=Fo,this.auth=se(e)}async verify(e="verify",n=!1){async function r(s){if(!n){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,a)=>{Xr(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(u=>{if(u.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{let c=new rt(u);return s.tenantId==null?s._agentRecaptchaConfig=c:s._tenantRecaptchaConfigs[s.tenantId]=c,o(c.siteKey)}}).catch(u=>{a(u)})})}function i(s,o,a){let u=window.grecaptcha;Rr(u)?u.enterprise.ready(()=>{u.enterprise.execute(s,{action:e}).then(c=>{o(c)}).catch(()=>{o(ke)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new In().execute("siteKey",{action:"verify"}):new Promise((s,o)=>{r(this.auth).then(a=>{if(!n&&Rr(window.grecaptcha))i(a,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let u=Uo();u.length!==0&&(u+=a),li(u).then(()=>{i(a,s,o)}).catch(c=>{o(c)})}}).catch(a=>{o(a)})})}};async function Te(t,e,n,r=!1,i=!1){let s=new ut(t),o;if(i)o=ke;else try{o=await s.verify(n)}catch{o=await s.verify(n,!0)}let a={...e};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in a){let u=a.phoneEnrollmentInfo.phoneNumber,c=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:u,recaptchaToken:c,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){let u=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:u,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function Ce(t,e,n,r,i){if(i==="EMAIL_PASSWORD_PROVIDER")if(t._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){let s=await Te(t,e,n,n==="getOobCode");return r(t,s)}else return r(t,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let o=await Te(t,e,n,n==="getOobCode");return r(t,o)}else return Promise.reject(s)});else if(i==="PHONE_PROVIDER")if(t._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let s=await Te(t,e,n);return r(t,s).catch(async o=>{if(t._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&(o.code==="auth/missing-recaptcha-token"||o.code==="auth/invalid-app-credential")){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`);let a=await Te(t,e,n,!1,!0);return r(t,a)}return Promise.reject(o)})}else{let s=await Te(t,e,n,!1,!0);return r(t,s)}else return Promise.reject(i+" provider is not supported.")}async function Vo(t){let e=se(t),n=await Xr(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new rt(n);e.tenantId==null?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,r.isAnyProviderEnabled()&&new ut(e).verify()}function hi(t,e){let n=rn(t,"auth");if(n.isInitialized()){let i=n.getImmediate(),s=n.getOptions();if(z(s,e??{}))return i;R(i,"already-initialized")}return n.initialize({options:e})}function Ho(t,e){let n=e?.persistence||[],r=(Array.isArray(n)?n:[n]).map(W);e?.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(r,e?.popupRedirectResolver)}function fi(t,e,n){let r=se(t);p(/^https?:\/\//.test(e),r,"invalid-emulator-scheme");let i=!!n?.disableWarnings,s=pi(e),{host:o,port:a}=Wo(e),u=a===null?"":`:${a}`,c={url:`${s}//${o}${u}/`},h=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){p(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),p(z(c,r.config.emulator)&&z(h,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=c,r.emulatorConfig=h,r.settings.appVerificationDisabledForTesting=!0,ve(o)?(nr(`${s}//${o}${u}`),rr("Auth",!0)):i||Bo()}function pi(t){let e=t.indexOf(":");return e<0?"":t.substr(0,e+1)}function Wo(t){let e=pi(t),n=/(\/\/)?([^?#/]+)/.exec(t.substr(e.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let s=i[1];return{host:s,port:Dr(r.substr(s.length+1))}}else{let[s,o]=r.split(":");return{host:s,port:Dr(o)}}}function Dr(t){if(!t)return null;let e=Number(t);return isNaN(e)?null:e}function Bo(){function t(){let e=document.createElement("p"),n=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",t):t())}var Z=class{constructor(e,n){this.providerId=e,this.signInMethod=n}toJSON(){return x("not implemented")}_getIdTokenResponse(e){return x("not implemented")}_linkToIdToken(e,n){return x("not implemented")}_getReauthenticationResolver(e){return x("not implemented")}};async function $o(t,e){return k(t,"POST","/v1/accounts:signUp",e)}async function zo(t,e){return ie(t,"POST","/v1/accounts:signInWithPassword",b(t,e))}async function jo(t,e){return ie(t,"POST","/v1/accounts:signInWithEmailLink",b(t,e))}async function qo(t,e){return ie(t,"POST","/v1/accounts:signInWithEmailLink",b(t,e))}var Ne=class t extends Z{constructor(e,n,r,i=null){super("password",r),this._email=e,this._password=n,this._tenantId=i}static _fromEmailAndPassword(e,n){return new t(e,n,"password")}static _fromEmailAndCode(e,n,r=null){return new t(e,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let n=typeof e=="string"?JSON.parse(e):e;if(n?.email&&n?.password){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ce(e,n,"signInWithPassword",zo,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return jo(e,{email:this._email,oobCode:this._password});default:R(e,"internal-error")}}async _linkToIdToken(e,n){switch(this.signInMethod){case"password":let r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ce(e,r,"signUpPassword",$o,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return qo(e,{idToken:n,email:this._email,oobCode:this._password});default:R(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}};async function pe(t,e){return ie(t,"POST","/v1/accounts:signInWithIdp",b(t,e))}var Go="http://localhost",ee=class t extends Z{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let n=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):R("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let n=typeof e=="string"?JSON.parse(e):e,{providerId:r,signInMethod:i,...s}=n;if(!r||!i)return null;let o=new t(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){let n=this.buildRequest();return pe(e,n)}_linkToIdToken(e,n){let r=this.buildRequest();return r.idToken=n,pe(e,r)}_getReauthenticationResolver(e){let n=this.buildRequest();return n.autoCreate=!1,pe(e,n)}buildRequest(){let e={requestUri:Go,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),e.postBody=ce(n)}return e}};async function Lr(t,e){return k(t,"POST","/v1/accounts:sendVerificationCode",b(t,e))}async function Ko(t,e){return ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,e))}async function Jo(t,e){let n=await ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,e));if(n.temporaryProof)throw be(t,"account-exists-with-different-credential",n);return n}var Yo={USER_NOT_FOUND:"user-not-found"};async function Xo(t,e){let n={...e,operation:"REAUTH"};return ie(t,"POST","/v1/accounts:signInWithPhoneNumber",b(t,n),Yo)}var Oe=class t extends Z{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,n){return new t({verificationId:e,verificationCode:n})}static _fromTokenResponse(e,n){return new t({phoneNumber:e,temporaryProof:n})}_getIdTokenResponse(e){return Ko(e,this._makeVerificationRequest())}_linkToIdToken(e,n){return Jo(e,{idToken:n,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return Xo(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:n,verificationId:r,verificationCode:i}=this.params;return e&&n?{temporaryProof:e,phoneNumber:n}:{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){typeof e=="string"&&(e=JSON.parse(e));let{verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s}=e;return!r&&!n&&!i&&!s?null:new t({verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:s})}};function Qo(t){switch(t){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}}function Zo(t){let e=ue(le(t)).link,n=e?ue(le(e)).deep_link_id:null,r=ue(le(t)).deep_link_id;return(r?ue(le(r)).link:null)||r||n||e||t}var lt=class t{constructor(e){let n=ue(le(e)),r=n.apiKey??null,i=n.oobCode??null,s=Qo(n.mode??null);p(r&&i&&s,"argument-error"),this.apiKey=r,this.operation=s,this.code=i,this.continueUrl=n.continueUrl??null,this.languageCode=n.lang??null,this.tenantId=n.tenantId??null}static parseLink(e){let n=Zo(e);try{return new t(n)}catch{return null}}};var _e=class t{constructor(){this.providerId=t.PROVIDER_ID}static credential(e,n){return Ne._fromEmailAndPassword(e,n)}static credentialWithLink(e,n){let r=lt.parseLink(n);return p(r,"argument-error"),Ne._fromEmailAndCode(e,r.code,r.tenantId)}};_e.PROVIDER_ID="password";_e.EMAIL_PASSWORD_SIGN_IN_METHOD="password";_e.EMAIL_LINK_SIGN_IN_METHOD="emailLink";var De=class{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}};var te=class extends De{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}};var Le=class t extends te{constructor(){super("facebook.com")}static credential(e){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return t.credential(e.oauthAccessToken)}catch{return null}}};Le.FACEBOOK_SIGN_IN_METHOD="facebook.com";Le.PROVIDER_ID="facebook.com";var ne=class t extends te{constructor(){super("google.com"),this.addScope("profile")}static credential(e,n){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:n,oauthAccessToken:r}=e;if(!n&&!r)return null;try{return t.credential(n,r)}catch{return null}}};ne.GOOGLE_SIGN_IN_METHOD="google.com";ne.PROVIDER_ID="google.com";var Me=class t extends te{constructor(){super("github.com")}static credential(e){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return t.credential(e.oauthAccessToken)}catch{return null}}};Me.GITHUB_SIGN_IN_METHOD="github.com";Me.PROVIDER_ID="github.com";var Ue=class t extends te{constructor(){super("twitter.com")}static credential(e,n){return ee._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})}static credentialFromResult(e){return t.credentialFromTaggedObject(e)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:n,oauthTokenSecret:r}=e;if(!n||!r)return null;try{return t.credential(n,r)}catch{return null}}};Ue.TWITTER_SIGN_IN_METHOD="twitter.com";Ue.PROVIDER_ID="twitter.com";var xe=class t{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,n,r,i=!1){let s=await J._fromIdTokenResponse(e,r,i),o=Mr(r);return new t({user:s,providerId:o,_tokenResponse:r,operationType:n})}static async _forOperation(e,n,r){await e._updateTokensIfNecessary(r,!0);let i=Mr(r);return new t({user:e,providerId:i,_tokenResponse:r,operationType:n})}};function Mr(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}var yn=class t extends P{constructor(e,n,r,i){super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,t.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,n,r,i){return new t(e,n,r,i)}};function _i(t,e,n,r){return(e==="reauthenticate"?n._getReauthenticationResolver(t):n._getIdTokenResponse(t)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?yn._fromErrorAndOperation(t,s,e,r):s})}async function ea(t,e,n=!1){let r=await Re(t,e._linkToIdToken(t.auth,await t.getIdToken()),n);return xe._forOperation(t,"link",r)}async function ta(t,e,n=!1){let{auth:r}=t;if(N(r.app))return Promise.reject(X(r));let i="reauthenticate";try{let s=await Re(t,_i(r,i,e,t),n);p(s.idToken,r,"internal-error");let o=On(s.idToken);p(o,r,"internal-error");let{sub:a}=o;return p(t.uid===a,r,"user-mismatch"),xe._forOperation(t,i,s)}catch(s){throw s?.code==="auth/user-not-found"&&R(r,"user-mismatch"),s}}async function na(t,e,n=!1){if(N(t.app))return Promise.reject(X(t));let r="signIn",i=await _i(t,r,e),s=await xe._fromIdTokenResponse(t,r,i);return n||await t._updateCurrentUser(s.user),s}function mi(t,e,n,r){return j(t).onIdTokenChanged(e,n,r)}function gi(t,e,n){return j(t).beforeAuthStateChanged(e,n)}function Ur(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:start",b(t,e))}function ra(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:finalize",b(t,e))}function ia(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:start",b(t,e))}function sa(t,e){return k(t,"POST","/v2/accounts/mfaEnrollment:finalize",b(t,e))}var dt="__sak";var ht=class{constructor(e,n){this.storageRetriever=e,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(dt,"1"),this.storage.removeItem(dt),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,n){return this.storage.setItem(e,JSON.stringify(n)),Promise.resolve()}_get(e){let n=this.storage.getItem(e);return Promise.resolve(n?JSON.parse(n):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}};var oa=1e3,aa=10,ft=class extends ht{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,n)=>this.onStorageEvent(e,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=ci(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let n of Object.keys(this.listeners)){let r=this.storage.getItem(n),i=this.localCache[n];r!==i&&e(n,i,r)}}onStorageEvent(e,n=!1){if(!e.key){this.forAllChangedKeys((o,a,u)=>{this.notifyListeners(o,u)});return}let r=e.key;n?this.detachListener():this.stopPolling();let i=()=>{let o=this.storage.getItem(r);!n&&this.localCache[r]===o||this.notifyListeners(r,o)},s=this.storage.getItem(r);Oo()&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,aa):i()}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:n,newValue:r}),!0)})},oa)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,n){Object.keys(this.listeners).length===0&&(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(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,n){await super._set(e,n),this.localCache[e]=JSON.stringify(n)}async _get(e){let n=await super._get(e);return this.localCache[e]=JSON.stringify(n),n}async _remove(e){await super._remove(e),delete this.localCache[e]}};ft.type="LOCAL";var Ii=ft;var ca=1e3;function an(t){let e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=RegExp(`${e}=([^;]+)`);return document.cookie.match(n)?.[1]??null}function cn(t){return`${window.location.protocol==="http:"?"__dev_":"__HOST-"}FIREBASE_${t.split(":")[3]}`}var vn=class{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(typeof window===void 0)return e;let n=new URL(`${window.location.origin}/__cookies__`);return n.searchParams.set("finalTarget",e),n}async _isAvailable(){return typeof isSecureContext=="boolean"&&!isSecureContext||typeof navigator>"u"||typeof document>"u"?!1:navigator.cookieEnabled??!0}async _set(e,n){}async _get(e){if(!this._isAvailable())return null;let n=cn(e);return window.cookieStore?(await window.cookieStore.get(n))?.value:an(n)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;let r=cn(e);document.cookie=`${r}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch(()=>{})}_addListener(e,n){if(!this._isAvailable())return;let r=cn(e);if(window.cookieStore){let a=(c=>{let h=c.changed.find(d=>d.name===r);h&&n(h.value),c.deleted.find(d=>d.name===r)&&n(null)}),u=()=>window.cookieStore.removeEventListener("change",a);return this.listenerUnsubscribes.set(n,u),window.cookieStore.addEventListener("change",a)}let i=an(r),s=setInterval(()=>{let a=an(r);a!==i&&(n(a),i=a)},ca),o=()=>clearInterval(s);this.listenerUnsubscribes.set(n,o)}_removeListener(e,n){let r=this.listenerUnsubscribes.get(n);r&&(r(),this.listenerUnsubscribes.delete(n))}};vn.type="COOKIE";var pt=class extends ht{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,n){}_removeListener(e,n){}};pt.type="SESSION";var Ln=pt;function ua(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(n){return{fulfilled:!1,reason:n}}}))}var _t=class t{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let n=this.receivers.find(i=>i.isListeningto(e));if(n)return n;let r=new t(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let n=e,{eventId:r,eventType:i,data:s}=n.data,o=this.handlersMap[i];if(!o?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});let a=Array.from(o).map(async c=>c(n.origin,s)),u=await ua(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:u})}_subscribe(e,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(n)}_unsubscribe(e,n){this.handlersMap[e]&&n&&this.handlersMap[e].delete(n),(!n||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}};_t.receivers=[];function Mn(t="",e=10){let n="";for(let r=0;r<e;r++)n+=Math.floor(Math.random()*10);return t+n}var wn=class{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,n,r=50){let i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((a,u)=>{let c=Mn("",20);i.port1.start();let h=setTimeout(()=>{u(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(l){let d=l;if(d.data.eventId===c)switch(d.data.status){case"ack":clearTimeout(h),s=setTimeout(()=>{u(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(d.data.response);break;default:clearTimeout(h),clearTimeout(s),u(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:c,data:n},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}};function F(){return window}function la(t){F().location.href=t}function Ei(){return typeof F().WorkerGlobalScope<"u"&&typeof F().importScripts=="function"}async function da(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function ha(){return navigator?.serviceWorker?.controller||null}function fa(){return Ei()?self:null}var yi="firebaseLocalStorageDb",pa=1,mt="firebaseLocalStorage",vi="fbase_key",re=class{constructor(e){this.request=e}toPromise(){return new Promise((e,n)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}};function kt(t,e){return t.transaction([mt],e?"readwrite":"readonly").objectStore(mt)}function _a(){let t=indexedDB.deleteDatabase(yi);return new re(t).toPromise()}function Tn(){let t=indexedDB.open(yi,pa);return new Promise((e,n)=>{t.addEventListener("error",()=>{n(t.error)}),t.addEventListener("upgradeneeded",()=>{let r=t.result;try{r.createObjectStore(mt,{keyPath:vi})}catch(i){n(i)}}),t.addEventListener("success",async()=>{let r=t.result;r.objectStoreNames.contains(mt)?e(r):(r.close(),await _a(),e(await Tn()))})})}async function xr(t,e,n){let r=kt(t,!0).put({[vi]:e,value:n});return new re(r).toPromise()}async function ma(t,e){let n=kt(t,!1).get(e),r=await new re(n).toPromise();return r===void 0?null:r.value}function Fr(t,e){let n=kt(t,!0).delete(e);return new re(n).toPromise()}var ga=800,Ia=3,gt=class{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Tn(),this.db)}async _withRetries(e){let n=0;for(;;)try{let r=await this._openDb();return await e(r)}catch(r){if(n++>Ia)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Ei()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=_t._getInstance(fa()),this.receiver._subscribe("keyChanged",async(e,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(e,n)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await da(),!this.activeServiceWorker)return;this.sender=new wn(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||ha()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await Tn();return await xr(e,dt,"1"),await Fr(e,dt),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>xr(r,e,n)),this.localCache[e]=n,this.notifyServiceWorker(e)))}async _get(e){let n=await this._withRetries(r=>ma(r,e));return this.localCache[e]=n,n}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(n=>Fr(n,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(i=>{let s=kt(i,!1).getAll();return new re(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let n=[],r=new Set;if(e.length!==0)for(let{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),n.push(i));for(let i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(e,n){this.localCache[e]=n;let r=this.listeners[e];if(r)for(let i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),ga)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(n)}_removeListener(e,n){this.listeners[e]&&(this.listeners[e].delete(n),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}};gt.type="LOCAL";var wi=gt;function Vr(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:start",b(t,e))}function Ea(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:finalize",b(t,e))}function ya(t,e){return k(t,"POST","/v2/accounts/mfaSignIn:finalize",b(t,e))}var tu=di("rcb"),nu=new Q(3e4,6e4);var Qe="recaptcha";async function va(t,e,n){if(!t._getRecaptchaConfig())try{await Vo(t)}catch{console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let r;if(typeof e=="string"?r={phoneNumber:e}:r=e,"session"in r){let i=r.session;if("phoneNumber"in r){p(i.type==="enroll",t,"internal-error");let s={idToken:i.credential,phoneEnrollmentInfo:{phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"}};return(await Ce(t,s,"mfaSmsEnrollment",async(c,h)=>{if(h.phoneEnrollmentInfo.captchaResponse===ke){p(n?.type===Qe,c,"argument-error");let l=await un(c,h,n);return Ur(c,l)}return Ur(c,h)},"PHONE_PROVIDER").catch(c=>Promise.reject(c))).phoneSessionInfo.sessionInfo}else{p(i.type==="signin",t,"internal-error");let s=r.multiFactorHint?.uid||r.multiFactorUid;p(s,t,"missing-multi-factor-info");let o={mfaPendingCredential:i.credential,mfaEnrollmentId:s,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}};return(await Ce(t,o,"mfaSmsSignIn",async(h,l)=>{if(l.phoneSignInInfo.captchaResponse===ke){p(n?.type===Qe,h,"argument-error");let d=await un(h,l,n);return Vr(h,d)}return Vr(h,l)},"PHONE_PROVIDER").catch(h=>Promise.reject(h))).phoneResponseInfo.sessionInfo}}else{let i={phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"};return(await Ce(t,i,"sendVerificationCode",async(u,c)=>{if(c.captchaResponse===ke){p(n?.type===Qe,u,"argument-error");let h=await un(u,c,n);return Lr(u,h)}return Lr(u,c)},"PHONE_PROVIDER").catch(u=>Promise.reject(u))).sessionInfo}}finally{n?._reset()}}async function un(t,e,n){p(n.type===Qe,t,"argument-error");let r=await n.verify();p(typeof r=="string",t,"argument-error");let i={...e};if("phoneEnrollmentInfo"in i){let s=i.phoneEnrollmentInfo.phoneNumber,o=i.phoneEnrollmentInfo.captchaResponse,a=i.phoneEnrollmentInfo.clientType,u=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:s,recaptchaToken:r,captchaResponse:o,clientType:a,recaptchaVersion:u}}),i}else if("phoneSignInInfo"in i){let s=i.phoneSignInInfo.captchaResponse,o=i.phoneSignInInfo.clientType,a=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:s,clientType:o,recaptchaVersion:a}}),i}else return Object.assign(i,{recaptchaToken:r}),i}var Fe=class t{constructor(e){this.providerId=t.PROVIDER_ID,this.auth=se(e)}verifyPhoneNumber(e,n){return va(this.auth,e,j(n))}static credential(e,n){return Oe._fromVerification(e,n)}static credentialFromResult(e){let n=e;return t.credentialFromTaggedObject(n)}static credentialFromError(e){return t.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:n,temporaryProof:r}=e;return n&&r?Oe._fromTokenResponse(n,r):null}};Fe.PROVIDER_ID="phone";Fe.PHONE_SIGN_IN_METHOD="phone";function Ti(t,e){return e?W(e):(p(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}var Ve=class extends Z{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return pe(e,this._buildIdpRequest())}_linkToIdToken(e,n){return pe(e,this._buildIdpRequest(n))}_getReauthenticationResolver(e){return pe(e,this._buildIdpRequest())}_buildIdpRequest(e){let n={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&&(n.idToken=e),n}};function wa(t){return na(t.auth,new Ve(t),t.bypassAuthState)}function Ta(t){let{auth:e,user:n}=t;return p(n,e,"internal-error"),ta(n,new Ve(t),t.bypassAuthState)}async function ba(t){let{auth:e,user:n}=t;return p(n,e,"internal-error"),ea(n,new Ve(t),t.bypassAuthState)}var It=class{constructor(e,n,r,i,s=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(e,n)=>{this.pendingPromise={resolve:e,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(e){let{urlResponse:n,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=e;if(o){this.reject(o);return}let u={auth:this.auth,requestUri:n,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(u))}catch(c){this.reject(c)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return wa;case"linkViaPopup":case"linkViaRedirect":return ba;case"reauthViaPopup":case"reauthViaRedirect":return Ta;default:R(this.auth,"internal-error")}}resolve(e){B(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){B(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()}};var Aa=new Q(2e3,1e4);async function Un(t,e,n){if(N(t.app))return Promise.reject(O(t,"operation-not-supported-in-this-environment"));let r=se(t);Io(t,e,De);let i=Ti(r,n);return new Et(r,"signInViaPopup",e,i).executeNotNull()}var Et=class t extends It{constructor(e,n,r,i,s){super(e,n,i,s),this.provider=r,this.authWindow=null,this.pollId=null,t.currentPopupAction&&t.currentPopupAction.cancel(),t.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return p(e,this.auth,"internal-error"),e}async onExecution(){B(this.filter.length===1,"Popup operations only handle one event");let e=Mn();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(O(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(O(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,t.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(O(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,Aa.get())};e()}};Et.currentPopupAction=null;var Sa="pendingRedirect",Ze=new Map,bn=class extends It{constructor(e,n,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let e=Ze.get(this.auth._key());if(!e){try{let r=await ka(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(n){e=()=>Promise.reject(n)}Ze.set(this.auth._key(),e)}return this.bypassAuthState||Ze.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let n=await this.auth._redirectUserForId(e.eventId);if(n)return this.user=n,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}};async function ka(t,e){let n=Pa(e),r=Ra(t);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function Ca(t,e){Ze.set(t._key(),e)}function Ra(t){return W(t._redirectPersistence)}function Pa(t){return Xe(Sa,t.config.apiKey,t.name)}async function Na(t,e,n=!1){if(N(t.app))return Promise.reject(X(t));let r=se(t),i=Ti(r,e),o=await new bn(r,i,n).execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}var Oa=600*1e3,An=class{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 n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(n=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!Da(e)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=e,n=!0)),n}sendToConsumer(e,n){if(e.error&&!bi(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";n.onError(O(this.auth,r))}else n.onAuthEvent(e)}isEventForConsumer(e,n){let r=n.eventId===null||!!e.eventId&&e.eventId===n.eventId;return n.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=Oa&&this.cachedEventUids.clear(),this.cachedEventUids.has(Hr(e))}saveEventToCache(e){this.cachedEventUids.add(Hr(e)),this.lastProcessedEventTime=Date.now()}};function Hr(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function bi({type:t,error:e}){return t==="unknown"&&e?.code==="auth/no-auth-event"}function Da(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return bi(t);default:return!1}}async function La(t,e={}){return k(t,"GET","/v1/projects",e)}var Ma=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Ua=/^https?/;async function xa(t){if(t.config.emulator)return;let{authorizedDomains:e}=await La(t);for(let n of e)try{if(Fa(n))return}catch{}R(t,"unauthorized-domain")}function Fa(t){let e=dn(),{protocol:n,hostname:r}=new URL(e);if(t.startsWith("chrome-extension://")){let o=new URL(t);return o.hostname===""&&r===""?n==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):n==="chrome-extension:"&&o.hostname===r}if(!Ua.test(n))return!1;if(Ma.test(t))return r===t;let i=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}var Va=new Q(3e4,6e4);function Wr(){let t=F().___jsl;if(t?.H){for(let e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let n=0;n<t.CP.length;n++)t.CP[n]=null}}function Ha(t){return new Promise((e,n)=>{function r(){Wr(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Wr(),n(O(t,"network-request-failed"))},timeout:Va.get()})}if(F().gapi?.iframes?.Iframe)e(gapi.iframes.getContext());else if(F().gapi?.load)r();else{let i=di("iframefcb");return F()[i]=()=>{gapi.load?r():n(O(t,"network-request-failed"))},li(`${xo()}?onload=${i}`).catch(s=>n(s))}}).catch(e=>{throw et=null,e})}var et=null;function Wa(t){return et=et||Ha(t),et}var Ba=new Q(5e3,15e3),$a="__/auth/iframe",za="emulator/auth/iframe",ja={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},qa=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Ga(t){let e=t.config;p(e.authDomain,t,"auth-domain-config-required");let n=e.emulator?Nn(e,za):`https://${t.config.authDomain}/${$a}`,r={apiKey:e.apiKey,appName:t.name,v:fe},i=qa.get(t.config.apiHost);i&&(r.eid=i);let s=t._getFrameworks();return s.length&&(r.fw=s.join(",")),`${n}?${ce(r).slice(1)}`}async function Ka(t){let e=await Wa(t),n=F().gapi;return p(n,t,"internal-error"),e.open({where:document.body,url:Ga(t),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ja,dontclear:!0},r=>new Promise(async(i,s)=>{await r.restyle({setHideOnLeave:!1});let o=O(t,"network-request-failed"),a=F().setTimeout(()=>{s(o)},Ba.get());function u(){F().clearTimeout(a),i(r)}r.ping(u).then(u,()=>{s(o)})}))}var Ja={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Ya=500,Xa=600,Qa="_blank",Za="http://localhost",yt=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function ec(t,e,n,r=Ya,i=Xa){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),a="",u={...Ja,width:r.toString(),height:i.toString(),top:s,left:o},c=S().toLowerCase();n&&(a=ri(c)?Qa:n),ti(c)&&(e=e||Za,u.scrollbars="yes");let h=Object.entries(u).reduce((d,[f,g])=>`${d}${f}=${g},`,"");if(No(c)&&a!=="_self")return tc(e||"",a),new yt(null);let l=window.open(e||"",a,h);p(l,t,"popup-blocked");try{l.focus()}catch{}return new yt(l)}function tc(t,e){let n=document.createElement("a");n.href=t,n.target=e;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}var nc="__/auth/handler",rc="emulator/auth/handler",ic=encodeURIComponent("fac");async function Br(t,e,n,r,i,s){p(t.config.authDomain,t,"auth-domain-config-required"),p(t.config.apiKey,t,"invalid-api-key");let o={apiKey:t.config.apiKey,appName:t.name,authType:n,redirectUrl:r,v:fe,eventId:i};if(e instanceof De){e.setDefaultLanguage(t.languageCode),o.providerId=e.providerId||"",dr(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[h,l]of Object.entries(s||{}))o[h]=l}if(e instanceof te){let h=e.getScopes().filter(l=>l!=="");h.length>0&&(o.scopes=h.join(","))}t.tenantId&&(o.tid=t.tenantId);let a=o;for(let h of Object.keys(a))a[h]===void 0&&delete a[h];let u=await t._getAppCheckToken(),c=u?`#${ic}=${encodeURIComponent(u)}`:"";return`${sc(t)}?${ce(a).slice(1)}${c}`}function sc({config:t}){return t.emulator?Nn(t,rc):`https://${t.authDomain}/${nc}`}var ln="webStorageSupport",Sn=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Ln,this._completeRedirectFn=Na,this._overrideRedirectResult=Ca}async _openPopup(e,n,r,i){B(this.eventManagers[e._key()]?.manager,"_initialize() not called before _openPopup()");let s=await Br(e,n,r,dn(),i);return ec(e,s,Mn())}async _openRedirect(e,n,r,i){await this._originValidation(e);let s=await Br(e,n,r,dn(),i);return la(s),new Promise(()=>{})}_initialize(e){let n=e._key();if(this.eventManagers[n]){let{manager:i,promise:s}=this.eventManagers[n];return i?Promise.resolve(i):(B(s,"If manager is not set, promise should be"),s)}let r=this.initAndGetManager(e);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(e){let n=await Ka(e),r=new An(e);return n.register("authEvent",i=>(p(i?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=n,r}_isIframeWebStorageSupported(e,n){this.iframes[e._key()].send(ln,{type:ln},i=>{let s=i?.[0]?.[ln];s!==void 0&&n(!!s),R(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let n=e._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=xa(e)),this.originValidationPromises[n]}get _shouldInitProactively(){return ci()||ni()||Dn()}},Ai=Sn,vt=class{constructor(e){this.factorId=e}_process(e,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(e,n.credential,r);case"signin":return this._finalizeSignIn(e,n.credential);default:return x("unexpected MultiFactorSessionType")}}},kn=class t extends vt{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new t(e)}_finalizeEnroll(e,n,r){return ra(e,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,n){return Ea(e,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},wt=class{constructor(){}static assertion(e){return kn._fromCredential(e)}};wt.FACTOR_ID="phone";var Tt=class{static assertionForEnrollment(e,n){return bt._fromSecret(e,n)}static assertionForSignIn(e,n){return bt._fromEnrollmentId(e,n)}static async generateSecret(e){let n=e;p(typeof n.user?.auth<"u","internal-error");let r=await ia(n.user.auth,{idToken:n.credential,totpEnrollmentInfo:{}});return At._fromStartTotpMfaEnrollmentResponse(r,n.user.auth)}};Tt.FACTOR_ID="totp";var bt=class t extends vt{constructor(e,n,r){super("totp"),this.otp=e,this.enrollmentId=n,this.secret=r}static _fromSecret(e,n){return new t(n,void 0,e)}static _fromEnrollmentId(e,n){return new t(n,e)}async _finalizeEnroll(e,n,r){return p(typeof this.secret<"u",e,"argument-error"),sa(e,{idToken:n,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)})}async _finalizeSignIn(e,n){p(this.enrollmentId!==void 0&&this.otp!==void 0,e,"argument-error");let r={verificationCode:this.otp};return ya(e,{mfaPendingCredential:n,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r})}},At=class t{constructor(e,n,r,i,s,o,a){this.sessionInfo=o,this.auth=a,this.secretKey=e,this.hashingAlgorithm=n,this.codeLength=r,this.codeIntervalSeconds=i,this.enrollmentCompletionDeadline=s}static _fromStartTotpMfaEnrollmentResponse(e,n){return new t(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,n)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,n){let r=!1;return(Je(e)||Je(n))&&(r=!0),r&&(Je(e)&&(e=this.auth.currentUser?.email||"unknownuser"),Je(n)&&(n=this.auth.name)),`otpauth://totp/${n}:${e}?secret=${this.secretKey}&issuer=${n}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}};function Je(t){return typeof t>"u"||t?.length===0}var $r="@firebase/auth",zr="1.11.0";var Cn=class{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 n=this.auth.onIdTokenChanged(r=>{e(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,n),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let n=this.internalListeners.get(e);n&&(this.internalListeners.delete(e),n(),this.updateProactiveRefresh())}assertAuthConfigured(){p(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function oc(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function ac(t){he(new M("auth",(e,{options:n})=>{let r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;p(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});let u={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ui(t)},c=new gn(r,i,s,u);return Ho(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,n,r)=>{e.getProvider("auth-internal").initialize()})),he(new M("auth-internal",e=>{let n=se(e.getProvider("auth").getImmediate());return(r=>new Cn(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),G($r,zr,oc(t)),G($r,zr,"esm2020")}var cc=300,uc=Bt("authIdTokenMaxAge")||cc,jr=null,lc=t=>async e=>{let n=e&&await e.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>uc)return;let i=n?.token;jr!==i&&(jr=i,await fetch(t,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function xn(t=Ar()){let e=rn(t,"auth");if(e.isInitialized())return e.getImmediate();let n=hi(t,{popupRedirectResolver:Ai,persistence:[wi,Ii,Ln]}),r=Bt("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(r,location.origin);if(location.origin===s.origin){let o=lc(s.toString());gi(n,o,()=>o(n.currentUser)),mi(n,a=>o(a))}}let i=tr("auth");return i&&fi(n,`http://${i}`),n}function dc(){return document.getElementsByTagName("head")?.[0]??document}Mo({loadJS(t){return new Promise((e,n)=>{let r=document.createElement("script");r.setAttribute("src",t),r.onload=e,r.onerror=i=>{let s=O("internal-error");s.customData=i,n(s)},r.type="text/javascript",r.charset="UTF-8",dc().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});ac("Browser");var Ot,I,Pi,hc,oe,Si,Ni,Oi,Di,Wn,Fn,Vn,fc,He={},Li=[],pc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Dt=Array.isArray;function $(t,e){for(var n in e)t[n]=e[n];return t}function Bn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function _c(t,e,n){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Ot.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return Rt(t,o,r,i,null)}function Rt(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Pi,__i:-1,__u:0};return i==null&&I.vnode!=null&&I.vnode(s),s}function ge(t){return t.children}function Pt(t,e){this.props=t,this.context=e}function me(t,e){if(e==null)return t.__?me(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?me(t):null}function Mi(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Mi(t)}}function ki(t){(!t.__d&&(t.__d=!0)&&oe.push(t)&&!Nt.__r++||Si!=I.debounceRendering)&&((Si=I.debounceRendering)||Ni)(Nt)}function Nt(){for(var t,e,n,r,i,s,o,a=1;oe.length;)oe.length>a&&oe.sort(Oi),t=oe.shift(),a=oe.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,s=[],o=[],e.__P&&((n=$({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),$n(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,s,i??me(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,Fi(s,n,o),n.__e!=i&&Mi(n)));Nt.__r=0}function Ui(t,e,n,r,i,s,o,a,u,c,h){var l,d,f,g,A,y,_,m=r&&r.__k||Li,C=e.length;for(u=mc(n,e,m,u,C),l=0;l<C;l++)(f=n.__k[l])!=null&&(d=f.__i==-1?He:m[f.__i]||He,f.__i=l,y=$n(t,f,d,i,s,o,a,u,c,h),g=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&zn(d.ref,null,f),h.push(f.ref,f.__c||g,f)),A==null&&g!=null&&(A=g),(_=!!(4&f.__u))||d.__k===f.__k?u=xi(f,u,t,_):typeof f.type=="function"&&y!==void 0?u=y:g&&(u=g.nextSibling),f.__u&=-7);return n.__e=A,u}function mc(t,e,n,r,i){var s,o,a,u,c,h=n.length,l=h,d=0;for(t.__k=new Array(i),s=0;s<i;s++)(o=e[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=s+d,(o=t.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Rt(null,o,null,null,null):Dt(o)?Rt(ge,{children:o},null,null,null):o.constructor==null&&o.__b>0?Rt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,a=null,(c=o.__i=gc(o,n,u,l))!=-1&&(l--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(i>h?d--:i<h&&d++),typeof o.type!="function"&&(o.__u|=4)):c!=u&&(c==u-1?d--:c==u+1?d++:(c>u?d--:d++,o.__u|=4))):t.__k[s]=null;if(l)for(s=0;s<h;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=me(a)),Hi(a,a));return r}function xi(t,e,n,r){var i,s;if(typeof t.type=="function"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=xi(i[s],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=me(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function gc(t,e,n,r){var i,s,o,a=t.key,u=t.type,c=e[n],h=c!=null&&(2&c.__u)==0;if(c===null&&t.key==null||h&&a==c.key&&u==c.type)return n;if(r>(h?1:0)){for(i=n-1,s=n+1;i>=0||s<e.length;)if((c=e[o=i>=0?i--:s++])!=null&&(2&c.__u)==0&&a==c.key&&u==c.type)return o}return-1}function Ci(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||pc.test(e)?n:n+"px"}function Ct(t,e,n,r,i){var s,o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ci(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ci(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(Di,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=Wn,t.addEventListener(e,s?Vn:Fn,s)):t.removeEventListener(e,s?Vn:Fn,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Ri(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Wn++;else if(e.t<n.u)return;return n(I.event?I.event(e):e)}}}function $n(t,e,n,r,i,s,o,a,u,c){var h,l,d,f,g,A,y,_,m,C,D,Be,Ie,Jn,$e,Ee,Mt,L=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=e.__e=n.__e]),(h=I.__b)&&h(e);e:if(typeof L=="function")try{if(_=e.props,m="prototype"in L&&L.prototype.render,C=(h=L.contextType)&&r[h.__c],D=h?C?C.props.value:h.__:r,n.__c?y=(l=e.__c=n.__c).__=l.__E:(m?e.__c=l=new L(_,D):(e.__c=l=new Pt(_,D),l.constructor=L,l.render=Ec),C&&C.sub(l),l.props=_,l.state||(l.state={}),l.context=D,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),m&&l.__s==null&&(l.__s=l.state),m&&L.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$({},l.__s)),$(l.__s,L.getDerivedStateFromProps(_,l.__s))),f=l.props,g=l.state,l.__v=e,d)m&&L.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),m&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(m&&L.getDerivedStateFromProps==null&&_!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,D),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,D)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(ae){ae&&(ae.__=e)}),Be=0;Be<l._sb.length;Be++)l.__h.push(l._sb[Be]);l._sb=[],l.__h.length&&o.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,D),m&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,g,A)})}if(l.context=D,l.props=_,l.__P=t,l.__e=!1,Ie=I.__r,Jn=0,m){for(l.state=l.__s,l.__d=!1,Ie&&Ie(e),h=l.render(l.props,l.state,l.context),$e=0;$e<l._sb.length;$e++)l.__h.push(l._sb[$e]);l._sb=[]}else do l.__d=!1,Ie&&Ie(e),h=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++Jn<25);l.state=l.__s,l.getChildContext!=null&&(r=$($({},r),l.getChildContext())),m&&!d&&l.getSnapshotBeforeUpdate!=null&&(A=l.getSnapshotBeforeUpdate(f,g)),Ee=h,h!=null&&h.type===ge&&h.key==null&&(Ee=Vi(h.props.children)),a=Ui(t,Dt(Ee)?Ee:[Ee],e,n,r,i,s,o,a,u,c),l.base=e.__e,e.__u&=-161,l.__h.length&&o.push(l),y&&(l.__E=l.__=null)}catch(ae){if(e.__v=null,u||s!=null)if(ae.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(Mt=s.length;Mt--;)Bn(s[Mt]);Hn(e)}else e.__e=n.__e,e.__k=n.__k,ae.then||Hn(e);I.__e(ae,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Ic(n.__e,e,n,r,i,s,o,u,c);return(h=I.diffed)&&h(e),128&e.__u?void 0:a}function Hn(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Hn)}function Fi(t,e,n){for(var r=0;r<n.length;r++)zn(n[r],n[++r],n[++r]);I.__c&&I.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){I.__e(s,i.__v)}})}function Vi(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Dt(t)?t.map(Vi):$({},t)}function Ic(t,e,n,r,i,s,o,a,u){var c,h,l,d,f,g,A,y=n.props,_=e.props,m=e.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((f=s[c])&&"setAttribute"in f==!!m&&(m?f.localName==m:f.nodeType==3)){t=f,s[c]=null;break}}if(t==null){if(m==null)return document.createTextNode(_);t=document.createElementNS(i,m,_.is&&_),a&&(I.__m&&I.__m(e,s),a=!1),s=null}if(m==null)y===_||a&&t.data==_||(t.data=_);else{if(s=s&&Ot.call(t.childNodes),y=n.props||He,!a&&s!=null)for(y={},c=0;c<t.attributes.length;c++)y[(f=t.attributes[c]).name]=f.value;for(c in y)if(f=y[c],c!="children"){if(c=="dangerouslySetInnerHTML")l=f;else if(!(c in _)){if(c=="value"&&"defaultValue"in _||c=="checked"&&"defaultChecked"in _)continue;Ct(t,c,null,f,i)}}for(c in _)f=_[c],c=="children"?d=f:c=="dangerouslySetInnerHTML"?h=f:c=="value"?g=f:c=="checked"?A=f:a&&typeof f!="function"||y[c]===f||Ct(t,c,f,y[c],i);if(h)a||l&&(h.__html==l.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(l&&(t.innerHTML=""),Ui(e.type=="template"?t.content:t,Dt(d)?d:[d],e,n,r,m=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&me(n,0),a,u),s!=null)for(c=s.length;c--;)Bn(s[c]);a||(c="value",m=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[c]||m=="progress"&&!g||m=="option"&&g!=y[c])&&Ct(t,c,g,y[c],i),c="checked",A!=null&&A!=t[c]&&Ct(t,c,A,y[c],i))}return t}function zn(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){I.__e(i,n)}}function Hi(t,e,n){var r,i;if(I.unmount&&I.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||zn(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){I.__e(s,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Hi(r[i],e,n||typeof t.type!="function");n||Bn(t.__e),t.__c=t.__=t.__e=void 0}function Ec(t,e,n){return this.constructor(t,n)}function Wi(t,e,n){var r,i,s,o;e==document&&(e=document.documentElement),I.__&&I.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,s=[],o=[],$n(e,t=(!r&&n||e).__k=_c(ge,null,[t]),i||He,He,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Ot.call(e.childNodes):null,s,!r&&n?n:i?i.__e:e.firstChild,r,o),Fi(s,t,o)}Ot=Li.slice,I={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},Pi=0,hc=function(t){return t!=null&&t.constructor==null},Pt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$({},this.state),typeof t=="function"&&(t=t($({},n),this.props)),t&&$(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ki(this))},Pt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ki(this))},Pt.prototype.render=ge,oe=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oi=function(t,e){return t.__v.__b-e.__v.__b},Nt.__r=0,Di=/(PointerCapture)$|Capture$/i,Wn=0,Fn=Ri(!1),Vn=Ri(!0),fc=0;var qn,v,jn,Bi,Gn=0,Yi=[],T=I,$i=T.__b,zi=T.__r,ji=T.diffed,qi=T.__c,Gi=T.unmount,Ki=T.__;function yc(t,e){T.__h&&T.__h(v,t,Gn||e),Gn=0;var n=v.__H||(v.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function Xi(t){return Gn=1,vc(Qi,t)}function vc(t,e,n){var r=yc(qn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Qi(void 0,e),function(a){var u=r.__N?r.__N[0]:r.__[0],c=r.t(u,a);u!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=v,!v.__f)){var i=function(a,u,c){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(d){return!!d.__c});if(h.every(function(d){return!d.__N}))return!s||s.call(this,a,u,c);var l=r.__c.props!==a;return h.forEach(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(l=!0)}}),s&&s.call(this,a,u,c)||l};v.__f=!0;var s=v.shouldComponentUpdate,o=v.componentWillUpdate;v.componentWillUpdate=function(a,u,c){if(this.__e){var h=s;s=void 0,i(a,u,c),s=h}o&&o.call(this,a,u,c)},v.shouldComponentUpdate=i}return r.__N||r.__}function wc(){for(var t;t=Yi.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Lt),t.__H.__h.forEach(Kn),t.__H.__h=[]}catch(e){t.__H.__h=[],T.__e(e,t.__v)}}T.__b=function(t){v=null,$i&&$i(t)},T.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Ki&&Ki(t,e)},T.__r=function(t){zi&&zi(t),qn=0;var e=(v=t.__c).__H;e&&(jn===v?(e.__h=[],v.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Lt),e.__h.forEach(Kn),e.__h=[],qn=0)),jn=v},T.diffed=function(t){ji&&ji(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Yi.push(e)!==1&&Bi===T.requestAnimationFrame||((Bi=T.requestAnimationFrame)||Tc)(wc)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),jn=v=null},T.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Lt),n.__h=n.__h.filter(function(r){return!r.__||Kn(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],T.__e(r,n.__v)}}),qi&&qi(t,e)},T.unmount=function(t){Gi&&Gi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Lt(r)}catch(i){e=i}}),n.__H=void 0,e&&T.__e(e,n.__v))};var Ji=typeof requestAnimationFrame=="function";function Tc(t){var e,n=function(){clearTimeout(r),Ji&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);Ji&&(e=requestAnimationFrame(n))}function Lt(t){var e=v,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),v=e}function Kn(t){var e=v;t.__c=t.__(),v=e}function Qi(t,e){return typeof e=="function"?e(t):e}var bc=0,Tl=Array.isArray;function w(t,e,n,r,i,s){e||(e={});var o,a,u=e;if("ref"in u)for(a in u={},e)a=="ref"?o=e[a]:u[a]=e[a];var c={type:t,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--bc,__i:-1,__u:0,__source:i,__self:s};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)u[a]===void 0&&(u[a]=o[a]);return I.vnode&&I.vnode(c),c}function We(){let[t,e]=Xi(""),n=window.__ROOT_CTX.name;function r(i){e(i)}return w("div",{className:"signin",children:[w("div",{className:"signin__headline",children:[n&&w("h1",{className:"signin__headline__title",children:n}),w("p",{className:"signin__headline__body",children:n?`Sign in to continue to ${n}`:"Sign in to continue"})]}),w(We.Button,{onError:r}),t&&w("p",{className:"signin__error",children:t})]})}We.Button=t=>{async function e(r){try{return await r.json()}catch(i){console.error(i)}return{}}async function n(){let r=new ne;r.addScope("profile"),r.addScope("email");let s=(await Un(window.firebase.auth,r)).user,o=await s.getIdToken(),a=await fetch("/cms/login",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:o})}),u=await e(a);if(a.status===401){let c=s?.email||"(no email)";u.reason?t.onError(`Login failed for: ${c}. Reason: ${u.reason}. If you believe this is a mistake, please contact a developer to help resolve the issue.`):t.onError(`Login failed for: ${c}. If you believe this is a mistake, please contact a developer to help resolve the issue.`);return}if(a.status!==200){console.error("login failed"),console.log(a.status,u),t.onError("An unknown error has occurred.");return}if(!u.success){console.error("login failed"),console.log(a.status,u),u.reason?t.onError(`Login failed. Reason: ${u.reason}`):t.onError("Login failed.");return}Ac()}return w("button",{className:"signin__button",onClick:n,children:[w("div",{className:"signin__button__icon",children:w(We.GLogo,{})}),w("div",{className:"signin__button__label",children:"Sign in with Google"})]})};We.GLogo=()=>w("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:w("g",{children:[w("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),w("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),w("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),w("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),w("path",{fill:"none",d:"M0 0h48v48H0z"})]})});function Ac(){let e=new URLSearchParams(window.location.search).get("continue");(!e||!e.startsWith("/")||e.startsWith("/cms/login"))&&(e="/cms"),window.location.replace(e)}var Zi=sn(window.__ROOT_CTX.firebaseConfig),Sc=xn(Zi);window.firebase={app:Zi,auth:Sc};var es=document.getElementById("root");es.innerHTML="";Wi(w(We,{}),es);})();