PageSourceSearch

https://madeintracker.com/_astro/firebase.ky6xm1Ko.js

js madeintracker.com collected 2026-10-08 10:17:11 UTC 165,164 bytes, 12 lines download raw bytes

1const rl={src:"/_astro/close.DFhbLBn2.svg"},uo=()=>{};var ar={};const Yr=function(i){const t=[];let n=0;for(let s=0;s<i.length;s++){let a=i.charCodeAt(s);a<128?t[n++]=a:a<2048?(t[n++]=a>>6|192,t[n++]=a&63|128):(a&64512)===55296&&s+1<i.length&&(i.charCodeAt(s+1)&64512)===56320?(a=65536+((a&1023)<<10)+(i.charCodeAt(++s)&1023),t[n++]=a>>18|240,t[n++]=a>>12&63|128,t[n++]=a>>6&63|128,t[n++]=a&63|128):(t[n++]=a>>12|224,t[n++]=a>>6&63|128,t[n++]=a&63|128)}return t},fo=function(i){const t=[];let n=0,s=0;for(;n<i.length;){const a=i[n++];if(a<128)t[s++]=String.fromCharCode(a);else if(a>191&&a<224){const c=i[n++];t[s++]=String.fromCharCode((a&31)<<6|c&63)}else if(a>239&&a<365){const c=i[n++],l=i[n++],w=i[n++],I=((a&7)<<18|(c&63)<<12|(l&63)<<6|w&63)-65536;t[s++]=String.fromCharCode(55296+(I>>10)),t[s++]=String.fromCharCode(56320+(I&1023))}else{const c=i[n++],l=i[n++];t[s++]=String.fromCharCode((a&15)<<12|(c&63)<<6|l&63)}}return t.join("")},Qr={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(i,t){if(!Array.isArray(i))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let a=0;a<i.length;a+=3){const c=i[a],l=a+1<i.length,w=l?i[a+1]:0,I=a+2<i.length,E=I?i[a+2]:0,A=c>>2,S=(c&3)<<4|w>>4;let b=(w&15)<<2|E>>6,U=E&63;I||(U=64,l||(b=64)),s.push(n[A],n[S],n[b],n[U])}return s.join("")},encodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(i):this.encodeByteArray(Yr(i),t)},decodeString(i,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(i):fo(this.decodeStringToByteArray(i,t))},decodeStringToByteArray(i,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let a=0;a<i.length;){const c=n[i.charAt(a++)],w=a<i.length?n[i.charAt(a)]:0;++a;const E=a<i.length?n[i.charAt(a)]:64;++a;const S=a<i.length?n[i.charAt(a)]:64;if(++a,c==null||w==null||E==null||S==null)throw new po;const b=c<<2|w>>4;if(s.push(b),E!==64){const U=w<<4&240|E>>2;if(s.push(U),S!==64){const O=E<<6&192|S;s.push(O)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let i=0;i<this.ENCODED_VALS.length;i++)this.byteToCharMap_[i]=this.ENCODED_VALS.charAt(i),this.charToByteMap_[this.byteToCharMap_[i]]=i,this.byteToCharMapWebSafe_[i]=this.ENCODED_VALS_WEBSAFE.charAt(i),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]]=i,i>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)]=i,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)]=i)}}};class po extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const go=function(i){const t=Yr(i);return Qr.encodeByteArray(t,!0)},Zr=function(i){return go(i).replace(/\./g,"")},ts=function(i){try{return Qr.decodeString(i,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function mo(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}const _o=()=>mo().__FIREBASE_DEFAULTS__,yo=()=>{if(typeof process>"u"||typeof ar>"u")return;const i=ar.__FIREBASE_DEFAULTS__;if(i)return JSON.parse(i)},wo=()=>{if(typeof document>"u")return;let i;try{i=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=i&&ts(i[1]);return t&&JSON.parse(t)},Zn=()=>{try{return uo()||_o()||yo()||wo()}catch(i){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${i}`);return}},vo=i=>Zn()?.emulatorHosts?.[i],Io=i=>{const t=vo(i);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const s=parseInt(t.substring(n+1),10);return t[0]==="["?[t.substring(1,n-1),s]:[t.substring(0,n),s]},es=()=>Zn()?.config,Eo=i=>Zn()?.[`_${i}`];class To{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,s)=>{n?this.reject(n):this.resolve(s),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,s))}}}function ft(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Ao(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ft())}function So(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function bo(){const i=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof i=="object"&&i.id!==void 0}function Co(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Ro(){try{return typeof indexedDB=="object"}catch{return!1}}function No(){return new Promise((i,t)=>{try{let n=!0;
1const s="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(s);a.onsuccess=()=>{a.result.close(),n||self.indexedDB.deleteDatabase(s),i(!0)},a.onupgradeneeded=()=>{n=!1},a.onerror=()=>{t(a.error?.message||"")}}catch(n){t(n)}})}const ko="FirebaseError";class pt extends Error{constructor(t,n,s){super(n),this.code=t,this.customData=s,this.name=ko,Object.setPrototypeOf(this,pt.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ve.prototype.create)}}class ve{constructor(t,n,s){this.service=t,this.serviceName=n,this.errors=s}create(t,...n){const s=n[0]||{},a=`${this.service}/${t}`,c=this.errors[t],l=c?Po(c,s):"Error",w=`${this.serviceName}: ${l} (${a}).`;return new pt(a,w,s)}}function Po(i,t){return i.replace(Do,(n,s)=>{const a=t[s];return a!=null?String(a):`<${s}?>`})}const Do=/\{\$([^}]+)}/g;function $n(i,t){if(i===t)return!0;const n=Object.keys(i),s=Object.keys(t);for(const a of n){if(!s.includes(a))return!1;const c=i[a],l=t[a];if(hr(c)&&hr(l)){if(!$n(c,l))return!1}else if(c!==l)return!1}for(const a of s)if(!n.includes(a))return!1;return!0}function hr(i){return i!==null&&typeof i=="object"}function ns(i){const t=[];for(const[n,s]of Object.entries(i))Array.isArray(s)?s.forEach(a=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(a))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(s));return t.length?"&"+t.join("&"):""}function Oo(i,t){const n=new Lo(i,t);return n.subscribe.bind(n)}class Lo{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(s=>{this.error(s)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,s){let a;if(t===void 0&&n===void 0&&s===void 0)throw new Error("Missing Observer.");Uo(t,["next","error","complete"])?a=t:a={next:t,error:n,complete:s},a.next===void 0&&(a.next=Dn),a.error===void 0&&(a.error=Dn),a.complete===void 0&&(a.complete=Dn);const c=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?a.error(this.finalError):a.complete()}catch{}}),this.observers.push(a),c}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(s){typeof console<"u"&&console.error&&console.error(s)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Uo(i,t){if(typeof i!="object"||i===null)return!1;for(const n of t)if(n in i&&typeof i[n]=="function")return!0;return!1}function Dn(){}function Pt(i){return i&&i._delegate?i._delegate:i}function nn(i){try{return(i.startsWith("http://")||i.startsWith("https://")?new URL(i).hostname:i).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Mo(i){return(await fetch(i,{credentials:"include"})).ok}class yt{constructor(t,n,s){this.name=t,this.instanceFactory=n,this.type=s,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}const xt="[DEFAULT]";class xo{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const s=new To;if(this.instancesDeferred.set(n,s),this.isInitialized(n)||this.shouldAutoInitialize())try{const a=this.getOrInitializeService({instanceIdentifier:n});a&&s.resolve(a)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t?.identifier),s=t?.o
1ptional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(s)return null;throw a}else{if(s)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(Vo(t))try{this.getOrInitializeService({instanceIdentifier:xt})}catch{}for(const[n,s]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(n);try{const c=this.getOrInitializeService({instanceIdentifier:a});s.resolve(c)}catch{}}}}clearInstance(t=xt){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=xt){return this.instances.has(t)}getOptions(t=xt){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,s=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(s))throw Error(`${this.name}(${s}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const a=this.getOrInitializeService({instanceIdentifier:s,options:n});for(const[c,l]of this.instancesDeferred.entries()){const w=this.normalizeInstanceIdentifier(c);s===w&&l.resolve(a)}return a}onInit(t,n){const s=this.normalizeInstanceIdentifier(n),a=this.onInitCallbacks.get(s)??new Set;a.add(t),this.onInitCallbacks.set(s,a);const c=this.instances.get(s);return c&&t(c,s),()=>{a.delete(t)}}invokeOnInitCallbacks(t,n){const s=this.onInitCallbacks.get(n);if(s)for(const a of s)try{a(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let s=this.instances.get(t);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:Fo(t),options:n}),this.instances.set(t,s),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(s,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,s
1)}catch{}return s||null}normalizeInstanceIdentifier(t=xt){return this.component?this.component.multipleInstances?t:xt:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Fo(i){return i===xt?void 0:i}function Vo(i){return i.instantiationMode==="EAGER"}class jo{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new xo(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}var L;(function(i){i[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT"})(L||(L={}));const Bo={debug:L.DEBUG,verbose:L.VERBOSE,info:L.INFO,warn:L.WARN,error:L.ERROR,silent:L.SILENT},$o=L.INFO,Ho={[L.DEBUG]:"log",[L.VERBOSE]:"log",[L.INFO]:"info",[L.WARN]:"warn",[L.ERROR]:"error"},zo=(i,t,...n)=>{if(t<i.logLevel)return;const s=new Date().toISOString(),a=Ho[t];if(a)console[a](`[${s}]  ${i.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class ti{constructor(t){this.name=t,this._logLevel=$o,this._logHandler=zo,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in L))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Bo[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,L.DEBUG,...t),this._logHandler(this,L.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,L.VERBOSE,...t),this._logHandler(this,L.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,L.INFO,...t),this._logHandler(this,L.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,L.WARN,...t),this._logHandler(this,L.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,L.ERROR,...t),this._logHandler(this,L.ERROR,...t)}}const Go=(i,t)=>t.some(n=>i instanceof n);let cr,lr;function Wo(){return cr||(cr=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function qo(){return lr||(lr=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const is=new WeakMap,Hn=new WeakMap,rs=new WeakMap,On=new WeakMap,ei=new WeakMap;function Ko(i){const t=new Promise((n,s)=>{const a=()=>{i.removeEventListener("success",c),i.removeEventListener("error",l)},c=()=>{n(Ct(i.result)),a()},l=()=>{s(i.error),a()};i.addEventListener("success",c),i.addEventListener("error",l)});return t.then(n=>{n instanceof IDBCursor&&is.set(n,i)}).catch(()=>{}),ei.set(t,i),t}function Jo(i){if(Hn.has(i))return;const t=new Promise((n,s)=>{const a=()=>{i.removeEventListener("complete",c),i.removeEventListener("error",l),i.removeEventListener("abort",l)},c=()=>{n(),a()},l=()=>{s(i.error||new DOMException("AbortError","AbortError")),a()};i.addEventListener("complete",c),i.addEventListener("error",l),i.addEventListener("abort",l)});Hn.set(i,t)}let zn={get(i,t,n){if(i instanceof IDBTransaction){if(t==="done")return Hn.get(i);if(t==="objectStoreNames")return i.objectStoreNames||rs.get(i);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ct(i[t])},set(i,t,n){return i[t]=n,!0},has(i,t){return i instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in i}};function Xo(i){zn=i(zn)}function Yo(i){return i===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const s=i.
1call(Ln(this),t,...n);return rs.set(s,t.sort?t.sort():[t]),Ct(s)}:qo().includes(i)?function(...t){return i.apply(Ln(this),t),Ct(is.get(this))}:function(...t){return Ct(i.apply(Ln(this),t))}}function Qo(i){return typeof i=="function"?Yo(i):(i instanceof IDBTransaction&&Jo(i),Go(i,Wo())?new Proxy(i,zn):i)}function Ct(i){if(i instanceof IDBRequest)return Ko(i);if(On.has(i))return On.get(i);const t=Qo(i);return t!==i&&(On.set(i,t),ei.set(t,i)),t}const Ln=i=>ei.get(i);function Zo(i,t,{blocked:n,upgrade:s,blocking:a,terminated:c}={}){const l=indexedDB.open(i,t),w=Ct(l);return s&&l.addEventListener("upgradeneeded",I=>{s(Ct(l.result),I.oldVersion,I.newVersion,Ct(l.transaction),I)}),n&&l.addEventListener("blocked",I=>n(I.oldVersion,I.newVersion,I)),w.then(I=>{c&&I.addEventListener("close",()=>c()),a&&I.addEventListener("versionchange",E=>a(E.oldVersion,E.newVersion,E))}).catch(()=>{}),w}const ta=["get","getKey","getAll","getAllKeys","count"],ea=["put","add","delete","clear"],Un=new Map;function ur(i,t){if(!(i instanceof IDBDatabase&&!(t in i)&&typeof t=="string"))return;if(Un.get(t))return Un.get(t);const n=t.replace(/FromIndex$/,""),s=t!==n,a=ea.includes(n);if(!(n in(s?IDBIndex:IDBObjectStore).prototype)||!(a||ta.includes(n)))return;const c=async function(l,...w){const I=this.transaction(l,a?"readwrite":"readonly");let E=I.store;return s&&(E=E.index(w.shift())),(await Promise.all([E[n](...w),a&&I.done]))[0]};return Un.set(t,c),c}Xo(i=>({...i,get:(t,n,s)=>ur(t,n)||i.get(t,n,s),has:(t,n)=>!!ur(t,n)||i.has(t,n)}));class na{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(ia(n)){const s=n.getImmediate();return`${s.library}/${s.version}`}else return null}).filter(n=>n).join(" ")}}function ia(i){return i.getComponent()?.type==="VERSION"}const Gn="@firebase/app",fr="0.14.12";const wt=new ti("@firebase/app"),ra="@firebase/app-compat",sa="@firebase/analytics-compat",oa="@firebase/analytics",aa="@firebase/app-check-compat",ha="@firebase/app-check",ca="@firebase/auth",la="@firebase/auth-compat",ua="@firebase/database",fa="@firebase/data-connect",da="@firebase/database-compat",pa="@firebase/functions",ga="@firebase/functions-compat",ma="@firebase/installations",_a="@firebase/installations-compat",ya="@firebase/messaging",wa="@firebase/messaging-compat",va="@firebase/performance",Ia="@firebase/performance-compat",Ea="@firebase/remote-config",Ta="@firebase/remote-config-compat",Aa="@firebase/storage",Sa="@firebase/storage-compat",ba="@firebase/firestore",Ca="@firebase/ai",Ra="@firebase/firestore-compat",Na="firebase",ka="12.13.0";const Wn="[DEFAULT]",Pa={[Gn]:"fire-core",[ra]:"fire-core-compat",[oa]:"fire-analytics",[sa]:"fire-analytics-compat",[ha]:"fire-app-check",[aa]:"fire-app-check-compat",[ca]:"fire-auth",[la]:"fire-auth-compat",[ua]:"fire-rtdb",[fa]:"fire-data-connect",[da]:"fire-rtdb-compat",[pa]:"fire-fn",[ga]:"fire-fn-compat",[ma]:"fire-iid",[_a]:"fire-iid-compat",[ya]:"fire-fcm",[wa]:"fire-fcm-compat",[va]:"fire-perf",[Ia]:"fire-perf-compat",[Ea]:"fire-rc",[Ta]:"fire-rc-compat",[Aa]:"fire-gcs",[Sa]:"fire-gcs-compat",[ba]:"fire-fst",[Ra]:"fire-fst-compat",[Ca]:"fire-vertex","fire-js":"fire-js",[Na]:"fire-js-all"};const ze=new Map,Da=new Map,qn=new Map;function dr(i,t){try{i.container.addComponent(t)}catch(n){wt.debug(`Component ${t.name} failed to register with FirebaseApp ${i.name}`,n)}}function Nt(i){const t=i.name;if(qn.has(t))return wt.debug(`There were multiple attempts to register component ${t}.`),!1;qn.set(t,i);for(const n of ze.values())dr(n,i);for(const n of Da.values())dr(n,i);return!0}function Oa(i,t){const n=i.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),i.container.getProvider(t)}function mt(i){return i==null?!1:i.settings!==void 0}const La={"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.","invali
1d-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."},Rt=new ve("app","Firebase",La);class Ua{constructor(t,n,s){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=s,this.container.addComponent(new yt("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Rt.create("app-deleted",{appName:this._name})}}const Ie=ka;function ss(i,t={}){let n=i;typeof t!="object"&&(t={name:t});const s={name:Wn,automaticDataCollectionEnabled:!0,...t},a=s.name;if(typeof a!="string"||!a)throw Rt.create("bad-app-name",{appName:String(a)});if(n||(n=es()),!n)throw Rt.create("no-options");const c=ze.get(a);if(c){if($n(n,c.options)&&$n(s,c.config))return c;throw Rt.create("duplicate-app",{appName:a})}const l=new jo(a);for(const I of qn.values())l.addComponent(I);const w=new Ua(n,s,l);return ze.set(a,w),w}function Ma(i=Wn){const t=ze.get(i);if(!t&&i===Wn&&es())return ss();if(!t)throw Rt.create("no-app",{appName:i});return t}function et(i,t,n){let s=Pa[i]??i;n&&(s+=`-${n}`);const a=s.match(/\s|\//),c=t.match(/\s|\//);if(a||c){const l=[`Unable to register library "${s}" with version "${t}":`];a&&l.push(`library name "${s}" contains illegal characters (whitespace or "/")`),a&&c&&l.push("and"),c&&l.push(`version name "${t}" contains illegal characters (whitespace or "/")`),wt.warn(l.join(" "));return}Nt(new yt(`${s}-version`,()=>({library:s,version:t}),"VERSION"))}const xa="firebase-heartbeat-database",Fa=1,we="firebase-heartbeat-store";let Mn=null;function os(){return Mn||(Mn=Zo(xa,Fa,{upgrade:(i,t)=>{switch(t){case 0:try{i.createObjectStore(we)}catch(n){console.warn(n)}}}}).catch(i=>{throw Rt.create("idb-open",{originalErrorMessage:i.message})})),Mn}async function Va(i){try{const n=(await os()).transaction(we),s=await n.objectStore(we).get(as(i));return await n.done,s}catch(t){if(t instanceof pt)wt.warn(t.message);else{const n=Rt.create("idb-get",{originalErrorMessage:t?.message});wt.warn(n.message)}}}async function pr(i,t){try{const s=(await os()).transaction(we,"readwrite");await s.objectStore(we).put(t,as(i)),await s.done}catch(n){if(n instanceof pt)wt.warn(n.message);else{const s=Rt.create("idb-set",{originalErrorMessage:n?.message});wt.warn(s.message)}}}function as(i){return`${i.name}!${i.options.appId}`}const ja=1024,Ba=30;class $a{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new za(n),this._heartbeatsCachePromise=this._storage.read().then(s=>(this._heartbeatsCache=s,s))}async triggerHeartbeat(){try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=gr();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(a=>a.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:n}),this._heartbeatsCache.heartbeats.length>Ba){const a=Ga(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(a,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(t){wt.warn(t)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=gr(),{heartbeatsToSend:n,unsentEntries:s}=Ha(this._heartbeatsCache.heartbeats),a=Zr(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}catch(t){return wt.warn(t),""}}}function gr(){return new Date().toISOString().substring(0,10)}function Ha(i,t=ja){const n=[];let s=i.slice();for(const a of i){const c=n.find(l=>l.agent===a.agent);if(c){if(c.dates.push(a.date),mr(n)>t){c.dates.pop();break}}else if(n.push({agent:a.agent,dates:[a.date]}),mr(n)>t){n.pop();break}s=s.slice(1)}return{heartbeatsToSend:n,unsentEntries:s}}class za{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Ro()?No().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await Va(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const s=await this.read();return pr(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??s.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const s=await this.read();return pr(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...t.heartbeats]})}else return}}function mr(i){return Zr(JSON.stringify({version:2,heartbeats:i})).length}function Ga(i){if(i.length===0)return-1;let t=0,n=i[0].date;for(let s=1;s<i.length;s++)i[s].date<n&&(n=i[s].date,t=s);return t}function Wa(i){Nt(new yt("platform-logger",t=>new na(t),"PRIVATE")),Nt(new yt("heartbeat",t=>new $a(t),"PRIVATE")),et(Gn,fr,i),et(Gn,fr,"esm2020"),et("fire-js","")}Wa("");
1var qa="firebase",Ka="12.13.0";et(qa,Ka,"app");function hs(){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."}}const Ja=hs,cs=new ve("auth","Firebase",hs());const Ge=new ti("@firebase/auth");function Xa(i,...t){Ge.logLevel<=L.WARN&&Ge.warn(`Auth (${Ie}): ${i}`,...t)}function Be(i,...t){Ge.logLevel<=L.ERROR&&Ge.error(`Auth (${Ie}): ${i}`,...t)}function _r(i,...t){throw ni(i,...t)}function ls(i,...t){return ni(i,...t)}function us(i,t,n){const s={...Ja(),[t]:n};return new ve("auth","Firebase",s).create(t,{appName:i.name})}function $e(i){return us(i,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function ni(i,...t){if(typeof i!="string"){const n=t[0],s=[...t.slice(1)];return s[0]&&(s[0].appName=i.name),i._errorFactory.create(n,...s)}return cs.create(i,...t)}function k(i,t,...n){if(!i)throw ni(t,...n)}function pe(i){const t="INTERNAL ASSERTION FAILED: "+i;throw Be(t),new Error(t)}function We(i,t){i||pe(t)}function Ya(){return yr()==="http:"||yr()==="https:"}function yr(){return typeof self<"u"&&self.location?.protocol||null}function Qa(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Ya()||bo()||"connection"in navigator)?navigator.onLine:!0}function Za(){if(typeof navigator>"u")return null;const i=navigator;return i.languages&&i.languages[0]||i.language||null}class Ee{constructor(t,n){this.shortDelay=t,this.longDelay=n,We(n>t,"Short delay should be less than long delay!"),this.isMobile=Ao()||Co()}get(){return Qa()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function th(i,t){We(i.emulator,"Emulator should always be set here");const{url:n}=i.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class fs{static initialize(t,n,s){this.fetchImpl=t,n&&(this.headersImpl=n),s&&(this.responseImpl=s)}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;pe("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;pe("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;pe("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const eh={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
1aptcha-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"};const nh=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],ih=new Ee(3e4,6e4);function ds(i,t){return i.tenantId&&!t.tenantId?{...t,tenantId:i.tenantId}:t}async function rn(i,t,n,s,a={}){return ps(i,a,async()=>{let c={},l={};s&&(t==="GET"?l=s:c={body:JSON.stringify(s)});const w=ns({key:i.config.apiKey,...l}).slice(1),I=await i._getAdditionalHeaders();I["Content-Type"]="application/json",i.languageCode&&(I["X-Firebase-Locale"]=i.languageCode);const E={method:t,headers:I,...c};return So()||(E.referrerPolicy="no-referrer"),i.emulatorConfig&&nn(i.emulatorConfig.host)&&(E.credentials="include"),fs.fetch()(await gs(i,i.config.apiHost,n,w),E)})}async function ps(i,t,n){i._canInitEmulator=!1;const s={...eh,...t};try{const a=new rh(i),c=await Promise.race([n(),a.promise]);a.clearNetworkTimeout();const l=await c.json();if("needConfirmation"in l)throw Me(i,"account-exists-with-different-credential",l);if(c.ok&&!("errorMessage"in l))return l;{const w=c.ok?l.errorMessage:l.error.message,[I,E]=w.split(" : ");if(I==="FEDERATED_USER_ID_ALREADY_LINKED")throw Me(i,"credential-already-in-use",l);if(I==="EMAIL_EXISTS")throw Me(i,"email-already-in-use",l);if(I==="USER_DISABLED")throw Me(i,"user-disabled",l);const A=s[I]||I.toLowerCase().replace(/[_\s]+/g,"-");if(E)throw us(i,A,E);_r(i,A)}}catch(a){if(a instanceof pt)throw a;_r(i,"network-request-failed",{message:String(a)})}}async function gs(i,t,n,s){const a=`${t}${n}?${s}`,c=i,l=c.config.emulator?th(i.config,a):`${i.config.apiScheme}://${a}`;return nh.includes(n)&&(await c._persistenceManagerAvailable,c._getPersistenceType()==="COOKIE")?c._getPersistence()._getFinalTarget(l).toString():l}class rh{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,s)=>{this.timer=setTimeout(()=>s(ls(this.auth,"network-request-failed")),ih.get())})}}function Me(i,t,n){const s={appName:i.name};n.email&&(s.email=n.email),n.phoneNumber&&(s.phoneNumber=n.phoneNumber);const a=ls(i,t,s);return a.customData._tokenResponse=n,a}async function sh(i,t){return rn(i,"POST","/v1/accounts:delete",t)}async function qe(i,t){return rn(i,"POST","/v1/accounts:lookup",t)}function ge(i){if(i)try{const t=new Date(Number(i));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function oh(i,t=!1){const n=Pt(i),s=await n.getIdToken(t),a=ms(s);k(a&&a.exp&&a.auth_time&&a.iat,n.auth,"internal-error");const c=typeof a.firebase=="object"?a.firebase:void 0,l=c?.sign_in_provider;return{claims:a,token:s,authTime:ge(xn(a.auth_time)),issuedAtTime:ge(xn(a.iat)),expirationTime:ge(xn(a.exp)),signInProvider:l||null,signInSecondFactor:c?.sign_in_second_factor||null}}function xn(i){return Number(i)*1e3}function ms(i){const[t,n,s]=i.split(".");if(t===void 0||n===void 0||s===void 0)return Be("JWT malformed, contained fewer than 3 sections"),null;try{const a=ts(n);return a?JSON.parse(a):(Be("Failed to decode base64 JWT payload"),null)}catch(a){return Be("Caught error parsing JWT payload as JSON",a?.toString()),null}}function wr(i){const t=ms(i);return k(t,"internal-error"),k(typeof t.exp<"u","internal-error"),k(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}async function Kn(i,t,n=!1){if(n)return t;try{return await t}catch(s){throw s instanceof pt&&ah(s)&&i.auth.currentUser===i&&await i.auth.signOut(),s}}function ah({code:i}){return i==="auth/user-disabled"||i==="auth/user-token-expired"}class hh{constructor(t){this.user=t,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(t){if(t){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const s=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,s)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class Jn{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=ge(this.lastLoginAt),this.creationTime=ge(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Ke(i){const t=i.auth,n=await i.getIdToken(),s=await Kn(i,qe(t,{idToken:n}));k(s?.users.length,t,"internal-error");const a=s.users[0];i._notifyReloadListener(a);const c=a.providerUserInfo?.length?_s(a.providerUserInfo):[],l=lh(i.providerData,c),w=i.isAnonymous,I=!(i.email&&a.passwordHash)&&!l?.length,E=w?I:!1,A={uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:l,metadata:new Jn(a.createdAt,a.lastLoginAt),isAnonymous:E};Object.assign(i,A)}async function ch(i){const t=Pt(i);await Ke(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function lh(i,t){return[...i.filter(s=>!t.some(a=>a.providerId===s.providerId)),...t]}function _s(i){return i.map(({providerId:t,...n})=>
1({providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}async function uh(i,t){const n=await ps(i,{},async()=>{const s=ns({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:a,apiKey:c}=i.config,l=await gs(i,a,"/v1/token",`key=${c}`),w=await i._getAdditionalHeaders();w["Content-Type"]="application/x-www-form-urlencoded";const I={method:"POST",headers:w,body:s};return i.emulatorConfig&&nn(i.emulatorConfig.host)&&(I.credentials="include"),fs.fetch()(l,I)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function fh(i,t){return rn(i,"POST","/v2/accounts:revokeToken",ds(i,t))}class Kt{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){k(t.idToken,"internal-error"),k(typeof t.idToken<"u","internal-error"),k(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):wr(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){k(t.length!==0,"internal-error");const n=wr(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(k(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:s,refreshToken:a,expiresIn:c}=await uh(t,n);this.updateTokensAndExpiration(s,a,Number(c))}updateTokensAndExpiration(t,n,s){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+s*1e3}static fromJSON(t,n){const{refreshToken:s,accessToken:a,expirationTime:c}=n,l=new Kt;return s&&(k(typeof s=="string","internal-error",{appName:t}),l.refreshToken=s),a&&(k(typeof a=="string","internal-error",{appName:t}),l.accessToken=a),c&&(k(typeof c=="number","internal-error",{appName:t}),l.expirationTime=c),l}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Kt,this.toJSON())}_performRefresh(){return pe("not implemented")}}function bt(i,t){k(typeof i=="string"||typeof i>"u","internal-error",{appName:t})}class lt{constructor({uid:t,auth:n,stsTokenManager:s,...a}){this.providerId="firebase",this.proactiveRefresh=new hh(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=s,this.accessToken=s.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?[...a.providerData]:[],this.metadata=new Jn(a.createdAt||void 0,a.lastLoginAt||void 0)}async getIdToken(t){const n=await Kn(this,this.stsTokenManager.getToken(this.auth,t));return k(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return oh(this,t)}reload(){return ch(this)}_assign(t){this!==t&&(k(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>({...n})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new lt({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(t){k(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let s=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),s=!0),n&&await Ke(this),await this.auth._persistUserIfCurrent(this),s&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(mt(this.auth.app))return Promise.reject($e(this.auth));const t=await this.getIdToken();return await Kn(this,sh(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
1nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),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(t,n){const s=n.displayName??void 0,a=n.email??void 0,c=n.phoneNumber??void 0,l=n.photoURL??void 0,w=n.tenantId??void 0,I=n._redirectEventId??void 0,E=n.createdAt??void 0,A=n.lastLoginAt??void 0,{uid:S,emailVerified:b,isAnonymous:U,providerData:O,stsTokenManager:F}=n;k(S&&F,t,"internal-error");const R=Kt.fromJSON(this.name,F);k(typeof S=="string",t,"internal-error"),bt(s,t.name),bt(a,t.name),k(typeof b=="boolean",t,"internal-error"),k(typeof U=="boolean",t,"internal-error"),bt(c,t.name),bt(l,t.name),bt(w,t.name),bt(I,t.name),bt(E,t.name),bt(A,t.name);const W=new lt({uid:S,auth:t,email:a,emailVerified:b,displayName:s,isAnonymous:U,photoURL:l,phoneNumber:c,tenantId:w,stsTokenManager:R,createdAt:E,lastLoginAt:A});return O&&Array.isArray(O)&&(W.providerData=O.map(st=>({...st}))),I&&(W._redirectEventId=I),W}static async _fromIdTokenResponse(t,n,s=!1){const a=new Kt;a.updateFromServerResponse(n);const c=new lt({uid:n.localId,auth:t,stsTokenManager:a,isAnonymous:s});return await Ke(c),c}static async _fromGetAccountInfoResponse(t,n,s){const a=n.users[0];k(a.localId!==void 0,"internal-error");const c=a.providerUserInfo!==void 0?_s(a.providerUserInfo):[],l=!(a.email&&a.passwordHash)&&!c?.length,w=new Kt;w.updateFromIdToken(s);const I=new lt({uid:a.localId,auth:t,stsTokenManager:w,isAnonymous:l}),E={uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:c,metadata:new Jn(a.createdAt,a.lastLoginAt),isAnonymous:!(a.email&&a.passwordHash)&&!c?.length};return Object.assign(I,E),I}}const vr=new Map;function Vt(i){We(i instanceof Function,"Expected a class definition");let t=vr.get(i);return t?(We(t instanceof i,"Instance stored in cache mismatched with class"),t):(t=new i,vr.set(i,t),t)}class ys{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}ys.type="NONE";const Ir=ys;function Fn(i,t,n){return`firebase:${i}:${t}:${n}`}class Jt{constructor(t,n,s){this.persistence=t,this.auth=n,this.userKey=s;const{config:a,name:c}=this.auth;this.fullUserKey=Fn(this.userKey,a.apiKey,c),this.fullPersistenceKey=Fn("persistence",a.apiKey,c),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const n=await qe(this.auth,{idToken:t}).catch(()=>{});return n?lt._fromGetAccountInfoResponse(this.auth,n,t):null}return lt._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,s="authUser"){if(!n.length)return new Jt(Vt(Ir),t,s);const a=(await Promise.all(n.map(async E=>{if(await E._isAvailable())return E}))).filter(E=>E);let c=a[0]||Vt(Ir);const l=Fn(s,t.config.apiKey,t.name);let w=null;for(const E of n)try{const A=await E._get(l);if(A){let S;if(typeof A=="string"){const b=await qe(t,{idToken:A}).catch(()=>{});if(!b)break;S=await lt._fromGetAccountInfoResponse(t,b,A)}else S=lt._fromJSON(t,A);E!==c&&(w=S),c=E;break}}catch{}const I=a.filter(E=>E._shouldAllowMigration);return!c._shouldAllowMigration||!I.length?new Jt(c,t,s):(c=I[0],w&&await c._set(l,w.toJSON()),await Promise.all(n.map(async E=>{if(E!==c)try{await E._remove(l)}catch{}})),new Jt(c,t,s))}}function Er(i){const t=i.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(mh(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(dh(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(yh(t))return"Blackberry";if(wh(t))return"Webos";if(ph(t))return"Safari";if((t.includes("chrome/")||gh(t))&&!t.includes("edge/"))return"Chrome";if(_h(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,s=i.match(n);if(s?.length===2)return s[1]}return"Other"}function dh(i=ft()){return/firefox\//i.test(i)}function ph(i=ft()){const t=i.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function gh(i=ft()){return/crios\//i.test(i)}function mh(i=ft()){return/iemobile/i.test(i)}function _h(i=ft()){return/android/i.test(i)}function yh(i=ft()){return/blackberry/i.test(i)}function wh(i=ft()){return/webos/i.test(i)}function ws(i,t=[]){let n;switch(i){case"Browser":n=Er(ft());break;case"Worker":n=`${Er(ft())}-${i}`;break;default:n=i}const s=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Ie}/${s}`}class vh{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const s=c=>new Promise((l,w)=>{try{const I=t(c);l(I)}catch(I){w(I)}});s.onAbort=n,this.queue.push(s);const a=this.queue.length-1;return()=>{this.queue[a]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const s of this.queue)await s(t),s.onAbort&&n.push(s.onAbort)}catch(s){n.reverse();for(const a of n)try{a()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:s?.message})}}}async function Ih(i,t={}){return rn(i,"GET","/v2/passwordPolicy",ds(i,t))}const Eh=6;class Th{constructor(t){const n=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??Eh,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=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=t.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,n),this.validatePasswordCharacterOptions(t,n),n.isValid&&
1(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(t,n){const s=this.customStrengthOptions.minPasswordLength,a=this.customStrengthOptions.maxPasswordLength;s&&(n.meetsMinPasswordLength=t.length>=s),a&&(n.meetsMaxPasswordLength=t.length<=a)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let s;for(let a=0;a<t.length;a++)s=t.charAt(a),this.updatePasswordCharacterOptionsStatuses(n,s>="a"&&s<="z",s>="A"&&s<="Z",s>="0"&&s<="9",this.allowedNonAlphanumericCharacters.includes(s))}updatePasswordCharacterOptionsStatuses(t,n,s,a,c){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=s)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=a)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=c))}}class Ah{constructor(t,n,s,a){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=s,this.config=a,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Tr(this),this.idTokenSubscription=new Tr(this),this.beforeStateQueue=new vh(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=cs,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=t.name,this.clientVersion=a.sdkClientVersion,this._persistenceManagerAvailable=new Promise(c=>this._resolvePersistenceManagerAvailable=c)}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Vt(n)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await Jt.create(this,t),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;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await qe(this,{idToken:t}),s=await lt._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(s)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){if(mt(this.app)){const c=this.app.settings.authIdToken;return c?new Promise(l=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(c).then(l,l))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let s=n,a=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const c=this.redirectUser?._redirectEventId,l=s?._redirectEventId,w=await this.tryRedirectSignIn(t);(!c||c===l)&&w?.user&&(s=w.user,a=!0)}if(!s)return this.directlySetCurrentUser(null);if(!s._redirectEventId){if(a)try{await this.beforeStateQueue.runMiddleware(s)}catch(c){s=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(c))}return s?this.reloadAndSetCurrentUserOrClear(s):this.directlySetCurrentUser(null)}return k(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===s._redirectEventId?this.directlySetCurrentUser(s):this.reloadAndSetCurrentUserOrClear(s)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await Ke(t)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=Za()}async _delete(){this._deleted=!0}
1async updateCurrentUser(t){if(mt(this.app))return Promise.reject($e(this));const n=t?Pt(t):null;return n&&k(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&k(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return mt(this.app)?Promise.reject($e(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return mt(this.app)?Promise.reject($e(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Vt(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await Ih(this),n=new Th(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new ve("auth","Firebase",t())}onAuthStateChanged(t,n,s){return this.registerStateListener(this.authStateSubscription,t,n,s)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,s){return this.registerStateListener(this.idTokenSubscription,t,n,s)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const s=this.onAuthStateChanged(()=>{s(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),s={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(s.tenantId=this.tenantId),await fh(this,s)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(t,n){const s=await this.getOrInitRedirectPersistenceManager(n);return t===null?s.removeCurrentUser():s.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&Vt(t)||this._popupRedirectResolver;k(n,this,"argument-error"),this.redirectPersistenceManager=await Jt.create(this,[Vt(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===t?this._currentUser:this.redirectUser?._redirectEventId===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===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);const t=this.currentUser?.uid??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,s,a){if(this._deleted)return()=>{};const c=typeof n=="function"?n:n.next.bind(n);let l=!1;const w=this._isInitialized?Promise.resolve():this._initializationPromise;if(k(w,this,"internal-error"),w.then(()=>{l||c(this.currentUser)}),typeof n=="function"){const I=t.addObserver(n,s,a);return()=>{l=!0,I()}}else{const I=t.addObserver(n);return()=>{l=!0,I()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return k(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=ws(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(t["X-Firebase-Client"]=n);const s=await this._getAppCheckToken();return s&&(t["X-Firebase-AppCheck"]=s),t}async _getAppCheckToken(){if(mt(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return t?.error&&Xa(`Error while retrieving App Check token: ${t.error}`),t?.token}}function Sh(i){return Pt(i)}class Tr{constructor(t){this.auth=t,this.observer=null,this.addObserver=Oo(n=>this.observer=n)}get next(){return k(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function bh(i,t){const n=t?.persistence||[],s=(Array.isArray(n)?n:[n]).map(Vt);t?.errorMap&&i._updateErrorMap(t.errorMap),i._initializeWithPersistence(s,t?.popupRedirectResolver)}new Ee(3e4,6e4);new Ee(2e3,1e4);new Ee(3e4,6e4);new Ee(5e3,15e3);var Ar="@firebase/auth",Sr="1.13.1";class Ch{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(s=>{t(s?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){k(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function Rh(i){switch(i){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Nh(i){Nt(new yt("auth",(t,{options:n})=>{const s=t.getProvider("app").getImmediate(),a=t.getProvider("heartbeat"),c=t.getProvider("app-check-internal"),{apiKey:l,authDomain:w}=s.options;k(l&&!l.includes(":"),"invalid-api-key",{appName:s.name});const I={apiKey:l,authDomain:w,clientPlatform:i,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ws(i)},E=new Ah(s,a,c,I);return bh(E,n),E},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,s)=>{t.getProvider("auth-internal").initialize()})),Nt(new yt("auth-internal",t=>{const n=Sh(t.getProvider("auth").getImmediate());return(s=>new Ch(s))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),et(Ar,Sr,Rh(i)),et(Ar,Sr,"esm2020")}const kh=300;Eo("authIdTokenMaxAge");Nh("Browser");var br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var ii;(function(){var i;function t(g,u){function d(){}d.prototype=u.prototype,g.F=u.prototype,g.prototype=new d,g.prototype.constructor=g,g.D=function(m,p,y){for(var f=Array(arguments.length-2),X=2;X<arguments.length;X++)f[X-2]=arguments[X];return u.prototype[p].apply(m,f)}}function n(){this.blockSize=-1}function s(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}t(s,n),s.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function a(g,u,d){d||(d=0);const m=Array(16);if(typeof u=="string")for(var p=0;p<16;++p)m[p]=u.charCodeAt(d++)|u.charCodeAt(d++)<<8|u.charCodeAt(d++)<<16|u.charCodeAt(d++)<<24;else for(p=0;p<16;++p)m[p]=u[d++]|u[d++]<<8|u[d++]<<16|u[d++]<<24;u=g.g[0],d=g.g[1],p=g.g[2];let y=g.g[3],f;f=u+(y^d&(p^y))+m[0]+3614090360&4294967295,u=d+(f<<7&4294967295|f>>>25),f=y+(p^u&(d^p))+m[1]+3905402710&4294967295,y=u+(f<<12&4294967295|f>>>20),f=p+(d^y&(u^d))+m[2]+606105819&4294967295,p=y+(f<<17&4294967295|f>>>15),f=d+(u^p&(y^u))+m[3]+3250441966&4294967295,d=p+(f<<22&4294967295|f>>>10),f=u+(y^d&(p^y))+m[4]+4118548399&4294967295,u=d+(f<<7&4294967295|f>>>25),f=y+(p^u&(d^p))+m[5]+1200080426&4294967295,y=u+(f<<12&4294967295|f>>>20),f=p+(d^y&(u^d))+m[6]+2821735955&4294967295,p=y+(f<<17&4294967295|f>>>15),f=d+(u^p&(y^u))+m[7]+4249261313&4294967295,d=p+(f<<22&4294967295|f>>>10),f=u+(y^d&(p^y))+m[8]+1770035416&4294967295,u=d+(f<<7&4294967295|f>>>25),f=y+(p^u&(d^p))+m[9]+2336552879&4294967295,y=u+(f<<12&4294967295|f>>>20),f=p+(d^y&(u^d))+m[10]+4294925233&4294967295,p=y+(f<<17&4294967295|f>>>15),f=d+(u^p&(y^u))+m[11]+2304563134&4294967295,d=p+(f<<22&4294967295|f>>>10),f=u+(y^d&(p^y))+m[12]+1804603682&4294967295,u=d+(f<<7&4294967295|f>>>25),f=y+(p^u&(d^p))+m[13]+4254626195&4294967295,y=u+(f<<12&4294967295|f>>>20),f=p+(d^y&(u^d))+m[14]+2792965006&4294967295,p=y+(f<<17&4294967295|f>>>15),f=d+(u^p&(y^u))+m[15]+1236535329&4294967295,d=p+(f<<22&4294967295|f>>>10),f=u+(p^y&(d^p))+m[1]+4129170786&4294967295,u=d+(f<<5&4294967295|f>>>27),f=y+(d^p&(u^d))+m[6]+3225465664&4294967295,y=u+(f<<9&4294967295|f>>>23),f=p+(u^d&(y^u))+m[11]+643717713&4294967295,p=y+(f<<14&4294967295|f>>>18),f=d+(y^u&(p^y))+m[0]+3921069994&4294967295,d=p+(f<<20&4294967295|f>>>12),f=u+(p^y&(d^p))+m[5]+3593408605&4294967295,u=d+(f<<5&4294967295|f>>>27),f=y+(d^p&(u^d))+m[10]+38016083&4294967295,y=u+(f<<9&4294967295|f>>>23),f=p+(u^d&(y^u))+m[15]+3634488961&4294967295,p=y+(f<<14&4294967295|f>>>18),f=d+(y^u&(p^y))+m[4]+3889429448&4294967295,d=p+(f<<20&4294967295|f>>>12),f=u+(p^y&(d^p))+m[9]+568446438&4294967295,u=d+(f<<5&4294967295|f>>>27),f=y+(d^p&(u^d))+m[14]+3275163606&4294967295,y=u+(f<<9&4294967295|f>>>23),f=p+(u^d&(y^u))+m[3]+4107603335&4294967295,p=y+(f<<14&4294967295|f>>>18),f=d+(y^u&(p^y))+m[8]+1163531501&4294967295,d=p+(f<<20&4294967295|f>>>12),f=u+(p^y&(d^p))+m[13]+2850285829&4294967295,u=d+(f<<5&4294967295|f>>>27),f=y+(d^p&(u^d))+m[2]+4243563512&4294967295,y=u+(f<<9&4294967295|f>>>23),f=p+(u^d&(y^u))+m[7]+1735328473&4294967295,p=y+(f<<14&4294967295|f>>>18),f=d+(y^u&(p^y))+m[12]+2368359562&4294967295,d=p+(f<<20&4294967295|f>>>12),f=u+(d^p^y)+m[5]+4294588738&4294967295,u=d+(f<<4&4294967295|f>>>28),f=y+(u^d^p)+m[8]+2272392833&4294967295,y=u+(f<<11&4294967295|f>>>21),f=p+(y^u^d)+m[11]+1839030562&4294967295,p=y+(f<<16&4294967295|f>>>16),f=d+(p^y^u)+m[14]+4259657740&4294967295,d=p+(f<<23&4294967295|f>>>9),f=u+(d^p^y)+m[1]+2763975236&4294967295,u=d+(f<<4&4294967295|f>>>28),f=y+(u^d^p)+m[4]+1272893353&4294967295,y=u+(f<<11&4294967295|f>>>21),f=p+(y^u^d)+m[7]+4139469664&4294967295,p=y+(f<<16&4294967295|f>>>16),f=d+(p^y^u)+m[10]+3200236656&4294967295,d=p+(f<<23&4294967295|f>>>9),f=u+(d^p^y)+m[13]+681279174&4294967295,u=d+(f<<4&4294967295|f>>>28),f=y+(u^d^p)+m[0]+3936430074&4294967295,y=u+(f<<11&4294967295|f>>>21),f=p+(y^u^d)+m[3]+3572445317&4294967295,p=y+(f<<16&4294967295|f>>>16),f=d+(p^y^u)+m[6]+76029189&4294967295,d=p+(f<<23&4294967295|f>>>9),f=u+(d^p^y)+m[9]+3654602809&4294967295,u=d+(f<<4&4294967295|f>>>28),f=y+(u^d^p)+m[12]+3873151461&4294967295,y=u+(f<<11&4294967295|f>>>21),f=p+(y^u^d)+m[15]+530742520&4294967295,p=y+(f<<16&4294967295|f>>>16),f=d+(p^y^u)+m[2]+3299628645&4294967295,d=p+(f<<23&4294967295|f>>>9),f=u+(p^(d|~y))+m[0]+4096336452&4294967295,u=d+(f<<6&4294967295|f>>>26),f=y+(d^(u|~p))+m[7]+1126891415&4294967295,y=u+(f<<10&4294967295|f>>>22),f=p+(u^(y|~d))+m[14]+2878612391&4294967295,p=y+(f<<15&4294967295|f>>>17),f=d+(y^(p|~u))+m[5]+4237533241&4294967295,d=p+(f<<21&4294967295|f>>>11),f=u+(p^(d|~y))+m[12]+1700485571&4294967295,u=d+(f<<6&4294967295|f>>>26),f=y+(d^(u|~p))+m[3]+2399980690&4294967295,y=u+(f<<10&4294967295|f>>>22),f=p+(u^(y|~d))+m[10]+4293915773&4294967295,p=y+(f<<15&4294967295|f>>>17),f=d+(y^(p|~u))+m[1]+2240044497&4294967295,d=p+(f<<21&4294967295|f>>>11),f=u+(p^(d|~y))+m[8]+1873313359&4294967295,u=d+(f<<6&4294967295|f>>>26),f=y+(d^(u|~p))+m[15]+4264355552&4294967295,y=u+(f<<10&4294967295|f>>>22),f=p+(u^(y|~d))+m[6]+2734768916&4294967295,p=y+(f<<15&4294967295|f>>>17),f=d+(y^(p|~u))+m[13]+1309151649&4294967295,d=p+(f<<21&4294967295|f>>>11),f=u+(p^(d|~y))+m[4]+4149444226&4294967295,u=d+(f<<6&4294967295|f>>>26),f=y+(d^(u|~p))+m[11]+3174756917&4294967295,y=u+(f<<10&4294967295|f>>>22),f=p+(u^(y|~d))+m[2]+718787259&4294967295,p=y+(f<<15&4294967295|f>>>17),f=d+(y^(p|~u))+m[9]+3951481745&4294967295,g.g[0]=g.g[0]+u&4294967295,g.g[1]=g.g[1]+(p+(f<<21&4294967295|f>>>11))&4294967295,g.g[2]=g.g[2]+p&4294967295,g.g[3]=g.g[3]+y&4294967295}s.prototype.v=function(g,u){u===void 0&&(u=g.length);const d=u-this.blockSize,m=this.C;let p=this.h,y=0;for(;y<u;){if(p==0)for(;y<=d;)a(this,g,y),y+=this.blockSize;if(typeof g=="string"){for(;y<u;)if(m[p++]=g.charCodeAt(y++),p==this.blockSize){a(this,m),p=0;break}}else for(;y<u;)if(m[p++]=g[y++],p==this.blockSize){a(this,m),p=0;break}}this.h=p,this.o+=u},s.prototype.A=function(){var g=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);g[0]=128;for(var u=1;u<g.length-8;++u)g[u]=0;u=this.o*8;for(var d=g.length-8;d<g.length;++d)g[d]=u&255,u/=256;for(this.v(g),g=Array(16),u=0,d=0;d<4;++d)for(let m=0;m<32;m+=8)g[u++]=this.g[d]>>>m&255;return g};function c(g,u){var d=w;return Object.prototype.hasOwnProperty.call(d,g)?d[g]:d[g]=u(g)}function l(g,u){this.h=u;const d=[];let m=!0;for(let p=g.length-1;p>=0;p--){const y=g[p]|0;m&&y==u||(d[p]=y,m=!1)}this.g=d}var w={};function I(g){return-128<=g&&g<128?c(g,function(u){return new l([u|0],u<0?-1:0)}):new l([g|0],g<0?-1:0)}function E(g){if(isNaN(g)||!isFinite(g))return S;if(g<0)return R(E(-g));const u=[];let d=1;for(let m=0;g>=d;m++)u[m]=g/d|0,d*=4294967296;return new l(u,0)}function A(g,u){if(g.length==0)throw Error("number format error: empty string");if(u=u||10,u<2||36<u)throw Error("radix out of range: "+u);if(g.charAt(0)=="-")return R(A(g.substring(1),u));if(g.indexOf("-")>=0)throw Error('number format error: interior "-" character');const d=E(Math.pow(u,8));let m=S;for(let y=0;y<g.length;y+=8){var p=Math.min(8,g.length-y);const f=parseInt(g.substring(y,y+p),u);p<8?(p=E(Math.pow(u,p)),m=m.j(p).add(E(f))):(m=m.j(d),m=m.add(E(f)))}return m}var S=I(0),b=I(1),U=I(16777216);i=l.prototype,i.m=function(){if(F(this))return-R(this).m();let g=0,u=1;for(let d=0;d<this.g.length;d++){const m=this.i(d);g+=(m>=0?m:4294967296+m)*u,u*=4294967296}return g},i.toString=function(g){if(g=g||10,g<2||36<g)throw Error("radix out of range: "+g);if(O(this))return"0";if(F(this))return"-"+R(this).toString(g);
1const u=E(Math.pow(g,6));var d=this;let m="";for(;;){const p=$(d,u).g;d=W(d,p.j(u));let y=((d.g.length>0?d.g[0]:d.h)>>>0).toString(g);if(d=p,O(d))return y+m;for(;y.length<6;)y="0"+y;m=y+m}},i.i=function(g){return g<0?0:g<this.g.length?this.g[g]:this.h};function O(g){if(g.h!=0)return!1;for(let u=0;u<g.g.length;u++)if(g.g[u]!=0)return!1;return!0}function F(g){return g.h==-1}i.l=function(g){return g=W(this,g),F(g)?-1:O(g)?0:1};function R(g){const u=g.g.length,d=[];for(let m=0;m<u;m++)d[m]=~g.g[m];return new l(d,~g.h).add(b)}i.abs=function(){return F(this)?R(this):this},i.add=function(g){const u=Math.max(this.g.length,g.g.length),d=[];let m=0;for(let p=0;p<=u;p++){let y=m+(this.i(p)&65535)+(g.i(p)&65535),f=(y>>>16)+(this.i(p)>>>16)+(g.i(p)>>>16);m=f>>>16,y&=65535,f&=65535,d[p]=f<<16|y}return new l(d,d[d.length-1]&-2147483648?-1:0)};function W(g,u){return g.add(R(u))}i.j=function(g){if(O(this)||O(g))return S;if(F(this))return F(g)?R(this).j(R(g)):R(R(this).j(g));if(F(g))return R(this.j(R(g)));if(this.l(U)<0&&g.l(U)<0)return E(this.m()*g.m());const u=this.g.length+g.g.length,d=[];for(var m=0;m<2*u;m++)d[m]=0;for(m=0;m<this.g.length;m++)for(let p=0;p<g.g.length;p++){const y=this.i(m)>>>16,f=this.i(m)&65535,X=g.i(p)>>>16,Dt=g.i(p)&65535;d[2*m+2*p]+=f*Dt,st(d,2*m+2*p),d[2*m+2*p+1]+=y*Dt,st(d,2*m+2*p+1),d[2*m+2*p+1]+=f*X,st(d,2*m+2*p+1),d[2*m+2*p+2]+=y*X,st(d,2*m+2*p+2)}for(g=0;g<u;g++)d[g]=d[2*g+1]<<16|d[2*g];for(g=u;g<2*u;g++)d[g]=0;return new l(d,0)};function st(g,u){for(;(g[u]&65535)!=g[u];)g[u+1]+=g[u]>>>16,g[u]&=65535,u++}function q(g,u){this.g=g,this.h=u}function $(g,u){if(O(u))throw Error("division by zero");if(O(g))return new q(S,S);if(F(g))return u=$(R(g),u),new q(R(u.g),R(u.h));if(F(u))return u=$(g,R(u)),new q(R(u.g),u.h);if(g.g.length>30){if(F(g)||F(u))throw Error("slowDivide_ only works with positive integers.");for(var d=b,m=u;m.l(g)<=0;)d=Q(d),m=Q(m);var p=z(d,1),y=z(m,1);for(m=z(m,2),d=z(d,2);!O(m);){var f=y.add(m);f.l(g)<=0&&(p=p.add(d),y=f),m=z(m,1),d=z(d,1)}return u=W(g,p.j(u)),new q(p,u)}for(p=S;g.l(u)>=0;){for(d=Math.max(1,Math.floor(g.m()/u.m())),m=Math.ceil(Math.log(d)/Math.LN2),m=m<=48?1:Math.pow(2,m-48),y=E(d),f=y.j(u);F(f)||f.l(g)>0;)d-=m,y=E(d),f=y.j(u);O(y)&&(y=b),p=p.add(y),g=W(g,f)}return new q(p,g)}i.B=function(g){return $(this,g).h},i.and=function(g){const u=Math.max(this.g.length,g.g.length),d=[];for(let m=0;m<u;m++)d[m]=this.i(m)&g.i(m);return new l(d,this.h&g.h)},i.or=function(g){const u=Math.max(this.g.length,g.g.length),d=[];for(let m=0;m<u;m++)d[m]=this.i(m)|g.i(m);return new l(d,this.h|g.h)},i.xor=function(g){const u=Math.max(this.g.length,g.g.length),d=[];for(let m=0;m<u;m++)d[m]=this.i(m)^g.i(m);return new l(d,this.h^g.h)};function Q(g){const u=g.g.length+1,d=[];for(let m=0;m<u;m++)d[m]=g.i(m)<<1|g.i(m-1)>>>31;return new l(d,g.h)}function z(g,u){const d=u>>5;u%=32;const m=g.g.length-d,p=[];for(let y=0;y<m;y++)p[y]=u>0?g.i(y+d)>>>u|g.i(y+d+1)<<32-u:g.i(y+d);return new l(p,g.h)}s.prototype.digest=s.prototype.A,s.prototype.reset=s.prototype.u,s.prototype.update=s.prototype.v,l.prototype.add=l.prototype.add,l.prototype.multiply=l.prototype.j,l.prototype.modulo=l.prototype.B,l.prototype.compare=l.prototype.l,l.prototype.toNumber=l.prototype.m,l.prototype.toString=l.prototype.toString,l.prototype.getBits=l.prototype.i,l.fromNumber=E,l.fromString=A,ii=l}).apply(typeof br<"u"?br:typeof self<"u"?self:typeof window<"u"?window:{});var xe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){var i,t=Object.defineProperty;function n(e){e=[typeof globalThis=="object"&&globalThis,e,typeof window=="object"&&window,typeof self=="object"&&self,typeof xe=="object"&&xe];for(var r=0;r<e.length;++r){var o=e[r];if(o&&o.Math==Math)return o}throw Error("Cannot find global object")}var s=n(this);function a(e,r){if(r)t:{var o=s;e=e.split(".");for(var h=0;h<e.length-1;h++){var _=e[h];if(!(_ in o))break t;o=o[_]}e=e[e.length-1],h=o[e],r=r(h),r!=h&&r!=null&&t(o,e,{configurable:!0,writable:!0,value:r})}}a("Symbol.dispose",function(e){return e||Symbol("Symbol.dispose")}),a("Array.prototype.values",function(e){return e||function(){return this[Symbol.iterator]()}}),a("Object.entries",function(e){return e||function(r){var o=[],h;for(h in r)Object.prototype.hasOwnProperty.call(r,h)&&o.push([h,r[h]]);return o}});var c=c||{},l=this||self;function w(e){var r=typeof e;return r=="object"&&e!=null||r=="function"}function I(e,r,o){return e.call.apply(e.bind,arguments)}function E(e,r,o){return E=I,E.apply(null,arguments)}
1function A(e,r){var o=Array.prototype.slice.call(arguments,1);return function(){var h=o.slice();return h.push.apply(h,arguments),e.apply(this,h)}}function S(e,r){function o(){}o.prototype=r.prototype,e.Z=r.prototype,e.prototype=new o,e.prototype.constructor=e,e.Ob=function(h,_,v){for(var T=Array(arguments.length-2),C=2;C<arguments.length;C++)T[C-2]=arguments[C];return r.prototype[_].apply(h,T)}}var b=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?e=>e&&AsyncContext.Snapshot.wrap(e):e=>e;function U(e){const r=e.length;if(r>0){const o=Array(r);for(let h=0;h<r;h++)o[h]=e[h];return o}return[]}function O(e,r){for(let h=1;h<arguments.length;h++){const _=arguments[h];var o=typeof _;if(o=o!="object"?o:_?Array.isArray(_)?"array":o:"null",o=="array"||o=="object"&&typeof _.length=="number"){o=e.length||0;const v=_.length||0;e.length=o+v;for(let T=0;T<v;T++)e[o+T]=_[T]}else e.push(_)}}class F{constructor(r,o){this.i=r,this.j=o,this.h=0,this.g=null}get(){let r;return this.h>0?(this.h--,r=this.g,this.g=r.next,r.next=null):r=this.i(),r}}function R(e){l.setTimeout(()=>{throw e},0)}function W(){var e=g;let r=null;return e.g&&(r=e.g,e.g=e.g.next,e.g||(e.h=null),r.next=null),r}class st{constructor(){this.h=this.g=null}add(r,o){const h=q.get();h.set(r,o),this.h?this.h.next=h:this.g=h,this.h=h}}var q=new F(()=>new $,e=>e.reset());class ${constructor(){this.next=this.g=this.h=null}set(r,o){this.h=r,this.g=o,this.next=null}reset(){this.next=this.g=this.h=null}}let Q,z=!1,g=new st,u=()=>{const e=Promise.resolve(void 0);Q=()=>{e.then(d)}};function d(){for(var e;e=W();){try{e.h.call(e.g)}catch(o){R(o)}var r=q;r.j(e),r.h<100&&(r.h++,e.next=r.g,r.g=e)}z=!1}function m(){this.u=this.u,this.C=this.C}m.prototype.u=!1,m.prototype.dispose=function(){this.u||(this.u=!0,this.N())},m.prototype[Symbol.dispose]=function(){this.dispose()},m.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function p(e,r){this.type=e,this.g=this.target=r,this.defaultPrevented=!1}p.prototype.h=function(){this.defaultPrevented=!0};var y=(function(){if(!l.addEventListener||!Object.defineProperty)return!1;var e=!1,r=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const o=()=>{};l.addEventListener("test",o,r),l.removeEventListener("test",o,r)}catch{}return e})();function f(e){return/^[\s\xa0]*$/.test(e)}function X(e,r){p.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e&&this.init(e,r)}S(X,p),X.prototype.init=function(e,r){const o=this.type=e.type,h=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;this.target=e.target||e.srcElement,this.g=r,r=e.relatedTarget,r||(o=="mouseover"?r=e.fromElement:o=="mouseout"&&(r=e.toElement)),this.relatedTarget=r,h?(this.clientX=h.clientX!==void 0?h.clientX:h.pageX,this.clientY=h.clientY!==void 0?h.clientY:h.pageY,this.screenX=h.screenX||0,this.screenY=h.screenY||0):(this.clientX=e.clientX!==void 0?e.clientX:e.pageX,this.clientY=e.clientY!==void 0?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=e.pointerType,this.state=e.state,this.i=e,e.defaultPrevented&&X.Z.h.call(this)},X.prototype.h=function(){X.Z.h.call(this);const e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Dt="closure_listenable_"+(Math.random()*1e6|0),Ps=0;function Ds(e,r,o,h,_){this.listener=e,this.proxy=null,this.src=r,this.type=o,this.capture=!!h,this.ha=_,this.key=++Ps,this.da=this.fa=!1}function Ae(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function Se(e,r,o){for(const h in e)r.call(o,e[h],h,e)}function Os(e,r){for(const o in e)r.call(void 0,e[o],o,e)}function hi(e){const r={};for(const o in e)r[o]=e[o];return r}const ci="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
1ing toString valueOf".split(" ");function li(e,r){let o,h;for(let _=1;_<arguments.length;_++){h=arguments[_];for(o in h)e[o]=h[o];for(let v=0;v<ci.length;v++)o=ci[v],Object.prototype.hasOwnProperty.call(h,o)&&(e[o]=h[o])}}function be(e){this.src=e,this.g={},this.h=0}be.prototype.add=function(e,r,o,h,_){const v=e.toString();e=this.g[v],e||(e=this.g[v]=[],this.h++);const T=an(e,r,h,_);return T>-1?(r=e[T],o||(r.fa=!1)):(r=new Ds(r,this.src,v,!!h,_),r.fa=o,e.push(r)),r};function on(e,r){const o=r.type;if(o in e.g){var h=e.g[o],_=Array.prototype.indexOf.call(h,r,void 0),v;(v=_>=0)&&Array.prototype.splice.call(h,_,1),v&&(Ae(r),e.g[o].length==0&&(delete e.g[o],e.h--))}}function an(e,r,o,h){for(let _=0;_<e.length;++_){const v=e[_];if(!v.da&&v.listener==r&&v.capture==!!o&&v.ha==h)return _}return-1}var hn="closure_lm_"+(Math.random()*1e6|0),cn={};function ui(e,r,o,h,_){if(Array.isArray(r)){for(let v=0;v<r.length;v++)ui(e,r[v],o,h,_);return null}return o=pi(o),e&&e[Dt]?e.J(r,o,w(h)?!!h.capture:!1,_):Ls(e,r,o,!1,h,_)}function Ls(e,r,o,h,_,v){if(!r)throw Error("Invalid event type");const T=w(_)?!!_.capture:!!_;let C=un(e);if(C||(e[hn]=C=new be(e)),o=C.add(r,o,h,T,v),o.proxy)return o;if(h=Us(),o.proxy=h,h.src=e,h.listener=o,e.addEventListener)y||(_=T),_===void 0&&(_=!1),e.addEventListener(r.toString(),h,_);else if(e.attachEvent)e.attachEvent(di(r.toString()),h);else if(e.addListener&&e.removeListener)e.addListener(h);else throw Error("addEventListener and attachEvent are unavailable.");return o}function Us(){function e(o){return r.call(e.src,e.listener,o)}const r=Ms;return e}function fi(e,r,o,h,_){if(Array.isArray(r))for(var v=0;v<r.length;v++)fi(e,r[v],o,h,_);else h=w(h)?!!h.capture:!!h,o=pi(o),e&&e[Dt]?(e=e.i,v=String(r).toString(),v in e.g&&(r=e.g[v],o=an(r,o,h,_),o>-1&&(Ae(r[o]),Array.prototype.splice.call(r,o,1),r.length==0&&(delete e.g[v],e.h--)))):e&&(e=un(e))&&(r=e.g[r.toString()],e=-1,r&&(e=an(r,o,h,_)),(o=e>-1?r[e]:null)&&ln(o))}function ln(e){if(typeof e!="number"&&e&&!e.da){var r=e.src;if(r&&r[Dt])on(r.i,e);else{var o=e.type,h=e.proxy;r.removeEventListener?r.removeEventListener(o,h,e.capture):r.detachEvent?r.detachEvent(di(o),h):r.addListener&&r.removeListener&&r.removeListener(h),(o=un(r))?(on(o,e),o.h==0&&(o.src=null,r[hn]=null)):Ae(e)}}}function di(e){return e in cn?cn[e]:cn[e]="on"+e}function Ms(e,r){if(e.da)e=!0;else{r=new X(r,this);const o=e.listener,h=e.ha||e.src;e.fa&&ln(e),e=o.call(h,r)}return e}function un(e){return e=e[hn],e instanceof be?e:null}var fn="__closure_events_fn_"+(Math.random()*1e9>>>0);function pi(e){return typeof e=="function"?e:(e[fn]||(e[fn]=function(r){return e.handleEvent(r)}),e[fn])}function G(){m.call(this),this.i=new be(this),this.M=this,this.G=null}S(G,m),G.prototype[Dt]=!0,G.prototype.removeEventListener=function(e,r,o,h){fi(this,e,r,o,h)};function K(e,r){var o,h=e.G;if(h)for(o=[];h;h=h.G)o.push(h);if(e=e.M,h=r.type||r,typeof r=="string")r=new p(r,e);else if(r instanceof p)r.target=r.target||e;else{var _=r;r=new p(h,e),li(r,_)}_=!0;let v,T;if(o)for(T=o.length-1;T>=0;T--)v=r.g=o[T],_=Ce(v,h,!0,r)&&_;if(v=r.g=e,_=Ce(v,h,!0,r)&&_,_=Ce(v,h,!1,r)&&_,o)for(T=0;T<o.length;T++)v=r.g=o[T],_=Ce(v,h,!1,r)&&_}G.prototype.N=function(){if(G.Z.N.call(this),this.i){var e=this.i;for(const r in e.g){const o=e.g[r];for(let h=0;h<o.length;h++)Ae(o[h]);delete e.g[r],e.h--}}this.G=null},G.prototype.J=function(e,r,o,h){return this.i.add(String(e),r,!1,o,h)},G.prototype.K=function(e,r,o,h){return this.i.add(String(e),r,!0,o,h)};function Ce(e,r,o,h){if(r=e.i.g[String(r)],!r)return!0;r=r.concat();let _=!0;for(let v=0;v<r.length;++v){const T=r[v];if(T&&!T.da&&T.capture==o){const C=T.listener,B=T.ha||T.src;T.fa&&on(e.i,T),_=C.call(B,h)!==!1&&_}}return _&&!h.defaultPrevented}function xs(e,r){if(typeof e!="function")if(e&&typeof e.handleEvent=="function")e=E(e.handleEvent,e);else throw Error("Invalid listener argument");return Number(r)>2147483647?-1:l.setTimeout(e,r||0)}function gi(e){e.g=xs(()=>{e.g=null,e.i&&(e.i=!1,gi(e))},e.l);const r=e.h;e.h=null,e.m.apply(null,r)}class Fs extends m{constructor(r,o){super(),this.m=r,this.l=o,this.h=null,this.i=!1,this.g=null}j(r){this.h=arguments,this.g?this.i=!0:gi(this)}N(){super.N(),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Qt(e){m.call(this),this.h=e,this.g={}}S(Qt,m);var mi=[];function _i(e){Se(e.g,function(r,o){this.g.hasOwnProperty(o)&&ln(r)},e),e.g={}}Qt.prototype.N=function(){Qt.Z.N.call(this),_i(this)},Qt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var dn=l.JSON.stringify,Vs=l.JSON.parse,js=class{stringify(e){return l.JSON.stringify(e,void 0)}parse(e){return l.JSON.parse(e,void 0)}};function yi(){}function Bs(){}var Zt={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function pn(){p.call(this,"d")}S(pn,p);function gn(){p.call(this,"c")}S(gn,p);var zt={},wi=null;function mn(){return wi=wi||new G}zt.Ia="serverreachability";function vi(e){p.call(this,zt.Ia,e)}S(vi,p);function te(e){const r=mn();K(r,new vi(r))}zt.STAT_EVENT="statevent";function Ii(e,r){p.call(this,zt.STAT_EVENT,e),this.stat=r}S(Ii,p);function J(e){const r=mn();K(r,new Ii(r,e))}zt.Ja="timingevent";function Ei(e,r){p.call(this,zt.Ja,e),this.size=r}S(Ei,p);function ee(e,r){if(typeof e!="function")throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){e()},r)}function ne(){this.g=!0}ne.prototype.ua=function(){this.g=!1};function $s(e,r,o,h,_,v){e.info(function(){if(e.g)if(v){var T="",C=v.split("&");for(let M=0;M<C.length;M++){var B=C[M].split("=");if(B.length>1){const H=B[0];B=B[1];const at=H.split("_");T=at.length>=2&&at[1]=="type"?T+(H+"="+B+"&"):T+(H+"=redacted&")}}}else T=null;else T=v;return"XMLHTTP REQ ("+h+") [attempt "+_+"]: "+r+`
2`+o+`
3`+T})}function Hs(e,r,o,h,_,v,T){e.info(function(){return"XMLHTTP RESP ("+h+") [ attempt "+_+"]: "+r+`
4`+o+`
5`+v+" "+T})}function Gt(e,r,o,h){e.info(function(){return"XMLHTTP TEXT ("+r+"): "+Gs(e,o)+(h?" "+h:"")})}function zs(e,r){e.info(function(){return"TIMEOUT: "+r})}ne.prototype.info=function(){};function Gs(e,r){if(!e.g)return r;if(!r)return null;try{const v=JSON.parse(r);if(v){for(e=0;e<v.length;e++)if(Array.isArray(v[e])){var o=v[e];
5if(!(o.length<2)){var h=o[1];if(Array.isArray(h)&&!(h.length<1)){var _=h[0];if(_!="noop"&&_!="stop"&&_!="close")for(let T=1;T<h.length;T++)h[T]=""}}}}return dn(v)}catch{return r}}var _n={NO_ERROR:0,TIMEOUT:8},Ws={},Ti;function yn(){}S(yn,yi),yn.prototype.g=function(){return new XMLHttpRequest},Ti=new yn;function ie(e){return encodeURIComponent(String(e))}function qs(e){var r=1;e=e.split(":");const o=[];for(;r>0&&e.length;)o.push(e.shift()),r--;return e.length&&o.push(e.join(":")),o}function vt(e,r,o,h){this.j=e,this.i=r,this.l=o,this.S=h||1,this.V=new Qt(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new Ai}function Ai(){this.i=null,this.g="",this.h=!1}var Si={},wn={};function vn(e,r,o){e.M=1,e.A=Ne(ot(r)),e.u=o,e.R=!0,bi(e,null)}function bi(e,r){e.F=Date.now(),Re(e),e.B=ot(e.A);var o=e.B,h=e.S;Array.isArray(h)||(h=[String(h)]),Vi(o.i,"t",h),e.C=0,o=e.j.L,e.h=new Ai,e.g=ir(e.j,o?r:null,!e.u),e.P>0&&(e.O=new Fs(E(e.Y,e,e.g),e.P)),r=e.V,o=e.g,h=e.ba;var _="readystatechange";Array.isArray(_)||(_&&(mi[0]=_.toString()),_=mi);for(let v=0;v<_.length;v++){const T=ui(o,_[v],h||r.handleEvent,!1,r.h||r);if(!T)break;r.g[T.key]=T}r=e.J?hi(e.J):{},e.u?(e.v||(e.v="POST"),r["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.B,e.v,e.u,r)):(e.v="GET",e.g.ea(e.B,e.v,null,r)),te(),$s(e.i,e.v,e.B,e.l,e.S,e.u)}vt.prototype.ba=function(e){e=e.target;const r=this.O;r&&Tt(e)==3?r.j():this.Y(e)},vt.prototype.Y=function(e){try{if(e==this.g)t:{const C=Tt(this.g),B=this.g.ya(),M=this.g.ca();if(!(C<3)&&(C!=3||this.g&&(this.h.h||this.g.la()||Wi(this.g)))){this.K||C!=4||B==7||(B==8||M<=0?te(3):te(2)),In(this);var r=this.g.ca();this.X=r;var o=Ks(this);if(this.o=r==200,Hs(this.i,this.v,this.B,this.l,this.S,C,r),this.o){if(this.U&&!this.L){e:{if(this.g){var h,_=this.g;if((h=_.g?_.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!f(h)){var v=h;break e}}v=null}if(e=v)Gt(this.i,this.l,e,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,En(this,e);else{this.o=!1,this.m=3,J(12),Ot(this),re(this);break t}}if(this.R){e=!0;let H;for(;!this.K&&this.C<o.length;)if(H=Js(this,o),H==wn){C==4&&(this.m=4,J(14),e=!1),Gt(this.i,this.l,null,"[Incomplete Response]");break}else if(H==Si){this.m=4,J(15),Gt(this.i,this.l,o,"[Invalid Chunk]"),e=!1;break}else Gt(this.i,this.l,H,null),En(this,H);if(Ci(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),C!=4||o.length!=0||this.h.h||(this.m=1,J(16),e=!1),this.o=this.o&&e,!e)Gt(this.i,this.l,o,"[Invalid Chunked Response]"),Ot(this),re(this);else if(o.length>0&&!this.W){this.W=!0;var T=this.j;T.g==this&&T.aa&&!T.P&&(T.j.info("Great, no buffering proxy detected. Bytes received: "+o.length),kn(T),T.P=!0,J(11))}}else Gt(this.i,this.l,o,null),En(this,o);C==4&&Ot(this),this.o&&!this.K&&(C==4?Zi(this.j,this):(this.o=!1,Re(this)))}else co(this.g),r==400&&o.indexOf("Unknown SID")>0?(this.m=3,J(12)):(this.m=0,J(13)),Ot(this),re(this)}}}catch{}};function Ks(e){if(!Ci(e))return e.g.la();const r=Wi(e.g);if(r==="")return"";let o="";const h=r.length,_=Tt(e.g)==4;if(!e.h.i){if(typeof TextDecoder>"u")return Ot(e),re(e),"";e.h.i=new l.TextDecoder}for(let v=0;v<h;v++)e.h.h=!0,o+=e.h.i.decode(r[v],{stream:!(_&&v==h-1)});return r.length=0,e.h.g+=o,e.C=0,e.h.g}function Ci(e){return e.g?e.v=="GET"&&e.M!=2&&e.j.Aa:!1}function Js(e,r){var o=e.C,h=r.indexOf(`
6`,o);return h==-1?wn:(o=Number(r.substring(o,h)),isNaN(o)?Si:(h+=1,h+o>r.length?wn:(r=r.slice(h,h+o),e.C=h+o,r)))}vt.prototype.cancel=function(){this.K=!0,Ot(this)};function Re(e){e.T=Date.now()+e.H,Ri(e,e.H)}function Ri(e,r){if(e.D!=null)throw Error("WatchDog timer not null");e.D=ee(E(e.aa,e),r)}function In(e){e.D&&(l.clearTimeout(e.D),e.D=null)}vt.prototype.aa=function(){this.D=null;const e=Date.now();e-this.T>=0?(zs(this.i,this.B),this.M!=2&&(te(),J(17)),Ot(this),this.m=2,re(this)):Ri(this,this.T-e)};function re(e){e.j.I==0||e.K||Zi(e.j,e)}function Ot(e){In(e);var r=e.O;r&&typeof r.dispose=="function"&&r.dispose(),e.O=null,_i(e.V),e.g&&(r=e.g,e.g=null,r.abort(),r.dispose())}function En(e,r){try{var o=e.j;if(o.I!=0&&(o.g==e||Tn(o.h,e))){if(!e.L&&Tn(o.h,e)&&o.I==3){try{var h=o.Ba.g.parse(r)}catch{h=null}if(Array.isArray(h)&&h.length==3){var _=h;
6if(_[0]==0){t:if(!o.v){if(o.g)if(o.g.F+3e3<e.F)Le(o),De(o);else break t;Nn(o),J(18)}}else o.xa=_[1],0<o.xa-o.K&&_[2]<37500&&o.F&&o.A==0&&!o.C&&(o.C=ee(E(o.Va,o),6e3));Pi(o.h)<=1&&o.ta&&(o.ta=void 0)}else Ut(o,11)}else if((e.L||o.g==e)&&Le(o),!f(r))for(_=o.Ba.g.parse(r),r=0;r<_.length;r++){let M=_[r];const H=M[0];if(!(H<=o.K))if(o.K=H,M=M[1],o.I==2)if(M[0]=="c"){o.M=M[1],o.ba=M[2];const at=M[3];at!=null&&(o.ka=at,o.j.info("VER="+o.ka));const Mt=M[4];Mt!=null&&(o.za=Mt,o.j.info("SVER="+o.za));const At=M[5];At!=null&&typeof At=="number"&&At>0&&(h=1.5*At,o.O=h,o.j.info("backChannelRequestTimeoutMs_="+h)),h=o;const St=e.g;if(St){const Ue=St.g?St.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Ue){var v=h.h;v.g||Ue.indexOf("spdy")==-1&&Ue.indexOf("quic")==-1&&Ue.indexOf("h2")==-1||(v.j=v.l,v.g=new Set,v.h&&(An(v,v.h),v.h=null))}if(h.G){const Pn=St.g?St.g.getResponseHeader("X-HTTP-Session-Id"):null;Pn&&(h.wa=Pn,x(h.J,h.G,Pn))}}o.I=3,o.l&&o.l.ra(),o.aa&&(o.T=Date.now()-e.F,o.j.info("Handshake RTT: "+o.T+"ms")),h=o;var T=e;if(h.na=nr(h,h.L?h.ba:null,h.W),T.L){Di(h.h,T);var C=T,B=h.O;B&&(C.H=B),C.D&&(In(C),Re(C)),h.g=T}else Yi(h);o.i.length>0&&Oe(o)}else M[0]!="stop"&&M[0]!="close"||Ut(o,7);else o.I==3&&(M[0]=="stop"||M[0]=="close"?M[0]=="stop"?Ut(o,7):Rn(o):M[0]!="noop"&&o.l&&o.l.qa(M),o.A=0)}}te(4)}catch{}}var Xs=class{constructor(e,r){this.g=e,this.map=r}};function Ni(e){this.l=e||10,l.PerformanceNavigationTiming?(e=l.performance.getEntriesByType("navigation"),e=e.length>0&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(l.chrome&&l.chrome.loadTimes&&l.chrome.loadTimes()&&l.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function ki(e){return e.h?!0:e.g?e.g.size>=e.j:!1}function Pi(e){return e.h?1:e.g?e.g.size:0}function Tn(e,r){return e.h?e.h==r:e.g?e.g.has(r):!1}function An(e,r){e.g?e.g.add(r):e.h=r}function Di(e,r){e.h&&e.h==r?e.h=null:e.g&&e.g.has(r)&&e.g.delete(r)}Ni.prototype.cancel=function(){if(this.i=Oi(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const e of this.g.values())e.cancel();this.g.clear()}};function Oi(e){if(e.h!=null)return e.i.concat(e.h.G);if(e.g!=null&&e.g.size!==0){let r=e.i;for(const o of e.g.values())r=r.concat(o.G);return r}return U(e.i)}var Li=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Ys(e,r){if(e){e=e.split("&");for(let o=0;o<e.length;o++){const h=e[o].indexOf("=");let _,v=null;h>=0?(_=e[o].substring(0,h),v=e[o].substring(h+1)):_=e[o],r(_,v?decodeURIComponent(v.replace(/\+/g," ")):"")}}}function It(e){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let r;e instanceof It?(this.l=e.l,se(this,e.j),this.o=e.o,this.g=e.g,oe(this,e.u),this.h=e.h,Sn(this,ji(e.i)),this.m=e.m):e&&(r=String(e).match(Li))?(this.l=!1,se(this,r[1]||"",!0),this.o=ae(r[2]||""),this.g=ae(r[3]||"",!0),oe(this,r[4]),this.h=ae(r[5]||"",!0),Sn(this,r[6]||"",!0),this.m=ae(r[7]||"")):(this.l=!1,this.i=new ce(null,this.l))}It.prototype.toString=function(){const e=[];var r=this.j;r&&e.push(he(r,Ui,!0),":");var o=this.g;return(o||r=="file")&&(e.push("//"),(r=this.o)&&e.push(he(r,Ui,!0),"@"),e.push(ie(o).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o=this.u,o!=null&&e.push(":",String(o))),(o=this.h)&&(this.g&&o.charAt(0)!="/"&&e.push("/"),e.push(he(o,o.charAt(0)=="/"?to:Zs,!0))),(o=this.i.toString())&&e.push("?",o),(o=this.m)&&e.push("#",he(o,no)),e.join("")},It.prototype.resolve=function(e){const r=ot(this);let o=!!e.j;o?se(r,e.j):o=!!e.o,o?r.o=e.o:o=!!e.g,o?r.g=e.g:o=e.u!=null;var h=e.h;if(o)oe(r,e.u);else if(o=!!e.h){if(h.charAt(0)!="/")if(this.g&&!this.h)h="/"+h;else{var _=r.h.lastIndexOf("/");_!=-1&&(h=r.h.slice(0,_+1)+h)}if(_=h,_==".."||_==".")h="";else if(_.indexOf("./")!=-1||_.indexOf("/.")!=-1){h=_.lastIndexOf("/",0)==0,_=_.split("/");const v=[];for(let T=0;T<_.length;){const C=_[T++];C=="."?h&&T==_.length&&v.push(""):C==".."?((v.length>1||v.length==1&&v[0]!="")&&v.pop(),h&&T==_.length&&v.push("")):(v.push(C),h=!0)}h=v.join("/")}else h=_}return o?r.h=h:o=e.i.toString()!=="",o?Sn(r,ji(e.i)):o=!!e.m,o&&(r.m=e.m),r};function ot(e){return new It(e)}function se(e,r,o){e.j=o?ae(r,!0):r,e.j&&(e.j=e.j.replace(/:$/,""))}function oe(e,r){if(r){if(r=Number(r),isNaN(r)||r<0)throw Error("Bad port number "+r);e.u=r}else e.u=null}function Sn(e,r,o){r instanceof ce?(e.i=r,io(e.i,e.l)):(o||(r=he(r,eo)),e.i=new ce(r,e.l))}function x(e,r,o){e.i.set(r,o)}function Ne(e){return x(e,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),e}function ae(e,r){return e?r?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function he(e,r,o){return typeof e=="string"?(e=encodeURI(e).replace(r,Qs),o&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Qs(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var Ui=/[#\/\?@]/g,Zs=/[#\?:]/g,to=/[#\?]/g,eo=/[#\?@]/g,no=/#/g;function ce(e,r){this.h=this.g=null,this.i=e||null,this.j=!!r}function Lt(e){e.g||(e.g=new Map,e.h=0,e.i&&Ys(e.i,function(r,o){e.add(decodeURIComponent(r.replace(/\+/g," ")),o)}))}i=ce.prototype,i.add=function(e,r){Lt(this),this.i=null,e=Wt(this,e);let o=this.g.get(e);return o||this.g.set(e,o=[]),o.push(r),this.h+=1,this};function Mi(e,r){Lt(e),r=Wt(e,r),e.g.has(r)&&(e.i=null,e.h-=e.g.get(r).length,e.g.delete(r))}function xi(e,r){return Lt(e),r=Wt(e,r),e.g.has(r)}i.forEach=function(e,r){Lt(this),this.g.forEach(function(o,h){o.forEach(function(_){e.call(r,_,h,this)},this)},this)};function Fi(e,r){Lt(e);let o=[];
6if(typeof r=="string")xi(e,r)&&(o=o.concat(e.g.get(Wt(e,r))));else for(e=Array.from(e.g.values()),r=0;r<e.length;r++)o=o.concat(e[r]);return o}i.set=function(e,r){return Lt(this),this.i=null,e=Wt(this,e),xi(this,e)&&(this.h-=this.g.get(e).length),this.g.set(e,[r]),this.h+=1,this},i.get=function(e,r){return e?(e=Fi(this,e),e.length>0?String(e[0]):r):r};function Vi(e,r,o){Mi(e,r),o.length>0&&(e.i=null,e.g.set(Wt(e,r),U(o)),e.h+=o.length)}i.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],r=Array.from(this.g.keys());for(let h=0;h<r.length;h++){var o=r[h];const _=ie(o);o=Fi(this,o);for(let v=0;v<o.length;v++){let T=_;o[v]!==""&&(T+="="+ie(o[v])),e.push(T)}}return this.i=e.join("&")};function ji(e){const r=new ce;return r.i=e.i,e.g&&(r.g=new Map(e.g),r.h=e.h),r}function Wt(e,r){return r=String(r),e.j&&(r=r.toLowerCase()),r}function io(e,r){r&&!e.j&&(Lt(e),e.i=null,e.g.forEach(function(o,h){const _=h.toLowerCase();h!=_&&(Mi(this,h),Vi(this,_,o))},e)),e.j=r}function ro(e,r){const o=new ne;if(l.Image){const h=new Image;h.onload=A(Et,o,"TestLoadImage: loaded",!0,r,h),h.onerror=A(Et,o,"TestLoadImage: error",!1,r,h),h.onabort=A(Et,o,"TestLoadImage: abort",!1,r,h),h.ontimeout=A(Et,o,"TestLoadImage: timeout",!1,r,h),l.setTimeout(function(){h.ontimeout&&h.ontimeout()},1e4),h.src=e}else r(!1)}function so(e,r){const o=new ne,h=new AbortController,_=setTimeout(()=>{h.abort(),Et(o,"TestPingServer: timeout",!1,r)},1e4);fetch(e,{signal:h.signal}).then(v=>{clearTimeout(_),v.ok?Et(o,"TestPingServer: ok",!0,r):Et(o,"TestPingServer: server error",!1,r)}).catch(()=>{clearTimeout(_),Et(o,"TestPingServer: error",!1,r)})}function Et(e,r,o,h,_){try{_&&(_.onload=null,_.onerror=null,_.onabort=null,_.ontimeout=null),h(o)}catch{}}function oo(){this.g=new js}function bn(e){this.i=e.Sb||null,this.h=e.ab||!1}S(bn,yi),bn.prototype.g=function(){return new ke(this.i,this.h)};function ke(e,r){G.call(this),this.H=e,this.o=r,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}S(ke,G),i=ke.prototype,i.open=function(e,r){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=e,this.D=r,this.readyState=1,ue(this)},i.send=function(e){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const r={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};e&&(r.body=e),(this.H||l).fetch(new Request(this.D,r)).then(this.Pa.bind(this),this.ga.bind(this))},i.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,le(this)),this.readyState=0},i.Pa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,ue(this)),this.g&&(this.readyState=3,ue(this),this.g)))if(this.responseType==="arraybuffer")e.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;Bi(this)}else e.text().then(this.Oa.bind(this),this.ga.bind(this))};function Bi(e){e.j.read().then(e.Ma.bind(e)).catch(e.ga.bind(e))}i.Ma=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var r=e.value?e.value:new Uint8Array(0);(r=this.B.decode(r,{stream:!e.done}))&&(this.response=this.responseText+=r)}e.done?le(this):ue(this),this.readyState==3&&Bi(this)}},i.Oa=function(e){this.g&&(this.response=this.responseText=e,le(this))},i.Na=function(e){this.g&&(this.response=e,le(this))},i.ga=function(){this.g&&le(this)};function le(e){e.readyState=4,e.l=null,e.j=null,e.B=null,ue(e)}i.setRequestHeader=function(e,r){this.A.append(e,r)},i.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},i.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],r=this.h.entries();
6for(var o=r.next();!o.done;)o=o.value,e.push(o[0]+": "+o[1]),o=r.next();return e.join(`\r
7`)};function ue(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(ke.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(e){this.m=e?"include":"same-origin"}});function $i(e){let r="";return Se(e,function(o,h){r+=h,r+=":",r+=o,r+=`\r
8`}),r}function Cn(e,r,o){t:{for(h in o){var h=!1;break t}h=!0}h||(o=$i(o),typeof e=="string"?o!=null&&ie(o):x(e,r,o))}function V(e){G.call(this),this.headers=new Map,this.L=e||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}S(V,G);var ao=/^https?$/i,ho=["POST","PUT"];i=V.prototype,i.Fa=function(e){this.H=e},i.ea=function(e,r,o,h){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);r=r?r.toUpperCase():"GET",this.D=e,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():Ti.g(),this.g.onreadystatechange=b(E(this.Ca,this));try{this.B=!0,this.g.open(r,String(e),!0),this.B=!1}catch(v){Hi(this,v);return}if(e=o||"",o=new Map(this.headers),h)if(Object.getPrototypeOf(h)===Object.prototype)for(var _ in h)o.set(_,h[_]);else if(typeof h.keys=="function"&&typeof h.get=="function")for(const v of h.keys())o.set(v,h.get(v));else throw Error("Unknown input type for opt_headers: "+String(h));h=Array.from(o.keys()).find(v=>v.toLowerCase()=="content-type"),_=l.FormData&&e instanceof l.FormData,!(Array.prototype.indexOf.call(ho,r,void 0)>=0)||h||_||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[v,T]of o)this.g.setRequestHeader(v,T);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(e),this.v=!1}catch(v){Hi(this,v)}};function Hi(e,r){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=r,e.o=5,zi(e),Pe(e)}function zi(e){e.A||(e.A=!0,K(e,"complete"),K(e,"error"))}i.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=e||7,K(this,"complete"),K(this,"abort"),Pe(this))},i.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Pe(this,!0)),V.Z.N.call(this)},i.Ca=function(){this.u||(this.B||this.v||this.j?Gi(this):this.Xa())},i.Xa=function(){Gi(this)};function Gi(e){if(e.h&&typeof c<"u"){if(e.v&&Tt(e)==4)setTimeout(e.Ca.bind(e),0);else if(K(e,"readystatechange"),Tt(e)==4){e.h=!1;try{const v=e.ca();t:switch(v){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}var o;if(!(o=r)){var h;if(h=v===0){let T=String(e.D).match(Li)[1]||null;!T&&l.self&&l.self.location&&(T=l.self.location.protocol.slice(0,-1)),h=!ao.test(T?T.toLowerCase():"")}o=h}if(o)K(e,"complete"),K(e,"success");else{e.o=6;try{var _=Tt(e)>2?e.g.statusText:""}catch{_=""}e.l=_+" ["+e.ca()+"]",zi(e)}}finally{Pe(e)}}}}function Pe(e,r){if(e.g){e.m&&(clearTimeout(e.m),e.m=null);const o=e.g;e.g=null,r||K(e,"ready");try{o.onreadystatechange=null}catch{}}}i.isActive=function(){return!!this.g};function Tt(e){return e.g?e.g.readyState:0}i.ca=function(){try{return Tt(this)>2?this.g.status:-1}catch{return-1}},i.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},i.La=function(e){if(this.g){var r=this.g.responseText;return e&&r.indexOf(e)==0&&(r=r.substring(e.length)),Vs(r)}};function Wi(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.F){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch{return null}}function co(e){const r={};e=(e.g&&Tt(e)>=2&&e.g.getAllResponseHeaders()||"").split(`\r
9`);for(let h=0;h<e.length;h++){if(f(e[h]))continue;var o=qs(e[h]);const _=o[0];if(o=o[1],typeof o!="string")continue;o=o.trim();const v=r[_]||[];r[_]=v,v.push(o)}Os(r,function(h){return h.join(", ")})}i.ya=function(){return this.o},i.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};
9function fe(e,r,o){return o&&o.internalChannelParams&&o.internalChannelParams[e]||r}function qi(e){this.za=0,this.i=[],this.j=new ne,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=fe("failFast",!1,e),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=fe("baseRetryDelayMs",5e3,e),this.Za=fe("retryDelaySeedMs",1e4,e),this.Ta=fe("forwardChannelMaxRetries",2,e),this.va=fe("forwardChannelRequestTimeoutMs",2e4,e),this.ma=e&&e.xmlHttpFactory||void 0,this.Ua=e&&e.Rb||void 0,this.Aa=e&&e.useFetchStreams||!1,this.O=void 0,this.L=e&&e.supportsCrossDomainXhr||!1,this.M="",this.h=new Ni(e&&e.concurrentRequestLimit),this.Ba=new oo,this.S=e&&e.fastHandshake||!1,this.R=e&&e.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=e&&e.Pb||!1,e&&e.ua&&this.j.ua(),e&&e.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&e&&e.detectBufferingProxy||!1,this.ia=void 0,e&&e.longPollingTimeout&&e.longPollingTimeout>0&&(this.ia=e.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}i=qi.prototype,i.ka=8,i.I=1,i.connect=function(e,r,o,h){J(0),this.W=e,this.H=r||{},o&&h!==void 0&&(this.H.OSID=o,this.H.OAID=h),this.F=this.X,this.J=nr(this,null,this.W),Oe(this)};function Rn(e){if(Ki(e),e.I==3){var r=e.V++,o=ot(e.J);if(x(o,"SID",e.M),x(o,"RID",r),x(o,"TYPE","terminate"),de(e,o),r=new vt(e,e.j,r),r.M=2,r.A=Ne(ot(o)),o=!1,l.navigator&&l.navigator.sendBeacon)try{o=l.navigator.sendBeacon(r.A.toString(),"")}catch{}!o&&l.Image&&(new Image().src=r.A,o=!0),o||(r.g=ir(r.j,null),r.g.ea(r.A)),r.F=Date.now(),Re(r)}er(e)}function De(e){e.g&&(kn(e),e.g.cancel(),e.g=null)}function Ki(e){De(e),e.v&&(l.clearTimeout(e.v),e.v=null),Le(e),e.h.cancel(),e.m&&(typeof e.m=="number"&&l.clearTimeout(e.m),e.m=null)}function Oe(e){if(!ki(e.h)&&!e.m){e.m=!0;var r=e.Ea;Q||u(),z||(Q(),z=!0),g.add(r,e),e.D=0}}function lo(e,r){return Pi(e.h)>=e.h.j-(e.m?1:0)?!1:e.m?(e.i=r.G.concat(e.i),!0):e.I==1||e.I==2||e.D>=(e.Sa?0:e.Ta)?!1:(e.m=ee(E(e.Ea,e,r),tr(e,e.D)),e.D++,!0)}i.Ea=function(e){if(this.m)if(this.m=null,this.I==1){if(!e){this.V=Math.floor(Math.random()*1e5),e=this.V++;const _=new vt(this,this.j,e);let v=this.o;if(this.U&&(v?(v=hi(v),li(v,this.U)):v=this.U),this.u!==null||this.R||(_.J=v,v=null),this.S)t:{for(var r=0,o=0;o<this.i.length;o++){e:{var h=this.i[o];if("__data__"in h.map&&(h=h.map.__data__,typeof h=="string")){h=h.length;break e}h=void 0}if(h===void 0)break;if(r+=h,r>4096){r=o;break t}if(r===4096||o===this.i.length-1){r=o+1;break t}}r=1e3}else r=1e3;r=Xi(this,_,r),o=ot(this.J),x(o,"RID",e),x(o,"CVER",22),this.G&&x(o,"X-HTTP-Session-Id",this.G),de(this,o),v&&(this.R?r="headers="+ie($i(v))+"&"+r:this.u&&Cn(o,this.u,v)),An(this.h,_),this.Ra&&x(o,"TYPE","init"),this.S?(x(o,"$req",r),x(o,"SID","null"),_.U=!0,vn(_,o,null)):vn(_,o,r),this.I=2}}else this.I==3&&(e?Ji(this,e):this.i.length==0||ki(this.h)||Ji(this))};function Ji(e,r){var o;r?o=r.l:o=e.V++;const h=ot(e.J);x(h,"SID",e.M),x(h,"RID",o),x(h,"AID",e.K),de(e,h),e.u&&e.o&&Cn(h,e.u,e.o),o=new vt(e,e.j,o,e.D+1),e.u===null&&(o.J=e.o),r&&(e.i=r.G.concat(e.i)),r=Xi(e,o,1e3),o.H=Math.round(e.va*.5)+Math.round(e.va*.5*Math.random()),An(e.h,o),vn(o,h,r)}function de(e,r){e.H&&Se(e.H,function(o,h){x(r,h,o)}),e.l&&Se({},function(o,h){x(r,h,o)})}function Xi(e,r,o){o=Math.min(e.i.length,o);const h=e.l?E(e.l.Ka,e.l,e):null;t:{var _=e.i;let C=-1;for(;;){const B=["count="+o];C==-1?o>0?(C=_[0].g,B.push("ofs="+C)):C=0:B.push("ofs="+C);let M=!0;for(let H=0;H<o;H++){var v=_[H].g;const at=_[H].map;if(v-=C,v<0)C=Math.max(0,_[H].g-100),M=!1;else try{v="req"+v+"_"||"";try{var T=at instanceof Map?at:Object.entries(at);for(const[Mt,At]of T){let St=At;w(At)&&(St=dn(At)),B.push(v+Mt+"="+encodeURIComponent(St))}}catch(Mt){throw B.push(v+"type="+encodeURIComponent("_badmap")),Mt}}catch{h&&h(at)}}if(M){T=B.join("&");break t}}T=void 0}return e=e.i.splice(0,o),r.G=e,T}function Yi(e){if(!e.g&&!e.v){e.Y=1;var r=e.Da;Q||u(),z||(Q(),z=!0),g.add(r,e),e.A=0}}function Nn(e){return e.g||e.v||e.A>=3?!1:(e.Y++,e.v=ee(E(e.Da,e),tr(e,e.A)),e.A++,!0)}
vendor: 5,797 bytes, line 9
9i.Da=function(){if(this.v=null,Qi(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var e=4*this.T;this.j.info("BP detection timer enabled: "+e),this.B=ee(E(this.Wa,this),e)}},i.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,J(10),De(this),Qi(this))};function kn(e){e.B!=null&&(l.clearTimeout(e.B),e.B=null)}function Qi(e){e.g=new vt(e,e.j,"rpc",e.Y),e.u===null&&(e.g.J=e.o),e.g.P=0;var r=ot(e.na);x(r,"RID","rpc"),x(r,"SID",e.M),x(r,"AID",e.K),x(r,"CI",e.F?"0":"1"),!e.F&&e.ia&&x(r,"TO",e.ia),x(r,"TYPE","xmlhttp"),de(e,r),e.u&&e.o&&Cn(r,e.u,e.o),e.O&&(e.g.H=e.O);var o=e.g;e=e.ba,o.M=1,o.A=Ne(ot(r)),o.u=null,o.R=!0,bi(o,e)}i.Va=function(){this.C!=null&&(this.C=null,De(this),Nn(this),J(19))};function Le(e){e.C!=null&&(l.clearTimeout(e.C),e.C=null)}function Zi(e,r){var o=null;if(e.g==r){Le(e),kn(e),e.g=null;var h=2}else if(Tn(e.h,r))o=r.G,Di(e.h,r),h=1;else return;if(e.I!=0){if(r.o)if(h==1){o=r.u?r.u.length:0,r=Date.now()-r.F;var _=e.D;h=mn(),K(h,new Ei(h,o)),Oe(e)}else Yi(e);else if(_=r.m,_==3||_==0&&r.X>0||!(h==1&&lo(e,r)||h==2&&Nn(e)))switch(o&&o.length>0&&(r=e.h,r.i=r.i.concat(o)),_){case 1:Ut(e,5);break;case 4:Ut(e,10);break;case 3:Ut(e,6);break;default:Ut(e,2)}}}function tr(e,r){let o=e.Qa+Math.floor(Math.random()*e.Za);return e.isActive()||(o*=2),o*r}function Ut(e,r){if(e.j.info("Error code "+r),r==2){var o=E(e.bb,e),h=e.Ua;const _=!h;h=new It(h||"//www.google.com/images/cleardot.gif"),l.location&&l.location.protocol=="http"||se(h,"https"),Ne(h),_?ro(h.toString(),o):so(h.toString(),o)}else J(2);e.I=0,e.l&&e.l.pa(r),er(e),Ki(e)}i.bb=function(e){e?(this.j.info("Successfully pinged google.com"),J(2)):(this.j.info("Failed to ping google.com"),J(1))};function er(e){if(e.I=0,e.ja=[],e.l){const r=Oi(e.h);(r.length!=0||e.i.length!=0)&&(O(e.ja,r),O(e.ja,e.i),e.h.i.length=0,U(e.i),e.i.length=0),e.l.oa()}}function nr(e,r,o){var h=o instanceof It?ot(o):new It(o);if(h.g!="")r&&(h.g=r+"."+h.g),oe(h,h.u);else{var _=l.location;h=_.protocol,r=r?r+"."+_.hostname:_.hostname,_=+_.port;const v=new It(null);h&&se(v,h),r&&(v.g=r),_&&oe(v,_),o&&(v.h=o),h=v}return o=e.G,r=e.wa,o&&r&&x(h,o,r),x(h,"VER",e.ka),de(e,h),h}function ir(e,r,o){if(r&&!e.L)throw Error("Can't create secondary domain capable XhrIo object.");return r=e.Aa&&!e.ma?new V(new bn({ab:o})):new V(e.ma),r.Fa(e.L),r}i.isActive=function(){return!!this.l&&this.l.isActive(this)};function rr(){}i=rr.prototype,i.ra=function(){},i.qa=function(){},i.pa=function(){},i.oa=function(){},i.isActive=function(){return!0},i.Ka=function(){};function tt(e,r){G.call(this),this.g=new qi(r),this.l=e,this.h=r&&r.messageUrlParams||null,e=r&&r.messageHeaders||null,r&&r.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=r&&r.initMessageHeaders||null,r&&r.messageContentType&&(e?e["X-WebChannel-Content-Type"]=r.messageContentType:e={"X-WebChannel-Content-Type":r.messageContentType}),r&&r.sa&&(e?e["X-WebChannel-Client-Profile"]=r.sa:e={"X-WebChannel-Client-Profile":r.sa}),this.g.U=e,(e=r&&r.Qb)&&!f(e)&&(this.g.u=e),this.A=r&&r.supportsCrossDomainXhr||!1,this.v=r&&r.sendRawJson||!1,(r=r&&r.httpSessionIdParam)&&!f(r)&&(this.g.G=r,e=this.h,e!==null&&r in e&&(e=this.h,r in e&&delete e[r])),this.j=new qt(this)}S(tt,G),tt.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},tt.prototype.close=function(){Rn(this.g)},tt.prototype.o=function(e){var r=this.g;if(typeof e=="string"){var o={};o.__data__=e,e=o}else this.v&&(o={},o.__data__=dn(e),e=o);r.i.push(new Xs(r.Ya++,e)),r.I==3&&Oe(r)},tt.prototype.N=function(){this.g.l=null,delete this.j,Rn(this.g),delete this.g,tt.Z.N.call(this)};function sr(e){pn.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var r=e.__sm__;if(r){t:{for(const o in r){e=o;break t}e=void 0}(this.i=e)&&(e=this.i,r=r!==null&&e in r?r[e]:void 0),this.data=r}else this.data=e}S(sr,pn);function or(){gn.call(this),this.status=1}S(or,gn);function qt(e){this.g=e}S(qt,rr),qt.prototype.ra=function(){K(this.g,"a")},qt.prototype.qa=function(e){K(this.g,new sr(e))},qt.prototype.pa=function(e){K(this.g,new or)},qt.prototype.oa=function(){K(this.g,"b")},tt.prototype.send=tt.prototype.o,tt.prototype.open=tt.prototype.m,tt.prototype.close=tt.prototype.close,_n.NO_ERROR=0,_n.TIMEOUT=8,_n.HTTP_ERROR=6,Ws.COMPLETE="complete",Bs.EventType=Zt,Zt.OPEN="a",Zt.CLOSE="b",Zt.ERROR="c",Zt.MESSAGE="d",G.prototype.listen=G.prototype.J,V.prototype.listenOnce=V.prototype.K,V.prototype.getLastError=V.prototype.Ha,V.prototype.getLastErrorCode=V.prototype.ya,V.prototype.getStatus=V.prototype.ca,V.prototype.getResponseJson=V.prototype.La,V.prototype.getResponseText=V.prototype.la,V.prototype.send=V.prototype.ea,V.prototype.setWithCredentials=V.prototype.Fa}).apply(typeof xe<"u"?xe:typeof self<"u"?self:typeof window<"u"?window:{});class Z{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}Z.UNAUTHENTICATED=new Z(null),Z.GOOGLE_CREDENTIALS=new Z("google-credentials-uid"),Z.FIRST_PARTY=new Z("first-party-uid"),Z.MOCK_USER=new Z("mock-user");let sn="12.13.0";function Ph(i){sn=i}const Je=new ti("@firebase/firestore");function it(i,...t){if(Je.logLevel<=L.DEBUG){const n=t.map(Is);Je.debug(`Firestore (${sn}): ${i}`,...n)}}function vs(i,...t){if(Je.logLevel<=L.ERROR){const n=t.map(Is);Je.error(`Firestore (${sn}): ${i}`,...n)}}function Is(i){if(typeof i=="string")return i;try{return(function(n){return JSON.stringify(n)})(i)}catch{return i}}function Xe(i,t,n){let s="Unexpected state";
9typeof t=="string"?s=t:n=t,Es(i,s,n)}function Es(i,t,n){let s=`FIRESTORE (${sn}) INTERNAL ASSERTION FAILED: ${t} (ID: ${i.toString(16)})`;if(n!==void 0)try{s+=" CONTEXT: "+JSON.stringify(n)}catch{s+=" CONTEXT: "+n}throw vs(s),new Error(s)}function me(i,t,n,s){let a="Unexpected state";typeof n=="string"?a=n:s=n,i||Es(t,a,s)}const P={CANCELLED:"cancelled",INVALID_ARGUMENT:"invalid-argument",FAILED_PRECONDITION:"failed-precondition"};class D extends pt{constructor(t,n){super(t,n),this.code=t,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class _e{constructor(){this.promise=new Promise(((t,n)=>{this.resolve=t,this.reject=n}))}}class Dh{constructor(t,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class Oh{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,n){t.enqueueRetryable((()=>n(Z.UNAUTHENTICATED)))}shutdown(){}}class Lh{constructor(t){this.t=t,this.currentUser=Z.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,n){me(this.o===void 0,42304);let s=this.i;const a=I=>this.i!==s?(s=this.i,n(I)):Promise.resolve();let c=new _e;this.o=()=>{this.i++,this.currentUser=this.u(),c.resolve(),c=new _e,t.enqueueRetryable((()=>a(this.currentUser)))};const l=()=>{const I=c;t.enqueueRetryable((async()=>{await I.promise,await a(this.currentUser)}))},w=I=>{it("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=I,this.o&&(this.auth.addAuthTokenListener(this.o),l())};this.t.onInit((I=>w(I))),setTimeout((()=>{if(!this.auth){const I=this.t.getImmediate({optional:!0});I?w(I):(it("FirebaseAuthCredentialsProvider","Auth not yet detected"),c.resolve(),c=new _e)}}),0),l()}getToken(){const t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((s=>this.i!==t?(it("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):s?(me(typeof s.accessToken=="string",31837,{l:s}),new Dh(s.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const t=this.auth&&this.auth.getUid();return me(t===null||typeof t=="string",2055,{h:t}),new Z(t)}}class Uh{constructor(t,n,s){this.P=t,this.T=n,this.I=s,this.type="FirstParty",this.user=Z.FIRST_PARTY,this.R=new Map}A(){return this.I?this.I():null}get headers(){this.R.set("X-Goog-AuthUser",this.P);const t=this.A();return t&&this.R.set("Authorization",t),this.T&&this.R.set("X-Goog-Iam-Authorization-Token",this.T),this.R}}class Mh{constructor(t,n,s){this.P=t,this.T=n,this.I=s}getToken(){return Promise.resolve(new Uh(this.P,this.T,this.I))}start(t,n){t.enqueueRetryable((()=>n(Z.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class Cr{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class xh{constructor(t,n){this.V=n,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,mt(t)&&t.settings.appCheckToken&&(this.p=t.settings.appCheckToken)}start(t,n){me(this.o===void 0,3512);const s=c=>{c.error!=null&&it("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${c.error.message}`);const l=c.token!==this.m;return this.m=c.token,it("FirebaseAppCheckTokenProvider",`Received ${l?"new":"existing"} token.`),l?n(c.token):Promise.resolve()};this.o=c=>{t.enqueueRetryable((()=>s(c)))};const a=c=>{it("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=c,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((c=>a(c))),setTimeout((()=>{if(!this.appCheck){const c=this.V.getImmediate({optional:!0});c?a(c):it("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new Cr(this.p));const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then((n=>n?(me(typeof n.token=="string",44558,{tokenResult:n}),this.m=n.token,new Cr(n.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}function Fh(i){const t=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(i);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(n);else for(let s=0;s<i;
9s++)n[s]=Math.floor(256*Math.random());return n}class Vh{static newId(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=62*Math.floor(4.129032258064516);let s="";for(;s.length<20;){const a=Fh(40);for(let c=0;c<a.length;++c)s.length<20&&a[c]<n&&(s+=t.charAt(a[c]%62))}return s}}function kt(i,t){return i<t?-1:i>t?1:0}function jh(i,t){const n=Math.min(i.length,t.length);for(let s=0;s<n;s++){const a=i.charAt(s),c=t.charAt(s);if(a!==c)return Vn(a)===Vn(c)?kt(a,c):Vn(a)?1:-1}return kt(i.length,t.length)}const Bh=55296,$h=57343;function Vn(i){const t=i.charCodeAt(0);return t>=Bh&&t<=$h}const Rr="__name__";class ht{constructor(t,n,s){n===void 0?n=0:n>t.length&&Xe(637,{offset:n,range:t.length}),s===void 0?s=t.length-n:s>t.length-n&&Xe(1746,{length:s,range:t.length-n}),this.segments=t,this.offset=n,this.len=s}get length(){return this.len}isEqual(t){return ht.comparator(this,t)===0}child(t){const n=this.segments.slice(this.offset,this.limit());return t instanceof ht?t.forEach((s=>{n.push(s)})):n.push(t),this.construct(n)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}isImmediateParentOf(t){if(this.length+1!==t.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}forEach(t){for(let n=this.offset,s=this.limit();n<s;n++)t(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(t,n){const s=Math.min(t.length,n.length);for(let a=0;a<s;a++){const c=ht.compareSegments(t.get(a),n.get(a));if(c!==0)return c}return kt(t.length,n.length)}static compareSegments(t,n){const s=ht.isNumericId(t),a=ht.isNumericId(n);return s&&!a?-1:!s&&a?1:s&&a?ht.extractNumericId(t).compare(ht.extractNumericId(n)):jh(t,n)}static isNumericId(t){return t.startsWith("__id")&&t.endsWith("__")}static extractNumericId(t){return ii.fromString(t.substring(4,t.length-2))}}class nt extends ht{construct(t,n,s){return new nt(t,n,s)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...t){const n=[];for(const s of t){if(s.indexOf("//")>=0)throw new D(P.INVALID_ARGUMENT,`Invalid segment (${s}). Paths must not contain // in them.`);n.push(...s.split("/").filter((a=>a.length>0)))}return new nt(n)}static emptyPath(){return new nt([])}}const Hh=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Ft extends ht{construct(t,n,s){return new Ft(t,n,s)}static isValidIdentifier(t){return Hh.test(t)}canonicalString(){return this.toArray().map((t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Ft.isValidIdentifier(t)||(t="`"+t+"`"),t))).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===Rr}static keyField(){return new Ft([Rr])}static fromServerFormat(t){const n=[];let s="",a=0;const c=()=>{if(s.length===0)throw new D(P.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(s),s=""};let l=!1;for(;a<t.length;){const w=t[a];if(w==="\\"){if(a+1===t.length)throw new D(P.INVALID_ARGUMENT,"Path has trailing escape character: "+t);const I=t[a+1];if(I!=="\\"&&I!=="."&&I!=="`")throw new D(P.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);s+=I,a+=2}else w==="`"?(l=!l,a++):w!=="."||l?(s+=w,a++):(c(),a++)}if(c(),l)throw new D(P.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new Ft(n)}static emptyPath(){return new Ft([])}}class jt{constructor(t){this.path=t}static fromPath(t){return new jt(nt.fromString(t))}static fromName(t){return new jt(nt.fromString(t).popFirst(5))}static empty(){return new jt(nt.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&nt.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,n){return nt.comparator(t.path,n.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new jt(new nt(t.slice()))}}function zh(i,t,n,s){if(t===!0&&s===!0)throw new D(P.INVALID_ARGUMENT,`${i} and ${n} cannot be used together.`)}function Gh(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Ob
9ject.getPrototypeOf(i)===null)}function j(i,t){const n={typeString:i};return t&&(n.value=t),n}function Te(i,t){if(!Gh(i))throw new D(P.INVALID_ARGUMENT,"JSON must be an object");let n;for(const s in t)if(t[s]){const a=t[s].typeString,c="value"in t[s]?{value:t[s].value}:void 0;if(!(s in i)){n=`JSON missing required field: '${s}'`;break}const l=i[s];if(a&&typeof l!==a){n=`JSON field '${s}' must be a ${a}.`;break}if(c!==void 0&&l!==c.value){n=`Expected '${s}' field to equal '${c.value}'`;break}}if(n)throw new D(P.INVALID_ARGUMENT,n);return!0}const Nr=-62135596800,kr=1e6;class ct{static now(){return ct.fromMillis(Date.now())}static fromDate(t){return ct.fromMillis(t.getTime())}static fromMillis(t){const n=Math.floor(t/1e3),s=Math.floor((t-1e3*n)*kr);return new ct(n,s)}constructor(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new D(P.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new D(P.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<Nr)throw new D(P.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new D(P.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/kr}_compareTo(t){return this.seconds===t.seconds?kt(this.nanoseconds,t.nanoseconds):kt(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:ct._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(t){if(Te(t,ct._jsonSchema))return new ct(t.seconds,t.nanoseconds)}valueOf(){const t=this.seconds-Nr;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}ct._jsonSchemaVersion="firestore/timestamp/1.0",ct._jsonSchema={type:j("string",ct._jsonSchemaVersion),seconds:j("number"),nanoseconds:j("number")};function Wh(i){return i.name==="IndexedDbTransactionError"}class qh extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class Ht{constructor(t){this.binaryString=t}static fromBase64String(t){const n=(function(a){try{return atob(a)}catch(c){throw typeof DOMException<"u"&&c instanceof DOMException?new qh("Invalid base64 string: "+c):c}})(t);return new Ht(n)}static fromUint8Array(t){const n=(function(a){let c="";for(let l=0;l<a.length;++l)c+=String.fromCharCode(a[l]);return c})(t);return new Ht(n)}[Symbol.iterator](){let t=0;return{next:()=>t<this.binaryString.length?{value:this.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}toBase64(){return(function(n){return btoa(n)})(this.binaryString)}toUint8Array(){return(function(n){const s=new Uint8Array(n.length);for(let a=0;a<n.length;a++)s[a]=n.charCodeAt(a);return s})(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(t){return kt(this.binaryString,t.binaryString)}isEqual(t){return this.binaryString===t.binaryString}}Ht.EMPTY_BYTE_STRING=new Ht("");const Pr="(default)";class Ye{constructor(t,n){this.projectId=t,this.database=n||Pr}static empty(){return new Ye("","")}get isDefaultDatabase(){return this.database===Pr}isEqual(t){return t instanceof Ye&&t.projectId===this.projectId&&t.database===this.database}}function Kh(i,t){if(!Object.prototype.hasOwnProperty.apply(i.options,["projectId"]))throw new D(P.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ye(i.options.projectId,t)}class Jh{constructor(t,n=null,s=[],a=[],c=null,l="F",w=null,I=null){this.path=t,this.collectionGroup=n,this.explicitOrderBy=s,this.filters=a,this.limit=c,this.limitType=l,this.startAt=w,this.endAt=I,this.Ie=null,this.Ee=null,this.Re=null,this.startAt,this.endAt}}function Xh(i){return new Jh(i)}var Dr,N;(N=Dr||(Dr={}))[N.OK=0]="OK",N[N.CANCELLED=1]="CANCELLED",N[N.UNKNOWN=2]="UNKNOWN",N[N.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",N[N.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",N[N.NOT_FOUND=5]="NOT_FOUND",N[N.ALREADY_EXISTS=6]="ALREADY_EXISTS",N[N.PERMISSION_DENIED=7]="PERMISSION_DENIED",N[N.UNAUTHENTICATED=16]="UNAUTHENTICATED",N[N.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",N[N.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",N[N.ABORTED=10]="ABORTED",N[N.OUT_OF_RANGE=11]="OUT_OF_RANGE",N[N.UNIMPLEMENT
9ED=12]="UNIMPLEMENTED",N[N.INTERNAL=13]="INTERNAL",N[N.UNAVAILABLE=14]="UNAVAILABLE",N[N.DATA_LOSS=15]="DATA_LOSS";new ii([4294967295,4294967295],0);const Yh=41943040;const Qh=1048576;function jn(){return typeof document<"u"?document:null}class Zh{constructor(t,n,s=1e3,a=1.5,c=6e4){this.Ci=t,this.timerId=n,this.R_=s,this.A_=a,this.V_=c,this.d_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.d_=0}g_(){this.d_=this.V_}p_(t){this.cancel();const n=Math.floor(this.d_+this.y_()),s=Math.max(0,Date.now()-this.f_),a=Math.max(0,n-s);a>0&&it("ExponentialBackoff",`Backing off for ${a} ms (base delay: ${this.d_} ms, delay with jitter: ${n} ms, last attempt: ${s} ms ago)`),this.m_=this.Ci.enqueueAfterDelay(this.timerId,a,(()=>(this.f_=Date.now(),t()))),this.d_*=this.A_,this.d_<this.R_&&(this.d_=this.R_),this.d_>this.V_&&(this.d_=this.V_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.d_}}class ri{constructor(t,n,s,a,c){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=s,this.op=a,this.removalCallback=c,this.deferred=new _e,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((l=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(t,n,s,a,c){const l=Date.now()+s,w=new ri(t,n,l,a,c);return w.start(s),w}start(t){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new D(P.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
9)}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then((t=>this.deferred.resolve(t)))):Promise.resolve()))}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}var Or,Lr;(Lr=Or||(Or={})).Ba="default",Lr.Cache="cache";function tc(i){const t={};return i.timeoutSeconds!==void 0&&(t.timeoutSeconds=i.timeoutSeconds),t}const ec="ComponentProvider",Ur=new Map;const nc="firestore.googleapis.com",Mr=!0;class xr{constructor(t){if(t.host===void 0){if(t.ssl!==void 0)throw new D(P.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=nc,this.ssl=Mr}else this.host=t.host,this.ssl=t.ssl??Mr;if(this.isUsingEmulator=t.emulatorOptions!==void 0,this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.localCache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=Yh;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<Qh)throw new D(P.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}zh("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=tc(t.experimentalLongPollingOptions??{}),(function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new D(P.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new D(P.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new D(P.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}})(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&(function(s,a){return s.timeoutSeconds===a.timeoutSeconds})(this.experimentalLongPollingOptions,t.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams}}class ic{constructor(t,n,s,a){this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=s,this._app=a,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new xr({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new D(P.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(t){if(this._settingsFrozen)throw new D(P.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new xr(t),this._emulatorOptions=t.emulatorOptions||{},t.credentials!==void 0&&(this._authCredentials=(function(s){if(!s)return new Oh;switch(s.type){case"firstParty":return new Mh(s.sessionIndex||"0",s.iamToken||null,s.authTokenFactory||null);case"provider":return s.client;default:throw new D(P.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}})(t.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return(function(n){const s=Ur.get(n);s&&(it(ec,"Removing Datastore"),Ur.delete(n),s.terminate())})(this),Promise.resolve()}}class si{constructor(t,n,s){this.converter=n,this._query=s,this.type="query",this.firestore=t}withConverter(t){return new si(this.firestore,t,this._query)}}class ut{constructor(t,n,s){this.converter=n,this._key=s,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}
vendor: 4,183 bytes, lines 9-10
9get path(){return this._key.path.canonicalString()}get parent(){return new oi(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new ut(this.firestore,t,this._key)}toJSON(){return{type:ut._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(t,n,s){if(Te(n,ut._jsonSchema))return new ut(t,s||null,new jt(nt.fromString(n.referencePath)))}}ut._jsonSchemaVersion="firestore/documentReference/1.0",ut._jsonSchema={type:j("string",ut._jsonSchemaVersion),referencePath:j("string")};class oi extends si{constructor(t,n,s){super(t,n,Xh(s)),this._path=s,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new ut(this.firestore,null,new jt(t))}withConverter(t){return new oi(this.firestore,t,this._path)}}const Fr="AsyncQueue";class Vr{constructor(t=Promise.resolve()){this.rc=[],this.sc=!1,this.oc=[],this._c=null,this.ac=!1,this.uc=!1,this.cc=[],this.M_=new Zh(this,"async_queue_retry"),this.lc=()=>{const s=jn();s&&it(Fr,"Visibility state changed to "+s.visibilityState),this.M_.w_()},this.hc=t;const n=jn();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.lc)}get isShuttingDown(){return this.sc}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.Pc(),this.Tc(t)}enterRestrictedMode(t){if(!this.sc){this.sc=!0,this.uc=t||!1;const n=jn();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.lc)}}enqueue(t){if(this.Pc(),this.sc)return new Promise((()=>{}));const n=new _e;return this.Tc((()=>this.sc&&this.uc?Promise.resolve():(t().then(n.resolve,n.reject),n.promise))).then((()=>n.promise))}enqueueRetryable(t){this.enqueueAndForget((()=>(this.rc.push(t),this.Ic())))}async Ic(){if(this.rc.length!==0){try{await this.rc[0](),this.rc.shift(),this.M_.reset()}catch(t){if(!Wh(t))throw t;it(Fr,"Operation failed with retryable error: "+t)}this.rc.length>0&&this.M_.p_((()=>this.Ic()))}}Tc(t){const n=this.hc.then((()=>(this.ac=!0,t().catch((s=>{throw this._c=s,this.ac=!1,vs("INTERNAL UNHANDLED ERROR: ",jr(s)),s})).then((s=>(this.ac=!1,s))))));return this.hc=n,n}enqueueAfterDelay(t,n,s){this.Pc(),this.cc.indexOf(t)>-1&&(n=0);const a=ri.createAndSchedule(this,t,n,s,(c=>this.Ec(c)));return this.oc.push(a),a}Pc(){this._c&&Xe(47125,{Rc:jr(this._c)})}verifyOperationInProgress(){}async Ac(){let t;do t=this.hc,await t;while(t!==this.hc)}Vc(t){for(const n of this.oc)if(n.timerId===t)return!0;return!1}dc(t){return this.Ac().then((()=>{this.oc.sort(((n,s)=>n.targetTimeMs-s.targetTimeMs));for(const n of this.oc)if(n.skipDelay(),t!=="all"&&n.timerId===t)break;return this.Ac()}))}mc(t){this.cc.push(t)}Ec(t){const n=this.oc.indexOf(t);this.oc.splice(n,1)}}function jr(i){let t=i.message||"";return i.stack&&(t=i.stack.includes(i.message)?i.stack:i.message+`
10`+i.stack),t}class rc extends ic{constructor(t,n,s,a){super(t,n,s,a),this.type="firestore",this._queue=new Vr,this._persistenceKey=a?.name||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const t=this._firestoreClient.terminate();this._queue=new Vr(t),this._firestoreClient=void 0,await t}}}class _t{constructor(t){this._byteString=t}static fromBase64String(t){try{return new _t(Ht.fromBase64String(t))}catch(n){throw new D(P.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(t){return new _t(Ht.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}toJSON(){return{type:_t._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(t){if(Te(t,_t._jsonSchema))return _t.fromBase64String(t.bytes)}}_t._jsonSchemaVersion="firestore/bytes/1.0",_t._jsonSchema={type:j("string",_t._jsonSchemaVersion),bytes:j("string")};class Ts{constructor(...t){for(let n=0;n<t.length;++n)if(t[n].length===0)throw new D(P.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Ft(t)}
10isEqual(t){return this._internalPath.isEqual(t._internalPath)}}class Bt{constructor(t,n){if(!isFinite(t)||t<-90||t>90)throw new D(P.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new D(P.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}_compareTo(t){return kt(this._lat,t._lat)||kt(this._long,t._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:Bt._jsonSchemaVersion}}static fromJSON(t){if(Te(t,Bt._jsonSchema))return new Bt(t.latitude,t.longitude)}}Bt._jsonSchemaVersion="firestore/geoPoint/1.0",Bt._jsonSchema={type:j("string",Bt._jsonSchemaVersion),latitude:j("number"),longitude:j("number")};class $t{constructor(t){this._values=(t||[]).map((n=>n))}toArray(){return this._values.map((t=>t))}isEqual(t){return(function(s,a){if(s.length!==a.length)return!1;for(let c=0;c<s.length;++c)if(s[c]!==a[c])return!1;return!0})(this._values,t._values)}toJSON(){return{type:$t._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(t){if(Te(t,$t._jsonSchema)){if(Array.isArray(t.vectorValues)&&t.vectorValues.every((n=>typeof n=="number")))return new $t(t.vectorValues);throw new D(P.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}$t._jsonSchemaVersion="firestore/vectorValue/1.0",$t._jsonSchema={type:j("string",$t._jsonSchemaVersion),vectorValues:j("object")};function As(i,t,n){if((t=Pt(t))instanceof Ts)return t._internalPath;if(typeof t=="string")return oc(i,t);throw Xn("Field path arguments must be of type string or ",i)}const sc=new RegExp("[~\\*/\\[\\]]");function oc(i,t,n){if(t.search(sc)>=0)throw Xn(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,i);try{return new Ts(...t.split("."))._internalPath}catch{throw Xn(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,i)}}function Xn(i,t,n,s,a){let c=`Function ${t}() called with invalid data`;c+=". ";let l="";return new D(P.INVALID_ARGUMENT,c+i+l)}const Br="@firebase/firestore",$r="4.14.1";class Ss{constructor(t,n,s,a,c){this._firestore=t,this._userDataWriter=n,this._key=s,this._document=a,this._converter=c}get id(){return this._key.path.lastSegment()}get ref(){return new ut(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const t=new ac(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}_fieldsProto(){return this._document?.data.clone().value.mapValue.fields??void 0}get(t){if(this._document){const n=this._document.data.field(As("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}}}class ac extends Ss{data(){return super.data()}}class Fe{constructor(t,n){this.hasPendingWrites=t,this.fromCache=n}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class Xt extends Ss{constructor(t,n,s,a,c,l){super(t,n,s,a,l),this._firestore=t,this._firestoreImpl=t,this.metadata=c}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const n=new He(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,n={}){if(this._document){const s=this._document.data.field(As("DocumentSnapshot.get",t));if(s!==null)return this._userDataWriter.convertValue(s,n.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new D(P.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const t=this._document,n={};return n.type=Xt._jsonSchemaVersion,n.bundle="",n.bundleSource="DocumentSnapshot",n.bundleName=this._key.toString(),!t||!t.isValidDocument()||!t.isFoundDocument()?n:(this._userDataWriter.convertObjectMap(t.data.value.mapValue.fields,"previous"),n.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),n)}}Xt._jsonSchemaVersion="firestore/documentSnapshot/1.0",Xt._jsonSchema={type:j("string",Xt._jsonSchemaVersion),bundleSource:j("string","DocumentSnapshot"),bundleName:j("string"),bundle:j("string")};class He extends Xt{data(t={}){return super.data(t)}}class ye{constructor(t,n,s,a){this._firestore=t,this._userDataWriter=n,this._snapshot=a,this.metadata=new Fe(a.hasPendingWrites,a.fromCache),this.query=s}get docs(){const t=[];return this.forEach((n=>t.push(n))),t}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(t,n){this._snapshot.docs.forEach((s=>{t.call(n,new He(this._firestore,this._userDataWriter,s.key,s,new Fe(this._snapshot.mutatedKeys.has(s.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(t={}){const n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new D(P.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=(function(a,c){if(a._snapshot.oldDocs.isEmpty()){let l=0;return a._snapshot.docChanges.map((w=>{const I=new He(a._firestore,a._userDataWriter,w.doc.key,w.doc,new Fe(a._snapshot.mutatedKeys.has(w.doc.key),a._snapshot.fromCache),a.query.converter);return w.doc,{type:"added",doc:I,oldIndex:-1,newIndex:l++}}))}{let l=a._snapshot.oldDocs;return a._snapshot.docChanges.filter((w=>c||w.type!==3)).map((w=>{const I=new He(a._firestore,a._userDataWriter,w.doc.key,w.doc,new Fe(a._snapshot.mutatedKeys.has(w.doc.key),a._snapshot.fromCache),a.query.converter);let E=-1,A=-1;return w.type!==0&&(E=l.indexOf(w.doc.key),l=l.delete(w.doc.key)),w.type!==1&&(l=l.add(w.doc),A=l.indexOf(w.doc.key)),{type:hc(w.type),doc:I,oldIndex:E,newIndex:A}}))}})(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new D(P.FAILED_PRECONDITION,"QuerySnapsh
10ot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const t={};t.type=ye._jsonSchemaVersion,t.bundleSource="QuerySnapshot",t.bundleName=Vh.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const n=[],s=[],a=[];return this.docs.forEach((c=>{c._document!==null&&(n.push(c._document),s.push(this._userDataWriter.convertObjectMap(c._document.data.value.mapValue.fields,"previous")),a.push(c.ref.path))})),t.bundle=(this._firestore,this.query._query,t.bundleName,"NOT SUPPORTED"),t}}function hc(i){switch(i){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Xe(61501,{type:i})}}ye._jsonSchemaVersion="firestore/querySnapshot/1.0",ye._jsonSchema={type:j("string",ye._jsonSchemaVersion),bundleSource:j("string","QuerySnapshot"),bundleName:j("string"),bundle:j("string")};(function(t,n=!0){Ph(Ie),Nt(new yt("firestore",((s,{instanceIdentifier:a,options:c})=>{const l=s.getProvider("app").getImmediate(),w=new rc(new Lh(s.getProvider("auth-internal")),new xh(l,s.getProvider("app-check-internal")),Kh(l,a),l);return c={useFetchStreams:n,...c},w._setSettings(c),w}),"PUBLIC").setMultipleInstances(!0)),et(Br,$r,t),et(Br,$r,"esm2020")})();const cc="type.googleapis.com/google.protobuf.Int64Value",lc="type.googleapis.com/google.protobuf.UInt64Value";function bs(i,t){const n={};for(const s in i)i.hasOwnProperty(s)&&(n[s]=t(i[s]));return n}function Qe(i){if(i==null)return null;if(i instanceof Number&&(i=i.valueOf()),typeof i=="number"&&isFinite(i)||i===!0||i===!1||Object.prototype.toString.call(i)==="[object String]")return i;if(i instanceof Date)return i.toISOString();if(Array.isArray(i))return i.map(t=>Qe(t));if(typeof i=="function"||typeof i=="object")return bs(i,t=>Qe(t));throw new Error("Data cannot be encoded in JSON: "+i)}function Yt(i){if(i==null)return i;if(i["@type"])switch(i["@type"]){case cc:case lc:{const t=Number(i.value);if(isNaN(t))throw new Error("Data cannot be decoded from JSON: "+i);return t}default:throw new Error("Data cannot be decoded from JSON: "+i)}return Array.isArray(i)?i.map(t=>Yt(t)):typeof i=="function"||typeof i=="object"?bs(i,t=>Yt(t)):i}const ai="functions";const Hr={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Y extends pt{constructor(t,n,s){super(`${ai}/${t}`,n||""),this.details=s,Object.setPrototypeOf(this,Y.prototype)}}function uc(i){if(i>=200&&i<300)return"ok";switch(i){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function Ze(i,t){let n=uc(i),s=n,a;try{const c=t&&t.error;if(c){const l=c.status;if(typeof l=="string"){if(!Hr[l])return new Y("internal","internal");n=Hr[l],s=l}const w=c.message;typeof w=="string"&&(s=w),a=c.details,a!==void 0&&(a=Yt(a))}}catch{}return n==="ok"?null:new Y(n,s,a)}class fc{constructor(t,n,s,a){this.app=t,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,mt(t)&&t.settings.appCheckToken&&(this.serverAppAppCheckToken=t.settings.appCheckToken),this.auth=n.getImmediate({optional:!0}),this.messaging=s.getImmediate({optional:!0}),this.auth||n.get().then(c=>this.auth=c,()=>{}),this.messaging||s.get().then(c=>this.messaging=c,()=>{}),this.appCheck||a?.get().then(c=>this.appCheck=c,()=>{})}async getAuthToken(){if(this.auth)try{return(await this.auth.getToken())?.accessToken}catch{return}}
10async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(t){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){const n=t?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return n.error?null:n.token}return null}async getContext(t){const n=await this.getAuthToken(),s=await this.getMessagingToken(),a=await this.getAppCheckToken(t);return{authToken:n,messagingToken:s,appCheckToken:a}}}const Yn="us-central1",dc=/^data: (.*?)(?:\n|$)/;function pc(i){let t=null;return{promise:new Promise((n,s)=>{t=setTimeout(()=>{s(new Y("deadline-exceeded","deadline-exceeded"))},i)}),cancel:()=>{t&&clearTimeout(t)}}}class gc{constructor(t,n,s,a,c=Yn,l=(...w)=>fetch(...w)){this.app=t,this.fetchImpl=l,this.emulatorOrigin=null,this.contextProvider=new fc(t,n,s,a),this.cancelAllRequests=new Promise(w=>{this.deleteService=()=>Promise.resolve(w())});try{const w=new URL(c);this.customDomain=w.origin+(w.pathname==="/"?"":w.pathname),this.region=Yn}catch{this.customDomain=null,this.region=c}}_delete(){return this.deleteService()}_url(t){const n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${t}`:this.customDomain!==null?`${this.customDomain}/${t}`:`https://${this.region}-${n}.cloudfunctions.net/${t}`}}function mc(i,t,n){const s=nn(t);i.emulatorOrigin=`http${s?"s":""}://${t}:${n}`,s&&Mo(i.emulatorOrigin+"/backends")}function _c(i,t,n){const s=a=>wc(i,t,a,{});return s.stream=(a,c)=>Ic(i,t,a,c),s}function Cs(i){return i.emulatorOrigin&&nn(i.emulatorOrigin)?"include":void 0}async function yc(i,t,n,s,a){n["Content-Type"]="application/json";
10let c;try{c=await s(i,{method:"POST",body:JSON.stringify(t),headers:n,credentials:Cs(a)})}catch{return{status:0,json:null}}let l=null;try{l=await c.json()}catch{}return{status:c.status,json:l}}async function Rs(i,t){const n={},s=await i.contextProvider.getContext(t.limitedUseAppCheckTokens);return s.authToken&&(n.Authorization="Bearer "+s.authToken),s.messagingToken&&(n["Firebase-Instance-ID-Token"]=s.messagingToken),s.appCheckToken!==null&&(n["X-Firebase-AppCheck"]=s.appCheckToken),n}function wc(i,t,n,s){const a=i._url(t);return vc(i,a,n,s)}async function vc(i,t,n,s){n=Qe(n);const a={data:n},c=await Rs(i,s),l=s.timeout||7e4,w=pc(l),I=await Promise.race([yc(t,a,c,i.fetchImpl,i),w.promise,i.cancelAllRequests]);if(w.cancel(),!I)throw new Y("cancelled","Firebase Functions instance was deleted.");const E=Ze(I.status,I.json);if(E)throw E;if(!I.json)throw new Y("internal","Response is not valid JSON object.");let A=I.json.data;if(typeof A>"u"&&(A=I.json.result),typeof A>"u")throw new Y("internal","Response is missing data field.");return{data:Yt(A)}}function Ic(i,t,n,s){const a=i._url(t);return Ec(i,a,n,s||{})}async function Ec(i,t,n,s){n=Qe(n);const a={data:n},c=await Rs(i,s);c["Content-Type"]="application/json",c.Accept="text/event-stream";let l;try{l=await i.fetchImpl(t,{method:"POST",body:JSON.stringify(a),headers:c,signal:s?.signal,credentials:Cs(i)})}catch(b){if(b instanceof Error&&b.name==="AbortError"){const O=new Y("cancelled","Request was cancelled.");return{data:Promise.reject(O),stream:{[Symbol.asyncIterator](){return{next(){return Promise.reject(O)}}}}}}const U=Ze(0,null);return{data:Promise.reject(U),stream:{[Symbol.asyncIterator](){return{next(){return Promise.reject(U)}}}}}}let w,I;const E=new Promise((b,U)=>{w=b,I=U});s?.signal?.addEventListener("abort",()=>{const b=new Y("cancelled","Request was cancelled.");I(b)});const A=l.body.getReader(),S=Tc(A,w,I,s?.signal);return{stream:{[Symbol.asyncIterator](){const b=S.getReader();return{async next(){const{value:U,done:O}=await b.read();return{value:U,done:O}},async return(){return await b.cancel(),{done:!0,value:void 0}}}}},data:E}}function Tc(i,t,n,s){const a=(l,w)=>{const I=l.match(dc);if(!I)return;const E=I[1];try{const A=JSON.parse(E);if("result"in A){t(Yt(A.result));return}if("message"in A){w.enqueue(Yt(A.message));return}if("error"in A){const S=Ze(0,A);w.error(S),n(S);return}}catch(A){if(A instanceof Y){w.error(A),n(A);return}}},c=new TextDecoder;return new ReadableStream({start(l){let w="";return I();async function I(){if(s?.aborted){const E=new Y("cancelled","Request was cancelled");return l.error(E),n(E),Promise.resolve()}try{const{value:E,done:A}=await i.read();if(A){w.trim()&&a(w.trim(),l),l.close();return}if(s?.aborted){const b=new Y("cancelled","Request was cancelled");l.error(b),n(b),await i.cancel();return}w+=c.decode(E,{stream:!0});const S=w.split(`
11`);w=S.pop()||"";for(const b of S)b.trim()&&a(b.trim(),l);return I()}catch(E){const A=E instanceof Y?E:Ze(0,null);l.error(A),n(A)}}},cancel(){return i.cancel()}})}const zr="@firebase/functions",Gr="0.13.4";const Ac="auth-internal",Sc="app-check-internal",bc="messaging-internal";function Cc(i){const t=(n,{instanceIdentifier:s})=>{const a=n.getProvider("app").getImmediate(),c=n.getProvider(Ac),l=n.getProvider(bc),w=n.getProvider(Sc);return new gc(a,c,l,w,s)};Nt(new yt(ai,t,"PUBLIC").setMultipleInstances(!0)),et(zr,Gr,i),et(zr,Gr,"esm2020")}function Rc(i=Ma(),t=Yn){const s=Oa(Pt(i),ai).getImmediate({identifier:t}),a=Io("functions");return a&&Nc(s,...a),s}function Nc(i,t,n){mc(Pt(i),t,n)}function sl(i,t,n){return _c(Pt(i),t)}Cc();const Ns="firebasestorage.googleapis.com",kc="storageBucket",Pc=120*1e3,Dc=600*1e3;class gt extends pt{constructor(t,n,s=0){super(Bn(t),`Firebase Storage: ${n} (${Bn(t)})`),this.status_=s,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,gt.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return Bn(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage}
12${this.customData.serverResponse}`:this.message=this._baseMessage}}var dt;(function(i){i.UNKNOWN="unknown",i.OBJECT_NOT_FOUND="object-not-found",i.BUCKET_NOT_FOUND="bucket-not-found",i.PROJECT_NOT_FOUND="project-not-found",i.QUOTA_EXCEEDED="quota-exceeded",i.UNAUTHENTICATED="unauthenticated",i.UNAUTHORIZED="unauthorized",i.UNAUTHORIZED_APP="unauthorized-app",i.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",i.INVALID_CHECKSUM="invalid-checksum",i.CANCELED="canceled",i.INVALID_EVENT_NAME="invalid-event-name",i.INVALID_URL="invalid-url",i.INVALID_DEFAULT_BUCKET="invalid-default-bucket",i.NO_DEFAULT_BUCKET="no-default-bucket",i.CANNOT_SLICE_BLOB="cannot-slice-blob",i.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",i.NO_DOWNLOAD_URL="no-download-url",i.INVALID_ARGUMENT="invalid-argument",i.INVALID_ARGUMENT_COUNT="invalid-argument-count",i.APP_DELETED="app-deleted",i.INVALID_ROOT_OPERATION="invalid-root-operation",i.INVALID_FORMAT="invalid-format",i.INTERNAL_ERROR="internal-error",i.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(dt||(dt={}));function Bn(i){return"storage/"+i}function Oc(){const i="An unknown error occurred, please check the error payload for server response.";return new gt(dt.UNKNOWN,i)}function Lc(){return new gt(dt.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function Uc(){return new gt(dt.CANCELED,"User canceled the upload/download.")}function Mc(i){return new gt(dt.INVALID_URL,"Invalid URL '"+i+"'.")}function xc(i){return new gt(dt.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+i+"'.")}function Wr(i){return new gt(dt.INVALID_ARGUMENT,i)}function ks(){return new gt(dt.APP_DELETED,"The Firebase app was deleted.")}function Fc(i){return new gt(dt.INVALID_ROOT_OPERATION,"The operation '"+i+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}class rt{constructor(t,n){this.bucket=t,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,n){let s;try{s=rt.makeFromUrl(t,n)}catch{return new rt(t,"")}if(s.path==="")return s;throw xc(t)}static makeFromUrl(t,n){let s=null;const a="([A-Za-z0-9.\\-_]+)";function c($){$.path.charAt($.path.length-1)==="/"&&($.path_=$.path_.slice(0,-1))}const l="(/(.*))?$",w=new RegExp("^gs://"+a+l,"i"),I={bucket:1,path:3};function E($){$.path_=decodeURIComponent($.path)}const A="v[A-Za-z0-9_]+",S=n.replace(/[.]/g,"\\."),b="(/([^?#]*).*)?$",U=new RegExp(`^https?://${S}/${A}/b/${a}/o${b}`,"i"),O={bucket:1,path:3},F=n===Ns?"(?:storage.googleapis.com|storage.cloud.google.com)":n,R="([^?#]*)",W=new RegExp(`^https?://${F}/${a}/${R}`,"i"),q=[{regex:w,indices:I,postModify:c},{regex:U,indices:O,postModify:E},{regex:W,indices:{bucket:1,path:2},postModify:E}];for(let $=0;$<q.length;$++){const Q=q[$],z=Q.regex.exec(t);if(z){const g=z[Q.indices.bucket];let u=z[Q.indices.path];u||(u=""),s=new rt(g,u),Q.postModify(s);break}}if(s==null)throw Mc(t);return s}}class Vc{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}}function jc(i,t,n){let s=1,a=null,c=null,l=!1,w=0;function I(){return w===2}let E=!1;function A(...R){E||(E=!0,t.apply(null,R))}function S(R){a=setTimeout(()=>{a=null,i(U,I())},R)}function b(){c&&clearTimeout(c)}function U(R,...W){if(E){b();return}if(R){b(),A.call(null,R,...W);return}if(I()||l){b(),A.call(null,R,...W);return}s<64&&(s*=2);let q;w===1?(w=2,q=0):q=(s+Math.random())*1e3,S(q)}let O=!1;function F(R){O||(O=!0,b(),!E&&(a!==null?(R||(w=2),clearTimeout(a),S(0)):R||(w=1)))}return S(0),c=setTimeout(()=>{l=!0,F(!0)},n),F}function Bc(i){i(!1)}function $c(i){return i!==void 0}function qr(i,t,n,s){if(s<t)throw Wr(`Invalid value for '${i}'. Expected ${t} or greater.`);if(s>n)throw Wr(`Invalid value for '${i}'. Expected ${n} or less.`)}function Hc(i){const t=encodeURIComponent;let n="?";for(const s in i)if(i.hasOwnProperty(s)){const a=t(s)+"="+t(i[s]);n=n+a+"&"}return n=n.slice(0,-1),n}var tn;
12(function(i){i[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT"})(tn||(tn={}));function zc(i,t){const n=i>=500&&i<600,a=[408,429].indexOf(i)!==-1,c=t.indexOf(i)!==-1;return n||a||c}class Gc{constructor(t,n,s,a,c,l,w,I,E,A,S,b=!0,U=!1){this.url_=t,this.method_=n,this.headers_=s,this.body_=a,this.successCodes_=c,this.additionalRetryCodes_=l,this.callback_=w,this.errorCallback_=I,this.timeout_=E,this.progressCallback_=A,this.connectionFactory_=S,this.retry=b,this.isUsingEmulator=U,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((O,F)=>{this.resolve_=O,this.reject_=F,this.start_()})}start_(){const t=(s,a)=>{if(a){s(!1,new Ve(!1,null,!0));return}const c=this.connectionFactory_();this.pendingConnection_=c;const l=w=>{const I=w.loaded,E=w.lengthComputable?w.total:-1;this.progressCallback_!==null&&this.progressCallback_(I,E)};this.progressCallback_!==null&&c.addUploadProgressListener(l),c.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&c.removeUploadProgressListener(l),this.pendingConnection_=null;const w=c.getErrorCode()===tn.NO_ERROR,I=c.getStatus();if(!w||zc(I,this.additionalRetryCodes_)&&this.retry){const A=c.getErrorCode()===tn.ABORT;s(!1,new Ve(!1,null,A));return}const E=this.successCodes_.indexOf(I)!==-1;s(!0,new Ve(E,c))})},n=(s,a)=>{const c=this.resolve_,l=this.reject_,w=a.connection;if(a.wasSuccessCode)try{const I=this.callback_(w,w.getResponse());$c(I)?c(I):c()}catch(I){l(I)}else if(w!==null){const I=Oc();I.serverResponse=w.getErrorText(),this.errorCallback_?l(this.errorCallback_(w,I)):l(I)}else if(a.canceled){const I=this.appDelete_?ks():Uc();l(I)}else{const I=Lc();l(I)}};this.canceled_?n(!1,new Ve(!1,null,!0)):this.backoffId_=jc(t,n,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&Bc(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class Ve{constructor(t,n,s){this.wasSuccessCode=t,this.connection=n,this.canceled=!!s}}function Wc(i,t){t!==null&&t.length>0&&(i.Authorization="Firebase "+t)}function qc(i,t){i["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function Kc(i,t){t&&(i["X-Firebase-GMPID"]=t)}function Jc(i,t){t!==null&&(i["X-Firebase-AppCheck"]=t)}function Xc(i,t,n,s,a,c,l=!0,w=!1){const I=Hc(i.urlParams),E=i.url+I,A=Object.assign({},i.headers);return Kc(A,t),Wc(A,n),qc(A,c),Jc(A,s),new Gc(E,i.method,A,i.body,i.successCodes,i.additionalRetryCodes,i.handler,i.errorHandler,i.timeout,i.progressCallback,a,l,w)}function Yc(i){if(i.length===0)return null;const t=i.lastIndexOf("/");return t===-1?"":i.slice(0,t)}function Qc(i){const t=i.lastIndexOf("/",i.length-2);
12return t===-1?i:i.slice(t+1)}class en{constructor(t,n){this._service=t,n instanceof rt?this._location=n:this._location=rt.makeFromUrl(n,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,n){return new en(t,n)}get root(){const t=new rt(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return Qc(this._location.path)}get storage(){return this._service}get parent(){const t=Yc(this._location.path);if(t===null)return null;const n=new rt(this._location.bucket,t);return new en(this._service,n)}_throwIfRoot(t){if(this._location.path==="")throw Fc(t)}}function Kr(i,t){const n=t?.[kc];return n==null?null:rt.makeFromBucketSpec(n,i)}class Zc{constructor(t,n,s,a,c,l=!1){this.app=t,this._authProvider=n,this._appCheckProvider=s,this._url=a,this._firebaseVersion=c,this._isUsingEmulator=l,this._bucket=null,this._host=Ns,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=Pc,this._maxUploadRetryTime=Dc,this._requests=new Set,a!=null?this._bucket=rt.makeFromBucketSpec(a,this._host):this._bucket=Kr(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=rt.makeFromBucketSpec(this._url,t):this._bucket=Kr(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){qr("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){qr("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const t=this._authProvider.getImmediate({optional:!0});if(t){const n=await t.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){if(mt(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new en(this,t)}_makeRequest(t,n,s,a,c=!0){if(this._deleted)return new Vc(ks());{const l=Xc(t,this._appId,s,a,n,this._firebaseVersion,c,this._isUsingEmulator);return this._requests.add(l),l.getPromise().then(()=>this._requests.delete(l),()=>this._requests.delete(l)),l}}async makeRequestWithTokens(t,n){const[s,a]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,n,s,a).getPromise()}}const Jr="@firebase/storage",Xr="0.14.3";const tl="storage";function el(i,{instanceIdentifier:t}){const n=i.getProvider("app").getImmediate(),s=i.getProvider("auth-internal"),a=i.getProvider("app-check-internal");return new Zc(n,s,a,t,Ie)}function nl(){Nt(new yt(tl,el,"PUBLIC").setMultipleInstances(!0)),et(Jr,Xr,""),et(Jr,Xr,"esm2020")}nl();let Qn;const il=()=>{try{return Qn=ss({apiKey:"AIzaSyBtu14p8r09EPr_OBLymvsN_856SXo7cpE",authDomain:"made-in-tracker.firebaseapp.com",projectId:"made-in-tracker",storageBucket:"made-in-tracker.firebasestorage.app",messagingSenderId:"534500472575",appId:"1:534500472575:web:b64b0e589b7629f518beca",measurementId:"G-RQ6HWVLBFY"}),Qn}catch(i){console.error({error:i})}};let je;const ol=()=>{if(je)return je;const i=Qn||il();return je=Rc(i,"europe-west3"),je};export{rl as c,sl as h,il as s,ol as u};

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