33 lines
1.4 KiB
JavaScript
33 lines
1.4 KiB
JavaScript
// Metro module 1196 (f1197).
|
|
import { Alert } from "react-native";
|
|
import { ReactNativeLibraries } from "./Module997";
|
|
import { isFabricEnabled, isWeb } from "./Module1002";
|
|
import { RN_GLOBAL_OBJ } from "./Module816";
|
|
export function isModalSupported() {
|
|
const ReactNativeVersion = ReactNativeLibraries.ReactNativeVersion;
|
|
const r10 = (ReactNativeVersion !== null ? ReactNativeVersion !== void 0 ? ReactNativeVersion.version : void 0 : void 0) || {};
|
|
const { major, minor } = r10;
|
|
return !(isFabricEnabled() && major === 0 && minor && minor < 71);
|
|
}
|
|
export function isNativeDriverSupportedForColorAnimations() {
|
|
const ReactNativeVersion = ReactNativeLibraries.ReactNativeVersion;
|
|
const r11 = (ReactNativeVersion !== null ? ReactNativeVersion !== void 0 ? ReactNativeVersion.version : void 0 : void 0) || {};
|
|
const { major, minor } = r11;
|
|
return major && major > 0 || minor && minor >= 69 || false;
|
|
}
|
|
export const isValidEmail = (a0) => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(a0);
|
|
export const base64ToUint8Array = (a0) => {
|
|
if (typeof globalThis.atob === "function" && isWeb()) {
|
|
return new Uint8Array([...atob(a0)].map((item) => item.charCodeAt(0)));
|
|
}
|
|
throw new Error("atob is not available in this environment.");
|
|
};
|
|
export const feedbackAlertDialog = (a0, a1) => {
|
|
if (isWeb() && RN_GLOBAL_OBJ.alert !== void 0) {
|
|
RN_GLOBAL_OBJ.alert(`${a0}
|
|
${a1}`);
|
|
} else {
|
|
Alert.alert(a0, a1);
|
|
}
|
|
};
|