- 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
72 lines
2.1 KiB
JavaScript
72 lines
2.1 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.canSkipRegexpu = canSkipRegexpu;
|
|
exports.generateRegexpuOptions = generateRegexpuOptions;
|
|
exports.transformFlags = transformFlags;
|
|
var _features = require("./features.js");
|
|
function generateRegexpuOptions(pattern, toTransform) {
|
|
const feat = name => {
|
|
return (0, _features.hasFeature)(toTransform, _features.FEATURES[name]) ? "transform" : false;
|
|
};
|
|
const featDuplicateNamedGroups = () => {
|
|
if (!feat("duplicateNamedCaptureGroups")) return false;
|
|
const regex = /\(\?<([^>]+)(>|$)/g;
|
|
const seen = new Set();
|
|
for (let match; (match = regex.exec(pattern)) && match[2]; seen.add(match[1])) {
|
|
if (seen.has(match[1])) return "transform";
|
|
}
|
|
return false;
|
|
};
|
|
return {
|
|
unicodeFlag: feat("unicodeFlag"),
|
|
unicodeSetsFlag: feat("unicodeSetsFlag"),
|
|
dotAllFlag: feat("dotAllFlag"),
|
|
unicodePropertyEscapes: feat("unicodePropertyEscape"),
|
|
namedGroups: feat("namedCaptureGroups") || featDuplicateNamedGroups(),
|
|
onNamedGroup: () => {},
|
|
modifiers: feat("modifiers")
|
|
};
|
|
}
|
|
function canSkipRegexpu(node, options) {
|
|
const {
|
|
flags,
|
|
pattern
|
|
} = node;
|
|
if (flags.includes("v")) {
|
|
if (options.unicodeSetsFlag === "transform") return false;
|
|
}
|
|
if (flags.includes("u")) {
|
|
if (options.unicodeFlag === "transform") return false;
|
|
if (options.unicodePropertyEscapes === "transform" && /\\p\{/i.test(pattern)) {
|
|
return false;
|
|
}
|
|
}
|
|
if (flags.includes("s")) {
|
|
if (options.dotAllFlag === "transform") return false;
|
|
}
|
|
if (options.namedGroups === "transform" && /\(\?<(?![=!])/.test(pattern)) {
|
|
return false;
|
|
}
|
|
if (options.modifiers === "transform" && /\(\?[\w-]+:/.test(pattern)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
function transformFlags(regexpuOptions, flags) {
|
|
if (regexpuOptions.unicodeSetsFlag === "transform") {
|
|
flags = flags.replace("v", "u");
|
|
}
|
|
if (regexpuOptions.unicodeFlag === "transform") {
|
|
flags = flags.replace("u", "");
|
|
}
|
|
if (regexpuOptions.dotAllFlag === "transform") {
|
|
flags = flags.replace("s", "");
|
|
}
|
|
return flags;
|
|
}
|
|
|
|
//# sourceMappingURL=util.js.map
|