UNPKG

firebase

Version:

Firebase JavaScript library for web and Node.js

3 lines (2 loc) • 40.3 kB
((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app-compat"),require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app-compat","@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase,e.firebase.INTERNAL.modularAPIs)})(this,function(Cr,Mr){try{!(function(){class O extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,O.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,F.prototype.create)}}class F{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var r=t[0]||{},n=this.service+"/"+e,i=this.errors[e],i=i?((r,n)=>{try{let e=0,t="";for(;e<r.length;){var i=r.indexOf("{$",e);if(-1===i){t+=r.substring(e);break}var a=r.indexOf("}",i+2);if(-1===a){t+=r.substring(e);break}var o=r.substring(i+2,a),s=n[o];t+=r.substring(e,i)+(null!=s?String(s):`<${o}?>`),e=a+1}return t}catch(e){return r}})(i,r):"Error",i=this.serviceName+`: ${i} (${n}).`;return new O(n,i,r)}}class e{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}var t;(I=t=t||{})[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";let x={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT},U=t.INFO,j={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"},q=(e,t,...r)=>{if(!(t<e.logLevel)){var n=(new Date).toISOString(),i=j[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${n}] ${e.name}:`,...r)}};function H(e){if("loading"===document.readyState)return"loading";var t=u();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"}function V(e,t){var r="";try{for(;e&&9!==e.nodeType;){var n=e,i=n.id?"#"+n.id:Q(n)+(n.classList&&n.classList.value&&n.classList.value.trim()&&n.classList.value.trim().length?"."+n.classList.value.trim().replace(/\s+/g,"."):"");if(r.length+i.length>(t||100)-1)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(e){}return r}function $(i,e){var o,s,a,c;o=function(e){r={},(e=e).entries.length&&(t=e.entries.reduce(function(e,t){return e&&e.value>t.value?e:t}))&&t.sources&&t.sources.length&&(n=(n=t.sources).find(function(e){return e.node&&1===e.node.nodeType})||n[0])&&(r={largestShiftTarget:V(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:H(t.startTime)});var t,r,n=Object.assign(e,{attribution:r});i(n)},s=e||{},a=ie(function(){function e(e){e.forEach(function(e){var t,r;e.hadRecentInput||(t=i[0],r=i[i.length-1],n&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(n+=e.value,i.push(e)):(n=e.value,i=[e]))}),n>r.value&&(r.value=n,r.entries=i,t())}var t,r=p("CLS",0),n=0,i=[],a=f("layout-shift",e);a&&(t=g(o,r,de,s.reportAllChanges),m(function(){e(a.takeRecords()),t(!0)}),d(function(){r=p("CLS",n=0),t=g(o,r,de,s.reportAllChanges),ne(function(){return t()})}),setTimeout(t,0))}),c=c||{},le(function(){var t,r=ce(),n=p("FCP"),i=f("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime)&&(n.value=Math.max(e.startTime-re(),0),n.entries.push(e),t(!0))})});i&&(t=g(a,n,ue,c.reportAllChanges),d(function(e){n=p("FCP"),t=g(a,n,ue,c.reportAllChanges),ne(function(){n.value=performance.now()-e.timeStamp,t(!0)})}))})}function W(a,o){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(o=o||{},le(function(){var e;he();function t(t){Ee(function(){t.forEach(we);var e=be();e&&e.latency!==r.value&&(r.value=e.latency,r.entries=e.entries,i())})}var r=p("INP"),n=f("event",t,{durationThreshold:null!=(e=o.durationThreshold)?e:40}),i=g(a,r,Te,o.reportAllChanges);n&&(n.observe({type:"first-input",buffered:!0}),m(function(){t(n.takeRecords()),i(!0)}),d(function(){ve=me(),s.length=0,c.clear(),r=p("INP"),i=g(a,r,Te,o.reportAllChanges)}))}))}function z(e){o=o.concat(e),Ce()}function K(){10<h.size&&h.forEach(function(e,t){c.has(t)||h.delete(t)});var r=s.map(function(e){return Se.get(e.entries[0])}),n=l.length-50;l=l.filter(function(e,t){return n<=t||r.includes(e)});for(var i=new Set,e=0;e<l.length;e++){var t=l[e];Me(t.startTime,t.processingEnd).forEach(function(e){i.add(e)})}var a=o.length-1-50;o=o.filter(function(e,t){return e.startTime>_e&&a<t||i.has(e)}),Ie=-1}function G(c,e){X=X||f("long-animation-frame",z),W(function(e){t=(e=e).entries[0],s=Se.get(t),r=t.processingStart,n=s.processingEnd,s=s.entries.sort(function(e,t){return e.processingStart-t.processingStart}),i=Me(t.startTime,n),a=(a=e.entries.find(function(e){return e.target}))&&a.target||h.get(t.interactionId),o=[t.startTime+t.duration,n].concat(i.map(function(e){return e.startTime+e.duration})),o=Math.max.apply(Math,o),a={interactionTarget:V(a),interactionTargetElement:a,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:o,processedEventEntries:s,longAnimationFrameEntries:i,inputDelay:r-t.startTime,processingDuration:n-r,presentationDelay:Math.max(o-n,0),loadState:H(t.startTime)};var t,r,n,i,a,o,s=Object.assign(e,{attribution:a});c(s)},e)}function J(l,e){var o,s;o=function(e){s={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:(e=e).value},e.entries.length&&(t=u())&&(o=t.activationStart||0,n=(r=e.entries[e.entries.length-1]).url&&performance.getEntriesByType("resource").filter(function(e){return e.name===r.url})[0],c=Math.max(0,t.responseStart-o),i=Math.max(c,n?(n.requestStart||n.startTime)-o:0),a=Math.max(i,n?n.responseEnd-o:0),o=Math.max(a,r.startTime-o),s={element:V(r.element),timeToFirstByte:c,resourceLoadDelay:i-c,resourceLoadDuration:a-i,elementRenderDelay:o-a,navigationEntry:t,lcpEntry:r},r.url&&(s.url=r.url),n)&&(s.lcpResourceEntry=n);var t,r,n,i,a,o,s,c=Object.assign(e,{attribution:s});l(c)},s=e||{},le(function(){function e(e){(e=s.reportAllChanges?e:e.slice(-1)).forEach(function(e){e.startTime<n.firstHiddenTime&&(i.value=Math.max(e.startTime-re(),0),i.entries=[e],t())})}var t,r,n=ce(),i=p("LCP"),a=f("largest-contentful-paint",e);a&&(t=g(o,i,ke,s.reportAllChanges),r=ie(function(){Le[i.id]||(e(a.takeRecords()),a.disconnect(),Le[i.id]=!0,t(!0))}),["keydown","click"].forEach(function(e){addEventListener(e,function(){return Ee(r)},{once:!0,capture:!0})}),m(r),d(function(e){i=p("LCP"),t=g(o,i,ke,s.reportAllChanges),ne(function(){i.value=performance.now()-e.timeStamp,Le[i.id]=!0,t(!0)})}))})}var Z,X,Y,u=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&0<e.responseStart&&e.responseStart<performance.now())return e},Q=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ee=-1,te=function(){return ee},d=function(t){addEventListener("pageshow",function(e){e.persisted&&(ee=e.timeStamp,t(e))},!0)},re=function(){var e=u();return e&&e.activationStart||0},p=function(e,t){var r=u(),n="navigate";return 0<=te()?n="back-forward-cache":r&&(document.prerendering||0<re()?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},f=function(e,t,r){try{var n;if(PerformanceObserver.supportedEntryTypes.includes(e))return(n=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})})).observe(Object.assign({type:e,buffered:!0},r||{})),n}catch(e){}},g=function(t,r,n,i){var a,o;return function(e){0<=r.value&&(e||i)&&((o=r.value-(a||0))||void 0===a)&&(a=r.value,r.delta=o,r.rating=(e=r.value)>n[1]?"poor":e>n[0]?"needs-improvement":"good",t(r))}},ne=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},m=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},ie=function(e){var t=!1;return function(){t||(e(),t=!0)}},r=-1,ae=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},n=function(e){"hidden"===document.visibilityState&&-1<r&&(r="visibilitychange"===e.type?e.timeStamp:0,se())},oe=function(){addEventListener("visibilitychange",n,!0),addEventListener("prerenderingchange",n,!0)},se=function(){removeEventListener("visibilitychange",n,!0),removeEventListener("prerenderingchange",n,!0)},ce=function(){return r<0&&(r=ae(),oe(),d(function(){setTimeout(function(){r=ae(),oe()},0)})),{get firstHiddenTime(){return r}}},le=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},ue=[1800,3e3],de=[.1,.25],pe=0,fe=1/0,i=0,ge=function(e){e.forEach(function(e){e.interactionId&&(fe=Math.min(fe,e.interactionId),i=Math.max(i,e.interactionId),pe=i?(i-fe)/7+1:0)})},me=function(){return Z?pe:performance.interactionCount||0},he=function(){"interactionCount"in performance||(Z=Z||f("event",ge,{type:"event",buffered:!0,durationThreshold:0}))},s=[],c=new Map,ve=0,be=function(){var e=Math.min(s.length-1,Math.floor((me()-ve)/50));return s[e]},ye=[],we=function(t){var e,r;ye.forEach(function(e){return e(t)}),!t.interactionId&&"first-input"!==t.entryType||(r=s[s.length-1],((e=c.get(t.interactionId))||s.length<10||t.duration>r.latency)&&(e?t.duration>e.latency?(e.entries=[t],e.latency=t.duration):t.duration===e.latency&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(r={id:t.interactionId,latency:t.duration,entries:[t]},c.set(r.id,r),s.push(r)),s.sort(function(e,t){return t.latency-e.latency}),10<s.length)&&s.splice(10).forEach(function(e){return c.delete(e.id)}))},Ee=function(e){var t=self.requestIdleCallback||self.setTimeout,r=-1;return e=ie(e),"hidden"===document.visibilityState?e():(r=t(e),m(e)),r},Te=[200,500],o=[],l=[],_e=0,Se=new WeakMap,h=new Map,Ie=-1,Ce=function(){Ie<0&&(Ie=Ee(K))},Me=(ye.push(function(e){e.interactionId&&e.target&&!h.has(e.interactionId)&&h.set(e.interactionId,e.target)},function(e){var t,r=e.startTime+e.duration;_e=Math.max(_e,e.processingEnd);for(var n=l.length-1;0<=n;n--){var i=l[n];if(Math.abs(r-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:[e]},l.push(t)),!e.interactionId&&"first-input"!==e.entryType||Se.set(e,t),Ce()}),function(e,t){for(var r,n=[],i=0;r=o[i];i++)if(!(r.startTime+r.duration<e)){if(r.startTime>t)break;n.push(r)}return n}),ke=[2500,4e3],Le={};let Ae=(t,e)=>e.some(e=>t instanceof e),Ne,Pe;let Re=new WeakMap,De=new WeakMap,Be=new WeakMap,Oe=new WeakMap,Fe=new WeakMap;let xe={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return De.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Be.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return v(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function Ue(n){return n!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Pe=Pe||[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]).includes(n)?function(...e){return n.apply(qe(this),e),v(Re.get(this))}:function(...e){return v(n.apply(qe(this),e))}:function(e,...t){var r=n.call(qe(this),e,...t);return Be.set(r,e.sort?e.sort():[e]),v(r)}}function je(e){var a,t;return"function"==typeof e?Ue(e):(e instanceof IDBTransaction&&(a=e,De.has(a)||(t=new Promise((e,t)=>{let r=()=>{a.removeEventListener("complete",n),a.removeEventListener("error",i),a.removeEventListener("abort",i)},n=()=>{e(),r()},i=()=>{t(a.error||new DOMException("AbortError","AbortError")),r()};a.addEventListener("complete",n),a.addEventListener("error",i),a.addEventListener("abort",i)}),De.set(a,t))),Ae(e,Ne=Ne||[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])?new Proxy(e,xe):e)}function v(e){var a,t;return e instanceof IDBRequest?(a=e,(t=new Promise((e,t)=>{let r=()=>{a.removeEventListener("success",n),a.removeEventListener("error",i)},n=()=>{e(v(a.result)),r()},i=()=>{t(a.error),r()};a.addEventListener("success",n),a.addEventListener("error",i)})).then(e=>{e instanceof IDBCursor&&Re.set(e,a)}).catch(()=>{}),Fe.set(t,a),t):Oe.has(e)?Oe.get(e):((t=je(e))!==e&&(Oe.set(e,t),Fe.set(t,e)),t)}let qe=e=>Fe.get(e);let He=["get","getKey","getAll","getAllKeys","count"],Ve=["put","add","delete","clear"],$e=new Map;function We(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t){if($e.get(t))return $e.get(t);let i=t.replace(/FromIndex$/,""),a=t!==i,o=Ve.includes(i);var r;return i in(a?IDBIndex:IDBObjectStore).prototype&&(o||He.includes(i))?(r=async function(e,...t){var r=this.transaction(e,o?"readwrite":"readonly");let n=r.store;return a&&(n=n.index(t.shift())),(await Promise.all([n[i](...t),o&&r.done]))[0]},$e.set(t,r),r):void 0}}xe={...Y=xe,get:(e,t,r)=>We(e,t)||Y.get(e,t,r),has:(e,t)=>!!We(e,t)||Y.has(e,t)};var a="@firebase/installations",ze="0.6.23";let Ke=1e4,Ge="w:"+ze,Je="FIS_v2",Ze="https://firebaseinstallations.googleapis.com/v1",Xe=36e5;let b=new F("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function Ye(e){return e instanceof O&&e.code.includes("request-failed")}function Qe({projectId:e}){return Ze+`/projects/${e}/installations`}function et(e){return{token:e.token,requestStatus:2,expiresIn:Number(e.expiresIn.replace("s","000")),creationTime:Date.now()}}async function tt(e,t){var r=(await t.json()).error;return b.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})}function rt({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function nt(e,{refreshToken:t}){var r=rt(e);return r.append("Authorization",(e=t,Je+" "+e)),r}async function it(e){var t=await e();return 500<=t.status&&t.status<600?e():t}function at(t){return new Promise(e=>{setTimeout(e,t)})}let ot=/^[cdef][\w-]{21}$/,st="";function ct(){try{var e=new Uint8Array(17),t=((self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16,(e=>btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_"))(e).substr(0,22));return ot.test(t)?t:st}catch{return st}}function y(e){return e.appName+"!"+e.appId}let lt=new Map;function ut(e,t){var r=y(e),e=(dt(r,t),r),r=(()=>(!w&&"BroadcastChannel"in self&&((w=new BroadcastChannel("[Firebase] FID Change")).onmessage=e=>{dt(e.data.key,e.data.fid)}),w))();r&&r.postMessage({key:e,fid:t}),0===lt.size&&w&&(w.close(),w=null)}function dt(e,t){var r=lt.get(e);if(r)for(var n of r)n(t)}let w=null;let pt="firebase-installations-database",ft=1,E="firebase-installations-store",gt=null;function mt(){return gt=gt||((e,t,{blocked:r,upgrade:n,blocking:i,terminated:a})=>{let o=indexedDB.open(e,t);var s=v(o);return n&&o.addEventListener("upgradeneeded",e=>{n(v(o.result),e.oldVersion,e.newVersion,v(o.transaction),e)}),r&&o.addEventListener("blocked",e=>r(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})(pt,ft,{upgrade:(e,t)=>{0===t&&e.createObjectStore(E)}})}async function T(e,t){var r=y(e),n=(await mt()).transaction(E,"readwrite"),i=n.objectStore(E),a=await i.get(r);return await i.put(t,r),await n.done,a&&a.fid===t.fid||ut(e,t.fid),t}async function ht(e){var t=y(e),r=(await mt()).transaction(E,"readwrite");await r.objectStore(E).delete(t),await r.done}async function _(e,t){var r=y(e),n=(await mt()).transaction(E,"readwrite"),i=n.objectStore(E),a=await i.get(r),o=t(a);return void 0===o?await i.delete(r):await i.put(o,r),await n.done,!o||a&&a.fid===o.fid||ut(e,o.fid),o}async function vt(r){let n;var e=await _(r.appConfig,e=>{var t=yt(e||{fid:ct(),registrationStatus:0}),t=((e,t)=>{var r,n;return 0===t.registrationStatus?navigator.onLine?(r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=(async(t,r)=>{try{var e=await(async({appConfig:e,heartbeatServiceProvider:t},{fid:r})=>{let n=Qe(e);var i=rt(e),a=((a=t.getImmediate({optional:!0}))&&(a=await a.getHeartbeatsHeader())&&i.append("x-firebase-client",a),{fid:r,authVersion:Je,appId:e.appId,sdkVersion:Ge});let o={method:"POST",headers:i,body:JSON.stringify(a)};if((i=await it(()=>fetch(n,o))).ok)return{fid:(a=await i.json()).fid||r,registrationStatus:2,refreshToken:a.refreshToken,authToken:et(a.authToken)};throw await tt("Create Installation",i)})(t,r);return T(t.appConfig,e)}catch(e){throw Ye(e)&&409===e.customData.serverCode?await ht(t.appConfig):await T(t.appConfig,{fid:r.fid,registrationStatus:0}),e}})(e,r),{installationEntry:r,registrationPromise:n}):(r=Promise.reject(b.create("app-offline")),{installationEntry:t,registrationPromise:r}):1===t.registrationStatus?{installationEntry:t,registrationPromise:(async e=>{let t=await bt(e.appConfig);for(;1===t.registrationStatus;)await at(100),t=await bt(e.appConfig);var r,n;return 0!==t.registrationStatus?t:({installationEntry:r,registrationPromise:n}=await vt(e),n||r)})(e)}:{installationEntry:t}})(r,t);return n=t.registrationPromise,t.installationEntry});return e.fid===st?{installationEntry:await n}:{installationEntry:e,registrationPromise:n}}function bt(e){return _(e,e=>{if(e)return yt(e);throw b.create("installation-not-found")})}function yt(e){var t;return 1===(t=e).registrationStatus&&t.registrationTime+Ke<Date.now()?{fid:e.fid,registrationStatus:0}:e}async function wt({appConfig:e,heartbeatServiceProvider:t},r){[i,a]=[e,r.fid];let n=Qe(i)+`/${a}/authTokens:generate`;var i,a,o=nt(e,r),s=t.getImmediate({optional:!0}),s=(s&&(s=await s.getHeartbeatsHeader())&&o.append("x-firebase-client",s),{installation:{sdkVersion:Ge,appId:e.appId}});let c={method:"POST",headers:o,body:JSON.stringify(s)};o=await it(()=>fetch(n,c));if(o.ok)return et(await o.json());throw await tt("Generate Auth Token",o)}async function Et(n,i=!1){let a;var e=await _(n.appConfig,e=>{if(!_t(e))throw b.create("not-registered");var t,r=e.authToken;if(i||2!==(t=r).requestStatus||(e=>{var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Xe})(t)){if(1===r.requestStatus)return a=(async(e,t)=>{let r=await Tt(e.appConfig);for(;1===r.authToken.requestStatus;)await at(100),r=await Tt(e.appConfig);var n=r.authToken;return 0===n.requestStatus?Et(e,t):n})(n,i),e;if(navigator.onLine)return t=e,r={requestStatus:1,requestTime:Date.now()},r={...t,authToken:r},a=(async(t,r)=>{try{var e=await wt(t,r),n={...r,authToken:e};return await T(t.appConfig,n),e}catch(e){var i;throw!Ye(e)||401!==e.customData.serverCode&&404!==e.customData.serverCode?(i={...r,authToken:{requestStatus:0}},await T(t.appConfig,i)):await ht(t.appConfig),e}})(n,r),r;throw b.create("app-offline")}return e});return a?await a:e.authToken}function Tt(e){return _(e,e=>{var t,r;if(_t(e))return t=e.authToken,1===(r=t).requestStatus&&r.requestTime+Ke<Date.now()?{...e,authToken:{requestStatus:0}}:e;throw b.create("not-registered")})}function _t(e){return void 0!==e&&2===e.registrationStatus}async function St(e,t=!1){var r=e,n=(await(!(n=(await vt(r)).registrationPromise)||!await n),await Et(r,t));return n.token}function It(e){return b.create("missing-app-config-values",{valueName:e})}let Ct="installations",Mt=e=>{var t=e.getProvider("app").getImmediate();return{app:t,appConfig:(e=>{if(!e||!e.options)throw It("App Configuration");if(!e.name)throw It("App Name");var t;for(t of["projectId","apiKey","appId"])if(!e.options[t])throw It(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}})(t),heartbeatServiceProvider:Mr._getProvider(t,"heartbeat"),_delete:()=>Promise.resolve()}},kt=e=>{var t=e.getProvider("app").getImmediate();let r=Mr._getProvider(t,Ct).getImmediate();return{getId:()=>(async e=>{var t=e,{installationEntry:r,registrationPromise:n}=await vt(t);return(n||Et(t)).catch(console.error),r.fid})(r),getToken:e=>St(r,e)}};Mr._registerComponent(new e(Ct,Mt,"PUBLIC")),Mr._registerComponent(new e("installations-internal",kt,"PRIVATE")),Mr.registerVersion(a,ze),Mr.registerVersion(a,ze,"esm2020");let Lt="@firebase/performance",At="0.7.13",Nt=At,Pt="FB-PERF-TRACE-MEASURE",Rt="@firebase/performance/config",Dt="@firebase/performance/configexpire";var S,I,a="Performance";let C=new F("performance",a,{"trace started":"Trace {$traceName} was started before.","trace stopped":"Trace {$traceName} is not running.","nonpositive trace startTime":"Trace {$traceName} startTime should be positive.","nonpositive trace duration":"Trace {$traceName} duration should be positive.","no window":"Window is not available.","no app id":"App id is not available.","no project id":"Project id is not available.","no api key":"Api key is not available.","invalid cc log":"Attempted to queue invalid cc event","FB not default":"Performance can only start when Firebase app instance is the default one.","RC response not ok":"RC response is not ok","invalid attribute name":"Attribute name {$attributeName} is invalid.","invalid attribute value":"Attribute value {$attributeValue} is invalid.","invalid custom metric name":"Custom metric name {$customMetricName} is invalid","invalid String merger input":"Input for String merger is invalid, contact support team to resolve.","already initialized":"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."}),M=new class{constructor(e){this.name=e,this._logLevel=U,this._logHandler=q,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in t))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?x[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,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)}}(a);M.logLevel=t.INFO;let Bt,Ot;class k{constructor(e){if(!(this.window=e))throw C.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay),this.onLCP=J,this.onINP=G,this.onCLS=$}getUrl(){return this.windowLocation.href.split("?")[0]}mark(e){this.performance&&this.performance.mark&&this.performance.mark(e)}measure(e,t,r){this.performance&&this.performance.measure&&this.performance.measure(e,t,r)}getEntriesByType(e){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(e):[]}getEntriesByName(e){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(e):[]}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return fetch&&Promise&&"undefined"!=typeof navigator&&navigator.cookieEnabled?!!(()=>{try{return"object"==typeof indexedDB}catch(e){}})()||(M.info("IndexedDB is not supported by current browser"),!1):(M.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)}setupObserver(e,r){this.PerformanceObserver&&new this.PerformanceObserver(e=>{for(var t of e.getEntries())r(t)}).observe({entryTypes:[e]})}static getInstance(){return Bt=void 0===Bt?new k(Ot):Bt}}let L;function Ft(e,t){var r=e.length-t.length;if(r<0||1<r)throw C.create("invalid String merger input");var n=[];for(let i=0;i<e.length;i++)n.push(e.charAt(i)),t.length>i&&n.push(t.charAt(i));return n.join("")}let xt;class A{constructor(){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,this.logMaxFlushSize=40}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}static getInstance(){return xt=void 0===xt?new A:xt}}(I=S=S||{})[I.UNKNOWN=0]="UNKNOWN",I[I.VISIBLE=1]="VISIBLE",I[I.HIDDEN=2]="HIDDEN";let Ut=["firebase_","google_","ga_"],jt=new RegExp("^[a-zA-Z]\\w*$");function qt(e){var t=e.options?.appId;if(t)return t;throw C.create("no app id")}let Ht="0.0.1",N={loggingEnabled:!0},Vt="FIREBASE_INSTALLATIONS_AUTH";function $t(e,t){var n,i,r=(()=>{var e=k.getInstance().localStorage;if(e){var t=e.getItem(Dt);if(t&&(e=>Number(e)>Date.now())(t)){t=e.getItem(Rt);if(t)try{return JSON.parse(t)}catch{}}}})();return r?(zt(r),Promise.resolve()):(i=t,(e=>{var t=e.getToken();return t.then(e=>{}),t})((n=e).installations).then(e=>{var t=(e=>{var t=e.options?.projectId;if(t)return t;throw C.create("no project id")})(n.app),r=(e=>{var t=e.options?.apiKey;if(t)return t;throw C.create("no api key")})(n.app),t=new Request(`https://firebaseremoteconfig.googleapis.com/v1/projects/${t}/namespaces/fireperf:fetch?key=`+r,{method:"POST",headers:{Authorization:Vt+" "+e},body:JSON.stringify({app_instance_id:i,app_instance_id_token:e,app_id:qt(n.app),app_version:Nt,sdk_version:Ht})});return fetch(t).then(e=>{if(e.ok)return e.json();throw C.create("RC response not ok")})}).catch(()=>{M.info(Wt)}).then(zt).then(e=>{var t;e=e,t=k.getInstance().localStorage,e&&t&&(t.setItem(Rt,JSON.stringify(e)),t.setItem(Dt,String(Date.now()+60*A.getInstance().configTimeToLive*60*1e3)))},()=>{}))}let Wt="Could not fetch config, will use default configs";function zt(e){var t,r;return e&&(t=A.getInstance(),void 0!==(r=e.entries||{}).fpr_enabled?t.loggingEnabled="true"===String(r.fpr_enabled):t.loggingEnabled=N.loggingEnabled,r.fpr_log_source?t.logSource=Number(r.fpr_log_source):N.logSource&&(t.logSource=N.logSource),r.fpr_log_endpoint_url?t.logEndPointUrl=r.fpr_log_endpoint_url:N.logEndPointUrl&&(t.logEndPointUrl=N.logEndPointUrl),r.fpr_log_transport_key?t.transportKey=r.fpr_log_transport_key:N.transportKey&&(t.transportKey=N.transportKey),void 0!==r.fpr_vc_network_request_sampling_rate?t.networkRequestsSamplingRate=Number(r.fpr_vc_network_request_sampling_rate):void 0!==N.networkRequestsSamplingRate&&(t.networkRequestsSamplingRate=N.networkRequestsSamplingRate),void 0!==r.fpr_vc_trace_sampling_rate?t.tracesSamplingRate=Number(r.fpr_vc_trace_sampling_rate):void 0!==N.tracesSamplingRate&&(t.tracesSamplingRate=N.tracesSamplingRate),r.fpr_log_max_flush_size?t.logMaxFlushSize=Number(r.fpr_log_max_flush_size):N.logMaxFlushSize&&(t.logMaxFlushSize=N.logMaxFlushSize),t.logTraceAfterSampling=Kt(t.tracesSamplingRate),t.logNetworkAfterSampling=Kt(t.networkRequestsSamplingRate)),e}function Kt(e){return Math.random()<=e}let Gt=1,Jt;function Zt(e){var r;return Gt=2,Jt=Jt||(r=e,(()=>{let r=k.getInstance().document;return new Promise(t=>{if(r&&"complete"!==r.readyState){let e=()=>{"complete"===r.readyState&&(r.removeEventListener("readystatechange",e),t())};r.addEventListener("readystatechange",e)}else t()})})().then(()=>{return e=r.installations,(t=e.getId()).then(e=>{L=e}),t;var e,t}).then(e=>$t(r,e)).then(()=>Xt(),()=>Xt()))}function Xt(){Gt=3}let Yt=1e4,Qt=1e3,er=3,tr=65536,rr=new TextEncoder,P=er,R=[],nr=!1;function ir(e){setTimeout(()=>{if(!(P<=0)){if(0<R.length){let e=R.splice(0,Qt),t=ar(e);(e=>{var t=A.getInstance().getFlTransportFullUrl();return rr.encode(e).length<=tr&&navigator.sendBeacon&&navigator.sendBeacon(t,e)?Promise.resolve():fetch(t,{method:"POST",body:e})})(t).then(()=>{P=er}).catch(()=>{R=[...e,...R],P--,M.info(`Tries left: ${P}.`),ir(Yt)})}ir(Yt)}},e)}function ar(e){var t=e.map(e=>({source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)})),t={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:A.getInstance().logSource,log_event:t};return JSON.stringify(t)}function or(t){return(...e)=>{e={message:t(...e),eventTime:Date.now()};if(!e.eventTime||!e.message)throw C.create("invalid cc log");R=[...R,e]}}function sr(){for(var e,t=A.getInstance().getFlTransportFullUrl();0<R.length;){var r=R.splice(-A.getInstance().logMaxFlushSize),n=ar(r);if(!navigator.sendBeacon||!navigator.sendBeacon(t,n)){R=[...R,...r];break}}0<R.length&&(e=ar(R),fetch(t,{method:"POST",body:e}).catch(()=>{M.info("Failed flushing queued events.")}))}let D;function cr(e,t){(D=D||{send:or(dr),flush:sr}).send(e,t)}function lr(e){var t=A.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&k.getInstance().requiredApisAvailable()&&(3===Gt?ur(e):Zt(e.performanceController).then(()=>ur(e),()=>ur(e)))}function ur(e){var t;L&&(t=A.getInstance()).loggingEnabled&&t.logTraceAfterSampling&&cr(e,1)}function dr(e,t){var r,n;return 0===t?(r={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},r={application_info:pr(e.performanceController.app),network_request_metric:r},JSON.stringify(r)):(r={name:(t=e).name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs},0!==Object.keys(t.counters).length&&(r.counters=t.counters),n=t.getAttributes(),0!==Object.keys(n).length&&(r.custom_attributes=n),n={application_info:pr(t.performanceController.app),trace_metric:r},JSON.stringify(n))}function pr(e){return{google_app_id:qt(e),app_instance_id:L,web_app_info:{sdk_version:Nt,page_url:k.getInstance().getUrl(),service_worker_status:(t=k.getInstance().navigator)?.serviceWorker?t.serviceWorker.controller?2:3:1,visibility_state:(()=>{switch(k.getInstance().document.visibilityState){case"visible":return S.VISIBLE;case"hidden":return S.HIDDEN;default:return S.UNKNOWN}})(),effective_connection_type:(()=>{var e=k.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}})()},application_process_state:0};var t}function fr(e,t){var r,n,i,a=t;a&&void 0!==a.responseStart&&(i=k.getInstance().getTimeOrigin(),i=Math.floor(1e3*(a.startTime+i)),r=a.responseStart?Math.floor(1e3*(a.responseStart-a.startTime)):void 0,n=Math.floor(1e3*(a.responseEnd-a.startTime)),a={performanceController:e,url:a.name&&a.name.split("?")[0],responsePayloadBytes:a.transferSize,startTimeUs:i,timeToResponseInitiatedUs:r,timeToResponseCompletedUs:n},t=a,(i=A.getInstance()).instrumentationEnabled)&&(r=t.url,n=i.logEndPointUrl.split("?")[0],a=i.flTransportEndpointUrl.split("?")[0],r!==n)&&r!==a&&i.loggingEnabled&&i.logNetworkAfterSampling&&cr(t,0)}let gr=["_fp","_fcp","_fid","_lcp","_cls","_inp"];class B{constructor(e,t,r=!1,n){this.performanceController=e,this.name=t,this.isAuto=r,this.state=1,this.customAttributes={},this.counters={},this.api=k.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark=`FB-PERF-TRACE-START-${this.randomId}-`+this.name,this.traceStopMark=`FB-PERF-TRACE-STOP-${this.randomId}-`+this.name,this.traceMeasure=n||`${Pt}-${this.randomId}-`+this.name,n&&this.calculateTraceMetrics())}start(){if(1!==this.state)throw C.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(2!==this.state)throw C.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),lr(this)}record(e,t,r){if(e<=0)throw C.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw C.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),r&&r.attributes&&(this.customAttributes={...r.attributes}),r&&r.metrics)for(var n of Object.keys(r.metrics))isNaN(Number(r.metrics[n]))||(this.counters[n]=Math.floor(Number(r.metrics[n])));lr(this)}incrementMetric(e,t=1){void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)}putMetric(e,t){if(n=e,i=this.name,0===n.length||100<n.length||!(i&&i.startsWith("_wt_")&&-1<gr.indexOf(n))&&n.startsWith("_"))throw C.create("invalid custom metric name",{customMetricName:e});var r,n,i;this.counters[e]=(i=t??0,(r=Math.floor(i))<i&&M.info(`Metric value should be an Integer, setting the value as : ${r}.`),r)}getMetric(e){return this.counters[e]||0}putAttribute(e,t){var r,n,i=!(0===(r=e).length||40<r.length||Ut.some(e=>r.startsWith(e))||!r.match(jt)),a=0!==(n=t).length&&n.length<=100;if(i&&a)this.customAttributes[e]=t;else{if(!i)throw C.create("invalid attribute name",{attributeName:e});if(!a)throw C.create("invalid attribute value",{attributeValue:t})}}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]}getAttributes(){return{...this.customAttributes}}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){var e=this.api.getEntriesByName(this.traceMeasure),e=e&&e[0];e&&(this.durationUs=Math.floor(1e3*e.duration),this.startTimeUs=Math.floor(1e3*(e.startTime+this.api.getTimeOrigin())))}static createOobTrace(e,t,r,n,i){var a=k.getInstance().getUrl();if(a){var a=new B(e,"_wt_"+a,!0),o=Math.floor(1e3*k.getInstance().getTimeOrigin());a.setStartTime(o),t&&t[0]&&(a.setDuration(Math.floor(1e3*t[0].duration)),a.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),a.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),a.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));r&&((o=r.find(e=>"first-paint"===e.name))&&o.startTime&&a.putMetric("_fp",Math.floor(1e3*o.startTime)),(o=r.find(e=>"first-contentful-paint"===e.name))&&o.startTime&&a.putMetric("_fcp",Math.floor(1e3*o.startTime)),i)&&a.putMetric("_fid",Math.floor(1e3*i)),this.addWebVitalMetric(a,"_lcp","lcp_element",n.lcp),this.addWebVitalMetric(a,"_cls","cls_largestShiftTarget",n.cls),this.addWebVitalMetric(a,"_inp","inp_interactionTarget",n.inp),lr(a),D&&D.flush()}}static addWebVitalMetric(e,t,r,n){n&&(e.putMetric(t,Math.floor(1e3*n.value)),n.elementAttribution)&&(100<n.elementAttribution.length?e.putAttribute(r,n.elementAttribution.substring(0,100)):e.putAttribute(r,n.elementAttribution))}static createUserTimingTrace(e,t){lr(new B(e,t,!1,t))}}let mr={},hr=!1,vr;function br(n){L&&(setTimeout(()=>{{var t=n;let e=k.getInstance();"onpagehide"in window?e.document.addEventListener("pagehide",()=>wr(t)):e.document.addEventListener("unload",()=>wr(t)),e.document.addEventListener("visibilitychange",()=>{"hidden"===e.document.visibilityState&&wr(t)}),e.onFirstInputDelay&&e.onFirstInputDelay(e=>{vr=e}),e.onLCP(e=>{mr.lcp={value:e.value,elementAttribution:e.attribution?.element}}),e.onCLS(e=>{mr.cls={value:e.value,elementAttribution:e.attribution?.largestShiftTarget}}),e.onINP(e=>{mr.inp={value:e.value,elementAttribution:e.attribution?.interactionTarget}})}},0),setTimeout(()=>{var e,t=n,r=k.getInstance();for(e of r.getEntriesByType("resource"))fr(t,e);r.setupObserver("resource",e=>fr(t,e))},0),setTimeout(()=>{var e,t=n,r=k.getInstance();for(e of r.getEntriesByType("measure"))yr(t,e);r.setupObserver("measure",e=>yr(t,e))},0))}function yr(e,t){var r=t.name;r.substring(0,Pt.length)!==Pt&&B.createUserTimingTrace(e,r)}function wr(r){if(!hr){hr=!0;var n=k.getInstance();let e=n.getEntriesByType("navigation"),t=n.getEntriesByType("paint");setTimeout(()=>{B.createOobTrace(r,e,t,mr,vr)},0)}}class Er{constructor(e,t){this.app=e,this.installations=t,this.initialized=!1}_init(e){this.initialized||(void 0!==e?.dataCollectionEnabled&&(this.dataCollectionEnabled=e.dataCollectionEnabled),void 0!==e?.instrumentationEnabled&&(this.instrumentationEnabled=e.instrumentationEnabled),k.getInstance().requiredApisAvailable()?new Promise((n,i)=>{try{let e=!0,t="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(t);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(t),n(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{i(r.error?.message||"")}}catch(e){i(e)}}).then(e=>{e&&(nr||(ir(5500),nr=!0),Zt(this).then(()=>br(this),()=>br(this)),this.initialized=!0)}).catch(e=>{M.info("Environment doesn't support IndexedDB: "+e)}):M.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(e){A.getInstance().instrumentationEnabled=e}get instrumentationEnabled(){return A.getInstance().instrumentationEnabled}set dataCollectionEnabled(e){A.getInstance().dataCollectionEnabled=e}get dataCollectionEnabled(){return A.getInstance().dataCollectionEnabled}}let Tr="[DEFAULT]";let _r=(e,{options:t})=>{var r=e.getProvider("app").getImmediate(),n=e.getProvider("installations-internal").getImmediate();if(r.name!==Tr)throw C.create("FB not default");if("undefined"==typeof window)throw C.create("no window");e=window,Ot=e;r=new Er(r,n);return r._init(t),r};Mr._registerComponent(new e("performance",_r,"PUBLIC")),Mr.registerVersion(Lt,At),Mr.registerVersion(Lt,At,"esm2020");class Sr{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled(){return this._delegate.instrumentationEnabled}set instrumentationEnabled(e){this._delegate.instrumentationEnabled=e}get dataCollectionEnabled(){return this._delegate.dataCollectionEnabled}set dataCollectionEnabled(e){this._delegate.dataCollectionEnabled=e}trace(e){return t=this._delegate,e=e,t=(r=t)&&r._delegate?r._delegate:r,new B(t,e);var t,r}}function Ir(e){var t=e.getProvider("app-compat").getImmediate(),r=e.getProvider("performance").getImmediate();return new Sr(t,r)}(I=Cr).INTERNAL.registerComponent(new e("performance-compat",Ir,"PUBLIC")),I.registerVersion("@firebase/performance-compat","0.2.26")}).apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-performance-compat.js - be sure to load firebase-app.js first.")}}); //# sourceMappingURL=firebase-performance-compat.js.map