firebase 9.4.1 → 9.5.0-canary.cb7299cbf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/app/dist/index.cjs.js +1 -1
- package/app/dist/index.esm.js +1 -1
- package/app/dist/index.mjs +1 -1
- package/compat/app/dist/index.cjs.js +1 -1
- package/compat/app/dist/index.esm.js +1 -1
- package/compat/app/dist/index.mjs +1 -1
- package/compat/dist/index.esm.js +2 -2
- package/compat/dist/index.node.cjs +2 -2
- package/compat/dist/index.rn.cjs.js +2 -2
- package/firebase-analytics-compat.js +1 -1
- package/firebase-analytics-compat.js.map +1 -1
- package/firebase-analytics.js +5 -5
- package/firebase-app-check-compat.js +2 -2
- package/firebase-app-check-compat.js.map +1 -1
- package/firebase-app-check.js +285 -50
- package/firebase-app-check.js.map +1 -1
- package/firebase-app-compat.js +2 -2
- package/firebase-app-compat.js.map +1 -1
- package/firebase-app.js +9 -9
- package/firebase-auth-compat.js +1 -1
- package/firebase-auth-compat.js.map +1 -1
- package/firebase-auth.js +3 -3
- package/firebase-compat.js +4 -4
- package/firebase-compat.js.map +1 -1
- package/firebase-database-compat.js +1 -1
- package/firebase-database-compat.js.map +1 -1
- package/firebase-database.js +5 -5
- package/firebase-firestore-compat.js +1 -1
- package/firebase-firestore-compat.js.map +1 -1
- package/firebase-firestore-lite.js +1089 -1089
- package/firebase-firestore-lite.js.map +1 -1
- package/firebase-firestore.js +12 -12
- package/firebase-firestore.js.map +1 -1
- package/firebase-functions-compat.js +1 -1
- package/firebase-functions-compat.js.map +1 -1
- package/firebase-functions.js +3 -3
- package/firebase-messaging-compat.js +1 -1
- package/firebase-messaging-compat.js.map +1 -1
- package/firebase-messaging-sw.js +2 -2
- package/firebase-messaging.js +3 -3
- package/firebase-performance-compat.js +1 -1
- package/firebase-performance-compat.js.map +1 -1
- package/firebase-performance-standalone-compat.es2017.js +15 -15
- package/firebase-performance-standalone-compat.es2017.js.map +1 -1
- package/firebase-performance-standalone-compat.js +1 -1
- package/firebase-performance-standalone-compat.js.map +1 -1
- package/firebase-performance.js +5 -5
- package/firebase-remote-config-compat.js +1 -1
- package/firebase-remote-config-compat.js.map +1 -1
- package/firebase-remote-config.js +4 -4
- package/firebase-storage-compat.js +1 -1
- package/firebase-storage-compat.js.map +1 -1
- package/firebase-storage.js +177 -24
- package/firebase-storage.js.map +1 -1
- package/package.json +26 -26
|
@@ -144,7 +144,7 @@ class t{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Pr
|
|
|
144
144
|
* See the License for the specific language governing permissions and
|
|
145
145
|
* limitations under the License.
|
|
146
146
|
*/
|
|
147
|
-
class
|
|
147
|
+
class y{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const _="@firebase/app",w="0.7.9-canary.cb7299cbf",I=new v("@firebase/app"),E="[DEFAULT]",T={[_]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},S=new Map,A=new Map;function C(e,t){try{e.container.addComponent(t)}catch(n){I.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function N(e){const t=e.name;if(A.has(t))return I.debug(`There were multiple attempts to register component ${t}.`),!1;A.set(t,e);for(const t of S.values())C(t,e);return!0}function O(e,t){return e.container.getProvider(t)}
|
|
148
148
|
/**
|
|
149
149
|
* @license
|
|
150
150
|
* Copyright 2019 Google LLC
|
|
@@ -194,7 +194,7 @@ class D{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),
|
|
|
194
194
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
195
195
|
* See the License for the specific language governing permissions and
|
|
196
196
|
* limitations under the License.
|
|
197
|
-
*/const P="9.
|
|
197
|
+
*/const P="9.5.0-canary.cb7299cbf";function L(e,t={}){if("object"!=typeof t){t={name:t}}const n=Object.assign({name:E,automaticDataCollectionEnabled:!1},t),r=n.name;if("string"!=typeof r||!r)throw k.create("bad-app-name",{appName:String(r)});const i=S.get(r);if(i){if(a(e,i.options)&&a(n,i.config))return i;throw k.create("duplicate-app",{appName:r})}const o=new p(r);for(const e of A.values())o.addComponent(e);const s=new D(e,n,o);return S.set(r,s),s}async function R(e){const t=e.name;S.has(t)&&(S.delete(t),await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function j(e,t,n){var r;let i=null!==(r=T[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void I.warn(e.join(" "))}N(new c(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}function M(e,t){if(null!==e&&"function"!=typeof e)throw k.create("invalid-log-argument");!function(e,t){for(const n of f){let r=null;t&&t.level&&(r=h[t.level]),n.userLogHandler=null===e?null:(t,n,...i)=>{const o=i.map((e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((e=>e)).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:d[n].toLowerCase(),message:o,args:i,type:t.name})}}}(e,t)}function $(e){var t;t=e,f.forEach((e=>{e.setLogLevel(t)}))}
|
|
198
198
|
/**
|
|
199
199
|
* @license
|
|
200
200
|
* Copyright 2019 Google LLC
|
|
@@ -210,7 +210,7 @@ class D{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),
|
|
|
210
210
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
211
211
|
* See the License for the specific language governing permissions and
|
|
212
212
|
* limitations under the License.
|
|
213
|
-
*/var F;F="",N(new c("platform-logger",(e=>new
|
|
213
|
+
*/var F;F="",N(new c("platform-logger",(e=>new y(e)),"PRIVATE")),j(_,w,F),j(_,w,"esm2017"),j("fire-js","");var B=Object.freeze({__proto__:null,SDK_VERSION:P,_DEFAULT_ENTRY_NAME:E,_addComponent:C,_addOrOverwriteComponent:function(e,t){e.container.addOrOverwriteComponent(t)},_apps:S,_clearComponents:function(){A.clear()},_components:A,_getProvider:O,_registerComponent:N,_removeServiceInstance:function(e,t,n="[DEFAULT]"){O(e,t).clearInstance(n)},deleteApp:R,getApp:function(e="[DEFAULT]"){const t=S.get(e);if(!t)throw k.create("no-app",{appName:e});return t},getApps:function(){return Array.from(S.values())},initializeApp:L,onLog:M,registerVersion:j,setLogLevel:$,FirebaseError:n});
|
|
214
214
|
/**
|
|
215
215
|
* @license
|
|
216
216
|
* Copyright 2019 Google LLC
|
|
@@ -309,7 +309,7 @@ const z=function(){const e=q(U);e.SDK_VERSION=`${e.SDK_VERSION}_LITE`;const t=e.
|
|
|
309
309
|
* See the License for the specific language governing permissions and
|
|
310
310
|
* limitations under the License.
|
|
311
311
|
*/
|
|
312
|
-
function(e){j("@firebase/app-compat","0.1.
|
|
312
|
+
function(e){j("@firebase/app-compat","0.1.10-canary.cb7299cbf",e)}("lite");function V(e){return Array.prototype.slice.call(e)}function H(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function K(e,t,n){var r,i=new Promise((function(i,o){H(r=e[t].apply(e,n)).then(i,o)}));return i.request=r,i}function W(e,t,n){var r=K(e,t,n);return r.then((function(e){if(e)return new Q(e,r.request)}))}function G(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function J(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return K(this[t],r,arguments)})}))}function Y(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function X(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return W(this[t],r,arguments)})}))}function Z(e){this._index=e}function Q(e,t){this._cursor=e,this._request=t}function ee(e){this._store=e}function te(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function ne(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new te(n)}function re(e){this._db=e}
|
|
313
313
|
/**
|
|
314
314
|
* @license
|
|
315
315
|
* Copyright 2020 Google LLC
|
|
@@ -326,7 +326,7 @@ function(e){j("@firebase/app-compat","0.1.9",e)}("lite");function V(e){return Ar
|
|
|
326
326
|
* See the License for the specific language governing permissions and
|
|
327
327
|
* limitations under the License.
|
|
328
328
|
*/
|
|
329
|
-
z.registerVersion("firebase","9.
|
|
329
|
+
z.registerVersion("firebase","9.5.0-canary.cb7299cbf","app-compat"),G(Z,"_index",["name","keyPath","multiEntry","unique"]),J(Z,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),X(Z,"_index",IDBIndex,["openCursor","openKeyCursor"]),G(Q,"_cursor",["direction","key","primaryKey","value"]),J(Q,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(e){e in IDBCursor.prototype&&(Q.prototype[e]=function(){var t=this,n=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,n),H(t._request).then((function(e){if(e)return new Q(e,t._request)}))}))})})),ee.prototype.createIndex=function(){return new Z(this._store.createIndex.apply(this._store,arguments))},ee.prototype.index=function(){return new Z(this._store.index.apply(this._store,arguments))},G(ee,"_store",["name","keyPath","indexNames","autoIncrement"]),J(ee,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),X(ee,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),Y(ee,"_store",IDBObjectStore,["deleteIndex"]),te.prototype.objectStore=function(){return new ee(this._tx.objectStore.apply(this._tx,arguments))},G(te,"_tx",["objectStoreNames","mode"]),Y(te,"_tx",IDBTransaction,["abort"]),ne.prototype.createObjectStore=function(){return new ee(this._db.createObjectStore.apply(this._db,arguments))},G(ne,"_db",["name","version","objectStoreNames"]),Y(ne,"_db",IDBDatabase,["deleteObjectStore","close"]),re.prototype.transaction=function(){return new te(this._db.transaction.apply(this._db,arguments))},G(re,"_db",["name","version","objectStoreNames"]),Y(re,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach((function(e){[ee,Z].forEach((function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var t=V(arguments),n=t[t.length-1],r=this._store||this._index,i=r[e].apply(r,t.slice(0,-1));i.onsuccess=function(){n(i.result)}})}))})),[Z,ee].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})}));const ie="@firebase/installations",oe="0.5.4-canary.cb7299cbf",ae=1e4,se=`w:${oe}`,ce="FIS_v2",le=36e5,ue=new r("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 pe(e){return e instanceof n&&e.code.includes("request-failed")}
|
|
330
330
|
/**
|
|
331
331
|
* @license
|
|
332
332
|
* Copyright 2019 Google LLC
|
|
@@ -408,7 +408,7 @@ function ve(e){return new Promise((t=>{setTimeout(t,e)}))}
|
|
|
408
408
|
* See the License for the specific language governing permissions and
|
|
409
409
|
* limitations under the License.
|
|
410
410
|
*/
|
|
411
|
-
const
|
|
411
|
+
const ye=/^[cdef][\w-]{21}$/;function _e(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){return(t=e,btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}
|
|
412
412
|
/**
|
|
413
413
|
* @license
|
|
414
414
|
* Copyright 2019 Google LLC
|
|
@@ -424,7 +424,7 @@ const _e=/^[cdef][\w-]{21}$/;function we(){try{const e=new Uint8Array(17);(self.
|
|
|
424
424
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
425
425
|
* See the License for the specific language governing permissions and
|
|
426
426
|
* limitations under the License.
|
|
427
|
-
*/(e);return
|
|
427
|
+
*/(e);return ye.test(t)?t:""}catch(e){return""}}function we(e){return`${e.appName}!${e.appId}`}
|
|
428
428
|
/**
|
|
429
429
|
* @license
|
|
430
430
|
* Copyright 2019 Google LLC
|
|
@@ -440,7 +440,7 @@ const _e=/^[cdef][\w-]{21}$/;function we(){try{const e=new Uint8Array(17);(self.
|
|
|
440
440
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
441
441
|
* See the License for the specific language governing permissions and
|
|
442
442
|
* limitations under the License.
|
|
443
|
-
*/const Ie=new Map;function Ee(e,t){const n=
|
|
443
|
+
*/const Ie=new Map;function Ee(e,t){const n=we(e);Te(n,t),function(e,t){const n=function(){!Se&&"BroadcastChannel"in self&&(Se=new BroadcastChannel("[Firebase] FID Change"),Se.onmessage=e=>{Te(e.data.key,e.data.fid)});return Se}();n&&n.postMessage({key:e,fid:t});0===Ie.size&&Se&&(Se.close(),Se=null)}(n,t)}function Te(e,t){const n=Ie.get(e);if(n)for(const e of n)e(t)}let Se=null;
|
|
444
444
|
/**
|
|
445
445
|
* @license
|
|
446
446
|
* Copyright 2019 Google LLC
|
|
@@ -457,7 +457,7 @@ const _e=/^[cdef][\w-]{21}$/;function we(){try{const e=new Uint8Array(17);(self.
|
|
|
457
457
|
* See the License for the specific language governing permissions and
|
|
458
458
|
* limitations under the License.
|
|
459
459
|
*/
|
|
460
|
-
const Ae="firebase-installations-store";let Ce=null;function Ne(){return Ce||(Ce=function(e,t,n){var r=K(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(e){n&&n(new ne(i.result,e.oldVersion,i.transaction))}),r.then((function(e){return new re(e)}))}("firebase-installations-database",1,(e=>{if(0===e.oldVersion)e.createObjectStore(Ae)}))),Ce}async function Oe(e,t){const n=
|
|
460
|
+
const Ae="firebase-installations-store";let Ce=null;function Ne(){return Ce||(Ce=function(e,t,n){var r=K(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(e){n&&n(new ne(i.result,e.oldVersion,i.transaction))}),r.then((function(e){return new re(e)}))}("firebase-installations-database",1,(e=>{if(0===e.oldVersion)e.createObjectStore(Ae)}))),Ce}async function Oe(e,t){const n=we(e),r=(await Ne()).transaction(Ae,"readwrite"),i=r.objectStore(Ae),o=await i.get(n);return await i.put(t,n),await r.complete,o&&o.fid===t.fid||Ee(e,t.fid),t}async function ke(e){const t=we(e),n=(await Ne()).transaction(Ae,"readwrite");await n.objectStore(Ae).delete(t),await n.complete}async function De(e,t){const n=we(e),r=(await Ne()).transaction(Ae,"readwrite"),i=r.objectStore(Ae),o=await i.get(n),a=t(o);return void 0===a?await i.delete(n):await i.put(a,n),await r.complete,!a||o&&o.fid===a.fid||Ee(e,a.fid),a}
|
|
461
461
|
/**
|
|
462
462
|
* @license
|
|
463
463
|
* Copyright 2019 Google LLC
|
|
@@ -473,7 +473,7 @@ const Ae="firebase-installations-store";let Ce=null;function Ne(){return Ce||(Ce
|
|
|
473
473
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
474
474
|
* See the License for the specific language governing permissions and
|
|
475
475
|
* limitations under the License.
|
|
476
|
-
*/async function Pe(e){let t;const n=await De(e,(n=>{const r=function(e){return je(e||{fid:
|
|
476
|
+
*/async function Pe(e){let t;const n=await De(e,(n=>{const r=function(e){return je(e||{fid:_e(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(ue.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function(e,{fid:t}){const n=fe(e),r=me(e),i={fid:t,authVersion:ce,appId:e.appId,sdkVersion:se},o={method:"POST",headers:r,body:JSON.stringify(i)},a=await be((()=>fetch(n,o)));if(a.ok){const e=await a.json();return{fid:e.fid||t,registrationStatus:2,refreshToken:e.refreshToken,authToken:de(e.authToken)}}throw await he("Create Installation",a)}(e,t);return Oe(e,n)}catch(n){throw pe(n)&&409===n.customData.serverCode?await ke(e):await Oe(e,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Le(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}));return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function Le(e){let t=await Re(e);for(;1===t.registrationStatus;)await ve(100),t=await Re(e);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await Pe(e);return n||t}return t}function Re(e){return De(e,(e=>{if(!e)throw ue.create("installation-not-found");return je(e)}))}function je(e){return 1===(t=e).registrationStatus&&t.registrationTime+ae<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t;
|
|
477
477
|
/**
|
|
478
478
|
* @license
|
|
479
479
|
* Copyright 2019 Google LLC
|
|
@@ -570,7 +570,7 @@ async function Ue(e,t=!1){const n=e;await async function(e){const{registrationPr
|
|
|
570
570
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
571
571
|
* See the License for the specific language governing permissions and
|
|
572
572
|
* limitations under the License.
|
|
573
|
-
*/const qe="installations",ze=e=>{const t=O(e.getProvider("app").getImmediate(),qe).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await Pe(t.appConfig);return r?r.catch(console.error):$e(t).catch(console.error),n.fid}(t),getToken:e=>Ue(t,e)}};N(new c(qe,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw xe("App Configuration");if(!e.name)throw xe("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw xe(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,platformLoggerProvider:O(t,"platform-logger"),_delete:()=>Promise.resolve()}}),"PUBLIC")),N(new c("installations-internal",ze,"PRIVATE")),j(ie,oe),j(ie,oe,"esm2017");const Ve="@firebase/performance",He="0.5.4",Ke=He,We="FB-PERF-TRACE-MEASURE",Ge="_wt_",Je="_fcp",Ye="_fid",Xe="@firebase/performance/config",Ze="@firebase/performance/configexpire",Qe="Performance",et=new r("performance",Qe,{"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."}),tt=new v(Qe);
|
|
573
|
+
*/const qe="installations",ze=e=>{const t=O(e.getProvider("app").getImmediate(),qe).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await Pe(t.appConfig);return r?r.catch(console.error):$e(t).catch(console.error),n.fid}(t),getToken:e=>Ue(t,e)}};N(new c(qe,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw xe("App Configuration");if(!e.name)throw xe("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw xe(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,platformLoggerProvider:O(t,"platform-logger"),_delete:()=>Promise.resolve()}}),"PUBLIC")),N(new c("installations-internal",ze,"PRIVATE")),j(ie,oe),j(ie,oe,"esm2017");const Ve="@firebase/performance",He="0.5.4-canary.cb7299cbf",Ke=He,We="FB-PERF-TRACE-MEASURE",Ge="_wt_",Je="_fcp",Ye="_fid",Xe="@firebase/performance/config",Ze="@firebase/performance/configexpire",Qe="Performance",et=new r("performance",Qe,{"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."}),tt=new v(Qe);
|
|
574
574
|
/**
|
|
575
575
|
* @license
|
|
576
576
|
* Copyright 2020 Google LLC
|
|
@@ -670,7 +670,7 @@ function gt(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.appId;if(
|
|
|
670
670
|
* See the License for the specific language governing permissions and
|
|
671
671
|
* limitations under the License.
|
|
672
672
|
*/
|
|
673
|
-
const bt="0.0.1",vt=!0,
|
|
673
|
+
const bt="0.0.1",vt=!0,yt="FIREBASE_INSTALLATIONS_AUTH";function _t(e,t){const n=function(){const e=at.getInstance().localStorage;if(!e)return;const t=e.getItem(Ze);if(!(t&&(n=t,Number(n)>Date.now())))return;var n;const r=e.getItem(Xe);if(!r)return;try{return JSON.parse(r)}catch(e){return}}();return n?(It(n),Promise.resolve()):function(e,t){return function(e){const t=e.getToken();return t.then((e=>{})),t}(e.installations).then((n=>{const r=function(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.projectId;if(!n)throw et.create("no project id");return n}(e.app),i=function(e){var t;const n=null===(t=e.options)||void 0===t?void 0:t.apiKey;if(!n)throw et.create("no api key");return n}(e.app),o=new Request(`https://firebaseremoteconfig.googleapis.com/v1/projects/${r}/namespaces/fireperf:fetch?key=${i}`,{method:"POST",headers:{Authorization:`${yt} ${n}`},body:JSON.stringify({app_instance_id:t,app_instance_id_token:n,app_id:gt(e.app),app_version:Ke,sdk_version:bt})});return fetch(o).then((e=>{if(e.ok)return e.json();throw et.create("RC response not ok")}))})).catch((()=>{tt.info(wt)}))}(e,t).then(It).then((e=>function(e){const t=at.getInstance().localStorage;if(!e||!t)return;t.setItem(Xe,JSON.stringify(e)),t.setItem(Ze,String(Date.now()+60*lt.getInstance().configTimeToLive*60*1e3))}(e)),(()=>{}))}const wt="Could not fetch config, will use default configs";function It(e){if(!e)return e;const t=lt.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=vt,n.fpr_log_source&&(t.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(t.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(t.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),t.logTraceAfterSampling=Et(t.tracesSamplingRate),t.logNetworkAfterSampling=Et(t.networkRequestsSamplingRate),e}function Et(e){return Math.random()<=e}
|
|
674
674
|
/**
|
|
675
675
|
* @license
|
|
676
676
|
* Copyright 2020 Google LLC
|
|
@@ -686,7 +686,7 @@ const bt="0.0.1",vt=!0,_t="FIREBASE_INSTALLATIONS_AUTH";function wt(e,t){const n
|
|
|
686
686
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
687
687
|
* See the License for the specific language governing permissions and
|
|
688
688
|
* limitations under the License.
|
|
689
|
-
*/let Tt,St=1;function At(e){return St=2,Tt=Tt||function(e){return function(){const e=at.getInstance().document;return new Promise((t=>{if(e&&"complete"!==e.readyState){const n=()=>{"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()}))}().then((()=>function(e){const t=e.getId();return t.then((e=>{it=e})),t}(e.installations))).then((t=>
|
|
689
|
+
*/let Tt,St=1;function At(e){return St=2,Tt=Tt||function(e){return function(){const e=at.getInstance().document;return new Promise((t=>{if(e&&"complete"!==e.readyState){const n=()=>{"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()}))}().then((()=>function(e){const t=e.getId();return t.then((e=>{it=e})),t}(e.installations))).then((t=>_t(e,t))).then((()=>Ct()),(()=>Ct()))}(e),Tt}function Ct(){St=3}
|
|
690
690
|
/**
|
|
691
691
|
* @license
|
|
692
692
|
* Copyright 2020 Google LLC
|
|
@@ -849,7 +849,7 @@ class Kt{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled
|
|
|
849
849
|
* See the License for the specific language governing permissions and
|
|
850
850
|
* limitations under the License.
|
|
851
851
|
*/
|
|
852
|
-
var Gt;(Gt=z).INTERNAL.registerComponent(new c("performance-compat",Wt,"PUBLIC")),Gt.registerVersion("@firebase/performance-compat","0.1.4");
|
|
852
|
+
var Gt;(Gt=z).INTERNAL.registerComponent(new c("performance-compat",Wt,"PUBLIC")),Gt.registerVersion("@firebase/performance-compat","0.1.4-canary.cb7299cbf");
|
|
853
853
|
/**
|
|
854
854
|
* @license
|
|
855
855
|
* Copyright 2019 Google LLC
|
|
@@ -866,5 +866,5 @@ var Gt;(Gt=z).INTERNAL.registerComponent(new c("performance-compat",Wt,"PUBLIC")
|
|
|
866
866
|
* See the License for the specific language governing permissions and
|
|
867
867
|
* limitations under the License.
|
|
868
868
|
*/
|
|
869
|
-
return z.registerVersion("firebase","9.
|
|
869
|
+
return z.registerVersion("firebase","9.5.0-canary.cb7299cbf","compat-lite"),z}));
|
|
870
870
|
//# sourceMappingURL=firebase-performance-standalone-compat.es2017.js.map
|