!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).firebase)}(this,function(Ce){"use strict";try{!function(){function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=t(Ce),r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;na[0]&&e[1]=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){for(var n=0,r=e.length,i=t.length;n"})):"Error",t=this.serviceName+": "+t+" ("+o+").";return new f(o,t,i)},n);function n(t,e,n){this.service=t,this.serviceName=e,this.errors=n}var d=/\{\$([^}]+)}/g,g=(m.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},m.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},m.prototype.setServiceProps=function(t){return this.serviceProps=t,this},m.prototype.setInstanceCreatedCallback=function(t){return this.onInstanceCreated=t,this},m);function m(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}function v(n){return new Promise(function(t,e){n.onsuccess=function(){t(n.result)},n.onerror=function(){e(n.error)}})}function y(n,r,i){var o,t=new Promise(function(t,e){v(o=n[r].apply(n,i)).then(t,e)});return t.request=o,t}function b(t,n,e){e.forEach(function(e){Object.defineProperty(t.prototype,e,{get:function(){return this[n][e]},set:function(t){this[n][e]=t}})})}function _(e,n,r,t){t.forEach(function(t){t in r.prototype&&(e.prototype[t]=function(){return y(this[n],t,arguments)})})}function w(e,n,r,t){t.forEach(function(t){t in r.prototype&&(e.prototype[t]=function(){return this[n][t].apply(this[n],arguments)})})}function I(t,r,e,n){n.forEach(function(n){n in e.prototype&&(t.prototype[n]=function(){return t=this[r],(e=y(t,n,arguments)).then(function(t){if(t)return new T(t,e.request)});var t,e})})}function S(t){this._index=t}function T(t,e){this._cursor=t,this._request=e}function E(t){this._store=t}function A(n){this._tx=n,this.complete=new Promise(function(t,e){n.oncomplete=function(){t()},n.onerror=function(){e(n.error)},n.onabort=function(){e(n.error)}})}function N(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new A(n)}function k(t){this._db=t}b(S,"_index",["name","keyPath","multiEntry","unique"]),_(S,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),I(S,"_index",IDBIndex,["openCursor","openKeyCursor"]),b(T,"_cursor",["direction","key","primaryKey","value"]),_(T,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(T.prototype[n]=function(){var e=this,t=arguments;return Promise.resolve().then(function(){return e._cursor[n].apply(e._cursor,t),v(e._request).then(function(t){if(t)return new T(t,e._request)})})})}),E.prototype.createIndex=function(){return new S(this._store.createIndex.apply(this._store,arguments))},E.prototype.index=function(){return new S(this._store.index.apply(this._store,arguments))},b(E,"_store",["name","keyPath","indexNames","autoIncrement"]),_(E,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),I(E,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),w(E,"_store",IDBObjectStore,["deleteIndex"]),A.prototype.objectStore=function(){return new E(this._tx.objectStore.apply(this._tx,arguments))},b(A,"_tx",["objectStoreNames","mode"]),w(A,"_tx",IDBTransaction,["abort"]),N.prototype.createObjectStore=function(){return new E(this._db.createObjectStore.apply(this._db,arguments))},b(N,"_db",["name","version","objectStoreNames"]),w(N,"_db",IDBDatabase,["deleteObjectStore","close"]),k.prototype.transaction=function(){return new A(this._db.transaction.apply(this._db,arguments))},b(k,"_db",["name","version","objectStoreNames"]),w(k,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(i){[E,S].forEach(function(t){i in t.prototype&&(t.prototype[i.replace("open","iterate")]=function(){var t=(n=arguments,Array.prototype.slice.call(n)),e=t[t.length-1],n=this._store||this._index,r=n[i].apply(n,t.slice(0,-1));r.onsuccess=function(){e(r.result)}})})}),[S,E].forEach(function(t){t.prototype.getAll||(t.prototype.getAll=function(t,n){var r=this,i=[];return new Promise(function(e){r.iterateCursor(t,function(t){t?(i.push(t.value),void 0===n||i.length!=n?t.continue():e(i)):e(i)})})})});var O="0.4.32",P=1e4,R="w:"+O,C="FIS_v2",M="https://firebaseinstallations.googleapis.com/v1",j=36e5,D=((Dt={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',Dt["not-registered"]="Firebase Installation is not registered.",Dt["installation-not-found"]="Firebase Installation not found.",Dt["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',Dt["app-offline"]="Could not process request. Application offline.",Dt["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",Dt),B=new h("installations","Installations",D);function L(t){return t instanceof f&&t.code.includes("request-failed")}function x(t){t=t.projectId;return M+"/projects/"+t+"/installations"}function U(t){return{token:t.token,requestStatus:2,expiresIn:(t=t.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()}}function q(n,r){return c(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,r.json()];case 1:return e=t.sent(),e=e.error,[2,B.create("request-failed",{requestName:n,serverCode:e.code,serverMessage:e.message,serverStatus:e.status})]}})})}function F(t){t=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function H(t,e){e=e.refreshToken,t=F(t);return t.append("Authorization",C+" "+e),t}function V(n){return c(this,void 0,void 0,function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,n()];case 1:return 500<=(e=t.sent()).status&&e.status<600?[2,n()]:[2,e]}})})}function K(e){return new Promise(function(t){setTimeout(t,e)})}function W(t){return btoa(String.fromCharCode.apply(String,u([],function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0i&&r.push(e.charAt(i));return r.join("")}var Ht,Vt,Kt=(Wt.prototype.getAppId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!t)throw Bt.create("no app id");return t},Wt.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw Bt.create("no project id");return t},Wt.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw Bt.create("no api key");return t},Wt.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},Wt.getInstance=function(){return xt=void 0===xt?new Wt:xt},Wt);function Wt(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=Ft("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=Ft("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}(jt=Vt=Vt||{})[jt.UNKNOWN=0]="UNKNOWN",jt[jt.VISIBLE=1]="VISIBLE",jt[jt.HIDDEN=2]="HIDDEN";var $t=["firebase_","google_","ga_"],Gt=new RegExp("^[a-zA-Z]\\w*$");function Jt(){switch(Ut.getInstance().document.visibilityState){case"visible":return Vt.VISIBLE;case"hidden":return Vt.HIDDEN;default:return Vt.UNKNOWN}}var zt="0.0.1",Yt={loggingEnabled:!0},Zt="FIREBASE_INSTALLATIONS_AUTH";function Qt(t){var n,e=function(){var t=Ut.getInstance().localStorage;if(t){var e=t.getItem(Mt);if(e&&function(t){return Number(t)>Date.now()}(e)){t=t.getItem(Ct);if(t)try{return JSON.parse(t)}catch(t){return}}}}();return e?(te(e),Promise.resolve()):(n=t,function(){var t=Kt.getInstance().installationsService.getToken();return t.then(function(t){}),t}().then(function(t){var e="https://firebaseremoteconfig.googleapis.com/v1/projects/"+Kt.getInstance().getProjectId()+"/namespaces/fireperf:fetch?key="+Kt.getInstance().getApiKey(),t=new Request(e,{method:"POST",headers:{Authorization:Zt+" "+t},body:JSON.stringify({app_instance_id:n,app_instance_id_token:t,app_id:Kt.getInstance().getAppId(),app_version:Pt,sdk_version:zt})});return fetch(t).then(function(t){if(t.ok)return t.json();throw Bt.create("RC response not ok")})}).catch(function(){Lt.info(Xt)}).then(te).then(function(t){var e;e=t,t=Ut.getInstance().localStorage,e&&t&&(t.setItem(Ct,JSON.stringify(e)),t.setItem(Mt,String(Date.now()+60*Kt.getInstance().configTimeToLive*60*1e3)))},function(){}))}var Xt="Could not fetch config, will use default configs";function te(t){if(!t)return t;var e=Kt.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=Yt.loggingEnabled,n.fpr_log_source&&(e.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(e.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(e.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(e.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),e.logTraceAfterSampling=ee(e.tracesSamplingRate),e.logNetworkAfterSampling=ee(e.networkRequestsSamplingRate),t}function ee(t){return Math.random()<=t}var ne,re=1;function ie(){return re=2,ne=ne||function(){var n=Ut.getInstance().document;return new Promise(function(t){var e;n&&"complete"!==n.readyState?(e=function(){"complete"===n.readyState&&(n.removeEventListener("readystatechange",e),t())},n.addEventListener("readystatechange",e)):t()})}().then(function(){return(t=Kt.getInstance().installationsService.getId()).then(function(t){Ht=t}),t;var t}).then(Qt).then(oe,oe)}function oe(){re=3}var ae,se=1e4,ue=5500,ce=3,le=1e3,fe=ce,pe=[],he=!1;function de(t){setTimeout(function(){var t,e;if(0!==fe)return pe.length?(t=pe.splice(0,le),e=t.map(function(t){return{source_extension_json_proto3:t.message,event_time_ms:String(t.eventTime)}}),void function(t,r){return function(t){var e=Kt.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then(function(t){return t.ok||Lt.info("Call to Firebase backend failed."),t.json()}).then(function(t){var e=Number(t.nextRequestWaitMillis),n=se;isNaN(e)||(n=Math.max(e,n));t=t.logResponseDetails;Array.isArray(t)&&0