hook up arabic translation, rebuild
This commit is contained in:
@@ -41,6 +41,7 @@ The app is fully internationalized using [React-Intl](https://github.com/formatj
|
||||
|
||||
The app is currently available in the following languages:
|
||||
* English - default
|
||||
* Arabic
|
||||
* Chinese simplified
|
||||
* Chinese traditional
|
||||
* French
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
"web"
|
||||
],
|
||||
"locales": [
|
||||
"ar",
|
||||
"de",
|
||||
"en",
|
||||
"es",
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1649
-1649
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@ if (typeof FIREBASE_INIT != 'undefined' && FIREBASE_INIT && FIREBASE_INIT.measur
|
||||
|
||||
// Allow loading translation strings for just one language.
|
||||
const messageLoader = {
|
||||
'ar': _ => import('./i18n.min/ar.json'),
|
||||
'de': _ => import('./i18n.min/de.json'),
|
||||
'en': _ => import('./i18n.min/en.json'),
|
||||
'es': _ => import('./i18n.min/es.json'),
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+126
-49
@@ -97,7 +97,7 @@ function isVersionServiceProvider(provider) {
|
||||
}
|
||||
|
||||
const name$q = "@firebase/app";
|
||||
const version$1 = "0.10.13";
|
||||
const version$1 = "0.11.5";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -163,12 +163,12 @@ const name$4 = "@firebase/storage-compat";
|
||||
|
||||
const name$3 = "@firebase/firestore";
|
||||
|
||||
const name$2 = "@firebase/vertexai-preview";
|
||||
const name$2 = "@firebase/vertexai";
|
||||
|
||||
const name$1 = "@firebase/firestore-compat";
|
||||
|
||||
const name = "firebase";
|
||||
const version = "10.14.1";
|
||||
const version = "11.6.1";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -219,7 +219,7 @@ const PLATFORM_LOG_STRING = {
|
||||
[name$3]: 'fire-fst',
|
||||
[name$1]: 'fire-fst-compat',
|
||||
[name$2]: 'fire-vertex',
|
||||
'fire-js': 'fire-js',
|
||||
'fire-js': 'fire-js', // Platform identifier for JS SDK.
|
||||
[name]: 'fire-js-all'
|
||||
};
|
||||
|
||||
@@ -346,6 +346,9 @@ function _isFirebaseApp(obj) {
|
||||
* @internal
|
||||
*/
|
||||
function _isFirebaseServerApp(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return false;
|
||||
}
|
||||
return obj.settings !== undefined;
|
||||
}
|
||||
/**
|
||||
@@ -476,6 +479,27 @@ class FirebaseAppImpl {
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Parse the token and check to see if the `exp` claim is in the future.
|
||||
// Reports an error to the console if the token or claim could not be parsed, or if `exp` is in
|
||||
// the past.
|
||||
function validateTokenTTL(base64Token, tokenName) {
|
||||
const secondPart = (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.base64Decode)(base64Token.split('.')[1]);
|
||||
if (secondPart === null) {
|
||||
console.error(`FirebaseServerApp ${tokenName} is invalid: second part could not be parsed.`);
|
||||
return;
|
||||
}
|
||||
const expClaim = JSON.parse(secondPart).exp;
|
||||
if (expClaim === undefined) {
|
||||
console.error(`FirebaseServerApp ${tokenName} is invalid: expiration claim could not be parsed`);
|
||||
return;
|
||||
}
|
||||
const exp = JSON.parse(secondPart).exp * 1000;
|
||||
const now = new Date().getTime();
|
||||
const diff = exp - now;
|
||||
if (diff <= 0) {
|
||||
console.error(`FirebaseServerApp ${tokenName} is invalid: the token has expired.`);
|
||||
}
|
||||
}
|
||||
class FirebaseServerAppImpl extends FirebaseAppImpl {
|
||||
constructor(options, serverConfig, name, container) {
|
||||
// Build configuration parameters for the FirebaseAppImpl base class.
|
||||
@@ -497,6 +521,14 @@ class FirebaseServerAppImpl extends FirebaseAppImpl {
|
||||
}
|
||||
// Now construct the data for the FirebaseServerAppImpl.
|
||||
this._serverConfig = Object.assign({ automaticDataCollectionEnabled }, serverConfig);
|
||||
// Ensure that the current time is within the `authIdtoken` window of validity.
|
||||
if (this._serverConfig.authIdToken) {
|
||||
validateTokenTTL(this._serverConfig.authIdToken, 'authIdToken');
|
||||
}
|
||||
// Ensure that the current time is within the `appCheckToken` window of validity.
|
||||
if (this._serverConfig.appCheckToken) {
|
||||
validateTokenTTL(this._serverConfig.appCheckToken, 'appCheckToken');
|
||||
}
|
||||
this._finalizationRegistry = null;
|
||||
if (typeof FinalizationRegistry !== 'undefined') {
|
||||
this._finalizationRegistry = new FinalizationRegistry(() => {
|
||||
@@ -917,8 +949,7 @@ function computeKey(app) {
|
||||
* limitations under the License.
|
||||
*/
|
||||
const MAX_HEADER_BYTES = 1024;
|
||||
// 30 days
|
||||
const STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1000;
|
||||
const MAX_NUM_STORED_HEARTBEATS = 30;
|
||||
class HeartbeatServiceImpl {
|
||||
constructor(container) {
|
||||
this.container = container;
|
||||
@@ -972,14 +1003,13 @@ class HeartbeatServiceImpl {
|
||||
else {
|
||||
// There is no entry for this date. Create one.
|
||||
this._heartbeatsCache.heartbeats.push({ date, agent });
|
||||
// If the number of stored heartbeats exceeds the maximum number of stored heartbeats, remove the heartbeat with the earliest date.
|
||||
// Since this is executed each time a heartbeat is pushed, the limit can only be exceeded by one, so only one needs to be removed.
|
||||
if (this._heartbeatsCache.heartbeats.length > MAX_NUM_STORED_HEARTBEATS) {
|
||||
const earliestHeartbeatIdx = getEarliestHeartbeatIdx(this._heartbeatsCache.heartbeats);
|
||||
this._heartbeatsCache.heartbeats.splice(earliestHeartbeatIdx, 1);
|
||||
}
|
||||
}
|
||||
// Remove entries older than 30 days.
|
||||
this._heartbeatsCache.heartbeats =
|
||||
this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {
|
||||
const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();
|
||||
const now = Date.now();
|
||||
return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;
|
||||
});
|
||||
return this._storage.overwrite(this._heartbeatsCache);
|
||||
}
|
||||
catch (e) {
|
||||
@@ -1154,6 +1184,24 @@ function countBytes(heartbeatsCache) {
|
||||
// heartbeatsCache wrapper properties
|
||||
JSON.stringify({ version: 2, heartbeats: heartbeatsCache })).length;
|
||||
}
|
||||
/**
|
||||
* Returns the index of the heartbeat with the earliest date.
|
||||
* If the heartbeats array is empty, -1 is returned.
|
||||
*/
|
||||
function getEarliestHeartbeatIdx(heartbeats) {
|
||||
if (heartbeats.length === 0) {
|
||||
return -1;
|
||||
}
|
||||
let earliestHeartbeatIdx = 0;
|
||||
let earliestHeartbeatDate = heartbeats[0].date;
|
||||
for (let i = 1; i < heartbeats.length; i++) {
|
||||
if (heartbeats[i].date < earliestHeartbeatDate) {
|
||||
earliestHeartbeatDate = heartbeats[i].date;
|
||||
earliestHeartbeatIdx = i;
|
||||
}
|
||||
}
|
||||
return earliestHeartbeatIdx;
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -1176,7 +1224,7 @@ function registerCoreComponents(variant) {
|
||||
_registerComponent(new _firebase_component__WEBPACK_IMPORTED_MODULE_0__.Component('heartbeat', container => new HeartbeatServiceImpl(container), "PRIVATE" /* ComponentType.PRIVATE */));
|
||||
// Register `app` package.
|
||||
registerVersion(name$q, version$1, variant);
|
||||
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
||||
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
|
||||
registerVersion(name$q, version$1, 'esm2017');
|
||||
// Register platform SDK identifier (no version).
|
||||
registerVersion('fire-js', '');
|
||||
@@ -1646,7 +1694,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
const name = "@firebase/installations";
|
||||
const version = "0.6.9";
|
||||
const version = "0.6.13";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -2790,7 +2838,7 @@ function registerInstallations() {
|
||||
*/
|
||||
registerInstallations();
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_0__.registerVersion)(name, version);
|
||||
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
||||
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_0__.registerVersion)(name, version, 'esm2017');
|
||||
|
||||
|
||||
@@ -3085,6 +3133,7 @@ const CONSOLE_CAMPAIGN_NAME = 'google.c.a.c_l';
|
||||
const CONSOLE_CAMPAIGN_TIME = 'google.c.a.ts';
|
||||
/** Set to '1' if Analytics is enabled for the campaign */
|
||||
const CONSOLE_CAMPAIGN_ANALYTICS_ENABLED = 'google.c.a.e';
|
||||
const DEFAULT_REGISTRATION_TIMEOUT = 10000;
|
||||
var MessageType$1;
|
||||
(function (MessageType) {
|
||||
MessageType[MessageType["DATA_MESSAGE"] = 1] = "DATA_MESSAGE";
|
||||
@@ -3879,6 +3928,7 @@ async function registerDefaultSw(messaging) {
|
||||
messaging.swRegistration.update().catch(() => {
|
||||
/* it is non blocking and we don't care if it failed */
|
||||
});
|
||||
await waitForRegistrationActive(messaging.swRegistration);
|
||||
}
|
||||
catch (e) {
|
||||
throw ERROR_FACTORY.create("failed-service-worker-registration" /* ErrorCode.FAILED_DEFAULT_REGISTRATION */, {
|
||||
@@ -3886,6 +3936,39 @@ async function registerDefaultSw(messaging) {
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Waits for registration to become active. MDN documentation claims that
|
||||
* a service worker registration should be ready to use after awaiting
|
||||
* navigator.serviceWorker.register() but that doesn't seem to be the case in
|
||||
* practice, causing the SDK to throw errors when calling
|
||||
* swRegistration.pushManager.subscribe() too soon after register(). The only
|
||||
* solution seems to be waiting for the service worker registration `state`
|
||||
* to become "active".
|
||||
*/
|
||||
async function waitForRegistrationActive(registration) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const rejectTimeout = setTimeout(() => reject(new Error(`Service worker not registered after ${DEFAULT_REGISTRATION_TIMEOUT} ms`)), DEFAULT_REGISTRATION_TIMEOUT);
|
||||
const incomingSw = registration.installing || registration.waiting;
|
||||
if (registration.active) {
|
||||
clearTimeout(rejectTimeout);
|
||||
resolve();
|
||||
}
|
||||
else if (incomingSw) {
|
||||
incomingSw.onstatechange = ev => {
|
||||
var _a;
|
||||
if (((_a = ev.target) === null || _a === void 0 ? void 0 : _a.state) === 'activated') {
|
||||
incomingSw.onstatechange = null;
|
||||
clearTimeout(rejectTimeout);
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
clearTimeout(rejectTimeout);
|
||||
reject(new Error('No incoming service worker found.'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -4050,7 +4133,7 @@ async function messageEventListener(messaging, event) {
|
||||
}
|
||||
|
||||
const name = "@firebase/messaging";
|
||||
const version = "0.12.12";
|
||||
const version = "0.12.17";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -4086,7 +4169,7 @@ function registerMessagingInWindow() {
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_4__._registerComponent)(new _firebase_component__WEBPACK_IMPORTED_MODULE_1__.Component('messaging', WindowMessagingFactory, "PUBLIC" /* ComponentType.PUBLIC */));
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_4__._registerComponent)(new _firebase_component__WEBPACK_IMPORTED_MODULE_1__.Component('messaging-internal', WindowMessagingInternalFactory, "PRIVATE" /* ComponentType.PRIVATE */));
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_4__.registerVersion)(name, version);
|
||||
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
||||
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
|
||||
(0,_firebase_app__WEBPACK_IMPORTED_MODULE_4__.registerVersion)(name, version, 'esm2017');
|
||||
}
|
||||
|
||||
@@ -4361,13 +4444,15 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ stringLength: function() { return /* binding */ stringLength; },
|
||||
/* harmony export */ stringToByteArray: function() { return /* binding */ stringToByteArray; },
|
||||
/* harmony export */ stringify: function() { return /* binding */ stringify; },
|
||||
/* harmony export */ uuidv4: function() { return /* binding */ uuidv4; },
|
||||
/* harmony export */ validateArgCount: function() { return /* binding */ validateArgCount; },
|
||||
/* harmony export */ validateCallback: function() { return /* binding */ validateCallback; },
|
||||
/* harmony export */ validateContextObject: function() { return /* binding */ validateContextObject; },
|
||||
/* harmony export */ validateIndexedDBOpenable: function() { return /* binding */ validateIndexedDBOpenable; },
|
||||
/* harmony export */ validateNamespace: function() { return /* binding */ validateNamespace; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _postinstall_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./postinstall.mjs */ "./node_modules/@firebase/util/dist/postinstall.mjs");
|
||||
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
@@ -4523,6 +4608,7 @@ const byteArrayToString = function (bytes) {
|
||||
// We define it as an object literal instead of a class because a class compiled down to es5 can't
|
||||
// be treeshaked. https://github.com/rollup/rollup/issues/1691
|
||||
// Static lookup maps, lazily populated by init_()
|
||||
// TODO(dlarocque): Define this as a class, since we no longer target ES5.
|
||||
const base64 = {
|
||||
/**
|
||||
* Maps bytes to characters.
|
||||
@@ -4919,7 +5005,8 @@ const getDefaultsFromCookie = () => {
|
||||
*/
|
||||
const getDefaults = () => {
|
||||
try {
|
||||
return (getDefaultsFromGlobal() ||
|
||||
return ((0,_postinstall_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultsFromPostinstall)() ||
|
||||
getDefaultsFromGlobal() ||
|
||||
getDefaultsFromEnvVariable() ||
|
||||
getDefaultsFromCookie());
|
||||
}
|
||||
@@ -5342,6 +5429,8 @@ class FirebaseError extends Error {
|
||||
this.name = ERROR_NAME;
|
||||
// Fix For ES5
|
||||
// https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
||||
// TODO(dlarocque): Replace this with `new.target`: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget
|
||||
// which we can now use since we no longer target ES5.
|
||||
Object.setPrototypeOf(this, FirebaseError.prototype);
|
||||
// Maintains proper stack trace for where our error was thrown.
|
||||
// Only available on V8.
|
||||
@@ -6335,34 +6424,6 @@ const stringLength = function (str) {
|
||||
return p;
|
||||
};
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2022 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Copied from https://stackoverflow.com/a/2117523
|
||||
* Generates a new uuid.
|
||||
* @public
|
||||
*/
|
||||
const uuidv4 = function () {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
||||
const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
@@ -6501,6 +6562,21 @@ function getModularInstance(service) {
|
||||
//# sourceMappingURL=index.esm2017.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/@firebase/util/dist/postinstall.mjs":
|
||||
/*!**********************************************************!*\
|
||||
!*** ./node_modules/@firebase/util/dist/postinstall.mjs ***!
|
||||
\**********************************************************/
|
||||
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ getDefaultsFromPostinstall: function() { return /* binding */ getDefaultsFromPostinstall; }
|
||||
/* harmony export */ });
|
||||
const getDefaultsFromPostinstall = () => (undefined);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/firebase/app/dist/esm/index.esm.js":
|
||||
@@ -6539,7 +6615,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
var name = "firebase";
|
||||
var version = "10.14.1";
|
||||
var version = "11.6.1";
|
||||
|
||||
/**
|
||||
* @license
|
||||
@@ -21621,6 +21697,7 @@ if (typeof FIREBASE_INIT != 'undefined' && FIREBASE_INIT && FIREBASE_INIT.measur
|
||||
gtag('config', FIREBASE_INIT.measurementId);
|
||||
}
|
||||
const messageLoader = {
|
||||
'ar': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_ar_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/ar.json */ "./src/i18n.min/ar.json", 19)),
|
||||
'de': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_de_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/de.json */ "./src/i18n.min/de.json", 19)),
|
||||
'en': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_en_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/en.json */ "./src/i18n.min/en.json", 19)),
|
||||
'es': _ => __webpack_require__.e(/*! import() */ "src_i18n_min_es_json").then(__webpack_require__.t.bind(__webpack_require__, /*! ./i18n.min/es.json */ "./src/i18n.min/es.json", 19)),
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+973
-449
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user