vendor: 5,079 bytes, line 1
1var e=()=>void 0,t=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)==56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},n=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let a=e[n++];t[r++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){let a=e[n++],o=e[n++],s=e[n++],c=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{let a=e[n++],o=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return t.join(``)},r={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(e,t){if(!Array.isArray(e))throw Error(`encodeByteArray takes an array as a parameter`);this.init_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],a=t+1<e.length,o=a?e[t+1]:0,s=t+2<e.length,c=s?e[t+2]:0,l=i>>2,u=(i&3)<<4|o>>4,d=(o&15)<<2|c>>6,f=c&63;s||(f=64,a||(d=64)),r.push(n[l],n[u],n[d],n[f])}return r.join(``)},encodeString(e,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(e):this.encodeByteArray(t(e),n)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):n(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let a=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0;++t;let s=t<e.length?n[e.charAt(t)]:64;++t;let c=t<e.length?n[e.charAt(t)]:64;if(++t,a==null||o==null||s==null||c==null)throw new i;let l=a<<2|o>>4;if(r.push(l),s!==64){let e=o<<4&240|s>>2;if(r.push(e),c!==64){let e=s<<6&192|c;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},i=class extends Error{constructor(){super(...arguments),this.name=`DecodeBase64StringError`}},a=function(e){let n=t(e);return r.encodeByteArray(n,!0)},o=function(e){return a(e).replace(/\./g,``)},s=function(e){try{return r.decodeString(e,!0)}catch(e){console.error(`base64Decode failed: `,e)}return null};function c(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`Unable to locate global object.`)}var l=()=>c().__FIREBASE_DEFAULTS__,u=()=>{if(typeof process>`u`)return;let e={}.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},d=()=>{if(typeof document>`u`)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=e&&s(e[1]);return t&&JSON.parse(t)},f=()=>{try{return e()||l()||u()||d()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},p=e=>f()?.emulatorHosts?.[e],ee=e=>{let t=p(e);if(!t)return;let n=t.lastIndexOf(`:`);if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return t[0]===`[`?[t.substring(1,n-1),r]:[t.substring(0,n),r]},m=()=>f()?.config,te=e=>f()?.[`_${e}`],h=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),typeof e==`function`&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,n))}}};function ne(e,t){if(e.uid)throw Error(`The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.`);let n={alg:`none`,type:`JWT`},r=t||`demo-project`,i=e.iat||0,a=e.sub||e.user_id;if(!a)throw Error(`mockUserToken must contain 'sub' or 'user_id' field!`);let s={iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:a,user_id:a,firebase:{sign_in_provider:`custom`,identities:{}},...e};return[o(JSON.stringify(n)),o(JSON.stringify(s)),``].join(`.`)}function g(){return typeof navigator<`u`&&typeof navigator.userAgent==`string`?navigator.userAgent:``}function re(){return typeof window<`u`&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function ie(){let e=f()?.forceEnvironment;if(e===`node`)return!0;
1if(e===`browser`)return!1;try{return Object.prototype.toString.call(global.process)===`[object process]`}catch{return!1}}function ae(){return typeof navigator<`u`&&navigator.userAgent===`Cloudflare-Workers`}function oe(){let e=typeof chrome==`object`?chrome.runtime:typeof browser==`object`?browser.runtime:void 0;return typeof e==`object`&&e.id!==void 0}function se(){return typeof navigator==`object`&&navigator.product===`ReactNative`}function ce(){let e=g();return e.indexOf(`MSIE `)>=0||e.indexOf(`Trident/`)>=0}function le(){return!ie()&&!!navigator.userAgent&&navigator.userAgent.includes(`Safari`)&&!navigator.userAgent.includes(`Chrome`)}function _(){try{return typeof indexedDB==`object`}catch{return!1}}function ue(){return new Promise((e,t)=>{try{let n=!0,r=`validate-browser-context-for-indexeddb-analytics-module`,i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{t(i.error?.message||``)}}catch(e){t(e)}})}var de=`FirebaseError`,v=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=de,Object.setPrototypeOf(this,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,y.prototype.create)}},y=class{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?fe(i,n):`Error`;return new v(r,`${this.serviceName}: ${a} (${r}).`,n)}};function fe(e,t){return e.replace(pe,(e,n)=>{let r=t[n];return r==null?`<${n}?>`:String(r)})}var pe=/\{\$([^}]+)}/g;function me(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function b(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);for(let i of n){if(!r.includes(i))return!1;let n=e[i],a=t[i];if(x(n)&&x(a)){if(!b(n,a))return!1}else if(n!==a)return!1}for(let e of r)if(!n.includes(e))return!1;return!0}function x(e){return typeof e==`object`&&!!e}function he(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+`=`+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+`=`+encodeURIComponent(r));return t.length?`&`+t.join(`&`):``}function ge(e){let t={};return e.replace(/^\?/,``).split(`&`).forEach(e=>{if(e){let[n,r]=e.split(`=`);t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function _e(e){let t=e.indexOf(`?`);if(!t)return``;let n=e.indexOf(`#`,t);return e.substring(t,n>0?n:void 0)}function ve(e,t){let n=new ye(e,t);return n.subscribe.bind(n)}var ye=class{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(e===void 0&&t===void 0&&n===void 0)throw Error(`Missing Observer.`);r=be(e,[`next`,`error`,`complete`])?e:{next:e,error:t,complete:n},r.next===void 0&&(r.next=S),r.error===void 0&&(r.error=S),r.complete===void 0&&(r.complete=S);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),i}unsubscribeOne(e){this.observers!==void 0&&this.observers[e]!==void 0&&(delete this.observers[e],--this.observerCount,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(e){typeof console<`u`&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function be(e,t){if(typeof e!=`object`||!e)return!1;for(let n of t)if(n in e&&typeof e[n]==`function`)return!0;return!1}function S(){}var xe=1e3,Se=2,Ce=144e5,we=.5;function Te(e,t=xe,n=Se){let r=t*n**+e,i=Math.round(we*r*(Math.random()-.5)*2);return Math.min(Ce,r+i)}function Ee(e){return e&&e._delegate?e._delegate:e}function De(e){try{return(e.startsWith(`http://`)||e.startsWith(`https://`)?new URL(e).hostname:e).endsWith(`.cloudworkstations.dev`)}catch{return!1}}async function Oe(e){return(await fetch(e,{credentials:`include`})).ok}var C=class{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode=`LAZY`,this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}},w=`[DEFAULT]`,ke=class{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new h;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),n=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}if(n)return null;throw Error(`Service ${this.name} is not available`)}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(je(e))try{this.getOrInitializeService({instanceIdentifier:w})}catch{}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch{}}}}clearInstance(e=w){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>`INTERNAL`in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>`_delete`in e).map(e=>e._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=w){return this.instances.has(e)}getOptions(e=w){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){let n=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(n)??new Set;r.add(e),this.onInitCallbacks.set(n,r);let i=this.instances.get(n);return i&&e(i,n),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:Ae(e),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=w){return this.component?this.component.multipleInstances?e:w:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!==`EXPLICIT`}};function Ae(e){return e===w?void 0:e}function je(e){return e.instantiationMode===`EAGER`}var Me=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new ke(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}},Ne=[],T;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.VERBOSE=1]=`VERBOSE`,e[e.INFO=2]=`INFO`,e[e.WARN=3]=`WARN`,e[e.ERROR=4]=`ERROR`,e[e.SILENT=5]=`SILENT`})(T||={});var Pe={debug:T.DEBUG,verbose:T.VERBOSE,info:T.INFO,warn:T.WARN,error:T.ERROR,silent:T.SILENT},Fe=T.INFO,Ie={[T.DEBUG]:`log`,[T.VERBOSE]:`log`,[T.INFO]:`info`,[T.WARN]:`warn`,[T.ERROR]:`error`},Le=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=Ie[t];if(i)console[i](`[${r}] ${e.name}:`,...n);
vendor: 13,597 bytes, line 1
1else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)},E=class{constructor(e){this.name=e,this._logLevel=Fe,this._logHandler=Le,this._userLogHandler=null,Ne.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in T))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e==`string`?Pe[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!=`function`)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,T.DEBUG,...e),this._logHandler(this,T.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,T.VERBOSE,...e),this._logHandler(this,T.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,T.INFO,...e),this._logHandler(this,T.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,T.WARN,...e),this._logHandler(this,T.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,T.ERROR,...e),this._logHandler(this,T.ERROR,...e)}},Re=(e,t)=>t.some(t=>e instanceof t),ze,Be;function Ve(){return ze||=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]}function He(){return Be||=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]}var D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap;function Ue(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`success`,i),e.removeEventListener(`error`,a)},i=()=>{t(N(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener(`success`,i),e.addEventListener(`error`,a)});return t.then(t=>{t instanceof IDBCursor&&D.set(t,e)}).catch(()=>{}),j.set(t,e),t}function We(e){if(O.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener(`complete`,i),e.removeEventListener(`error`,a),e.removeEventListener(`abort`,a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException(`AbortError`,`AbortError`)),r()};e.addEventListener(`complete`,i),e.addEventListener(`error`,a),e.addEventListener(`abort`,a)});O.set(e,t)}var M={get(e,t,n){if(e instanceof IDBTransaction){if(t===`done`)return O.get(e);if(t===`objectStoreNames`)return e.objectStoreNames||k.get(e);if(t===`store`)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return N(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t===`done`||t===`store`)||t in e}};function Ge(e){M=e(M)}function Ke(e){return e===IDBDatabase.prototype.transaction&&!(`objectStoreNames`in IDBTransaction.prototype)?function(t,...n){let r=e.call(P(this),t,...n);return k.set(r,t.sort?t.sort():[t]),N(r)}:He().includes(e)?function(...t){return e.apply(P(this),t),N(D.get(this))}:function(...t){return N(e.apply(P(this),t))}}function qe(e){return typeof e==`function`?Ke(e):(e instanceof IDBTransaction&&We(e),Re(e,Ve())?new Proxy(e,M):e)}function N(e){if(e instanceof IDBRequest)return Ue(e);if(A.has(e))return A.get(e);let t=qe(e);return t!==e&&(A.set(e,t),j.set(t,e)),t}var P=e=>j.get(e);function Je(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){let o=indexedDB.open(e,t),s=N(o);return r&&o.addEventListener(`upgradeneeded`,e=>{r(N(o.result),e.oldVersion,e.newVersion,N(o.transaction),e)}),n&&o.addEventListener(`blocked`,e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{a&&e.addEventListener(`close`,()=>a()),i&&e.addEventListener(`versionchange`,e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}var Ye=[`get`,`getKey`,`getAll`,`getAllKeys`,`count`],Xe=[`put`,`add`,`delete`,`clear`],F=new Map;function I(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==`string`))return;if(F.get(t))return F.get(t);let n=t.replace(/FromIndex$/,``),r=t!==n,i=Xe.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Ye.includes(n)))return;let a=async function(e,...t){let a=this.transaction(e,i?`readwrite`:`readonly`),o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return F.set(t,a),a}Ge(e=>({...e,get:(t,n,r)=>I(t,n)||e.get(t,n,r),has:(t,n)=>!!I(t,n)||e.has(t,n)}));var Ze=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(Qe(e)){let t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(` `)}};function Qe(e){return e.getComponent()?.type===`VERSION`}var L=`@firebase/app`,R=`0.14.10`,z=new E(`@firebase/app`),$e=`@firebase/app-compat`,et=`@firebase/analytics-compat`,tt=`@firebase/analytics`,nt=`@firebase/app-check-compat`,rt=`@firebase/app-check`,it=`@firebase/auth`,at=`@firebase/auth-compat`,ot=`@firebase/database`,st=`@firebase/data-connect`,ct=`@firebase/database-compat`,lt=`@firebase/functions`,ut=`@firebase/functions-compat`,dt=`@firebase/installations`,ft=`@firebase/installations-compat`,pt=`@firebase/messaging`,mt=`@firebase/messaging-compat`,ht=`@firebase/performance`,gt=`@firebase/performance-compat`,_t=`@firebase/remote-config`,vt=`@firebase/remote-config-compat`,yt=`@firebase/storage`,bt=`@firebase/storage-compat`,xt=`@firebase/firestore`,St=`@firebase/ai`,Ct=`@firebase/firestore-compat`,wt=`firebase`,Tt=`12.11.0`,B=`[DEFAULT]`,Et={[L]:`fire-core`,[$e]:`fire-core-compat`,[tt]:`fire-analytics`,[et]:`fire-analytics-compat`,[rt]:`fire-app-check`,[nt]:`fire-app-check-compat`,[it]:`fire-auth`,[at]:`fire-auth-compat`,[ot]:`fire-rtdb`,[st]:`fire-data-connect`,[ct]:`fire-rtdb-compat`,[lt]:`fire-fn`,[ut]:`fire-fn-compat`,[dt]:`fire-iid`,[ft]:`fire-iid-compat`,[pt]:`fire-fcm`,[mt]:`fire-fcm-compat`,[ht]:`fire-perf`,[gt]:`fire-perf-compat`,[_t]:`fire-rc`,[vt]:`fire-rc-compat`,[yt]:`fire-gcs`,[bt]:`fire-gcs-compat`,[xt]:`fire-fst`,[Ct]:`fire-fst-compat`,[St]:`fire-vertex`,"fire-js":`fire-js`,[wt]:`fire-js-all`},V=new Map,Dt=new Map,H=new Map;function U(e,t){try{e.container.addComponent(t)}catch(n){z.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function W(e){let t=e.name;if(H.has(t))return z.debug(`There were multiple attempts to register component ${t}.`),!1;H.set(t,e);for(let t of V.values())U(t,e);for(let t of Dt.values())U(t,e);return!0}function Ot(e,t){let n=e.container.getProvider(`heartbeat`).getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function kt(e){return e!=null&&e.settings!==void 0}var G=new y(`app`,`Firebase`,{"no-app":`No Firebase App '{$appName}' has been created - call initializeApp() first`,"bad-app-name":`Illegal App name: '{$appName}'`,"duplicate-app":`Firebase App named '{$appName}' already exists with different options or config`,"app-deleted":`Firebase App named '{$appName}' already deleted`,"server-app-deleted":`Firebase Server App has been deleted`,"no-options":`Need to provide options, when not being deployed to hosting via source.`,"invalid-app-argument":`firebase.{$appName}() takes either no argument or a Firebase App instance.`,"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.`}),At=class{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new C(`app`,()=>this,`PUBLIC`))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw G.create(`app-deleted`,{appName:this._name})}},jt=Tt;function K(e,t={}){let n=e;typeof t!=`object`&&(t={name:t});let r={name:B,automaticDataCollectionEnabled:!0,...t},i=r.name;if(typeof i!=`string`||!i)throw G.create(`bad-app-name`,{appName:String(i)});if(n||=m(),!n)throw G.create(`no-options`);let a=V.get(i);if(a){if(b(n,a.options)&&b(r,a.config))return a;throw G.create(`duplicate-app`,{appName:i})}let o=new Me(i);for(let e of H.values())o.addComponent(e);let s=new At(n,r,o);return V.set(i,s),s}function Mt(e=B){let t=V.get(e);if(!t&&e===`[DEFAULT]`&&m())return K();if(!t)throw G.create(`no-app`,{appName:e});return t}function q(e,t,n){let r=Et[e]??e;n&&(r+=`-${n}`);let i=r.match(/\s|\//),a=t.match(/\s|\//);if(i||a){let e=[`Unable to register library "${r}" with version "${t}":`];i&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&e.push(`and`),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),z.warn(e.join(` `));return}W(new C(`${r}-version`,()=>({library:r,version:t}),`VERSION`))}var Nt=`firebase-heartbeat-database`,Pt=1,J=`firebase-heartbeat-store`,Y=null;function X(){return Y||=Je(Nt,Pt,{upgrade:(e,t)=>{if(t===0)try{e.createObjectStore(J)}catch(e){console.warn(e)}}}).catch(e=>{throw G.create(`idb-open`,{originalErrorMessage:e.message})}),Y}async function Ft(e){try{let t=(await X()).transaction(J),n=await t.objectStore(J).get(Q(e));return await t.done,n}catch(e){if(e instanceof v)z.warn(e.message);else{let t=G.create(`idb-get`,{originalErrorMessage:e?.message});z.warn(t.message)}}}async function Z(e,t){try{let n=(await X()).transaction(J,`readwrite`);await n.objectStore(J).put(t,Q(e)),await n.done}catch(e){if(e instanceof v)z.warn(e.message);else{let t=G.create(`idb-set`,{originalErrorMessage:e?.message});z.warn(t.message)}}}function Q(e){return`${e.name}!${e.options.appId}`}var It=1024,Lt=30,Rt=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider(`app`).getImmediate();this._storage=new Bt(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider(`platform-logger`).getImmediate().getPlatformInfoString(),t=$();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>Lt){let e=Ht(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){z.warn(e)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return``;let e=$(),{heartbeatsToSend:t,unsentEntries:n}=zt(this._heartbeatsCache.heartbeats),r=o(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}catch(e){return z.warn(e),``}}};function $(){return new Date().toISOString().substring(0,10)}function zt(e,t=It){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(!e){if(n.push({agent:i.agent,dates:[i.date]}),Vt(n)>t){n.pop();break}}else if(e.dates.push(i.date),Vt(n)>t){e.dates.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}var Bt=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return _()?ue().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){let e=await Ft(this.app);return e?.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return Z(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return Z(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}};function Vt(e){return o(JSON.stringify({version:2,heartbeats:e})).length}function Ht(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}function Ut(e){W(new C(`platform-logger`,e=>new Ze(e),`PRIVATE`)),W(new C(`heartbeat`,e=>new Rt(e),`PRIVATE`)),q(L,R,e),q(L,R,`esm2020`),q(`fire-js`,``)}Ut(``);export{me as A,te as C,oe as D,g as E,le as F,Oe as I,he as L,_ as M,re as N,De as O,se as P,ge as R,ee as S,Ee as T,ne as _,Mt as a,_e as b,T as c,h as d,y as f,Te as g,s as h,W as i,ce as j,ae as k,E as l,r as m,Ot as n,K as o,v as p,kt as r,q as s,jt as t,C as u,ve as v,c as w,p as x,b as y};
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.