- 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
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
var $TypeError = require('es-errors/type');
|
|
|
|
var GetValueFromBuffer = require('./GetValueFromBuffer');
|
|
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
|
|
|
|
var typedArrayBuffer = require('typed-array-buffer');
|
|
var typedArrayByteOffset = require('typed-array-byte-offset');
|
|
var whichTypedArray = require('which-typed-array');
|
|
|
|
var tableTAO = require('./tables/typed-array-objects');
|
|
|
|
// https://262.ecma-international.org/12.0/#sec-integerindexedelementget
|
|
|
|
module.exports = function IntegerIndexedElementGet(O, index) {
|
|
var arrayTypeName = whichTypedArray(O); // step 4
|
|
if (!arrayTypeName) {
|
|
throw new $TypeError('Assertion failed: `O` must be a TypedArray'); // step 1
|
|
}
|
|
|
|
if (typeof index !== 'number') {
|
|
throw new $TypeError('Assertion failed: `index` must be a Number');
|
|
}
|
|
|
|
if (!IsValidIntegerIndex(O, index)) {
|
|
return void undefined; // step 2
|
|
}
|
|
|
|
var offset = typedArrayByteOffset(O); // step 3
|
|
|
|
var elementType = tableTAO.name['$' + arrayTypeName]; // step 7
|
|
|
|
var elementSize = tableTAO.size['$' + elementType]; // step 5
|
|
|
|
var indexedPosition = (index * elementSize) + offset; // step 6
|
|
|
|
return GetValueFromBuffer(typedArrayBuffer(O), indexedPosition, elementType, true, 'Unordered'); // step 11
|
|
};
|