- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
116 lines
2.9 KiB
JavaScript
116 lines
2.9 KiB
JavaScript
"use strict";
|
|
|
|
// Returns "Type(value) is Object" in ES terminology.
|
|
function isObject(value) {
|
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
}
|
|
|
|
function hasOwn(obj, prop) {
|
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
}
|
|
|
|
const wrapperSymbol = Symbol("wrapper");
|
|
const implSymbol = Symbol("impl");
|
|
const sameObjectCaches = Symbol("SameObject caches");
|
|
const ctorRegistrySymbol = Symbol.for("[webidl2js] constructor registry");
|
|
|
|
function getSameObject(wrapper, prop, creator) {
|
|
if (!wrapper[sameObjectCaches]) {
|
|
wrapper[sameObjectCaches] = Object.create(null);
|
|
}
|
|
|
|
if (prop in wrapper[sameObjectCaches]) {
|
|
return wrapper[sameObjectCaches][prop];
|
|
}
|
|
|
|
wrapper[sameObjectCaches][prop] = creator();
|
|
return wrapper[sameObjectCaches][prop];
|
|
}
|
|
|
|
function wrapperForImpl(impl) {
|
|
return impl ? impl[wrapperSymbol] : null;
|
|
}
|
|
|
|
function implForWrapper(wrapper) {
|
|
return wrapper ? wrapper[implSymbol] : null;
|
|
}
|
|
|
|
function tryWrapperForImpl(impl) {
|
|
const wrapper = wrapperForImpl(impl);
|
|
return wrapper ? wrapper : impl;
|
|
}
|
|
|
|
function tryImplForWrapper(wrapper) {
|
|
const impl = implForWrapper(wrapper);
|
|
return impl ? impl : wrapper;
|
|
}
|
|
|
|
const iterInternalSymbol = Symbol("internal");
|
|
const IteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));
|
|
|
|
function isArrayIndexPropName(P) {
|
|
if (typeof P !== "string") {
|
|
return false;
|
|
}
|
|
const i = P >>> 0;
|
|
if (i === Math.pow(2, 32) - 1) {
|
|
return false;
|
|
}
|
|
const s = `${i}`;
|
|
if (P !== s) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
const byteLengthGetter =
|
|
Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
|
|
function isArrayBuffer(value) {
|
|
try {
|
|
byteLengthGetter.call(value);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
const supportsPropertyIndex = Symbol("supports property index");
|
|
const supportedPropertyIndices = Symbol("supported property indices");
|
|
const supportsPropertyName = Symbol("supports property name");
|
|
const supportedPropertyNames = Symbol("supported property names");
|
|
const indexedGet = Symbol("indexed property get");
|
|
const indexedSetNew = Symbol("indexed property set new");
|
|
const indexedSetExisting = Symbol("indexed property set existing");
|
|
const namedGet = Symbol("named property get");
|
|
const namedSetNew = Symbol("named property set new");
|
|
const namedSetExisting = Symbol("named property set existing");
|
|
const namedDelete = Symbol("named property delete");
|
|
|
|
module.exports = exports = {
|
|
isObject,
|
|
hasOwn,
|
|
wrapperSymbol,
|
|
implSymbol,
|
|
getSameObject,
|
|
ctorRegistrySymbol,
|
|
wrapperForImpl,
|
|
implForWrapper,
|
|
tryWrapperForImpl,
|
|
tryImplForWrapper,
|
|
iterInternalSymbol,
|
|
IteratorPrototype,
|
|
isArrayBuffer,
|
|
isArrayIndexPropName,
|
|
supportsPropertyIndex,
|
|
supportedPropertyIndices,
|
|
supportsPropertyName,
|
|
supportedPropertyNames,
|
|
indexedGet,
|
|
indexedSetNew,
|
|
indexedSetExisting,
|
|
namedGet,
|
|
namedSetNew,
|
|
namedSetExisting,
|
|
namedDelete
|
|
};
|