Compare commits

..

1 Commits

Author SHA1 Message Date
Abdullah Atta
f751db673e web: benchmark different embedding models 2024-06-01 11:14:11 +05:00
304 changed files with 17484 additions and 15597 deletions

View File

@@ -22,7 +22,7 @@ jobs:
- name: Use specific Java version for the builds
uses: joschi/setup-jdk@v2
with:
java-version: "17"
java-version: "11"
architecture: "x64"
- name: Install node modules

View File

@@ -40,35 +40,12 @@ Once you are inside the `./notesnook` directory, run the preparation step:
npm install
```
Now you can finally start the desktop app for development:
Now you can finally start the desktop app:
```bash
npm run start:desktop
```
To run the app in release mode:
```bash
npm run staging -- --rebuild
```
This will compile and run the app in production mode but it won't generate any packages. To create the final packages, you'll have to run the following commands:
```bash
npm run release -- --rebuild
# For macOS
npx electron-builder --mac dmg --arm64 --x64 -publish never
# For Linux (AppImage)
npx electron-builder --linux AppImage:x64 AppImage:arm64 -publish never
# For Windows
npx electron-builder --win --publish never
```
Feel free to play around with the `electron-builder` command to get the packages you need. `npx electron-builder --help` is a great resource to learn different commands & platforms supported by `electron-builder`.
## Developer guide
### The tech stack

View File

@@ -1,4 +1,3 @@
owner: streetwriters
repo: notesnook
provider: github
updaterCacheDirName: Notesnook

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "@notesnook/desktop",
"productName": "Notesnook",
"description": "Your private note taking space",
"version": "3.0.13",
"version": "3.0.6",
"appAppleId": "1544027013",
"private": true,
"main": "./dist/index.js",
@@ -16,7 +16,7 @@
"@trpc/server": "10.38.3",
"better-sqlite3-multiple-ciphers": "^9.5.0",
"electron-trpc": "0.5.2",
"electron-updater": "^6.2.1",
"electron-updater": "6.1.4",
"icojs": "^0.17.1",
"sodium-native": "^4.1.1",
"typed-emitter": "^2.1.0",
@@ -29,7 +29,7 @@
"chokidar": "^3.5.3",
"electron": "^29.3.1",
"electron-builder": "^24.13.3",
"esbuild": "^0.23.0",
"esbuild": "^0.20.0",
"kysely": "^0.27.3",
"node-gyp-build": "^4.8.0",
"prebuildify": "^6.0.1",

View File

@@ -46,11 +46,11 @@ if (args.rebuild || !existsSync(path.join(webAppPath, "build"))) {
// temporary until there's support for prebuilt binaries for linux ARM
if (os.platform() === "linux") await patchBetterSQLite3();
// if (os.platform() === "win32")
// await exec(
// `npx prebuildify --arch=arm64 --strip -t electron@${packageJson.devDependencies.electron}`,
// path.join(__dirname, "..", "node_modules", "sodium-native")
// );
if (os.platform() === "win32")
await exec(
`npx prebuildify --arch=arm64 --strip -t electron@${packageJson.devDependencies.electron}`,
path.join(__dirname, "..", "node_modules", "sodium-native")
);
await fs.cp(path.join(webAppPath, "build"), "build", {
recursive: true,

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { initTRPC } from "@trpc/server";
import { z } from "zod";
import { app, dialog, nativeTheme, Notification, shell } from "electron";
import { dialog, nativeTheme, Notification, shell } from "electron";
import { AutoLaunch } from "../utils/autolaunch";
import { config, DesktopIntegration } from "../utils/config";
import { bringToFront } from "../utils/bring-to-front";
@@ -152,10 +152,6 @@ export const osIntegrationRouter = t.router({
await rm(input);
}),
restart: t.procedure.query(() => {
app.relaunch();
app.exit();
}),
showNotification: t.procedure
.input(NotificationOptions)
.query(({ input }) => {
@@ -195,10 +191,7 @@ export const osIntegrationRouter = t.router({
({ input: { theme, windowControlsIconColor, backgroundColor } }) => {
if (windowControlsIconColor) {
config.windowControlsIconColor = windowControlsIconColor;
if (
process.platform === "win32" &&
!config.desktopSettings.nativeTitlebar
)
if (process.platform === "win32")
globalThis.window?.setTitleBarOverlay({
symbolColor: windowControlsIconColor
});

View File

@@ -61,18 +61,7 @@ export const updaterRouter = t.router({
"update-not-available"
),
onAvailable: createSubscription<"update-available", UpdateInfo>(
"update-available",
() => {
if (!config.automaticUpdates) return false;
autoUpdater.emit("download-progress", {
bytesPerSecond: 0,
delta: 0,
percent: 0,
total: 100,
transferred: 0
});
return true;
}
"update-available"
),
onError: createSubscription("error")
});
@@ -80,11 +69,10 @@ export const updaterRouter = t.router({
function createSubscription<
TName extends keyof AppUpdaterEvents,
TReturnType = Parameters<AppUpdaterEvents[TName]>[0]
>(eventName: TName, handler?: (args: TReturnType) => boolean) {
>(eventName: TName) {
return t.procedure.subscription(() => {
return observable<TReturnType>((emit) => {
const listener: AppUpdaterEvents[TName] = (...args: any[]) => {
if (handler?.(args[0])) return;
emit.next(args[0]);
};
autoUpdater.removeAllListeners(eventName);

View File

@@ -84,21 +84,17 @@ async function createWindow() {
format: process.platform === "win32" ? "ico" : "png"
}),
...(config.desktopSettings.nativeTitlebar
? {}
: {
titleBarStyle: "hidden",
frame: process.platform === "win32" || process.platform === "darwin",
titleBarOverlay: {
height: 37,
color: "#00000000",
symbolColor: config.windowControlsIconColor
},
trafficLightPosition: {
x: 16,
y: 12
}
}),
titleBarStyle: "hidden",
frame: process.platform === "win32" || process.platform === "darwin",
titleBarOverlay: {
height: 37,
color: "#00000000",
symbolColor: config.windowControlsIconColor
},
trafficLightPosition: {
x: 16,
y: 12
},
webPreferences: {
zoomFactor: config.zoomFactor,

View File

@@ -35,7 +35,6 @@ async function configureAutoUpdater() {
autoUpdater.allowDowngrade = false;
autoUpdater.allowPrerelease = false;
autoUpdater.autoInstallOnAppQuit = true;
autoUpdater.disableWebInstaller = true;
}
export { configureAutoUpdater };

View File

@@ -25,8 +25,7 @@ export const DesktopIntegration = z.object({
autoStart: z.boolean().optional(),
startMinimized: z.boolean().optional(),
minimizeToSystemTray: z.boolean().optional(),
closeToSystemTray: z.boolean().optional(),
nativeTitlebar: z.boolean().optional()
closeToSystemTray: z.boolean().optional()
});
export type DesktopIntegration = z.infer<typeof DesktopIntegration>;
@@ -36,8 +35,7 @@ export const config = {
autoStart: false,
startMinimized: false,
minimizeToSystemTray: false,
closeToSystemTray: false,
nativeTitlebar: false
closeToSystemTray: false
},
privacyMode: false,
isSpellCheckerEnabled: true,

View File

@@ -38,7 +38,7 @@ DerivedData
*.ipa
*.xcuserstate
*.hprof
**/.xcode.env.local
ios/.xcode.env.local
# Android/IntelliJ
#
rn-build-deps/

View File

@@ -25,6 +25,7 @@ import { I18nManager, View } from "react-native";
import "react-native-gesture-handler";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { initializeLogger } from "./common/database/logger";
import AppLockedOverlay from "./components/app-lock-overlay";
import { withErrorBoundry } from "./components/exception-handler";
import GlobalSafeAreaProvider from "./components/globalsafearea";
@@ -40,25 +41,35 @@ import { useUserStore } from "./stores/use-user-store";
I18nManager.allowRTL(false);
I18nManager.forceRTL(false);
I18nManager.swapLeftAndRightInRTL(false);
const { appLockEnabled, appLockMode } = SettingsService.get();
if (appLockEnabled || appLockMode !== "none") {
useUserStore.getState().lockApp(true);
}
const App = () => {
useAppEvents();
//@ts-ignore
globalThis["IS_MAIN_APP_RUNNING"] = true;
const init = useAppEvents();
useEffect(() => {
SettingsService.onFirstLaunch();
setTimeout(async () => {
await Notifications.get();
if (SettingsService.get().notifNotes) {
Notifications.pinQuickNote(true);
}
TipManager.init();
}, 100);
initializeLogger()
.catch((e) => {
console.log(e);
})
.finally(() => {
const { appLockEnabled, appLockMode } = SettingsService.get();
if (appLockEnabled || appLockMode !== "none") {
useUserStore.getState().lockApp(true);
}
//@ts-ignore
globalThis["IS_MAIN_APP_RUNNING"] = true;
init();
setTimeout(async () => {
SettingsService.onFirstLaunch();
await Notifications.get();
if (SettingsService.get().notifNotes) {
Notifications.pinQuickNote(true);
}
TipManager.init();
}, 100);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
<View
style={{

View File

@@ -23,9 +23,7 @@ import { Platform } from "react-native";
import { setLogger } from ".";
import { RNSqliteDriver } from "./sqlite.kysely";
let loggerLoaded = false;
const initializeLogger = async () => {
if (loggerLoaded) return;
await initialize({
dialect: (name) => ({
createDriver: () => {
@@ -39,7 +37,6 @@ const initializeLogger = async () => {
journalMode: Platform.OS === "ios" ? "DELETE" : "WAL"
});
setLogger();
loggerLoaded = true;
};
export { initializeLogger };

View File

@@ -26,7 +26,6 @@ import { Platform } from "react-native";
import { IOS_APPGROUPID } from "../../utils/constants";
import { createCacheDir } from "./io";
import { getUploadedFileSize } from "./download";
import { ToastManager } from "../../services/event-manager";
export async function uploadFile(filename, data, cancelToken) {
if (!data) return false;
@@ -51,15 +50,9 @@ export async function uploadFile(filename, data, cancelToken) {
method: "PUT",
headers
});
const uploadUrl = res.ok ? await res.text() : await res.json();
if (typeof uploadUrl !== "string") {
throw new Error(
uploadUrl.error || "Unable to resolve attachment upload url."
);
}
if (!res.ok) throw new Error(`${res.status}: Unable to resolve upload url`);
const uploadUrl = await res.text();
if (!uploadUrl) throw new Error("Unable to resolve attachment upload url");
let uploadFilePath = `${cacheDir}/${filename}`;
const iosAppGroup =
@@ -132,10 +125,8 @@ export async function uploadFile(filename, data, cancelToken) {
return result;
} catch (e) {
useAttachmentStore.getState().remove(filename);
ToastManager.error(e, "File upload failed");
DatabaseLogger.error(e, "File upload failed", {
filename
});
DatabaseLogger.info(`File upload error: ${filename}, ${e}`);
DatabaseLogger.error(e);
return false;
}
}

View File

@@ -18,15 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React, { useCallback, useEffect, useRef } from "react";
import {
AppStateStatus,
Platform,
TextInput,
useWindowDimensions,
View
} from "react-native";
import { AppStateStatus, Platform, TextInput, View } from "react-native";
//@ts-ignore
import { useThemeColors } from "@notesnook/theme";
import { enabled } from "react-native-privacy-snapshot";
import { DatabaseLogger } from "../../common/database";
import {
decrypt,
@@ -52,7 +47,6 @@ import Input from "../ui/input";
import Seperator from "../ui/seperator";
import Heading from "../ui/typography/heading";
import Paragraph from "../ui/typography/paragraph";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
const getUser = () => {
const user = MMKV.getString("user");
@@ -93,7 +87,6 @@ const AppLockedOverlay = () => {
const appState = useAppState();
const lastAppState = useRef<AppStateStatus>(appState);
const biometricUnlockAwaitingUserInput = useRef(false);
const { height } = useWindowDimensions();
const keyboardType = useSettingStore(
(state) => state.settings.applockKeyboardType
);
@@ -128,6 +121,7 @@ const AppLockedOverlay = () => {
);
if (unlocked) {
lockApp(false);
enabled(false);
password.current = undefined;
}
biometricUnlockAwaitingUserInput.current = false;
@@ -154,6 +148,7 @@ const AppLockedOverlay = () => {
}
lockApp(false);
enabled(false);
password.current = undefined;
} else {
ToastManager.show({
@@ -168,6 +163,10 @@ const AppLockedOverlay = () => {
};
useEffect(() => {
if (appState === "active") {
enabled(false);
}
const prevState = lastAppState.current;
lastAppState.current = appState;
@@ -193,26 +192,26 @@ const AppLockedOverlay = () => {
DatabaseLogger.info("Biometric unlock request");
onUnlockAppRequested();
}
enabled(false);
} else {
SettingsService.appEnteredBackground();
if (SettingsService.get().privacyScreen) {
enabled(true);
}
}
}, [appState, onUnlockAppRequested, appLocked]);
return appLocked ? (
<KeyboardAwareScrollView
<View
style={{
backgroundColor: colors.primary.background,
width: "100%",
height: "100%",
position: "absolute",
zIndex: 999
zIndex: 999,
justifyContent: "center"
}}
contentContainerStyle={{
justifyContent: "center",
minHeight: height
}}
keyboardDismissMode="interactive"
keyboardShouldPersistTaps="handled"
>
<Toast context="local" />
<View
@@ -327,7 +326,7 @@ const AppLockedOverlay = () => {
</View>
</View>
</View>
</KeyboardAwareScrollView>
</View>
) : null;
};

View File

@@ -355,7 +355,6 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {
AttachmentDialog.present = (note?: Note) => {
presentSheet({
component: () => <AttachmentDialog note={note} />,
keyboardHandlerDisabled: true
component: () => <AttachmentDialog note={note} />
});
};

View File

@@ -17,16 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { useThemeColors } from "@notesnook/theme";
import React, { useEffect, useState } from "react";
import { TouchableOpacity, View, useWindowDimensions } from "react-native";
import { SheetManager } from "react-native-actions-sheet";
import { DDS } from "../../services/device-detection";
import { eSendEvent } from "../../services/event-manager";
import Sync from "../../services/sync";
import { useSettingStore } from "../../stores/use-setting-store";
import { useUserStore } from "../../stores/use-user-store";
import { eUserLoggedIn } from "../../utils/events";
import { useThemeColors } from "@notesnook/theme";
import { SIZE } from "../../utils/size";
import { sleep } from "../../utils/time";
import SheetProvider from "../sheet-provider";
@@ -38,6 +34,11 @@ import Paragraph from "../ui/typography/paragraph";
import { hideAuth } from "./common";
import { ForgotPassword } from "./forgot-password";
import { useLogin } from "./use-login";
import { useSettingStore } from "../../stores/use-setting-store";
import { eUserLoggedIn } from "../../utils/events";
import { useUserStore } from "../../stores/use-user-store";
import Sync from "../../services/sync";
import { Notice } from "../ui/notice";
const LoginSteps = {
emailAuth: 1,
@@ -183,11 +184,7 @@ export const Login = ({ changeMode }) => {
defaultValue={email.current}
editable={step === LoginSteps.emailAuth && !loading}
onSubmit={() => {
if (step === LoginSteps.emailAuth) {
login();
} else {
passwordInputRef.current?.focus();
}
passwordInputRef.current?.focus();
}}
/>
@@ -246,7 +243,6 @@ export const Login = ({ changeMode }) => {
width: 250,
borderRadius: 100
}}
height={50}
fontSize={SIZE.md}
type="accent"
title={!loading ? "Continue" : null}

View File

@@ -37,7 +37,6 @@ import Seperator from "../ui/seperator";
import Heading from "../ui/typography/heading";
import Paragraph from "../ui/typography/paragraph";
import { useCallback } from "react";
import { ScrollView } from "react-native-actions-sheet";
const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {
const { colors } = useThemeColors();
@@ -144,10 +143,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {
}, [currentMethod.method, mfaInfo.token, seconds, sending, start]);
return (
<ScrollView
keyboardShouldPersistTaps="handled"
keyboardDismissMode="interactive"
>
<View>
<View
style={{
alignItems: "center",
@@ -218,7 +214,6 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {
code.current = value;
//onNext();
}}
onSubmitEditing={onNext}
caretHidden
inputStyle={{
fontSize: SIZE.lg,
@@ -230,7 +225,6 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {
keyboardType={
currentMethod.method === "recoveryCode" ? "default" : "numeric"
}
enablesReturnKeyAutomatically
containerStyle={{
height: 60,
borderWidth: 0,
@@ -303,7 +297,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {
</>
)}
</View>
</ScrollView>
</View>
);
};

View File

@@ -23,7 +23,10 @@ import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
import { Dialog } from "../dialog";
import { Issue } from "../sheets/github/issue";
const error = (stack: string, component: string) => `
const error = (
stack: string,
component: string
) => `Please let us know what happened. What steps we can take to reproduce the issue here.
_______________________________
Stacktrace: In ${component}::${stack}`;
@@ -36,9 +39,9 @@ class ExceptionHandler extends React.Component<{
error: Error | null;
hasError: boolean;
} = {
hasError: false,
error: null
};
hasError: false,
error: null
};
static getDerivedStateFromError(error: Error) {
return { hasError: true, error: error };
}

View File

@@ -49,8 +49,7 @@ export const Card = ({ color }: { color?: string }) => {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
paddingHorizontal: 0,
width: "100%"
paddingHorizontal: 0
}}
>
<View
@@ -92,6 +91,7 @@ export const Card = ({ color }: { color?: string }) => {
<View
style={{
marginLeft: 10,
flexShrink: 1,
marginRight: 10
}}
>

View File

@@ -18,33 +18,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Debug } from "@notesnook/core/dist/api/debug";
import { getModel, getBrand, getSystemVersion } from "react-native-device-info";
import { useThemeColors } from "@notesnook/theme";
import Clipboard from "@react-native-clipboard/clipboard";
import React, { useRef, useState } from "react";
import { Linking, Platform, Text, TextInput, View } from "react-native";
import { getVersion } from "react-native-device-info";
import { useStoredRef } from "../../../hooks/use-stored-ref";
import { ToastManager } from "../../../services/event-manager";
import { ToastManager, eSendEvent } from "../../../services/event-manager";
import PremiumService from "../../../services/premium";
import { useUserStore } from "../../../stores/use-user-store";
import { eCloseSheet } from "../../../utils/events";
import { openLinkInBrowser } from "../../../utils/functions";
import { SIZE } from "../../../utils/size";
import { sleep } from "../../../utils/time";
import DialogHeader from "../../dialog/dialog-header";
import { presentDialog } from "../../dialog/functions";
import { Button } from "../../ui/button";
import Seperator from "../../ui/seperator";
import Heading from "../../ui/typography/heading";
import Paragraph from "../../ui/typography/paragraph";
export const Issue = ({ defaultTitle, defaultBody, issueTitle }) => {
const { colors } = useThemeColors();
const body = useStoredRef("issueBody");
const body = useStoredRef("issueBody", defaultBody);
const title = useStoredRef("issueTitle", defaultTitle);
const [done, setDone] = useState(false);
const user = useUserStore((state) => state.user);
const [loading, setLoading] = useState(false);
const bodyRef = useRef();
const initialLayout = useRef(false);
const issueUrl = useRef();
const onPress = async () => {
if (loading) return;
@@ -54,24 +56,57 @@ export const Issue = ({ defaultTitle, defaultBody, issueTitle }) => {
try {
setLoading(true);
issueUrl.current = await Debug.report({
let issue_url = await Debug.report({
title: title.current,
body:
body.current +
`\n${defaultBody || ""}` +
`\n_______________
**Device information:**
App version: ${getVersion()}
Platform: ${Platform.OS}
Device: ${getBrand() || ""}-${getModel() || ""}-${getSystemVersion() || ""}
Model: ${Platform.constants.Brand || ""}-${Platform.constants.Model || ""}-${
Platform.constants.Version || ""
}
Pro: ${PremiumService.get()}
Logged in: ${user ? "yes" : "no"}`,
userId: user?.id
});
setLoading(false);
eSendEvent(eCloseSheet);
body.reset();
title.reset();
setDone(true);
await sleep(300);
presentDialog({
title: "Issue reported",
paragraph: (
<Text>
You can track your issue at{" "}
<Text
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
onPress={() => {
Linking.openURL(issue_url);
}}
>
{issue_url}.
</Text>{" "}
Please note that we will respond to your issue on the given link. We
recommend that you save it.
</Text>
),
positiveText: "Copy link",
positivePress: () => {
Clipboard.setString(issue_url);
ToastManager.show({
heading: "Issue url copied!",
type: "success",
context: "global"
});
},
negativeText: "Close"
});
} catch (e) {
setLoading(false);
ToastManager.show({
@@ -89,177 +124,125 @@ Logged in: ${user ? "yes" : "no"}`,
width: "100%"
}}
>
{done ? (
<>
<View
style={{
height: 250,
justifyContent: "center",
alignItems: "center",
gap: 10
}}
>
<Heading>Issue submitted</Heading>
<Paragraph
style={{
textAlign: "center"
}}
selectable={true}
>
You can track your issue at{" "}
<Paragraph
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
onPress={() => {
Linking.openURL(issueUrl.current);
}}
>
{issueUrl.current}
</Paragraph>
. Please note that we will respond to your issue on the given
link. We recommend that you save it.
</Paragraph>
<DialogHeader
title={issueTitle || "Report issue"}
paragraph={
issueTitle
? "We are sorry, it seems that the app crashed due to an error. You can submit a bug report below so we can fix this asap."
: "Let us know if you have faced any issue/bug while using Notesnook."
}
/>
<Button
title="Open issue"
onPress={() => {
Linking.openURL(issueUrl.current);
}}
type="accent"
width="100%"
/>
</View>
</>
) : (
<>
<DialogHeader
title={issueTitle || "Report issue"}
paragraph={
issueTitle
? "We are sorry, it seems that the app crashed due to an error. You can submit a bug report below so we can fix this asap."
: "Let us know if you have faced any issue/bug while using Notesnook."
}
/>
<Seperator half />
<Seperator half />
<TextInput
placeholder="Title"
onChangeText={(v) => (title.current = v)}
defaultValue={title.current}
style={{
borderWidth: 1,
borderColor: colors.primary.border,
borderRadius: 5,
padding: 12,
fontFamily: "OpenSans-Regular",
marginBottom: 10,
fontSize: SIZE.md,
color: colors.primary.heading
}}
placeholderTextColor={colors.primary.placeholder}
/>
<TextInput
ref={bodyRef}
multiline
placeholder={`Tell us more about the issue you are facing.
<TextInput
placeholder="Title"
onChangeText={(v) => (title.current = v)}
defaultValue={title.current}
style={{
borderWidth: 1,
borderColor: colors.primary.border,
borderRadius: 5,
padding: 12,
fontFamily: "OpenSans-Regular",
marginBottom: 10,
fontSize: SIZE.md,
color: colors.primary.heading
}}
placeholderTextColor={colors.primary.placeholder}
/>
<TextInput
ref={bodyRef}
placeholder={`Tell us more about the issue you are facing.
For example:
- What were you trying to do in the app?
- What did you expect to happen?
- Steps to reproduce the issue
- Steps to reproduce the issue
- Things you have tried etc.`}
numberOfLines={5}
textAlignVertical="top"
onChangeText={(v) => (body.current = v)}
onLayout={() => {
if (initialLayout.current) return;
initialLayout.current = true;
if (body.current) {
bodyRef.current?.setNativeProps({
text: body.current,
selection: {
start: 0,
end: 0
}
});
multiline
numberOfLines={5}
textAlignVertical="top"
onChangeText={(v) => (body.current = v)}
onLayout={() => {
if (initialLayout.current) return;
initialLayout.current = true;
if (body.current) {
bodyRef.current?.setNativeProps({
text: body.current,
selection: {
start: 0,
end: 0
}
}}
style={{
borderWidth: 1,
borderColor: colors.primary.border,
borderRadius: 5,
padding: 12,
fontFamily: "OpenSans-Regular",
maxHeight: 200,
fontSize: SIZE.sm,
marginBottom: 2.5,
color: colors.primary.paragraph
}}
placeholderTextColor={colors.primary.placeholder}
/>
<Paragraph
size={SIZE.xs}
color={colors.secondary.paragraph}
>{`App version: ${getVersion()} Platform: ${
Platform.OS
} Model: ${getBrand()}-${getModel()}-${getSystemVersion()}`}</Paragraph>
});
}
}}
style={{
borderWidth: 1,
borderColor: colors.primary.border,
borderRadius: 5,
padding: 12,
fontFamily: "OpenSans-Regular",
maxHeight: 200,
fontSize: SIZE.sm,
marginBottom: 2.5,
color: colors.primary.paragraph
}}
placeholderTextColor={colors.primary.placeholder}
/>
<Paragraph
size={SIZE.xs}
color={colors.secondary.paragraph}
>{`App version: ${getVersion()} Platform: ${Platform.OS} Model: ${
Platform.constants.Brand
}-${Platform.constants.Model}-${Platform.constants.Version}`}</Paragraph>
<Seperator />
<Button
onPress={onPress}
title={loading ? null : "Submit"}
loading={loading}
width="100%"
type="accent"
/>
<Seperator />
<Button
onPress={onPress}
title={loading ? null : "Submit"}
loading={loading}
width="100%"
type="accent"
/>
<Paragraph
color={colors.secondary.paragraph}
size={SIZE.xs}
style={{
marginTop: 10,
textAlign: "center"
}}
>
The information above will be publically available at{" "}
<Text
onPress={() => {
Linking.openURL("https://github.com/streetwriters/notesnook");
}}
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
>
github.com/streetwriters/notesnook.
</Text>{" "}
If you want to ask something in general or need some assistance, we
would suggest that you{" "}
<Text
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
onPress={async () => {
try {
await openLinkInBrowser(
"https://discord.gg/zQBK97EE22",
colors
);
} catch (e) {
console.error(e);
}
}}
>
join our community on Discord.
</Text>
</Paragraph>
</>
)}
<Paragraph
color={colors.secondary.paragraph}
size={SIZE.xs}
style={{
marginTop: 10,
textAlign: "center"
}}
>
The information above will be publically available at{" "}
<Text
onPress={() => {
Linking.openURL("https://github.com/streetwriters/notesnook");
}}
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
>
github.com/streetwriters/notesnook.
</Text>{" "}
If you want to ask something in general or need some assistance, we
would suggest that you{" "}
<Text
style={{
textDecorationLine: "underline",
color: colors.primary.accent
}}
onPress={async () => {
try {
await openLinkInBrowser("https://discord.gg/zQBK97EE22", colors);
} catch (e) {
console.error(e);
}
}}
>
join our community on Discord.
</Text>
</Paragraph>
</View>
);
};

View File

@@ -42,7 +42,10 @@ import { ProgressBarComponent } from "../../ui/svg/lazy";
import Paragraph from "../../ui/typography/paragraph";
import { Issue } from "../github/issue";
export const makeError = (stack: string, component: string) => `
export const makeError = (
stack: string,
component: string
) => `Please let us know what happened. What steps we can take to reproduce the issue here.
_______________________________
Stacktrace: In ${component}::${stack}`;

View File

@@ -25,8 +25,7 @@ import {
DimensionValue,
TextStyle,
View,
ViewStyle,
useWindowDimensions
ViewStyle
} from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import { useUserStore } from "../../../stores/use-user-store";
@@ -93,9 +92,6 @@ export const Button = ({
});
const textColor = buttonType?.text ? buttonType.text : text;
const { fontScale } = useWindowDimensions();
const growFactor = 1 + (fontScale - 1) / 10;
const Component = bold ? Heading : Paragraph;
return (
@@ -121,11 +117,8 @@ export const Button = ({
customOpacity={buttonType?.opacity}
customAlpha={buttonType?.alpha}
style={{
height: typeof height === "number" ? height * growFactor : height,
width:
typeof width === "number"
? width * growFactor
: (width as DimensionValue) || undefined,
height: height,
width: (width as DimensionValue) || undefined,
paddingHorizontal: 12,
borderRadius: 5,
alignSelf: "center",

View File

@@ -21,12 +21,11 @@ import { VariantsWithStaticColors, useThemeColors } from "@notesnook/theme";
import React, { RefObject, useCallback } from "react";
import {
ColorValue,
PressableStateCallbackType,
Pressable as RNPressable,
PressableProps as RNPressableProps,
PressableStateCallbackType,
View,
ViewStyle,
useWindowDimensions
ViewStyle
} from "react-native";
import {
RGB_Linear_Shade,
@@ -257,8 +256,6 @@ export const Pressable = ({
? 1
: colorOpacity;
const alpha = customAlpha ? customAlpha : isDark ? 0.03 : -0.03;
const { fontScale } = useWindowDimensions();
const growFactor = 1 + (fontScale - 1) / 8;
const getStyle = useCallback(
({ pressed }: PressableStateCallbackType): ViewStyle | ViewStyle[] => [
@@ -279,13 +276,7 @@ export const Pressable = ({
: borderColor || "transparent",
borderWidth: borderWidth
},
style,
{
height:
typeof style.height === "number"
? style.height * growFactor
: style.height
}
style
],
[
alpha,
@@ -297,8 +288,7 @@ export const Pressable = ({
borderSelectedColor,
borderColor,
borderWidth,
style,
growFactor
style
]
);

View File

@@ -97,7 +97,6 @@ import {
import { getGithubVersion } from "../utils/github-version";
import { tabBarRef } from "../utils/global-refs";
import { sleep } from "../utils/time";
import { initializeLogger } from "../common/database/logger";
const onCheckSyncStatus = async (type: SyncStatusEvent) => {
const { disableSync, disableAutoSync } = SettingsService.get();
@@ -281,108 +280,8 @@ const onSubscriptionError = async (error: RNIap.PurchaseError) => {
const SodiumEventEmitter = new NativeEventEmitter(NativeModules.Sodium);
const doAppLoadActions = async () => {
if (SettingsService.get().sessionExpired) {
eSendEvent(eLoginSessionExpired);
return;
}
notifee.setBadgeCount(0);
if (!(await db.user.getUser())) {
setLoginMessage();
return;
}
await useMessageStore.getState().setAnnouncement();
if (NewFeature.present()) return;
if (await checkAppUpdateAvailable()) return;
if (await checkForRateAppRequest()) return;
if (await PremiumService.getRemainingTrialDaysStatus()) return;
if (SettingsService.get().introCompleted) {
useMessageStore.subscribe((state) => {
const dialogs = state.dialogs;
if (dialogs.length > 0) {
eSendEvent(eOpenAnnouncementDialog, dialogs[0]);
}
});
}
};
const checkAppUpdateAvailable = async () => {
if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD || BETA)
return;
try {
const version =
Config.GITHUB_RELEASE === "true"
? await getGithubVersion()
: await checkVersion();
if (!version || !version?.needsUpdate) return false;
setUpdateAvailableMessage(version);
return true;
} catch (e) {
return false;
}
};
const checkForRateAppRequest = async () => {
const rateApp = SettingsService.get().rateApp as number;
if (
rateApp &&
rateApp < Date.now() &&
!useMessageStore.getState().message?.visible
) {
setRateAppMessage();
return false;
}
return false;
};
const IsDatabaseMigrationRequired = () => {
if (!db.migrations.required() || useUserStore.getState().appLocked)
return false;
presentSheet({
component: <Migrate />,
onClose: () => {
if (!db.migrations.required()) {
initializeDatabase();
}
},
disableClosing: true
});
return true;
};
const initializeDatabase = async (password?: string) => {
if (useUserStore.getState().appLocked) return;
if (!db.isInitialized) {
RNBootSplash.hide({ fade: true });
DatabaseLogger.info("Initializing database");
try {
await setupDatabase(password);
await db.init();
} catch (e) {
DatabaseLogger.error(e as Error);
ToastManager.error(e as Error, "Error initializing database", "global");
}
}
if (IsDatabaseMigrationRequired()) return;
if (db.isInitialized) {
Notifications.setupReminders(true);
if (SettingsService.get().notifNotes) {
Notifications.pinQuickNote(false);
}
useSettingStore.getState().setAppLoading(false);
DatabaseLogger.info("Database initialized");
}
Walkthrough.init();
};
export const useAppEvents = () => {
const isAppLoading = useSettingStore((state) => state.isAppLoading);
const loading = useSettingStore((state) => state.isAppLoading);
const [setLastSynced, setUser, appLocked, syncing] = useUserStore((state) => [
state.setLastSynced,
state.setUser,
@@ -413,7 +312,7 @@ export const useAppEvents = () => {
}, [setLastSynced]);
useEffect(() => {
if (isAppLoading) return;
if (loading) return;
let subscriptions: EventManagerSubscription[] = [];
const eventManager = db.eventManager;
@@ -428,7 +327,7 @@ export const useAppEvents = () => {
return () => {
subscriptions.forEach((sub) => sub?.unsubscribe?.());
};
}, [isAppLoading, onSyncComplete]);
}, [loading, onSyncComplete]);
const subscribeToPurchaseListeners = useCallback(async () => {
if (Platform.OS === "android") {
@@ -673,7 +572,7 @@ export const useAppEvents = () => {
});
}
let sub: NativeEventSubscription;
if (!isAppLoading && !appLocked) {
if (!loading && !appLocked) {
setTimeout(() => {
sub = AppState.addEventListener("change", onAppStateChanged);
if (
@@ -695,7 +594,7 @@ export const useAppEvents = () => {
sub?.remove();
unsubscribePurchaseListeners();
};
}, [isAppLoading, appLocked, checkAutoBackup]);
}, [loading, appLocked, checkAutoBackup]);
useEffect(() => {
if (!appLocked && !syncing && refValues.current.backupDidWait) {
@@ -744,22 +643,127 @@ export const useAppEvents = () => {
}
useEffect(() => {
if (!isAppLoading) {
if (!loading) {
onUserUpdated();
doAppLoadActions();
}
}, [isAppLoading, onUserUpdated]);
}, [loading, onUserUpdated]);
const initializeDatabase = useCallback(async (password?: string) => {
const IsDatabaseMigrationRequired = () => {
if (!db.migrations.required() || useUserStore.getState().appLocked)
return false;
presentSheet({
component: <Migrate />,
onClose: () => {
if (!db.migrations.required()) {
initializeDatabase();
}
},
disableClosing: true
});
return true;
};
if (useUserStore.getState().appLocked) return;
if (!db.isInitialized) {
RNBootSplash.hide({ fade: true });
DatabaseLogger.info("Initializing database");
try {
await setupDatabase(password);
await db.init();
} catch (e) {
DatabaseLogger.error(e as Error);
ToastManager.error(e as Error, "Error initializing database", "global");
}
}
if (IsDatabaseMigrationRequired()) return;
if (db.isInitialized) {
Notifications.setupReminders(true);
if (SettingsService.get().notifNotes) {
Notifications.pinQuickNote(false);
}
useSettingStore.getState().setAppLoading(false);
DatabaseLogger.info("Database initialized");
}
Walkthrough.init();
}, []);
useEffect(() => {
if (!appLocked && isAppLoading) {
initializeLogger()
.catch((e) => {
console.log(e);
})
.finally(() => {
//@ts-ignore
let sub: () => void;
if (appLocked) {
const sub = useUserStore.subscribe((state) => {
if (!state.appLocked && useSettingStore.getState().isAppLoading) {
console.log("DB initialized");
initializeDatabase();
});
sub();
}
});
}
}, [appLocked, isAppLoading]);
return () => {
sub?.();
};
}, [appLocked, initializeDatabase]);
return initializeDatabase;
};
const doAppLoadActions = async () => {
if (SettingsService.get().sessionExpired) {
eSendEvent(eLoginSessionExpired);
return;
}
notifee.setBadgeCount(0);
if (!(await db.user.getUser())) {
setLoginMessage();
return;
}
await useMessageStore.getState().setAnnouncement();
if (NewFeature.present()) return;
if (await checkAppUpdateAvailable()) return;
if (await checkForRateAppRequest()) return;
if (await PremiumService.getRemainingTrialDaysStatus()) return;
if (SettingsService.get().introCompleted) {
useMessageStore.subscribe((state) => {
const dialogs = state.dialogs;
if (dialogs.length > 0) {
eSendEvent(eOpenAnnouncementDialog, dialogs[0]);
}
});
}
};
const checkAppUpdateAvailable = async () => {
if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD || BETA)
return;
try {
const version =
Config.GITHUB_RELEASE === "true"
? await getGithubVersion()
: await checkVersion();
if (!version || !version?.needsUpdate) return false;
setUpdateAvailableMessage(version);
return true;
} catch (e) {
return false;
}
};
const checkForRateAppRequest = async () => {
const rateApp = SettingsService.get().rateApp as number;
if (
rateApp &&
rateApp < Date.now() &&
!useMessageStore.getState().message?.visible
) {
setRateAppMessage();
return false;
}
return false;
};

View File

@@ -62,6 +62,7 @@ import {
} from "../services/event-manager";
import { useSettingStore } from "../stores/use-setting-store";
import {
eClearEditor,
eCloseFullscreenEditor,
eOnEnterEditor,
eOnExitEditor,
@@ -285,10 +286,9 @@ const _TabsHolder = () => {
break;
case "mobile":
if (
(state &&
!state?.movedAway &&
useTabStore.getState().getCurrentNoteId()) ||
editorState().movedAway === false
state &&
!state?.movedAway &&
useTabStore.getState().getCurrentNoteId()
) {
tabBarRef.current?.goToIndex(2, false);
} else {

View File

@@ -16,7 +16,7 @@
"html-to-text": "9.0.5",
"phone": "^3.1.14",
"qclone": "^1.2.0",
"react-native-actions-sheet": "0.9.7",
"react-native-actions-sheet": "0.9.3",
"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version",
"react-native-drax": "^0.10.2",
"react-native-image-zoom-viewer": "^3.0.1",

View File

@@ -569,7 +569,7 @@ export const useEditor = (
return;
}
lastContentChangeTime.current[item.id] = 0;
lastContentChangeTime.current[item.id] = item.dateEdited;
currentLoadingNoteId.current = item.id;
currentNotes.current[item.id] = item;

View File

@@ -70,7 +70,6 @@ import { useDragState } from "./editor/state";
import { verifyUser, verifyUserWithApplock } from "./functions";
import { SettingSection } from "./types";
import { getTimeLeft } from "./user-section";
import ScreenGuardModule from "react-native-screenguard";
type User = any;
@@ -334,14 +333,12 @@ export const settingsGroups: SettingSection[] = [
{
id: "logout",
name: "Log out",
description:
"Logging out will clear all data stored on THIS DEVICE.",
description: "Clear all your data and reset the app.",
icon: "logout",
modifer: () => {
presentDialog({
title: "Logout",
paragraph:
"Logging out will clear all data stored on THIS DEVICE. Make sure you have synced all your changes before logging out.",
paragraph: "Clear all your data and reset the app.",
positiveText: "Logout",
positivePress: async () => {
try {
@@ -475,7 +472,7 @@ export const settingsGroups: SettingSection[] = [
{
id: "pull-sync",
name: "Force pull changes",
description: `Use this if changes from other devices are not appearing on this device. This will overwrite the data on this device with the latest data from the server.\n\nThis must only be used for troubleshooting. Using it regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.`,
description: `Use this if some changes are not appearing on this device from other devices. This will pull everything from the server and overwrite with whatever is one this device.\n\nThese must only be used for troubleshooting. Using them regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.`,
modifer: () => {
presentDialog({
title: "Force Pull changes",
@@ -497,7 +494,7 @@ export const settingsGroups: SettingSection[] = [
{
id: "push-sync",
name: "Force push changes",
description: `Use this if changes made on this device are not appearing on other devices. This will overwrite the data on the server with the data from this device.\n\nThis must only be used for troubleshooting. Using it regularly for sync is not recommended and will lead to unexpected data loss and other issues. If you are having persistent issues with sync, please report them to us at support@streetwriters.co.`,
description: `Use this if some changes are not appearing on this device from other devices. This will pull everything from the server and overwrite with whatever is one this device.`,
modifer: () => {
presentDialog({
title: "Force Push changes",
@@ -851,18 +848,9 @@ export const settingsGroups: SettingSection[] = [
"Hide app contents when you switch to other apps. This will also disable screenshot taking in the app.",
modifer: () => {
const settings = SettingsService.get();
if (Platform.OS === "ios") {
enabled(!settings.privacyScreen);
if (settings.privacyScreen) {
ScreenGuardModule.unregister();
} else {
ScreenGuardModule.register({
backgroundColor: "#000000"
});
}
} else {
NotesnookModule.setSecureMode(!settings.privacyScreen);
}
Platform.OS === "android"
? NotesnookModule.setSecureMode(!settings.privacyScreen)
: enabled(true);
SettingsService.set({ privacyScreen: !settings.privacyScreen });
},

View File

@@ -141,6 +141,7 @@ const onBoot = async () => {
}
await Notifications.setupReminders();
SettingsService.init();
if (SettingsService.get().notifNotes) {
Notifications.pinQuickNote(false);
}

View File

@@ -171,6 +171,7 @@ async function run(progress = false, context) {
}
let path;
let backupFilePath;
let backupFileName = "notesnook_backup_" + Date.now();
if (Platform.OS === "ios") {
@@ -235,7 +236,7 @@ async function run(progress = false, context) {
await sleep(300);
if (showBackupCompleteSheet) {
presentBackupCompleteSheet(path);
presentBackupCompleteSheet(backupFilePath);
} else {
progress && eSendEvent(eCloseSheet);
}

View File

@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { NativeModules, Platform } from "react-native";
import { Platform } from "react-native";
import { enabled } from "react-native-privacy-snapshot";
import { MMKV } from "../common/database/mmkv";
import {
@@ -29,7 +29,6 @@ import { NotesnookModule } from "../utils/notesnook-module";
import { scale, updateSize } from "../utils/size";
import { DatabaseLogger } from "../common/database";
import { useUserStore } from "../stores/use-user-store";
import ScreenGuardModule from "react-native-screenguard";
function reset() {
const settings = get();
if (settings.reminder !== "off" && settings.reminder !== "useroff") {
@@ -118,18 +117,12 @@ function setPrivacyScreen(settings: SettingStore["settings"]) {
NotesnookModule.setSecureMode(true);
} else {
enabled(true);
if (NativeModules.ScreenGuard) {
ScreenGuardModule.register({ backgroundColor: "#000000" });
}
}
} else {
if (Platform.OS === "android") {
NotesnookModule.setSecureMode(false);
} else {
enabled(false);
if (NativeModules.ScreenGuard) {
ScreenGuardModule.unregister();
}
}
}
}

View File

@@ -17,7 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Profile, User } from "@notesnook/core";
import { Profile } from "@notesnook/core";
import { User } from "@notesnook/core";
import create, { State } from "zustand";
export enum SyncStatus {
@@ -55,9 +56,7 @@ export const useUserStore = create<UserStore>((set) => ({
set({ syncing: syncing, lastSyncStatus: status });
},
setLastSynced: (lastSynced) => set({ lastSynced: lastSynced }),
lockApp: (appLocked) => {
set({ appLocked });
},
lockApp: (appLocked) => set({ appLocked }),
lastSyncStatus: SyncStatus.Never,
disableAppLockRequests: false,
setDisableAppLockRequests: (disableAppLockRequests) => {

View File

@@ -1,7 +1,4 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'cocoapods', '~> 1.12'

View File

@@ -1,7 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
import com.android.build.OutputFile
@@ -98,14 +96,10 @@ def getNpmVersion() {
return jsonPackage["version"]
}
def isBuildingAAB = gradle.startParameter.getTaskNames().any { it.contains("bundleRelease") }
android {
compileSdkVersion rootProject.ext.compileSdkVersion
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
@@ -117,7 +111,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode 3022
versionCode 3016
versionName getNpmVersion()
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@@ -184,15 +178,9 @@ android {
defaultConfig.versionCode * 5 + versionCodes.get(abi)
println("Fdroid Version code: ${output.versionCodeOverride} for abi ${versionCodes.get(abi)}");
} else {
if (isBuildingAAB) {
output.versionCodeOverride = 4 * 1048576 + defaultConfig.versionCode
println("AAB version code: ${output.versionCodeOverride}");
} else {
output.versionCodeOverride =
println("Version code: ${output.versionCodeOverride} for abi ${versionCodes.get(abi)}");
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
println("Version code: ${output.versionCodeOverride} for abi ${versionCodes.get(abi)}");
}
}
}
@@ -215,7 +203,13 @@ dependencies {
androidTestImplementation('com.wix:detox:+')
implementation 'androidx.appcompat:appcompat:1.1.0'
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {

View File

@@ -2,9 +2,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
</manifest>

View File

@@ -0,0 +1,71 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.streetwriters.notesnook;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}

View File

@@ -18,7 +18,6 @@
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" tools:node="remove" />
<queries>
<intent>

View File

@@ -0,0 +1,65 @@
package com.streetwriters.notesnook;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.util.List;
import androidx.multidex.MultiDexApplication;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactNativeHost;
public class MainApplication extends MultiDexApplication implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new NNativeModulePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
com.streetwriters.notesnook.ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
}

View File

@@ -1,44 +0,0 @@
package com.streetwriters.notesnook
import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
add(NNativeModulePackage());
}
override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
}
}

View File

@@ -67,6 +67,7 @@ public class ShareApplication extends MultiDexApplication implements ReactApplic
@Override
public void onCreate() {
super.onCreate();
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
SoLoader.init(this, /* native exopackage */ false);
}

View File

@@ -3,11 +3,11 @@ import org.apache.tools.ant.taskdefs.condition.Os
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
kotlinVersion = '1.9.22'
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
ext.kotlinVersion = '1.8.0'
androidXAnnotation = "1.1.0"
androidXCoreVersion = "1.7.0"
androidXCore = "1.7.0"
@@ -23,11 +23,10 @@ buildscript {
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
apply plugin: "com.facebook.react.rootproject"
allprojects {
repositories {
@@ -39,9 +38,9 @@ allprojects {
maven { url 'https://www.jitpack.io' }
}
// tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
// kotlinOptions {
// jvmTarget = "11"
// }
// }
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "11"
}
}
}

View File

@@ -24,6 +24,9 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64

View File

@@ -1,7 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -83,8 +83,10 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -131,13 +133,10 @@ location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -145,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -153,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -198,15 +197,11 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

View File

@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail

View File

@@ -2,7 +2,7 @@ const env = process.env.BABEL_ENV || process.env.NODE_ENV;
const configs = {
env: {
development: {
presets: ['module:@react-native/babel-preset'],
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-transform-named-capturing-groups-regex',
'react-native-reanimated/plugin',
@@ -18,7 +18,7 @@ const configs = {
]
},
test: {
presets: ['module:@react-native/babel-preset'],
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-transform-named-capturing-groups-regex',
'react-native-reanimated/plugin',
@@ -40,7 +40,7 @@ const configs = {
},
production: {
presets: ['module:@react-native/babel-preset'],
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'transform-remove-console',
'@babel/plugin-transform-named-capturing-groups-regex',

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -14,7 +14,6 @@
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2DCD954D1E0B4F2C00145EB5 /* NotesnookTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* NotesnookTests.m */; };
2E4BF736C2EB268ED3FD9C29 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = B5216B66C0B4A91C0A69128B /* PrivacyInfo.xcprivacy */; };
6510E6D72877215700DACAA9 /* build.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6510E6D62877215700DACAA9 /* build.bundle */; };
6515C42F2580AA3000E83E39 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6515C42E2580AA2F00E83E39 /* StoreKit.framework */; };
6517B7C12B6838EB0079FF37 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6517B7BE2B6838EB0079FF37 /* OpenSans-Regular.ttf */; };
@@ -22,9 +21,9 @@
6517B7C32B6838EB0079FF37 /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6517B7C02B6838EB0079FF37 /* OpenSans-Bold.ttf */; };
6529A13E279BC4C70048D4A8 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6529A13D279BC4C70048D4A8 /* BootSplash.storyboard */; };
656835812BB29A9800144BAB /* OpenSans-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 656835802BB29A8300144BAB /* OpenSans-Italic.ttf */; };
6569927F2C5754F10041CD41 /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6517B7C02B6838EB0079FF37 /* OpenSans-Bold.ttf */; };
656992802C5754F10041CD41 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6517B7BE2B6838EB0079FF37 /* OpenSans-Regular.ttf */; };
656992812C5754F10041CD41 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6517B7BF2B6838EB0079FF37 /* OpenSans-SemiBold.ttf */; };
656DD2AB2B1891DF00A362EA /* BuildFile in Resources */ = {isa = PBXBuildFile; };
656DD2AC2B1891DF00A362EA /* BuildFile in Resources */ = {isa = PBXBuildFile; };
656DD2AD2B1891DF00A362EA /* BuildFile in Resources */ = {isa = PBXBuildFile; };
6593E4A3281C345400492C50 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6593E4A2281C345400492C50 /* AppDelegate.mm */; };
659BE46725E11A5100E05671 /* notesnook-text.png in Resources */ = {isa = PBXBuildFile; fileRef = 659BE46625E11A5100E05671 /* notesnook-text.png */; };
65AA857925E6DDEC00772A01 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65AA857825E6DDEC00772A01 /* WidgetKit.framework */; };
@@ -43,7 +42,6 @@
87CE5B71DC72F3D95B7B1AA5 /* libPods-Notesnook-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A03E3F5851D27269540E147C /* libPods-Notesnook-tvOSTests.a */; };
A79A93DC9D0CAE8703462151 /* libPods-Notesnook-NotesnookTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 068FA9BDFA207A50B0A9E597 /* libPods-Notesnook-NotesnookTests.a */; };
C619D096A9DE2070DBEAC70F /* libPods-Make Note.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C4AF691C324D95337F2FB0A /* libPods-Make Note.a */; };
E7F9D56665C2F19F4A97BF49 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 4B679E87FDFB1312CAD6CF45 /* PrivacyInfo.xcprivacy */; };
F50BF8BC21F8B58EB2B5A31A /* libPods-Notesnook-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16C0296DE7A2B4102817F5C1 /* libPods-Notesnook-tvOS.a */; };
/* End PBXBuildFile section */
@@ -112,7 +110,6 @@
2D02E4901E0B4A5D006451C7 /* Notesnook-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Notesnook-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
41D57E9831C724F59F18FBAE /* libPods-Notesnook-Add to Notes.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook-Add to Notes.a"; sourceTree = BUILT_PRODUCTS_DIR; };
47AE097A087A651BD60CAD7B /* Pods-Notesnook-Make Note.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-Make Note.release.xcconfig"; path = "Target Support Files/Pods-Notesnook-Make Note/Pods-Notesnook-Make Note.release.xcconfig"; sourceTree = "<group>"; };
4B679E87FDFB1312CAD6CF45 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4BD34AE0C0FD2416E48803B8 /* libPods-Notesnook.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4C4AF691C324D95337F2FB0A /* libPods-Make Note.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Make Note.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6510E6D62877215700DACAA9 /* build.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = build.bundle; path = "../../../../packages/editor-mobile/build.bundle"; sourceTree = "<group>"; };
@@ -152,7 +149,6 @@
88211800FA8BF60638327ADE /* Pods-Make Note.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Make Note.debug.xcconfig"; path = "Target Support Files/Pods-Make Note/Pods-Make Note.debug.xcconfig"; sourceTree = "<group>"; };
A03E3F5851D27269540E147C /* libPods-Notesnook-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A84F3F0D50641D1CD4569B0E /* Pods-Make Note.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Make Note.release.xcconfig"; path = "Target Support Files/Pods-Make Note/Pods-Make Note.release.xcconfig"; sourceTree = "<group>"; };
B5216B66C0B4A91C0A69128B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
B9989E5C777BB11343A62D09 /* Pods-Notesnook-NotesnookTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-NotesnookTests.debug.xcconfig"; path = "Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests.debug.xcconfig"; sourceTree = "<group>"; };
D1710CA05FED221CC56D2BE1 /* Pods-Notesnook-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Notesnook-tvOSTests/Pods-Notesnook-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@@ -247,7 +243,6 @@
13B07FB71A68108700A75B9A /* main.m */,
65E0340A257B9FF100793428 /* File.swift */,
65E03409257B9FF100793428 /* Notesnook-Bridging-Header.h */,
4B679E87FDFB1312CAD6CF45 /* PrivacyInfo.xcprivacy */,
);
name = Notesnook;
sourceTree = "<group>";
@@ -320,7 +315,6 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
DA84645424CFBF19A44D64B3 /* Pods */,
B5216B66C0B4A91C0A69128B /* PrivacyInfo.xcprivacy */,
);
indentWidth = 2;
sourceTree = "<group>";
@@ -373,7 +367,6 @@
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
819D480147D052141ACC55A9 /* [CP] Copy Pods Resources */,
310C868ED8D8299D75460154 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -397,7 +390,6 @@
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
240525450DF9ABA0F332B52E /* [CP] Copy Pods Resources */,
65A7F34B255687E600699170 /* Embed App Extensions */,
48C834D962D612F18A0388B3 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -564,7 +556,6 @@
6510E6D72877215700DACAA9 /* build.bundle in Resources */,
6517B7C12B6838EB0079FF37 /* OpenSans-Regular.ttf in Resources */,
659BE46725E11A5100E05671 /* notesnook-text.png in Resources */,
E7F9D56665C2F19F4A97BF49 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -573,7 +564,6 @@
buildActionMask = 2147483647;
files = (
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
2E4BF736C2EB268ED3FD9C29 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -596,9 +586,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6569927F2C5754F10041CD41 /* OpenSans-Bold.ttf in Resources */,
656992802C5754F10041CD41 /* OpenSans-Regular.ttf in Resources */,
656992812C5754F10041CD41 /* OpenSans-SemiBold.ttf in Resources */,
656DD2AB2B1891DF00A362EA /* BuildFile in Resources */,
656DD2AC2B1891DF00A362EA /* BuildFile in Resources */,
656DD2AD2B1891DF00A362EA /* BuildFile in Resources */,
65C400DF2A80B6B600AA3DF5 /* MaterialCommunityIcons.ttf in Resources */,
65C149872A61151B005C40F1 /* extension.bundle in Resources */,
65B5014725A672B200E2D264 /* MainInterface.storyboard in Resources */,
@@ -652,13 +642,13 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook/Pods-Notesnook-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
@@ -702,42 +692,6 @@
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\nexport EXTRA_PACKAGER_ARGS=\"--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ../node_modules/react-native/scripts/react-native-xcode.sh";
};
310C868ED8D8299D75460154 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
48C834D962D612F18A0388B3 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook/Pods-Notesnook-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Notesnook/Pods-Notesnook-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
52B9E42E0FD77D180139A8C7 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -809,13 +763,13 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
@@ -852,11 +806,11 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Make Note/Pods-Make Note-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -1061,7 +1015,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEVELOPMENT_TEAM = 53CWBG3QUC;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1130,12 +1084,12 @@
"${PODS_ROOT}/Headers/Public/#{s.name}/**",
);
INFOPLIST_FILE = Notesnook/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1166,7 +1120,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1235,12 +1189,12 @@
"${PODS_ROOT}/Headers/Public/#{s.name}/**",
);
INFOPLIST_FILE = Notesnook/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@@ -1399,7 +1353,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1411,7 +1365,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
@@ -1442,7 +1396,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1455,7 +1409,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1485,7 +1439,7 @@
CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 53CWBG3QUC;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
@@ -1559,7 +1513,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
@@ -1590,7 +1544,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2110;
CURRENT_PROJECT_VERSION = 2105;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
@@ -1665,7 +1619,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 3.0.13;
MARKETING_VERSION = 3.0.8;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1684,7 +1638,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1742,13 +1696,8 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
name = Debug;
};
@@ -1758,7 +1707,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1809,13 +1758,8 @@
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
};
name = Release;

View File

@@ -19,16 +19,9 @@
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self bundleURL];
}
- (NSURL *)bundleURL
{
#if DEBUG
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

View File

@@ -71,11 +71,14 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>Take a picture and add it to your note.</string>
@@ -112,7 +115,7 @@
<string>BootSplash</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@@ -14,7 +14,16 @@ require Pod::Executable.execute_command('node', ['-p',
platform :ios, min_ios_version_supported
prepare_react_native_project!
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -29,14 +38,22 @@ pod 'MMKV'
target 'Notesnook' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => false,
:hermes_enabled => false,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
@@ -54,7 +71,7 @@ target 'Make Note' do
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:hermes_enabled => false,
:fabric_enabled => false,
# Enables Flipper.
#
@@ -101,9 +118,9 @@ post_install do |installer|
react_native_path = "../../node_modules/react-native",
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false,
# :ccache_enabled => true
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
@@ -113,7 +130,7 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-quick-sqlite" then
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1'
end
end
end

File diff suppressed because it is too large Load Diff

View File

@@ -4,16 +4,12 @@
"version": "1.0.0",
"main": "index.js",
"license": "GPL-3.0-or-later",
"overrides": {
"react-native": "0.74.5",
"react": "18.2.0"
},
"dependencies": {
"@ammarahmed/notifee-react-native": "7.4.7",
"@ammarahmed/react-native-share-extension": "^3.0.0",
"@ammarahmed/react-native-sodium": "1.5.4",
"@bam.tech/react-native-image-resizer": "3.0.5",
"@callstack/repack": "^4.1.1",
"@callstack/repack": "^3.2.0",
"@react-native-clipboard/clipboard": "^1.9.0",
"@react-native-community/checkbox": "^0.5.8",
"@react-native-community/datetimepicker": "6.6.0",
@@ -24,8 +20,9 @@
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "6.6.2",
"@sayem314/react-native-keep-awake": "^1.0.4",
"@shopify/flash-list": "1.4.0",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native": "0.72.0",
"react-native-actions-shortcuts": "^1.0.1",
"react-native-background-actions": "^2.6.6",
"react-native-begin-background-task": "https://github.com/blockfirm/react-native-begin-background-task.git",
@@ -39,39 +36,37 @@
"react-native-exit-app": "https://github.com/ammarahm-ed/react-native-exit-app.git",
"react-native-file-viewer": "^2.1.1",
"react-native-fingerprint-scanner": "https://github.com/ammarahm-ed/react-native-fingerprint-scanner.git",
"react-native-gesture-handler": "^2.18.0",
"react-native-reanimated": "3.14.0",
"react-native-safe-area-context": "^4.10.8",
"react-native-screens": "^3.33.0",
"react-native-webview": "^13.10.0",
"@shopify/flash-list": "1.7.0",
"react-native-vector-icons": "9.2.0",
"react-native-gesture-handler": "^2.12.0",
"react-native-get-random-values": "^1.7.0",
"react-native-gzip": "1.1.0",
"react-native-html-to-pdf-lite": "^0.9.1",
"react-native-iap": "12.15.1",
"react-native-iap": "12.11.0",
"react-native-in-app-review": "4.3.3",
"react-native-keychain": "4.0.5",
"react-native-mmkv-storage": "^0.10.2",
"react-native-mmkv-storage": "^0.10.0-alpha.12",
"react-native-modal-datetime-picker": "14.0.0",
"react-native-navigation-bar-color": "2.0.2",
"react-native-notification-sounds": "0.5.5",
"react-native-orientation": "https://github.com/yamill/react-native-orientation.git",
"react-native-pdf": "6.6.2",
"react-native-privacy-snapshot": "https://github.com/standardnotes/react-native-privacy-snapshot.git",
"react-native-reanimated": "3.3.0",
"react-native-safe-area-context": "^4.3.1",
"react-native-scoped-storage": "^1.9.5",
"react-native-screens": "^3.13.1",
"react-native-securerandom": "^1.0.1",
"react-native-share": "^7.2.0",
"react-native-svg": "^12.3.0",
"react-native-swiper-flatlist": "3.2.2",
"react-native-tooltips": "^1.0.3",
"react-native-vector-icons": "9.2.0",
"react-native-webview": "^13.10.0",
"react-native-zip-archive": "6.0.9",
"react-native-quick-sqlite": "^8.0.6",
"react-native-theme-switch-animation": "^0.6.0",
"@ammarahmed/react-native-background-fetch": "^4.2.2",
"react-native-image-crop-picker": "^0.40.2",
"react-native-url-polyfill": "^2.0.0",
"react-native-screenguard": "^1.0.0"
"react-native-url-polyfill": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
@@ -80,19 +75,19 @@
"@babel/plugin-transform-private-methods": "^7.22.5",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "0.74.86",
"@react-native/metro-config": "0.74.86",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.6",
"@tsconfig/react-native": "^3.0.2",
"@types/html-to-text": "^8.0.1",
"@types/jest": "^29.2.1",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.2.6",
"@types/react": "^18.0.24",
"@types/react-native": "^0.69.1",
"@types/react-native-vector-icons": "^6.4.10",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"babel-jest": "^29.6.3",
"babel-jest": "^29.6.2",
"babel-loader": "^8.2.5",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-remove-console": "6.9.4",
@@ -104,12 +99,12 @@
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"expect": "^29.6.2",
"jest": "^29.6.3",
"jest": "^29.6.2",
"jest-circus": "^29.6.2",
"jest-image-snapshot": "^6.2.0",
"@react-native/babel-preset": "0.74.86",
"metro-react-native-babel-preset": "0.76.5",
"pixelmatch": "^5.3.0",
"prettier": "2.8.8",
"prettier": "^2.4.1",
"react-native-actions-shortcuts": "^1.0.1",
"react-native-bundle-visualizer": "^3.1.1",
"react-native-cli-bump-version": "^1.3.0",

View File

@@ -17,12 +17,6 @@ config.dependencies['react-native-vector-icons'] = {
},
}
config.dependencies['react-native-screenguard'] = {
platforms: {
android: null,
},
}
if (isGithubRelease) {
config.dependencies["react-native-iap"] = {
platforms: {
@@ -36,10 +30,4 @@ if (isGithubRelease) {
}
}
const repackCommands = require('@callstack/repack/commands');
config.commands = repackCommands.filter((command) =>
command.name.startsWith('webpack')
),
module.exports = config;

View File

@@ -26,7 +26,7 @@ module.exports = (env) => {
mode = "development",
context = __dirname,
entry = "./index.js",
platform = process.env.PLATFORM,
platform,
minimize = mode === "production",
devServer = undefined,
bundleFilename = undefined,
@@ -118,8 +118,7 @@ module.exports = (env) => {
*/
output: {
clean: true,
hashFunction: 'xxhash64',
path: path.join(__dirname, 'build/generated', platform),
path: path.join(__dirname, "build/generated", platform),
filename: "index.bundle",
chunkFilename: "[name].chunk.bundle",
publicPath: Repack.getPublicPath({ platform, devServer }),
@@ -173,7 +172,7 @@ module.exports = (env) => {
"node_modules/.webpack-cache"
),
babelrc: false,
presets: ["module:@react-native/babel-preset"],
presets: ["module:metro-react-native-babel-preset"],
plugins: [
"react-native-reanimated/plugin",
"@babel/plugin-transform-named-capturing-groups-regex",
@@ -185,7 +184,7 @@ module.exports = (env) => {
{
test: /\.mjs$|cjs$|js$|jsx$|ts$|tsx$/,
include: [
/node_modules(.*[/\\])+react-native/,
/node_modules(.*[/\\])+react/,
/node_modules(.*[/\\])+@react-native/,
/node_modules(.*[/\\])+@react-navigation/,
/node_modules(.*[/\\])+@react-native-community/,
@@ -221,7 +220,6 @@ module.exports = (env) => {
/node_modules(.*[/\\])+whatwg-url/,
/node_modules(.*[/\\])+react-native-url-polyfill/,
/node_modules(.*[/\\])+diffblazer/,
/node_modules(.*[/\\])+react-freeze/,
],
use: {
loader: "babel-loader",
@@ -232,7 +230,7 @@ module.exports = (env) => {
"node_modules/.webpack-cache"
),
babelrc: false,
presets: ["module:@react-native/babel-preset"],
presets: ["module:metro-react-native-babel-preset"],
plugins: [
"react-native-reanimated/plugin",
"@babel/plugin-transform-named-capturing-groups-regex",
@@ -260,7 +258,7 @@ module.exports = (env) => {
"node_modules/.webpack-cache"
),
babelrc: false,
presets: [["module:@react-native/babel-preset"]],
presets: [["module:metro-react-native-babel-preset"]],
plugins:
devServer && devServer.hmr
? [

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@notesnook/mobile",
"version": "3.0.13",
"version": "3.0.8",
"private": true,
"license": "GPL-3.0-or-later",
"workspaces": [
@@ -25,15 +25,10 @@
},
"devDependencies": {
"fonteditor-core": "^2.1.11",
"listr": "^0.14.3",
"otplib": "12.0.1",
"patch-package": "7.0.0",
"react-refresh": "0.14.0"
},
"overrides": {
"react-native": "0.74.5",
"react": "18.2.0"
},
"dependencies": {
"@notesnook/common": "file:../../packages/common",
"@notesnook/core": "file:../../packages/core",
@@ -44,8 +39,6 @@
"@notesnook/themes-server": "file:../../servers/themes",
"diffblazer": "^1.0.1",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native-mmkv-storage": "^0.10.2",
"react-native-actions-sheet": "^0.9.7"
"react-native": "0.72.0"
}
}
}

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/@callstack/repack/android/build.gradle b/node_modules/@callstack/repack/android/build.gradle
index e41f2f3..b04735e 100644
--- a/node_modules/@callstack/repack/android/build.gradle
+++ b/node_modules/@callstack/repack/android/build.gradle
@@ -29,7 +29,7 @@ android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')
defaultConfig {
- minSdkVersion 16
+ minSdkVersion 21
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
versionCode 1
versionName "1.0"

View File

@@ -1,11 +0,0 @@
diff --git a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
index 636c0d8..87f4ee6 100644
--- a/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
+++ b/node_modules/@react-native/community-cli-plugin/dist/utils/loadMetroConfig.js
@@ -105,5 +105,6 @@ This warning will be removed in future (https://github.com/facebook/metro/issues
...options,
});
const overrideConfig = getOverrideConfig(ctx, config);
+ if (!overrideConfig.resolver.resolveRequest) delete overrideConfig.resolver.resolveRequest;
return (0, _metroConfig.mergeConfig)(config, overrideConfig);
}

View File

@@ -0,0 +1,24 @@
diff --git a/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.d.ts b/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.d.ts
index 6cbcc22..62d5422 100644
--- a/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.d.ts
+++ b/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.d.ts
@@ -12,6 +12,7 @@ export interface ConfigOptionsT {
reporter?: any;
config?: string;
}
+
/**
* Load Metro config.
*
diff --git a/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.js b/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.js
index f26ef52..233a7c9 100644
--- a/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.js
+++ b/node_modules/@react-native-community/cli-plugin-metro/build/tools/loadMetroConfig.js
@@ -82,6 +82,7 @@ async function loadMetroConfig(ctx, options = {}) {
(0, _getDefaultMetroConfig.default)(ctx));
return (0, _metroConfig().mergeConfig)(loadedConfig, overrideConfig);
}
+ if (!overrideConfig.resolver.resolveRequest) delete overrideConfig.resolver.resolveRequest;
return (0, _metroConfig().mergeConfig)(await (0, _metroConfig().loadConfig)({
cwd: ctx.root,
...options

View File

@@ -0,0 +1,70 @@
diff --git a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
index 7958519..25f58b1 100644
--- a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
+++ b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
@@ -409,12 +409,12 @@ JSCRuntime::~JSCRuntime() {
// has started.
ctxInvalid_ = true;
JSGlobalContextRelease(ctx_);
-#ifndef NDEBUG
- assert(
- objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object");
- assert(
- stringCounter_ == 0 && "JSCRuntime destroyed with a dangling API string");
-#endif
+//#ifndef NDEBUG
+// assert(
+// objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object");
+// assert(
+// stringCounter_ == 0 && "JSCRuntime destroyed with a dangling API string");
+//#endif
}
std::shared_ptr<const jsi::PreparedJavaScript> JSCRuntime::prepareJavaScript(
diff --git a/node_modules/react-native/scripts/.packager.env b/node_modules/react-native/scripts/.packager.env
new file mode 100644
index 0000000..361f5fb
--- /dev/null
+++ b/node_modules/react-native/scripts/.packager.env
@@ -0,0 +1 @@
+export RCT_METRO_PORT=8081
diff --git a/node_modules/react-native/scripts/launchPackager.command b/node_modules/react-native/scripts/launchPackager.command
index efd1f2e..c2fbbb3 100755
--- a/node_modules/react-native/scripts/launchPackager.command
+++ b/node_modules/react-native/scripts/launchPackager.command
@@ -10,7 +10,7 @@ clear
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
-export PODS_ROOT="$THIS_DIR/../../../ios/Pods"
+export PODS_ROOT="$THIS_DIR/../../../native/ios/Pods"
WITH_ENVIRONMENT="$THIS_DIR/xcode/with-environment.sh"
source $WITH_ENVIRONMENT
diff --git a/node_modules/react-native/scripts/packager.sh b/node_modules/react-native/scripts/packager.sh
index cb8b101..519070a 100755
--- a/node_modules/react-native/scripts/packager.sh
+++ b/node_modules/react-native/scripts/packager.sh
@@ -8,17 +8,16 @@
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
REACT_NATIVE_ROOT="$THIS_DIR/.."
# Application root directory - General use case: react-native is a dependency
-PROJECT_ROOT=${PROJECT_ROOT:-"$THIS_DIR/../../.."}
-
+PROJECT_ROOT=${PROJECT_ROOT:-"$THIS_DIR/../../../native"}
# check and assign NODE_BINARY env
# shellcheck disable=SC1090
source "${THIS_DIR}/node-binary.sh"
# When running react-native tests, react-native doesn't live in node_modules but in the PROJECT_ROOT
-if [ ! -d "$THIS_DIR/../../../node_modules/react-native" ];
-then
- PROJECT_ROOT="$THIS_DIR/../../.."
-fi
+# if [ ! -d "$THIS_DIR/../../../node_modules/react-native" ];
+# then
+# PROJECT_ROOT="$THIS_DIR/../../.."
+# fi
# Start packager from PROJECT_ROOT
cd "$PROJECT_ROOT" || exit
"$NODE_BINARY" "$REACT_NATIVE_ROOT/cli.js" start --custom-log-reporter-path "$THIS_DIR/packager-reporter.js" "$@"

View File

@@ -1,13 +0,0 @@
diff --git a/node_modules/react-native/scripts/packager.sh b/node_modules/react-native/scripts/packager.sh
index 00d6ebc..6846832 100755
--- a/node_modules/react-native/scripts/packager.sh
+++ b/node_modules/react-native/scripts/packager.sh
@@ -8,7 +8,7 @@
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
REACT_NATIVE_ROOT="$THIS_DIR/.."
# Application root directory - General use case: react-native is a dependency
-PROJECT_ROOT=${PROJECT_ROOT:-"$THIS_DIR/../../.."}
+PROJECT_ROOT=${PROJECT_ROOT:-"$THIS_DIR/../../../native"}
# check and assign NODE_BINARY env
# shellcheck disable=SC1090

View File

@@ -1,88 +1,7 @@
diff --git a/node_modules/react-native-quick-sqlite/.DS_Store b/node_modules/react-native-quick-sqlite/.DS_Store
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/metadata_generation_command.txt b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/metadata_generation_command.txt
new file mode 100644
index 0000000..16ba95f
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/metadata_generation_command.txt
@@ -0,0 +1,23 @@
+ -H/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android
+-DCMAKE_SYSTEM_NAME=Android
+-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+-DCMAKE_SYSTEM_VERSION=21
+-DANDROID_PLATFORM=android-21
+-DANDROID_ABI=arm64-v8a
+-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
+-DANDROID_NDK=/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620
+-DCMAKE_ANDROID_NDK=/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620
+-DCMAKE_TOOLCHAIN_FILE=/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake
+-DCMAKE_MAKE_PROGRAM=/Volumes/DataDrive/Android/sdk/cmake/3.22.1/bin/ninja
+-DCMAKE_CXX_FLAGS=-O2 -fexceptions -frtti -std=c++1y -DONANDROID
+-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/obj/arm64-v8a
+-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/obj/arm64-v8a
+-DCMAKE_BUILD_TYPE=Debug
+-DCMAKE_FIND_ROOT_PATH=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/prefab/arm64-v8a/prefab
+-B/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a
+-GNinja
+-DANDROID_STL=c++_shared
+-DSQLITE_FLAGS='-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC=0 -DHAVE_CIPHER_AES_256_CBC=0 -DHAVE_CIPHER_SQLCIPHER=0 -DHAVE_CIPHER_RC4=0 -DHAVE_CIPHER_CHACHA20=1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_USE_ALLOCA=1'
+-DUSE_HERMES=true
+ Build command args: []
+ Version: 2
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/prefab_config.json b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/prefab_config.json
new file mode 100644
index 0000000..1d61ce4
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/prefab_config.json
@@ -0,0 +1,8 @@
+{
+ "enabled": true,
+ "prefabPath": "/Users/ammarahmed/.gradle/caches/modules-2/files-2.1/com.google.prefab/cli/2.0.0/f2702b5ca13df54e3ca92f29d6b403fb6285d8df/cli-2.0.0-all.jar",
+ "packages": [
+ "/Users/ammarahmed/.gradle/caches/transforms-4/af547bd0d6b859d6b490959996fda082/transformed/jetified-react-android-0.74.4-debug/prefab",
+ "/Users/ammarahmed/.gradle/caches/transforms-4/c7e26f7d3c2fc1a6636ff1467fc77795/transformed/jetified-fbjni-0.6.0/prefab"
+ ]
+}
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/hash_key.txt b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/hash_key.txt
new file mode 100644
index 0000000..a453b76
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/hash_key.txt
@@ -0,0 +1,30 @@
+# Values used to calculate the hash in this folder name.
+# Should not depend on the absolute path of the project itself.
+# - AGP: 8.2.1.
+# - $NDK is the path to NDK 23.1.7779620.
+# - $PROJECT is the path to the parent folder of the root Gradle build file.
+# - $ABI is the ABI to be built with. The specific value doesn't contribute to the value of the hash.
+# - $HASH is the hash value computed from this text.
+# - $CMAKE is the path to CMake 3.22.1.
+# - $NINJA is the path to Ninja.
+-H/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android
+-DCMAKE_SYSTEM_NAME=Android
+-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+-DCMAKE_SYSTEM_VERSION=21
+-DANDROID_PLATFORM=android-21
+-DANDROID_ABI=$ABI
+-DCMAKE_ANDROID_ARCH_ABI=$ABI
+-DANDROID_NDK=$NDK
+-DCMAKE_ANDROID_NDK=$NDK
+-DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake
+-DCMAKE_MAKE_PROGRAM=$NINJA
+-DCMAKE_CXX_FLAGS=-O2 -fexceptions -frtti -std=c++1y -DONANDROID
+-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/$HASH/obj/$ABI
+-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/$HASH/obj/$ABI
+-DCMAKE_BUILD_TYPE=Debug
+-DCMAKE_FIND_ROOT_PATH=/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/$HASH/prefab/$ABI/prefab
+-B/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/$HASH/$ABI
+-GNinja
+-DANDROID_STL=c++_shared
+-DSQLITE_FLAGS='-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC=0 -DHAVE_CIPHER_AES_256_CBC=0 -DHAVE_CIPHER_SQLCIPHER=0 -DHAVE_CIPHER_RC4=0 -DHAVE_CIPHER_CHACHA20=1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_USE_ALLOCA=1'
+-DUSE_HERMES=true
\ No newline at end of file
index 0000000..02a6bbf
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/.DS_Store differ
diff --git a/node_modules/react-native-quick-sqlite/android/.settings/org.eclipse.buildship.core.prefs b/node_modules/react-native-quick-sqlite/android/.settings/org.eclipse.buildship.core.prefs
deleted file mode 100644
index 8c253d6..0000000
@@ -102,765 +21,12 @@ index 8c253d6..0000000
-override.workspace.settings=true
-show.console.view=true
-show.executions.view=true
diff --git a/node_modules/react-native-quick-sqlite/android/build.gradle b/node_modules/react-native-quick-sqlite/android/build.gradle
index 96d2a74..c26e678 100644
--- a/node_modules/react-native-quick-sqlite/android/build.gradle
+++ b/node_modules/react-native-quick-sqlite/android/build.gradle
@@ -63,7 +63,7 @@ android {
}
defaultConfig {
- minSdkVersion 21
+ minSdkVersion safeExtGet("minSdkVersion", 23)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
diff --git a/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/results.bin b/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/results.bin
new file mode 100644
index 0000000..0d259dd
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/results.bin
@@ -0,0 +1 @@
+o/classes
diff --git a/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/transformed/classes/classes_dex/classes.dex b/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/transformed/classes/classes_dex/classes.dex
new file mode 100644
index 0000000..220a44f
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/.transforms/a5d230bd7410c4a394e68198eafb820e/transformed/classes/classes_dex/classes.dex differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/generated/source/buildConfig/debug/com/reactnativequicksqlite/BuildConfig.java b/node_modules/react-native-quick-sqlite/android/build/generated/source/buildConfig/debug/com/reactnativequicksqlite/BuildConfig.java
new file mode 100644
index 0000000..bb02d55
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/generated/source/buildConfig/debug/com/reactnativequicksqlite/BuildConfig.java
@@ -0,0 +1,10 @@
+/**
+ * Automatically generated file. DO NOT MODIFY
+ */
+package com.reactnativequicksqlite;
+
+public final class BuildConfig {
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
+ public static final String LIBRARY_PACKAGE_NAME = "com.reactnativequicksqlite";
+ public static final String BUILD_TYPE = "debug";
+}
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml b/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml
new file mode 100644
index 0000000..65ada26
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.reactnativequicksqlite" >
+
+ <uses-sdk android:minSdkVersion="21" />
+
+</manifest>
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json b/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json
new file mode 100644
index 0000000..c903659
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json
@@ -0,0 +1,18 @@
+{
+ "version": 3,
+ "artifactType": {
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
+ "kind": "Directory"
+ },
+ "applicationId": "com.reactnativequicksqlite",
+ "variantName": "debug",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "attributes": [],
+ "outputFile": "AndroidManifest.xml"
+ }
+ ],
+ "elementType": "File"
+}
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/aar_metadata/debug/aar-metadata.properties b/node_modules/react-native-quick-sqlite/android/build/intermediates/aar_metadata/debug/aar-metadata.properties
new file mode 100644
index 0000000..1211b1e
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/aar_metadata/debug/aar-metadata.properties
@@ -0,0 +1,6 @@
+aarFormatVersion=1.0
+aarMetadataVersion=1.0
+minCompileSdk=1
+minCompileSdkExtension=0
+minAndroidGradlePluginVersion=1.0.0
+coreLibraryDesugaringEnabled=false
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json b/node_modules/react-native-quick-sqlite/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_library_classes_jar/debug/classes.jar b/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_library_classes_jar/debug/classes.jar
new file mode 100644
index 0000000..d7046e6
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_library_classes_jar/debug/classes.jar differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_r_class_jar/debug/R.jar b/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_r_class_jar/debug/R.jar
new file mode 100644
index 0000000..1fff931
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_r_class_jar/debug/R.jar differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_symbol_list/debug/R.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/compile_symbol_list/debug/R.txt
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/build_model.json b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/build_model.json
new file mode 100644
index 0000000..b6ba478
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/build_model.json
@@ -0,0 +1,201 @@
+{
+ "info": {
+ "name": "arm64-v8a",
+ "bitness": 64,
+ "isDefault": true,
+ "isDeprecated": false,
+ "architecture": "arm64",
+ "triple": "aarch64-linux-android",
+ "llvmTriple": "aarch64-none-linux-android"
+ },
+ "cxxBuildFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a",
+ "soFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/obj/arm64-v8a",
+ "soRepublishFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cmake/debug/obj/arm64-v8a",
+ "abiPlatformVersion": 21,
+ "cmake": {
+ "effectiveConfiguration": {
+ "inheritEnvironments": [],
+ "variables": []
+ }
+ },
+ "variant": {
+ "buildSystemArgumentList": [
+ "-DANDROID_STL\u003dc++_shared",
+ "-DSQLITE_FLAGS\u003d\u0027-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC\u003d0 -DHAVE_CIPHER_AES_256_CBC\u003d0 -DHAVE_CIPHER_SQLCIPHER\u003d0 -DHAVE_CIPHER_RC4\u003d0 -DHAVE_CIPHER_CHACHA20\u003d1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK\u003d1 -DSQLITE_MAX_EXPR_DEPTH\u003d0 -DSQLITE_OMIT_DEPRECATED\u003d1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS\u003d1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS\u003d1 -DSQLITE_DQS\u003d0 -DSQLITE_DEFAULT_MEMSTATUS\u003d0 -DSQLITE_USE_ALLOCA\u003d1\u0027",
+ "-DUSE_HERMES\u003dtrue"
+ ],
+ "cFlagsList": [],
+ "cppFlagsList": [
+ "-O2",
+ "-fexceptions",
+ "-frtti",
+ "-std\u003dc++1y",
+ "-DONANDROID"
+ ],
+ "variantName": "debug",
+ "isDebuggableEnabled": true,
+ "validAbiList": [
+ "armeabi-v7a",
+ "arm64-v8a",
+ "x86",
+ "x86_64"
+ ],
+ "buildTargetSet": [],
+ "implicitBuildTargetSet": [],
+ "cmakeSettingsConfiguration": "android-gradle-plugin-predetermined-name",
+ "module": {
+ "cxxFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx",
+ "intermediatesBaseFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates",
+ "intermediatesFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx",
+ "gradleModulePathName": ":react-native-quick-sqlite",
+ "moduleRootFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android",
+ "moduleBuildFile": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build.gradle",
+ "makeFile": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "buildSystem": "CMAKE",
+ "ndkFolder": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620",
+ "ndkFolderBeforeSymLinking": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620",
+ "ndkVersion": "23.1.7779620",
+ "ndkSupportedAbiList": [
+ "armeabi-v7a",
+ "arm64-v8a",
+ "x86",
+ "x86_64"
+ ],
+ "ndkDefaultAbiList": [
+ "armeabi-v7a",
+ "arm64-v8a",
+ "x86",
+ "x86_64"
+ ],
+ "ndkDefaultStl": "LIBCXX_STATIC",
+ "ndkMetaPlatforms": {
+ "min": 16,
+ "max": 31,
+ "aliases": {
+ "20": 19,
+ "25": 24,
+ "J": 16,
+ "J-MR1": 17,
+ "J-MR2": 18,
+ "K": 19,
+ "L": 21,
+ "L-MR1": 22,
+ "M": 23,
+ "N": 24,
+ "N-MR1": 24,
+ "O": 26,
+ "O-MR1": 27,
+ "P": 28,
+ "Q": 29,
+ "R": 30,
+ "S": 31
+ }
+ },
+ "ndkMetaAbiList": [
+ {
+ "name": "armeabi-v7a",
+ "bitness": 32,
+ "isDefault": true,
+ "isDeprecated": false,
+ "architecture": "arm",
+ "triple": "arm-linux-androideabi",
+ "llvmTriple": "armv7-none-linux-androideabi"
+ },
+ {
+ "name": "arm64-v8a",
+ "bitness": 64,
+ "isDefault": true,
+ "isDeprecated": false,
+ "architecture": "arm64",
+ "triple": "aarch64-linux-android",
+ "llvmTriple": "aarch64-none-linux-android"
+ },
+ {
+ "name": "x86",
+ "bitness": 32,
+ "isDefault": true,
+ "isDeprecated": false,
+ "architecture": "x86",
+ "triple": "i686-linux-android",
+ "llvmTriple": "i686-none-linux-android"
+ },
+ {
+ "name": "x86_64",
+ "bitness": 64,
+ "isDefault": true,
+ "isDeprecated": false,
+ "architecture": "x86_64",
+ "triple": "x86_64-linux-android",
+ "llvmTriple": "x86_64-none-linux-android"
+ }
+ ],
+ "cmakeToolchainFile": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake",
+ "cmake": {
+ "cmakeExe": "/Volumes/DataDrive/Android/sdk/cmake/3.22.1/bin/cmake"
+ },
+ "stlSharedObjectMap": {
+ "LIBCXX_SHARED": {
+ "armeabi-v7a": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so",
+ "arm64-v8a": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so",
+ "x86": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so",
+ "x86_64": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so"
+ },
+ "LIBCXX_STATIC": {},
+ "NONE": {},
+ "SYSTEM": {}
+ },
+ "project": {
+ "rootBuildGradleFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/native/android",
+ "sdkFolder": "/Volumes/DataDrive/Android/sdk",
+ "isBuildOnlyTargetAbiEnabled": true,
+ "isCmakeBuildCohabitationEnabled": false,
+ "isPrefabEnabled": true
+ },
+ "outputOptions": [],
+ "ninjaExe": "/Volumes/DataDrive/Android/sdk/cmake/3.22.1/bin/ninja",
+ "hasBuildTimeInformation": true
+ },
+ "prefabClassPaths": [
+ "/Users/ammarahmed/.gradle/caches/modules-2/files-2.1/com.google.prefab/cli/2.0.0/f2702b5ca13df54e3ca92f29d6b403fb6285d8df/cli-2.0.0-all.jar"
+ ],
+ "prefabPackages": [
+ "/Users/ammarahmed/.gradle/caches/transforms-4/af547bd0d6b859d6b490959996fda082/transformed/jetified-react-android-0.74.4-debug/prefab",
+ "/Users/ammarahmed/.gradle/caches/transforms-4/c7e26f7d3c2fc1a6636ff1467fc77795/transformed/jetified-fbjni-0.6.0/prefab"
+ ],
+ "prefabPackageConfigurations": [],
+ "stlType": "c++_shared",
+ "optimizationTag": "Debug"
+ },
+ "buildSettings": {
+ "environmentVariables": []
+ },
+ "prefabFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/prefab/arm64-v8a",
+ "isActiveAbi": true,
+ "fullConfigurationHash": "3u4yy1v4n5m1m3r6x453b2w4u42s4h63w1d2iu6l6v2q6n2d4154135b3h34",
+ "fullConfigurationHashKey": "# Values used to calculate the hash in this folder name.\n# Should not depend on the absolute path of the project itself.\n# - AGP: 8.2.1.\n# - $NDK is the path to NDK 23.1.7779620.\n# - $PROJECT is the path to the parent folder of the root Gradle build file.\n# - $ABI is the ABI to be built with. The specific value doesn\u0027t contribute to the value of the hash.\n# - $HASH is the hash value computed from this text.\n# - $CMAKE is the path to CMake 3.22.1.\n# - $NINJA is the path to Ninja.\n-H/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android\n-DCMAKE_SYSTEM_NAME\u003dAndroid\n-DCMAKE_EXPORT_COMPILE_COMMANDS\u003dON\n-DCMAKE_SYSTEM_VERSION\u003d21\n-DANDROID_PLATFORM\u003dandroid-21\n-DANDROID_ABI\u003d$ABI\n-DCMAKE_ANDROID_ARCH_ABI\u003d$ABI\n-DANDROID_NDK\u003d$NDK\n-DCMAKE_ANDROID_NDK\u003d$NDK\n-DCMAKE_TOOLCHAIN_FILE\u003d$NDK/build/cmake/android.toolchain.cmake\n-DCMAKE_MAKE_PROGRAM\u003d$NINJA\n-DCMAKE_CXX_FLAGS\u003d-O2 -fexceptions -frtti -std\u003dc++1y -DONANDROID\n-DCMAKE_LIBRARY_OUTPUT_DIRECTORY\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/$HASH/obj/$ABI\n-DCMAKE_RUNTIME_OUTPUT_DIRECTORY\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/$HASH/obj/$ABI\n-DCMAKE_BUILD_TYPE\u003dDebug\n-DCMAKE_FIND_ROOT_PATH\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/$HASH/prefab/$ABI/prefab\n-B/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/$HASH/$ABI\n-GNinja\n-DANDROID_STL\u003dc++_shared\n-DSQLITE_FLAGS\u003d\u0027-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC\u003d0 -DHAVE_CIPHER_AES_256_CBC\u003d0 -DHAVE_CIPHER_SQLCIPHER\u003d0 -DHAVE_CIPHER_RC4\u003d0 -DHAVE_CIPHER_CHACHA20\u003d1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK\u003d1 -DSQLITE_MAX_EXPR_DEPTH\u003d0 -DSQLITE_OMIT_DEPRECATED\u003d1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS\u003d1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS\u003d1 -DSQLITE_DQS\u003d0 -DSQLITE_DEFAULT_MEMSTATUS\u003d0 -DSQLITE_USE_ALLOCA\u003d1\u0027\n-DUSE_HERMES\u003dtrue",
+ "configurationArguments": [
+ "-H/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android",
+ "-DCMAKE_SYSTEM_NAME\u003dAndroid",
+ "-DCMAKE_EXPORT_COMPILE_COMMANDS\u003dON",
+ "-DCMAKE_SYSTEM_VERSION\u003d21",
+ "-DANDROID_PLATFORM\u003dandroid-21",
+ "-DANDROID_ABI\u003darm64-v8a",
+ "-DCMAKE_ANDROID_ARCH_ABI\u003darm64-v8a",
+ "-DANDROID_NDK\u003d/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620",
+ "-DCMAKE_ANDROID_NDK\u003d/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620",
+ "-DCMAKE_TOOLCHAIN_FILE\u003d/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake",
+ "-DCMAKE_MAKE_PROGRAM\u003d/Volumes/DataDrive/Android/sdk/cmake/3.22.1/bin/ninja",
+ "-DCMAKE_CXX_FLAGS\u003d-O2 -fexceptions -frtti -std\u003dc++1y -DONANDROID",
+ "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/obj/arm64-v8a",
+ "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/obj/arm64-v8a",
+ "-DCMAKE_BUILD_TYPE\u003dDebug",
+ "-DCMAKE_FIND_ROOT_PATH\u003d/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/prefab/arm64-v8a/prefab",
+ "-B/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a",
+ "-GNinja",
+ "-DANDROID_STL\u003dc++_shared",
+ "-DSQLITE_FLAGS\u003d\u0027-DSQLITE3MC_OMIT_AES_HARDWARE_SUPPORT -DHAVE_CIPHER_AES_128_CBC\u003d0 -DHAVE_CIPHER_AES_256_CBC\u003d0 -DHAVE_CIPHER_SQLCIPHER\u003d0 -DHAVE_CIPHER_RC4\u003d0 -DHAVE_CIPHER_CHACHA20\u003d1 -DSQLITE_ENABLE_FTS5 -DSQLITE_OMIT_PROGRESS_CALLBACK\u003d1 -DSQLITE_MAX_EXPR_DEPTH\u003d0 -DSQLITE_OMIT_DEPRECATED\u003d1 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS\u003d1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS\u003d1 -DSQLITE_DQS\u003d0 -DSQLITE_DEFAULT_MEMSTATUS\u003d0 -DSQLITE_USE_ALLOCA\u003d1\u0027",
+ "-DUSE_HERMES\u003dtrue"
+ ],
+ "stlLibraryFile": "/Volumes/DataDrive/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so",
+ "intermediatesParentFolder": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4"
+}
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/generate_cxx_metadata_696_timing.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/generate_cxx_metadata_696_timing.txt
new file mode 100644
index 0000000..34dc50a
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/generate_cxx_metadata_696_timing.txt
@@ -0,0 +1,7 @@
+# C/C++ build system timings
+generate_cxx_metadata
+ generate-prefab-packages
+ exec-prefab 363ms
+ generate-prefab-packages completed in 367ms
+generate_cxx_metadata completed in 372ms
+
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/metadata_generation_record.json b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/metadata_generation_record.json
new file mode 100644
index 0000000..2030622
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/metadata_generation_record.json
@@ -0,0 +1,80 @@
+[
+ {
+ "level_": 0,
+ "message_": "Start JSON generation. Platform version: 21 min SDK version: arm64-v8a",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ },
+ {
+ "level_": 0,
+ "message_": "rebuilding JSON /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/.cxx/Debug/3u4yy1v4/arm64-v8a/android_gradle_build.json due to:",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ },
+ {
+ "level_": 0,
+ "message_": "- no fingerprint file, will remove stale configuration folder",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ },
+ {
+ "level_": 0,
+ "message_": "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/java \\\n --class-path \\\n /Users/ammarahmed/.gradle/caches/modules-2/files-2.1/com.google.prefab/cli/2.0.0/f2702b5ca13df54e3ca92f29d6b403fb6285d8df/cli-2.0.0-all.jar \\\n com.google.prefab.cli.AppKt \\\n --build-system \\\n cmake \\\n --platform \\\n android \\\n --abi \\\n arm64-v8a \\\n --os-version \\\n 21 \\\n --stl \\\n c++_shared \\\n --ndk-version \\\n 23 \\\n --output \\\n /var/folders/8n/7d231mbx74v_dqslxq126wm40000gn/T/agp-prefab-staging14064479766908916482/staged-cli-output \\\n /Users/ammarahmed/.gradle/caches/transforms-4/af547bd0d6b859d6b490959996fda082/transformed/jetified-react-android-0.74.4-debug/prefab \\\n /Users/ammarahmed/.gradle/caches/transforms-4/c7e26f7d3c2fc1a6636ff1467fc77795/transformed/jetified-fbjni-0.6.0/prefab\n",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ },
+ {
+ "level_": 0,
+ "message_": "Received process result: 0",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ },
+ {
+ "level_": 1,
+ "message_": "com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/fabricjni. Rejected the following libraries:",
+ "file_": "/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/CMakeLists.txt",
+ "tag_": "debug|arm64-v8a",
+ "diagnosticCode_": 0,
+ "memoizedIsInitialized": 1,
+ "unknownFields": {
+ "fields": {}
+ },
+ "memoizedSize": -1,
+ "memoizedHashCode": 0
+ }
+]
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_command b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_command
new file mode 100755
index 0000000..76cf03e
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_command
@@ -0,0 +1,20 @@
+/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/java \
+ --class-path \
+ /Users/ammarahmed/.gradle/caches/modules-2/files-2.1/com.google.prefab/cli/2.0.0/f2702b5ca13df54e3ca92f29d6b403fb6285d8df/cli-2.0.0-all.jar \
+ com.google.prefab.cli.AppKt \
+ --build-system \
+ cmake \
+ --platform \
+ android \
+ --abi \
+ arm64-v8a \
+ --os-version \
+ 21 \
+ --stl \
+ c++_shared \
+ --ndk-version \
+ 23 \
+ --output \
+ /var/folders/8n/7d231mbx74v_dqslxq126wm40000gn/T/agp-prefab-staging14064479766908916482/staged-cli-output \
+ /Users/ammarahmed/.gradle/caches/transforms-4/af547bd0d6b859d6b490959996fda082/transformed/jetified-react-android-0.74.4-debug/prefab \
+ /Users/ammarahmed/.gradle/caches/transforms-4/c7e26f7d3c2fc1a6636ff1467fc77795/transformed/jetified-fbjni-0.6.0/prefab
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_stderr.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_stderr.txt
new file mode 100644
index 0000000..f0ba97d
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_stderr.txt
@@ -0,0 +1,170 @@
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/fabricjni. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/folly_runtime. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/glog. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/hermes_executor. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/jscexecutor. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/jsi. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/jsinspector. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_codegen_rncore. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_cxxreactpackage. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_debug. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_nativemodule_core. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_newarchdefaults. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_animations. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_componentregistry. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_core. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_debug. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_graphics. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_imagemanager. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_mapbuffer. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_mounting. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_scheduler. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_textlayoutmanager. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_render_uimanager. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/react_utils. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/reactnativejni. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_image. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_legacyviewmanagerinterop. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_root. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_text. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_textinput. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/rrc_view. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/runtimeexecutor. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/turbomodulejsijni. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
+com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/yoga. Rejected the following libraries:
+android.arm64-v8a: User has minSdkVersion 21 but library was built for 23
+android.armeabi-v7a: User is targeting arm64-v8a but library is for armeabi-v7a
+android.x86: User is targeting arm64-v8a but library is for x86
+android.x86_64: User is targeting arm64-v8a but library is for x86_64
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_stdout.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/cxx/Debug/3u4yy1v4/logs/arm64-v8a/prefab_stdout.txt
new file mode 100644
index 0000000..e69de29
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
new file mode 100644
index 0000000..dbce266
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties
@@ -0,0 +1 @@
+#Thu Aug 01 12:36:04 PKT 2024
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
new file mode 100644
index 0000000..af54be8
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/mergeDebugShaders/merger.xml b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
new file mode 100644
index 0000000..a8ab2fe
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/mergeDebugShaders/merger.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/debug/shaders"/></dataSet></merger>
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/packageDebugAssets/merger.xml b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/packageDebugAssets/merger.xml
new file mode 100644
index 0000000..e9d427d
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/incremental/packageDebugAssets/merger.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/build/intermediates/shader_assets/debug/out"/></dataSet></merger>
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/BuildConfig.class b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/BuildConfig.class
new file mode 100644
index 0000000..0e69a3b
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/BuildConfig.class differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/QuickSQLiteBridge.class b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/QuickSQLiteBridge.class
new file mode 100644
index 0000000..08396d0
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/QuickSQLiteBridge.class differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelModule.class b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelModule.class
new file mode 100644
index 0000000..2c123a9
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelModule.class differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelPackage.class b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelPackage.class
new file mode 100644
index 0000000..d78a2bf
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/javac/debug/classes/com/reactnativequicksqlite/SequelPackage.class differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/local_only_symbol_list/debug/R-def.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/local_only_symbol_list/debug/R-def.txt
new file mode 100644
index 0000000..78ac5b8
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/local_only_symbol_list/debug/R-def.txt
@@ -0,0 +1,2 @@
+R_DEF: Internal format may change without notice
+local
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
new file mode 100644
index 0000000..a67baa4
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt
@@ -0,0 +1,7 @@
+1<?xml version="1.0" encoding="utf-8"?>
+2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+3 package="com.reactnativequicksqlite" >
+4
+5 <uses-sdk android:minSdkVersion="21" />
+6
+7</manifest>
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml b/node_modules/react-native-quick-sqlite/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml
new file mode 100644
index 0000000..65ada26
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.reactnativequicksqlite" >
+
+ <uses-sdk android:minSdkVersion="21" />
+
+</manifest>
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/navigation_json/debug/navigation.json b/node_modules/react-native-quick-sqlite/android/build/intermediates/navigation_json/debug/navigation.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/navigation_json/debug/navigation.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar b/node_modules/react-native-quick-sqlite/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar
new file mode 100644
index 0000000..9fb3961
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar differ
diff --git a/node_modules/react-native-quick-sqlite/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt b/node_modules/react-native-quick-sqlite/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt
new file mode 100644
index 0000000..1ab64fc
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt
@@ -0,0 +1 @@
+com.reactnativequicksqlite
diff --git a/node_modules/react-native-quick-sqlite/android/build/outputs/logs/manifest-merger-debug-report.txt b/node_modules/react-native-quick-sqlite/android/build/outputs/logs/manifest-merger-debug-report.txt
new file mode 100644
index 0000000..50600fe
--- /dev/null
+++ b/node_modules/react-native-quick-sqlite/android/build/outputs/logs/manifest-merger-debug-report.txt
@@ -0,0 +1,17 @@
+-- Merging decision tree log ---
+manifest
+ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml:1:1-4:12
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml:1:1-4:12
+ package
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml:2:11-47
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml
+ xmlns:android
+ ADDED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml:1:11-69
+uses-sdk
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml
+INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml
+ android:targetSdkVersion
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml
+ android:minSdkVersion
+ INJECTED from /Volumes/DataDrive/Projects/apps/notesnook/apps/mobile/node_modules/react-native-quick-sqlite/android/src/main/AndroidManifest.xml
diff --git a/node_modules/react-native-quick-sqlite/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin b/node_modules/react-native-quick-sqlite/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin
new file mode 100644
index 0000000..ef93f2f
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin differ
diff --git a/node_modules/react-native-quick-sqlite/cpp/.DS_Store b/node_modules/react-native-quick-sqlite/cpp/.DS_Store
new file mode 100644
index 0000000..e69de29
index 0000000..5008ddf
Binary files /dev/null and b/node_modules/react-native-quick-sqlite/cpp/.DS_Store differ
diff --git a/node_modules/react-native-quick-sqlite/cpp/sqlite3.c b/node_modules/react-native-quick-sqlite/cpp/sqlite3.c
index 51d5dbd..f1295eb 100644
index 51d5dbd..895536b 100644
--- a/node_modules/react-native-quick-sqlite/cpp/sqlite3.c
+++ b/node_modules/react-native-quick-sqlite/cpp/sqlite3.c
@@ -1,6 +1,139 @@
@@ -2515,7 +1681,7 @@ index 51d5dbd..f1295eb 100644
} /* End of the 'extern "C"' block */
#endif
#endif /* SQLITE3_H */
+/* Function prototypes of SQLite3 Multiple Ciphers */
+SQLITE_PRIVATE int sqlite3mcCheckVfs(const char*);
+SQLITE_PRIVATE int sqlite3mcFileControlPragma(sqlite3*, const char*, int, void*);
@@ -105619,7 +104785,7 @@ index 51d5dbd..f1295eb 100644
+
+#endif
diff --git a/node_modules/react-native-quick-sqlite/cpp/sqlite3.h b/node_modules/react-native-quick-sqlite/cpp/sqlite3.h
index 9b284d2..bda794a 100644
index 9b284d2..a12c6ab 100644
--- a/node_modules/react-native-quick-sqlite/cpp/sqlite3.h
+++ b/node_modules/react-native-quick-sqlite/cpp/sqlite3.h
@@ -1,4 +1,50 @@

View File

@@ -1,54 +0,0 @@
diff --git a/node_modules/react-native-screenguard/ios/ScreenGuard.mm b/node_modules/react-native-screenguard/ios/ScreenGuard.mm
index 9fa7d33..d2e6d68 100644
--- a/node_modules/react-native-screenguard/ios/ScreenGuard.mm
+++ b/node_modules/react-native-screenguard/ios/ScreenGuard.mm
@@ -11,7 +11,7 @@
@implementation ScreenGuard
RCT_EXPORT_MODULE(ScreenGuard)
-bool hasListeners;
+bool hasListeners_;
UITextField *textField;
UIImageView *imageView;
@@ -22,11 +22,11 @@ @implementation ScreenGuard
}
- (void)startObserving {
- hasListeners = YES;
+ hasListeners_ = YES;
}
- (void)stopObserving {
- hasListeners = NO;
+ hasListeners_ = NO;
}
- (void)secureViewWithBackgroundColor: (NSString *)color {
@@ -335,7 +335,7 @@ - (UIImage *)convertViewToImage:(UIView *)view {
queue:mainQueue
usingBlock:^(NSNotification *notification) {
- if (hasListeners && getScreenShotPath) {
+ if (hasListeners_ && getScreenShotPath) {
UIViewController *presentedViewController = RCTPresentedViewController();
UIImage *image = [self convertViewToImage:presentedViewController.view.superview];
@@ -359,7 +359,7 @@ - (UIImage *)convertViewToImage:(UIView *)view {
result = @{@"path": filePath, @"name": fileName, @"type": @"PNG"};
}
[self emit:SCREENSHOT_EVT body: result];
- } else if (hasListeners) {
+ } else if (hasListeners_) {
[self emit:SCREENSHOT_EVT body: nil];
}
}];
@@ -376,7 +376,7 @@ - (UIImage *)convertViewToImage:(UIView *)view {
queue:mainQueue
usingBlock:^(NSNotification *notification) {
- if (hasListeners) {
+ if (hasListeners_) {
[self emit:SCREEN_RECORDING_EVT body:nil];
}
}];

View File

@@ -134,15 +134,15 @@
},
"../../packages/common": {
"name": "@notesnook/common",
"version": "2.0.7",
"version": "1.0.0",
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "^8.0.0",
"@notesnook/core": "file:../core",
"pathe": "^1.1.2",
"timeago.js": "4.0.2"
},
"devDependencies": {
"@notesnook/core": "^8.0.0",
"@notesnook/core": "file:../core",
"@types/react": "^18.2.39",
"react": "18.2.0",
"vitest": "^1.4.0"
@@ -330,7 +330,7 @@
},
"../../packages/theme": {
"name": "@notesnook/theme",
"version": "2.0.7",
"version": "1.2.0",
"license": "GPL-3.0-or-later",
"devDependencies": {
"@emotion/react": "11.11.1",
@@ -979,7 +979,7 @@
},
"../web": {
"name": "@notesnook/web",
"version": "3.0.13",
"version": "3.0.6",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
@@ -1029,12 +1029,12 @@
"framer-motion": "^10.16.8",
"hash-wasm": "^4.9.0",
"hotkeys-js": "^3.8.3",
"immer": "^10.0.3",
"katex": "0.16.2",
"kysely": "^0.26.3",
"libsodium-wrappers": "^0.7.13",
"mac-scrollbar": "^0.13.5",
"marked": "^4.1.0",
"mutative": "^1.0.6",
"pdfjs-dist": "3.6.172",
"phone": "^3.1.14",
"platform": "^1.3.6",
@@ -1059,14 +1059,12 @@
"w3c-keyname": "^2.2.6",
"web-streams-polyfill": "^3.1.1",
"wouter": "2.12.1",
"zustand": "4.4.7",
"zustand-mutative": "^1.0.1"
"zustand": "4.4.7"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@playwright/test": "^1.43.1",
"@swc/core": "^1.5.24",
"@swc/plugin-react-remove-properties": "^2.0.4",
"@swc/core": "1.3.61",
"@trpc/server": "10.38.3",
"@types/babel__core": "^7.20.1",
"@types/event-source-polyfill": "^1.0.1",
@@ -1081,8 +1079,8 @@
"@types/react-scroll-sync": "^0.9.0",
"@types/tinycolor2": "^1.4.3",
"@types/wicg-file-system-access": "^2020.9.6",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"@vitejs/plugin-react-swc": "3.3.2",
"autoprefixer": "^10.4.14",
"better-sqlite3-multiple-ciphers": "^9.4.0",
"buffer": "^6.0.3",
"chalk": "^4.1.0",
@@ -1093,13 +1091,14 @@
"ip": "^1.1.8",
"lorem-ipsum": "^2.0.4",
"otplib": "^12.0.1",
"rollup": "^4.18.0",
"rollup-plugin-visualizer": "^5.12.0",
"vite": "^5.2.12",
"vite-plugin-env-compatible": "^2.0.1",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^1.6.0",
"rollup": "^3.29.4",
"rollup-plugin-visualizer": "^5.9.2",
"swc-plugin-react-remove-properties": "^0.1.4",
"vite": "^4.5.0",
"vite-plugin-env-compatible": "^1.1.1",
"vite-plugin-pwa": "^0.16.3",
"vite-plugin-svgr": "^3.2.0",
"vitest": "^0.34.6",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-precaching": "^7.0.0",
@@ -2028,6 +2027,15 @@
"@trpc/server": "10.38.3"
}
},
"node_modules/@trpc/server": {
"version": "10.38.3",
"resolved": "https://registry.npmjs.org/@trpc/server/-/server-10.38.3.tgz",
"integrity": "sha512-9s8/kwo2IDB5hwB2SKZZrfevRhdb1f9fdXtIYd3lbQuf2jQaC/LyQuHaIQjDQoUx9updBfsHXcFFPiCP1DL6pg==",
"funding": [
"https://trpc.io/sponsor"
],
"peer": true
},
"node_modules/@types/babel__core": {
"version": "7.20.1",
"dev": true,

View File

@@ -33,7 +33,7 @@
},
"../../packages/crypto": {
"name": "@notesnook/crypto",
"version": "2.0.7",
"version": "1.1.1",
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/sodium": "file:../sodium"

3
apps/web/.gitignore vendored
View File

@@ -30,4 +30,5 @@ dist
public/workbox
scripts/secrets
test-results
.swc
.swc
public/models

View File

@@ -14,7 +14,7 @@
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=1690887574068">
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=0">
<style>

View File

@@ -14,7 +14,7 @@
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=1690887574068">
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=0">
<style>

View File

@@ -14,7 +14,7 @@
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=1690887574068">
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=0">
<style>

View File

@@ -97,7 +97,6 @@ test("logged in user should not be able to open unauthorized routes", async ({
await page.goto(route);
await page.waitForURL(/\/notes/gm);
await page.waitForTimeout(1000);
expect(await app.navigation.findItem("Notes")).toBeDefined();
}
});

View File

@@ -0,0 +1,128 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { describe, bench } from "vitest";
import { pipeline } from "@xenova/transformers";
import path from "path";
const text = `I am generally not in favor of huge feature packed releases instead preferring small releases without one or two features at most. v3 is a special case in that the sheer amount of changes required to migrate from our old key value database to SQLite forced us to release all of these updates together.
Migrating to SQLite
Initially, as all plans go, our only goal was to migrate to SQLite as quickly and with as few changes as possible. Unfortunately, that plan died in its infancy. Our old legacy database was not designed to handle tens of thousands of notes or gigabytes of data — something we quickly realized after some users with over 100K notes approached us with significant performance issues. While it "worked", it was neither efficient nor particularly safe.
In August 2023, we began slowly migrating the Notesnook Core to SQLite. While migrating we quickly realized we'd need TypeScript if this was ever going to work because Kysely (the underlying query builder we used) heavily relied on types being there. So from the very first day we were doing 2 things: migrating the database to SQLite, and migrating the codebase to TypeScript.
I won't bore you with too many technical details but we had a few primary goals behind all this upheaval:
The clients should perform predictably regardless of how much data you have.
The clients should use as less RAM as possible to work in extremely constrained enviroments (e.g. iOS limits all Share Extensions to around 50 MB before crashing).
With v3 we have acheived both of these goals.
Fixing the Sync
Sync has notoriously been one of the least stable parts of Notesnook. From the beginning, we opted for a decentralized syncing system where each client could independently sync items without depending on a central server. This had a few drawbacks:
Since each client was independent, it was a nightmare to debug why something wasn't syncing.
In order to be efficient, we detected changed items based on their modified timestamp, but this forced us to juggle with the various inconsistencies of time on different devices.
Building everything on top of timestamps meant resumability during sync could never be stable.
In short, our old sync logic heavily depended on time to be the exact same (down to the last millisecond) for things to work. As you can imagine, this didn't work out that well.
While migrating everything to SQLite, we greatly simplified the sync logic opting for a centralized system this time. This allowed us to completely get rid of all the time juggling resolving all the edge cases in our previous logic.
As a result, in v3 you'll notice a bug free sync that "just works" regardless of where you are, how many devices you are on, the time difference between them etc.
Features, Features
In every new release, it is always a struggle to decide which features to add and which features to leave behind for later. v3 was no different because ultimately each feature you add pushes the deadline further and further away. Even then, v3 is one of our biggest releases ever.
Note linking
The crown jewel of v3! Yes, finally, you can link 2 notes together and even link directly to a specific block inside a note.
We have also added controls to quickly see which notes you have linked to, and which notes link to a particular note.
To keep things simple, a note link is no different than a normal hyperlink except that clicking on it will take you to the note instead of an external page. This also means that when you export your notes, your note links are automatically converted into hyperlinks that directly open the linked Markdown or HTML files of the notes. This is something no other app does instead keeping the links in their proprietary format making them essentially useless.
Tabs
The only reason we added tabs was to allow quick navigation to/from a note on clicking a note link. You can, of course, use tabs without ever linking a note.
Notesnook is one of the few note taking apps (besides Obsidian & OneNote) that has a full fledged tab experience. With v3, we are slowly upgrading Notesnook to become a power user's tool while keeping things just as simple as before.
Nested notebooks
At rest encryption
Thanks to SQLite, at rest encryption is now a thing on all platforms. The encryption key is randomly generated on database creation without requiring any user intervention. In other words, it "just works" keeping your notes secure even if your device is compromised. Which brings me to...
App lock
App lock is an enhancement on at rest encryption. When you enable app lock, it further encrypts your database encryption key with your app lock pin (or security key) so it's not just an "overlay". If you forget your app lock pin, the only way into the app is to reset & clear the database and start over.
At Notesnook, we take your security & privacy very seriously.
Export attachments with notes
Exports got a lot of love in v3 with things like automatic downloading & linking of attachments, organization of note files based on your notebook structure, and resolution of internal note links to actual HTML/MD files.
User profile
Custom colors for note organization
Fixed colors were nice but not nicer than custom colors.
Customizable side bar
You can now drag/drop and reorganize how things in your side bar looks including hiding things that you don't use. It can be as simple or as complex as you want.
Callouts
Beta release channels
Nested notebooks/topics
Note linking
Tabs
Table of Contents
Customizable/sortable sidebar
User profile
Custom colors
Yearly reminders
Callouts in editor
Migration to SQLite
New sync system
At rest encryption
app lock
export attachments with notes
.ccccccccccxccccccc`;
describe("benchmarking embeddings", async () => {
const models = [
["Xenova/jina-embeddings-v2-small-en", 87],
["Snowflake/snowflake-arctic-embed-s", 41],
["Snowflake/snowflake-arctic-embed-m", 20],
["Snowflake/snowflake-arctic-embed-xs", 62],
// "Alibaba-NLP/gte-base-en-v1.5",
// "andersonbcdefg/bge-small-4096"
["Xenova/GIST-small-Embedding-v0", 57],
["Xenova/GIST-all-MiniLM-L6-v2", 88],
// "Xenova/all-MiniLM-L12-v2" // 96
["Xenova/NoInstruct-small-Embedding-v0", 40],
["TaylorAI/bge-micro-v2", 100],
// "Snowflake/snowflake-arctic-embed-m-long" // 19
// "Xenova/e5-small-v2" // 67
// "nomic-ai/nomic-embed-text-v1.5",
// "Xenova/bert-base-uncased",
["TaylorAI/gte-tiny", 88],
["Xenova/gte-small", 63]
];
for (const provider of ["cpu"]) {
for (const [model, rank] of models) {
const extractor = await pipeline("feature-extraction", model, {
// progress_callback: console.log,
device: provider,
dtype: "q8",
cache_dir: path.join(__dirname, "..", "..", "public", "models")
});
console.log(model, extractor.tokenizer.model_max_length);
extractor.tokenizer.model_max_length = 512;
bench(`${rank}. ${model} (${provider})`, async () => {
const output = await extractor(text, {
pooling: extractor.tokenizer._tokenizer_config.cls_token
? "cls"
: "mean"
});
});
}
}
});
// console.time("extraction");
// const output = await extractor(text);
// console.timeEnd("extraction");
// console.log(output.data.length);

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "@notesnook/web",
"description": "Your private note taking space",
"version": "3.0.13",
"version": "3.0.6",
"private": true,
"main": "./src/app.js",
"homepage": "https://notesnook.com/",
@@ -38,6 +38,7 @@
"@theme-ui/core": "^0.16.1",
"@trpc/client": "10.38.3",
"@trpc/react-query": "10.38.3",
"@xenova/transformers": "github:xenova/transformers.js#v3",
"@zip.js/zip.js": "^2.7.32",
"async-mutex": "^0.4.0",
"axios": "^1.3.4",
@@ -54,12 +55,13 @@
"framer-motion": "^10.16.8",
"hash-wasm": "^4.9.0",
"hotkeys-js": "^3.8.3",
"immer": "^10.0.3",
"katex": "0.16.2",
"kysely": "^0.26.3",
"libsodium-wrappers": "^0.7.13",
"mac-scrollbar": "^0.13.5",
"marked": "^4.1.0",
"mutative": "^1.0.6",
"onnxruntime-node": "^1.18.0",
"pdfjs-dist": "3.6.172",
"phone": "^3.1.14",
"platform": "^1.3.6",
@@ -84,14 +86,12 @@
"w3c-keyname": "^2.2.6",
"web-streams-polyfill": "^3.1.1",
"wouter": "2.12.1",
"zustand": "4.4.7",
"zustand-mutative": "^1.0.1"
"zustand": "4.4.7"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@playwright/test": "^1.43.1",
"@swc/core": "^1.5.24",
"@swc/plugin-react-remove-properties": "^2.0.4",
"@swc/core": "1.3.61",
"@trpc/server": "10.38.3",
"@types/babel__core": "^7.20.1",
"@types/event-source-polyfill": "^1.0.1",
@@ -106,8 +106,8 @@
"@types/react-scroll-sync": "^0.9.0",
"@types/tinycolor2": "^1.4.3",
"@types/wicg-file-system-access": "^2020.9.6",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"@vitejs/plugin-react-swc": "3.3.2",
"autoprefixer": "^10.4.14",
"better-sqlite3-multiple-ciphers": "^9.4.0",
"buffer": "^6.0.3",
"chalk": "^4.1.0",
@@ -118,19 +118,23 @@
"ip": "^1.1.8",
"lorem-ipsum": "^2.0.4",
"otplib": "^12.0.1",
"rollup": "^4.18.0",
"rollup-plugin-visualizer": "^5.12.0",
"vite": "^5.2.12",
"vite-plugin-env-compatible": "^2.0.1",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^1.6.0",
"rollup": "^3.29.4",
"rollup-plugin-visualizer": "^5.9.2",
"swc-plugin-react-remove-properties": "^0.1.4",
"vite": "^4.5.0",
"vite-plugin-env-compatible": "^1.1.1",
"vite-plugin-pwa": "^0.16.3",
"vite-plugin-svgr": "^3.2.0",
"vitest": "^0.34.6",
"workbox-core": "^7.0.0",
"workbox-expiration": "^7.0.0",
"workbox-precaching": "^7.0.0",
"workbox-routing": "^7.0.0",
"workbox-strategies": "^7.0.0"
},
"overrides": {
"onnxruntime-node": "^1.18.0"
},
"scripts": {
"start": "cross-env PLATFORM=web vite",
"start:desktop": "cross-env PLATFORM=desktop vite",

View File

@@ -58,8 +58,9 @@ export default function MobileAppEffects({
overlay.style.pointerEvents = "none";
}
},
onChange: (e, { slide }) => {
toggleSideMenu(slide?.index === 0 ? true : false);
onChange: (e, { slide, lastSlide }) => {
if (!lastSlide || !isMobile) return;
toggleSideMenu(slide?.index === 1 ? true : false);
setIsEditorOpen(slide?.index === 3 ? true : false);
}
});

View File

@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import React, { useEffect } from "react";
import { useStore } from "./stores/app-store";
import { useStore as useUserStore } from "./stores/user-store";
import { useStore as useAttachmentStore } from "./stores/attachment-store";
import { useEditorStore } from "./stores/editor-store";
import { useStore as useAnnouncementStore } from "./stores/announcement-store";
import { resetNotices, scheduleBackups } from "./common/notices";
@@ -29,17 +30,17 @@ import { db } from "./common/db";
import { EV, EVENTS } from "@notesnook/core/dist/common";
import { registerKeyMap } from "./common/key-map";
import { isUserPremium } from "./hooks/use-is-user-premium";
import {
showAnnouncementDialog,
showBuyDialog,
showFeatureDialog,
showOnboardingDialog
} from "./common/dialog-controller";
import { updateStatus, removeStatus, getStatus } from "./hooks/use-status";
import { showToast } from "./utils/toast";
import {
interruptedOnboarding,
OnboardingDialog
} from "./dialogs/onboarding-dialog";
import { interruptedOnboarding } from "./dialogs/onboarding-dialog";
import { hashNavigate } from "./navigation";
import { desktop } from "./common/desktop-bridge";
import { BuyDialog } from "./dialogs/buy-dialog";
import { FeatureDialog } from "./dialogs/feature-dialog";
import { AnnouncementDialog } from "./dialogs/announcement-dialog";
type AppEffectsProps = {
setShow: (show: boolean) => void;
@@ -50,6 +51,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
const isFocusMode = useStore((store) => store.isFocusMode);
const initUser = useUserStore((store) => store.init);
const initStore = useStore((store) => store.init);
const initAttachments = useAttachmentStore((store) => store.init);
const setIsVaultCreated = useStore((store) => store.setIsVaultCreated);
const initEditorStore = useEditorStore((store) => store.init);
const dialogAnnouncements = useAnnouncementStore(
@@ -67,7 +69,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
showToast(
"error",
"Please upgrade your account to Pro to use this feature.",
[{ text: "Upgrade now", onClick: () => BuyDialog.show({}) }]
[{ text: "Upgrade now", onClick: () => showBuyDialog() }]
);
return { type, result: false };
}
@@ -75,6 +77,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
);
initStore();
initAttachments();
initEditorStore();
(async function () {
@@ -86,9 +89,8 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
await resetNotices();
setIsVaultCreated(await db.vault.exists());
const onboardingKey = interruptedOnboarding();
if (onboardingKey) await OnboardingDialog.show({ type: onboardingKey });
await FeatureDialog.show({ featureName: "highlights" });
await showOnboardingDialog(interruptedOnboarding());
await showFeatureDialog("highlights");
await scheduleBackups();
})();
@@ -99,6 +101,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
[
initEditorStore,
initStore,
initAttachments,
updateLastSynced,
refreshNavItems,
initUser,
@@ -221,7 +224,7 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
useEffect(() => {
if (!dialogAnnouncements.length || IS_TESTING) return;
(async () => {
await AnnouncementDialog.show({ announcement: dialogAnnouncements[0] });
await showAnnouncementDialog(dialogAnnouncements[0]);
})();
}, [dialogAnnouncements]);

View File

@@ -22,8 +22,10 @@ import { Box, Flex } from "@theme-ui/components";
import { ScopedThemeProvider } from "./components/theme-provider";
import useMobile from "./hooks/use-mobile";
import useTablet from "./hooks/use-tablet";
import useDatabase from "./hooks/use-database";
import { useStore } from "./stores/app-store";
import { Toaster } from "react-hot-toast";
import { ViewLoader } from "./components/loaders/view-loader";
import NavigationMenu from "./components/navigation-menu";
import StatusBar from "./components/status-bar";
import { EditorLoader } from "./components/loaders/editor-loader";
@@ -36,13 +38,12 @@ import {
PanelResizeHandle,
ImperativePanelHandle
} from "react-resizable-panels";
import GlobalMenuWrapper from "./components/global-menu-wrapper";
new WebExtensionRelay();
// const GlobalMenuWrapper = React.lazy(
// () => import("./components/global-menu-wrapper")
// );
const GlobalMenuWrapper = React.lazy(
() => import("./components/global-menu-wrapper")
);
const AppEffects = React.lazy(() => import("./app-effects"));
const MobileAppEffects = React.lazy(() => import("./app-effects.mobile"));
const HashRouter = React.lazy(() => import("./components/hash-router"));
@@ -50,24 +51,26 @@ const HashRouter = React.lazy(() => import("./components/hash-router"));
function App() {
const isMobile = useMobile();
const [show, setShow] = useState(true);
const [isAppLoaded] = useDatabase();
const isFocusMode = useStore((store) => store.isFocusMode);
return (
<>
<Suspense fallback={<div style={{ display: "none" }} />}>
<div id="menu-wrapper">
<GlobalMenuWrapper />
</div>
<AppEffects setShow={setShow} />
{isMobile && (
<MobileAppEffects
sliderId="slider"
overlayId="overlay"
setShow={setShow}
/>
)}
</Suspense>
{isAppLoaded && (
<Suspense fallback={<div style={{ display: "none" }} />}>
<div id="menu-wrapper">
<GlobalMenuWrapper />
</div>
<AppEffects setShow={setShow} />
{isMobile && (
<MobileAppEffects
sliderId="slider"
overlayId="overlay"
setShow={setShow}
/>
)}
</Suspense>
)}
<Flex
id="app"
bg="background"
@@ -75,9 +78,13 @@ function App() {
sx={{ overflow: "hidden", flexDirection: "column", height: "100%" }}
>
{isMobile ? (
<MobileAppContents />
<MobileAppContents isAppLoaded={isAppLoaded} />
) : (
<DesktopAppContents setShow={setShow} show={show} />
<DesktopAppContents
isAppLoaded={isAppLoaded}
setShow={setShow}
show={show}
/>
)}
<Toaster containerClassName="toasts-container" />
</Flex>
@@ -114,10 +121,15 @@ function SuspenseLoader<TComponent extends React.JSXElementConstructor<any>>({
}
type DesktopAppContentsProps = {
isAppLoaded: boolean;
show: boolean;
setShow: (show: boolean) => void;
};
function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
function DesktopAppContents({
isAppLoaded,
show,
setShow
}: DesktopAppContentsProps) {
const isFocusMode = useStore((store) => store.isFocusMode);
const isTablet = useTablet();
const [isNarrow, setIsNarrow] = useState(isTablet || false);
@@ -125,23 +137,19 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
const middlePane = useRef<ImperativePanelHandle>(null);
useEffect(() => {
setIsNarrow(isTablet);
}, [isTablet]);
if (show) middlePane.current?.expand();
else middlePane.current?.collapse();
}, [show]);
// useEffect(() => {
// if (show) middlePane.current?.expand();
// else middlePane.current?.collapse();
// }, [show]);
// useEffect(() => {
// if (isFocusMode) {
// const middlePaneSize = middlePane.current?.getSize() || 20;
// navPane.current?.collapse();
// // the middle pane has to be resized because collapsing the nav
// // pane increases the middle pane's size every time.
// middlePane.current?.resize(middlePaneSize);
// } else navPane.current?.expand();
// }, [isFocusMode]);
useEffect(() => {
if (isFocusMode) {
const middlePaneSize = middlePane.current?.getSize() || 20;
navPane.current?.collapse();
// the middle pane has to be resized because collapsing the nav
// pane increases the middle pane's size every time.
middlePane.current?.resize(middlePaneSize);
} else navPane.current?.expand();
}, [isFocusMode]);
return (
<>
@@ -152,67 +160,45 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
}}
>
<PanelGroup autoSaveId="global-panel-group" direction="horizontal">
{!isFocusMode && isTablet ? (
<Flex sx={{ width: 50 }}>
<NavigationMenu
toggleNavigationContainer={(state) => {
setShow(state || !show);
}}
isTablet={isNarrow}
/>
</Flex>
) : (
!isFocusMode && (
<>
<Panel
ref={navPane}
order={1}
className="nav-pane"
defaultSize={10}
minSize={3.5}
// maxSize={isNarrow ? 5 : undefined}
onResize={(size) => setIsNarrow(size <= 5)}
collapsible
collapsedSize={3.5}
>
<NavigationMenu
toggleNavigationContainer={(state) => {
setShow(state || !show);
}}
isTablet={isNarrow}
/>
</Panel>
<PanelResizeHandle className="panel-resize-handle" />
</>
)
)}
{!isFocusMode && show && (
<>
<Panel
ref={middlePane}
className="middle-pane"
order={2}
collapsible
defaultSize={20}
>
<ScopedThemeProvider
className="listMenu"
scope="list"
sx={{
display: "flex",
flexDirection: "column",
flex: 1,
bg: "background",
borderRight: "1px solid var(--separator)"
}}
>
<CachedRouter />
</ScopedThemeProvider>
</Panel>
<PanelResizeHandle className="panel-resize-handle" />
</>
)}
<Panel className="editor-pane" order={3} defaultSize={70}>
<Panel
ref={navPane}
className="nav-pane"
defaultSize={10}
minSize={3.5}
onResize={(size) => setIsNarrow(size <= 5)}
collapsible
collapsedSize={3.5}
>
<NavigationMenu
toggleNavigationContainer={(state) => {
setShow(state || !show);
}}
isTablet={isNarrow}
/>
</Panel>
<PanelResizeHandle className="panel-resize-handle" />
<Panel
ref={middlePane}
className="middle-pane"
collapsible
defaultSize={20}
>
<ScopedThemeProvider
className="listMenu"
scope="list"
sx={{
display: "flex",
flexDirection: "column",
flex: 1,
bg: "background",
borderRight: "1px solid var(--separator)"
}}
>
{isAppLoaded && <CachedRouter />}
</ScopedThemeProvider>
</Panel>
<PanelResizeHandle className="panel-resize-handle" />
<Panel className="editor-pane" defaultSize={70}>
<Flex
sx={{
display: "flex",
@@ -222,7 +208,7 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
bg: "background"
}}
>
{<HashRouter />}
{isAppLoaded && <HashRouter />}
</Flex>
</Panel>
</PanelGroup>
@@ -232,7 +218,7 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
);
}
function MobileAppContents() {
function MobileAppContents({ isAppLoaded }: { isAppLoaded: boolean }) {
return (
<FlexScrollContainer
id="slider"
@@ -271,7 +257,11 @@ function MobileAppContents() {
width: "100vw"
}}
>
<CachedRouter />
<SuspenseLoader
condition={isAppLoaded}
component={CachedRouter}
fallback={<ViewLoader />}
/>
<Box
id="overlay"
sx={{
@@ -300,7 +290,7 @@ function MobileAppContents() {
<SuspenseLoader
fallback={<EditorLoader />}
component={HashRouter}
condition={true}
condition={isAppLoaded}
/>
</Flex>
</FlexScrollContainer>

View File

@@ -18,10 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import "./polyfills";
import "@notesnook/core/dist/types";
import { getCurrentHash, getCurrentPath, makeURL } from "./navigation";
import Config from "./utils/config";
// import { initializeLogger, logger } from "./utils/logger";
import { initializeLogger, logger } from "./utils/logger";
import type { AuthProps } from "./views/auth";
import { initializeFeatureChecks } from "./utils/feature-check";
@@ -101,7 +102,7 @@ const sessionExpiryExceptions: Routes[] = [
function getRoute(): RouteWithPath<AuthProps> | RouteWithPath {
const path = getCurrentPath() as Routes;
// logger.info(`Getting route for path: ${path}`);
logger.info(`Getting route for path: ${path}`);
const signup = redirectToRegistration(path);
const sessionExpired = isSessionExpired(path);
@@ -128,7 +129,7 @@ function redirectToRegistration(path: Routes): RouteWithPath<AuthProps> | null {
function isSessionExpired(path: Routes): RouteWithPath<AuthProps> | null {
const isSessionExpired = Config.get("sessionExpired", false);
if (isSessionExpired && !sessionExpiryExceptions.includes(path)) {
// logger.info(`User session has expired. Routing to /sessionexpired`);
logger.info(`User session has expired. Routing to /sessionexpired`);
window.history.replaceState(
{},
@@ -142,10 +143,7 @@ function isSessionExpired(path: Routes): RouteWithPath<AuthProps> | null {
export async function init() {
await initializeFeatureChecks();
await import("./utils/logger").then(({ initializeLogger }) =>
initializeLogger()
);
await initializeLogger();
const { path, route } = getRoute();
return { ...route, path };

View File

@@ -20,11 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { EventSourcePolyfill as EventSource } from "event-source-polyfill";
import { DatabasePersistence, NNStorage } from "../interfaces/storage";
import { logger } from "../utils/logger";
import { showMigrationDialog } from "./dialog-controller";
import { database } from "@notesnook/common";
import { createDialect } from "./sqlite";
import { isFeatureSupported } from "../utils/feature-check";
import { generatePassword } from "../utils/password-generator";
import { deriveKey, useKeyStore } from "../interfaces/key-store";
import { deriveKey } from "../interfaces/key-store";
import { logManager } from "@notesnook/core/dist/logger";
const db = database;
@@ -33,6 +34,7 @@ async function initializeDatabase(persistence: DatabasePersistence) {
const { FileStorage } = await import("../interfaces/fs");
const { Compressor } = await import("../utils/compressor");
const { useKeyStore } = await import("../interfaces/key-store");
let databaseKey = await useKeyStore.getState().getValue("databaseKey");
if (!databaseKey) {
@@ -55,29 +57,21 @@ async function initializeDatabase(persistence: DatabasePersistence) {
);
await storage.migrate();
const multiTab = !!globalThis.SharedWorker && isFeatureSupported("opfs");
database.setup({
sqliteOptions: {
dialect: (name, init) =>
createDialect({
name: persistence === "memory" ? ":memory:" : name,
encrypted: true,
async: !isFeatureSupported("opfs"),
init,
multiTab
}),
dialect: (name, init) => createDialect(name, true, init),
...(IS_DESKTOP_APP || isFeatureSupported("opfs")
? { journalMode: "WAL", lockingMode: "exclusive" }
: {
journalMode: "MEMORY",
lockingMode: "normal"
lockingMode: "exclusive"
}),
tempStore: "memory",
synchronous: "normal",
pageSize: 8192,
cacheSize: -32000,
password: Buffer.from(databaseKey).toString("hex"),
skipInitialization: !IS_DESKTOP_APP && multiTab
skipInitialization: !IS_DESKTOP_APP
},
storage: storage,
eventsource: EventSource,
@@ -104,9 +98,7 @@ async function initializeDatabase(persistence: DatabasePersistence) {
// });
// }
console.log("loading db");
await db.init();
console.log("db loaded");
window.addEventListener("beforeunload", async () => {
if (IS_DESKTOP_APP) {
@@ -118,9 +110,7 @@ async function initializeDatabase(persistence: DatabasePersistence) {
logger.measure("Database initialization");
if (db.migrations?.required()) {
await import("../dialogs/migration-dialog").then(({ MigrationDialog }) =>
MigrationDialog.show({})
);
await showMigrationDialog();
}
return db;

View File

@@ -28,10 +28,7 @@ export const desktop = createTRPCProxyClient<AppRouter>({
links: [ipcLink()]
});
attachListeners();
function attachListeners() {
console.log("attaching listeners");
document.addEventListener("readystatechange", async () => {
desktop.updater.onChecking.subscribe(
undefined,
attachListener(AppEvents.checkingForUpdate)
@@ -65,7 +62,7 @@ function attachListeners() {
TaskScheduler.register("updateCheck", "0 0 */12 * * * *", () => {
checkForUpdate();
});
}
});
function attachListener(event: string) {
return {

View File

@@ -0,0 +1,577 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { Dialogs } from "../dialogs";
import { store as tagStore } from "../stores/tag-store";
import { store as appStore } from "../stores/app-store";
import { useEditorStore } from "../stores/editor-store";
import { store as noteStore } from "../stores/note-store";
import { db } from "./db";
import { showToast } from "../utils/toast";
import Config from "../utils/config";
import { AppVersion, getChangelog } from "../utils/version";
import { Period } from "../dialogs/buy-dialog/types";
import { FeatureKeys } from "../dialogs/feature-dialog";
import { Suspense } from "react";
import { ConfirmDialogProps } from "../dialogs/confirm";
import { getFormattedDate } from "@notesnook/common";
import { downloadUpdate } from "../utils/updater";
import { ThemeMetadata } from "@notesnook/themes-server";
import {
Color,
Profile,
Reminder,
Tag,
AuthenticatorType
} from "@notesnook/core";
import { createRoot } from "react-dom/client";
import { PasswordDialogProps } from "../dialogs/password-dialog";
import { LinkAttributes } from "@notesnook/editor/dist/extensions/link";
type DialogTypes = typeof Dialogs;
type DialogIds = keyof DialogTypes;
export type Perform<T = boolean> = (result: T) => void;
type RenderDialog<TId extends DialogIds, TReturnType> = (
dialog: DialogTypes[TId],
perform: (result: TReturnType) => void
) => JSX.Element;
let openDialogs: Partial<Record<DialogIds, boolean>> = {};
function showDialog<TId extends DialogIds, TReturnType>(
id: TId,
render: RenderDialog<TId, TReturnType>
): Promise<TReturnType> {
return new Promise((resolve) => {
if (openDialogs[id]) return false;
const container = document.createElement("div");
container.id = id;
const root = createRoot(container);
const perform = (result: TReturnType) => {
openDialogs[id] = false;
root.unmount();
container.remove();
resolve(result);
};
const PropDialog = () => render(Dialogs[id], perform);
root.render(
<Suspense fallback={<div />}>
<PropDialog />
</Suspense>
);
openDialogs[id] = true;
});
}
export function closeOpenedDialog() {
openDialogs = {};
const dialogs = document.querySelectorAll(
".ReactModalPortal,[data-react-modal-body-trap]"
);
dialogs.forEach((elem) => elem.remove());
}
export function showAddTagsDialog(noteIds: string[]) {
return showDialog("AddTagsDialog", (Dialog, perform) => (
<Dialog onClose={(res: any) => perform(res)} noteIds={noteIds} />
));
}
export function showCreateColorDialog() {
return showDialog<"CreateColorDialog", string | undefined>(
"CreateColorDialog",
(Dialog, perform) => (
<Dialog onClose={() => perform(undefined)} onDone={(id) => perform(id)} />
)
);
}
export function showAddNotebookDialog(parentId?: string) {
return showDialog("AddNotebookDialog", (Dialog, perform) => (
<Dialog
parentId={parentId}
onClose={() => {
perform(false);
}}
/>
));
}
export function showNoteLinkingDialog(attr?: LinkAttributes) {
return showDialog<"NoteLinkingDialog", LinkAttributes | undefined>(
"NoteLinkingDialog",
(Dialog, perform) => (
<Dialog
attributes={attr}
onDone={(link) => perform(link)}
onClose={() => perform(undefined)}
/>
)
);
}
export async function showEditNotebookDialog(notebookId: string) {
const notebook = await db.notebooks.notebook(notebookId);
if (!notebook) return;
return await showDialog("AddNotebookDialog", (Dialog, perform) => (
<Dialog
notebook={notebook}
edit={true}
onClose={() => {
perform(false);
}}
/>
));
}
export function showBuyDialog(plan?: Period, couponCode?: string) {
return showDialog("BuyDialog", (Dialog, perform) => (
<Dialog
plan={plan}
couponCode={couponCode}
onClose={() => perform(false)}
/>
));
}
export function confirm<TCheckId extends string>(
props: Omit<ConfirmDialogProps<TCheckId>, "onClose">
) {
return showDialog<"Confirm", false | Record<TCheckId, boolean>>(
"Confirm",
(Dialog, perform) => (
<Dialog {...props} onClose={(result) => perform(result)} />
)
);
}
export function showPromptDialog(props: {
title: string;
description?: string;
defaultValue?: string;
}) {
return showDialog<"Prompt", string | null>("Prompt", (Dialog, perform) => (
<Dialog
{...props}
onClose={() => perform(null)}
onSave={(text) => {
perform(text);
}}
/>
));
}
export function showEmailChangeDialog() {
return showDialog("EmailChangeDialog", (Dialog, perform) => (
<Dialog onClose={() => perform(null)} />
));
}
export function showError(title: string, message: string) {
return confirm({ title, message, positiveButtonText: "Okay" });
}
export function showMultiDeleteConfirmation(length: number) {
return confirm({
title: `Delete ${length} items?`,
message: `These items will be **kept in your Trash for ${
db.settings.getTrashCleanupInterval() || 7
} days** after which they will be permanently deleted.`,
positiveButtonText: "Yes",
negativeButtonText: "No"
});
}
export function showMultiPermanentDeleteConfirmation(length: number) {
return confirm({
title: `Permanently delete ${length} items?`,
message:
"These items will be **permanently deleted**. This is IRREVERSIBLE.",
positiveButtonText: "Yes",
negativeButtonText: "No"
});
}
export function showLogoutConfirmation() {
return confirm({
title: `Logout?`,
message:
"Logging out will delete all local data and reset the app. Make sure you have synced your data before logging out.",
positiveButtonText: "Yes",
negativeButtonText: "No"
});
}
export function showClearSessionsConfirmation() {
return confirm({
title: `Logout from other devices?`,
message:
"All other logged-in devices will be forced to logout stopping sync. Use with care lest you lose important notes.",
positiveButtonText: "Yes",
negativeButtonText: "No"
});
}
export function showAccountLoggedOutNotice(reason?: string) {
return confirm({
title: "You were logged out",
message: reason,
negativeButtonText: "Okay"
});
}
export function showAppUpdatedNotice(
version: AppVersion & { changelog?: string }
) {
return confirm({
title: `Welcome to v${version.formatted}`,
message: `## Changelog:
\`\`\`
${version.changelog || "No change log."}
\`\`\`
`,
positiveButtonText: `Continue`
});
}
export function showEmailVerificationDialog() {
return showDialog("EmailVerificationDialog", (Dialog, perform) => (
<Dialog onCancel={() => perform(false)} />
));
}
export function showMigrationDialog() {
return showDialog("MigrationDialog", (Dialog, perform) => (
<Dialog onClose={() => perform(false)} />
));
}
type LoadingDialogProps<T> = {
title: string;
message?: string;
subtitle: string;
action: () => T | Promise<T>;
};
export function showLoadingDialog<T>(dialogData: LoadingDialogProps<T>) {
const { title, message, subtitle, action } = dialogData;
return showDialog<"LoadingDialog", T | boolean>(
"LoadingDialog",
(Dialog, perform) => (
<Dialog
title={title}
description={subtitle}
message={message}
action={action}
onClose={(e) => perform(e as T | boolean)}
/>
)
);
}
type ProgressDialogProps = {
title: string;
subtitle: string;
action: (...args: never[]) => void;
};
export function showProgressDialog<T>(dialogData: ProgressDialogProps) {
const { title, subtitle, action } = dialogData;
return showDialog<"ProgressDialog", T>(
"ProgressDialog",
(Dialog, perform) => (
<Dialog
title={title}
subtitle={subtitle}
action={action}
onDone={(e: T) => perform(e)}
/>
)
);
}
export function showThemeDetails(theme: ThemeMetadata) {
return showDialog("ThemeDetailsDialog", (Dialog, perform) => (
<Dialog theme={theme} onClose={(res: boolean) => perform(res)} />
));
}
export function showMoveNoteDialog(noteIds: string[]) {
return showDialog("MoveDialog", (Dialog, perform) => (
<Dialog noteIds={noteIds} onClose={(res: boolean) => perform(res)} />
));
}
export function showPasswordDialog<
TInputId extends string,
TCheckId extends string
>(props: Omit<PasswordDialogProps<TInputId, TCheckId>, "onClose">) {
return showDialog<
"PasswordDialog",
string extends TCheckId ? boolean : false | Record<TCheckId, boolean>
>("PasswordDialog", (Dialog, perform) => (
<Dialog
{...props}
onClose={(result) =>
perform(
result as string extends TCheckId
? boolean
: false | Record<TCheckId, boolean>
)
}
/>
));
}
export function showBackupPasswordDialog(
validate: (outputs: {
password?: string;
key?: string;
}) => boolean | Promise<boolean>
) {
return showDialog("BackupPasswordDialog", (Dialog, perform) => (
<Dialog onClose={() => perform(false)} validate={validate} />
));
}
export function showRecoveryKeyDialog() {
return showDialog("RecoveryKeyDialog", (Dialog, perform) => (
<Dialog onDone={() => perform(true)} />
));
}
export function showCreateTagDialog() {
return showDialog("ItemDialog", (Dialog, perform) => (
<Dialog
title={"Create tag"}
subtitle={"You can create as many tags as you want."}
onClose={() => {
perform(false);
}}
onAction={async (title: string) => {
await db.tags.add({ title });
showToast("success", "Tag created!");
tagStore.refresh();
perform(true);
}}
/>
));
}
export function showEditTagDialog(tag: Tag) {
return showDialog("ItemDialog", (Dialog, perform) => (
<Dialog
title={"Edit tag"}
subtitle={`You are editing #${tag.title}.`}
defaultValue={tag.title}
onClose={() => perform(false)}
onAction={async (title: string) => {
await db.tags.add({ id: tag.id, title });
showToast("success", "Tag edited!");
await tagStore.refresh();
await useEditorStore.getState().refreshTags();
await noteStore.refresh();
await appStore.refreshNavItems();
perform(true);
}}
/>
));
}
export function showRenameColorDialog(color: Color) {
return showDialog("ItemDialog", (Dialog, perform) => (
<Dialog
title={"Rename color"}
subtitle={`You are renaming color ${color.title}.`}
defaultValue={color.title}
onClose={() => perform(false)}
onAction={async (title: string) => {
if (!title) return;
await db.colors.add({ id: color.id, title });
showToast("success", "Color renamed!");
appStore.refreshNavItems();
perform(true);
}}
/>
));
}
export function showFeatureDialog(featureName: FeatureKeys) {
return showDialog("FeatureDialog", (Dialog, perform) => (
<Dialog featureName={featureName} onClose={(res) => perform(res)} />
));
}
export function showReminderDialog(reminderKey: string) {
if (Config.get(reminderKey, false)) return;
return showDialog("ReminderDialog", (Dialog, perform) => (
<Dialog
reminderKey={reminderKey}
onClose={(res: boolean) => {
Config.set(reminderKey, true);
perform(res);
}}
/>
));
}
export function showReminderPreviewDialog(reminder: Reminder) {
return showDialog("ReminderPreviewDialog", (Dialog, perform) => (
<Dialog reminder={reminder} onClose={perform} />
));
}
export async function showAddReminderDialog(noteId?: string) {
const note = noteId ? await db.notes.note(noteId) : undefined;
return showDialog("AddReminderDialog", (Dialog, perform) => (
<Dialog onClose={(res: boolean) => perform(res)} note={note} />
));
}
export async function showEditReminderDialog(reminderId: string) {
const reminder = await db.reminders.reminder(reminderId);
if (!reminder) return null;
return showDialog("AddReminderDialog", (Dialog, perform) => (
<Dialog onClose={(res: boolean) => perform(res)} reminder={reminder} />
));
}
export function showAnnouncementDialog(announcement: any) {
return showDialog("AnnouncementDialog", (Dialog, perform) => (
<Dialog
announcement={announcement}
onClose={(res: boolean) => perform(res)}
/>
));
}
export function showIssueDialog() {
return showDialog("IssueDialog", (Dialog, perform) => (
<Dialog
onClose={(res: boolean) => {
perform(res);
}}
/>
));
}
export function showMultifactorDialog(primaryMethod?: AuthenticatorType) {
return showDialog("MultifactorDialog", (Dialog, perform) => (
<Dialog onClose={(res) => perform(res)} primaryMethod={primaryMethod} />
));
}
export function show2FARecoveryCodesDialog(primaryMethod: AuthenticatorType) {
return showDialog("RecoveryCodesDialog", (Dialog, perform) => (
<Dialog onClose={(res) => perform(res)} primaryMethod={primaryMethod} />
));
}
export function showAttachmentsDialog() {
return showDialog("AttachmentsDialog", (Dialog, perform) => (
<Dialog onClose={(res: boolean) => perform(res)} />
));
}
export function showEditProfilePictureDialog(profile?: Profile) {
return showDialog("EditProfilePictureDialog", (Dialog, perform) => (
<Dialog onClose={(res: boolean) => perform(res)} profile={profile} />
));
}
export function showImagePickerDialog(images: File[]): Promise<false | File[]> {
if (images.length <= 0) return Promise.resolve(false);
return showDialog("ImagePickerDialog", (Dialog, perform) => (
<Dialog onClose={(res) => perform(res)} images={images} />
));
}
export function showSettings() {
return showDialog("SettingsDialog", (Dialog, perform) => (
<Dialog onClose={(res: boolean) => perform(res)} />
));
}
export function showOnboardingDialog(type?: string) {
if (!type) return;
return showDialog("OnboardingDialog", (Dialog, perform) => (
<Dialog type={type} onClose={(res: boolean) => perform(res)} />
));
}
export async function showInvalidSystemTimeDialog({
serverTime,
localTime
}: {
serverTime: number;
localTime: number;
}) {
const result = await confirm({
title: "Your system clock is out of sync",
subtitle:
"Please correct your system date & time and reload the app to avoid syncing issues.",
message: `Server time: ${getFormattedDate(serverTime)}
Local time: ${getFormattedDate(localTime)}
Please sync your system time with [https://time.is](https://time.is).`,
positiveButtonText: "Reload app"
});
if (result) window.location.reload();
}
export async function showUpdateAvailableNotice({
version
}: {
version: string;
}) {
const changelog = await getChangelog(version);
return showUpdateDialog({
title: `New version available`,
subtitle: `v${version} is available for download`,
changelog,
action: { text: `Update now`, onClick: () => downloadUpdate() }
});
}
type UpdateDialogProps = {
title: string;
subtitle: string;
changelog: string;
action: {
text: string;
onClick: () => void;
};
};
async function showUpdateDialog({
title,
subtitle,
changelog,
action
}: UpdateDialogProps) {
const result = await confirm({
title,
subtitle,
message: changelog,
width: 500,
positiveButtonText: action.text
});
if (result && action.onClick) action.onClick();
}

View File

@@ -1,88 +0,0 @@
/*
This file is part of the Notesnook project (https://notesnook.com/)
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from "react";
import { createRoot } from "react-dom/client";
export interface BaseDialogProps<T = unknown> {
onClose: (result: T) => void;
}
class _DialogManager {
private openedDialogs: Set<React.JSXElementConstructor<any>> = new Set();
open<
Props extends BaseDialogProps<any>,
Result extends Props extends BaseDialogProps<infer T> ? T : unknown
>(
component: React.ComponentType<Props>,
props: Omit<Props, "onClose">
): Promise<Result | false> {
if (this.openedDialogs.has(component)) return Promise.resolve(false);
const container = document.createElement("div");
const root = createRoot(container);
const close = () => {
this.openedDialogs.delete(component);
root.unmount();
container.remove();
};
const Dialog = component as React.FunctionComponent<
Omit<Props, "onClose"> & {
onClose: (result: any) => void;
}
>;
this.openedDialogs.add(component);
return new Promise<Result>((resolve, reject) =>
root.render(
<Dialog
{...props}
onClose={(result: Result) => {
try {
close();
resolve(result);
} catch (e) {
reject(e);
}
}}
/>
)
);
}
closeAll() {
this.openedDialogs.clear();
const dialogs = document.querySelectorAll(
".ReactModalPortal,[data-react-modal-body-trap]"
);
dialogs.forEach((elem) => elem.remove());
}
register<Props extends BaseDialogProps<any>>(
component: React.ComponentType<Props>
) {
return {
show: (props: Omit<Props, "onClose">) => this.open(component, props)
};
}
}
export const DialogManager = new _DialogManager();

View File

@@ -32,7 +32,7 @@ import {
import Vault from "./vault";
import { ExportStream } from "../utils/streams/export-stream";
import { showToast } from "../utils/toast";
import { ConfirmDialog } from "../dialogs/confirm";
import { confirm } from "./dialog-controller";
export async function exportToPDF(
title: string,
@@ -100,26 +100,17 @@ export async function exportNotes(
};
}
});
if (result instanceof Error) {
ConfirmDialog.show({
title: `Export failed`,
message: result.stack || result.message,
positiveButtonText: "Okay"
});
return false;
} else {
ConfirmDialog.show({
title: `Exported ${result.count} notes`,
message:
result.errors.length > 0
? `Export completed with ${result.errors.length} errors:
confirm({
title: `Exported ${result.count} notes`,
message:
result.errors.length > 0
? `Export completed with ${result.errors.length} errors:
${result.errors.map((e, i) => `${i + 1}. ${e.message}`).join("\n")}`
: "Export completed with 0 errors.",
positiveButtonText: "Okay"
});
return true;
}
: "Export completed with 0 errors.",
positiveButtonText: "Okay"
});
return true;
}
const FORMAT_TO_EXT = {

View File

@@ -17,6 +17,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import {
showBackupPasswordDialog,
showFeatureDialog,
showPasswordDialog,
showReminderDialog
} from "./dialog-controller";
import Config from "../utils/config";
import { hashNavigate, getCurrentHash } from "../navigation";
import { db } from "./db";
@@ -32,20 +38,278 @@ import { TaskManager } from "./task-manager";
import { EVENTS } from "@notesnook/core/dist/common";
import { createWritableStream } from "./desktop-bridge";
import { createZipStream } from "../utils/streams/zip-stream";
import { FeatureDialog, FeatureKeys } from "../dialogs/feature-dialog";
import { FeatureKeys } from "../dialogs/feature-dialog";
import { ZipEntry, createUnzipIterator } from "../utils/streams/unzip-stream";
import { User } from "@notesnook/core";
import { LegacyBackupFile } from "@notesnook/core";
import { useEditorStore } from "../stores/editor-store";
import { formatDate } from "@notesnook/core/dist/utils/date";
import { showPasswordDialog } from "../dialogs/password-dialog";
import { BackupPasswordDialog } from "../dialogs/backup-password-dialog";
import { ReminderDialog } from "../dialogs/reminder-dialog";
import {
pipeline,
AutoModel,
env,
Tensor,
mean_pooling,
FeatureExtractionPipeline
} from "@xenova/transformers";
import { toChunks } from "@notesnook/core/dist/utils/array";
env.allowLocalModels = true;
console.log(env);
const text = `I am generally not in favor of huge feature packed releases instead preferring small releases without one or two features at most. v3 is a special case in that the sheer amount of changes required to migrate from our old key value database to SQLite forced us to release all of these updates together.
Migrating to SQLite
Initially, as all plans go, our only goal was to migrate to SQLite as quickly and with as few changes as possible. Unfortunately, that plan died in its infancy. Our old legacy database was not designed to handle tens of thousands of notes or gigabytes of data — something we quickly realized after some users with over 100K notes approached us with significant performance issues. While it "worked", it was neither efficient nor particularly safe.
In August 2023, we began slowly migrating the Notesnook Core to SQLite. While migrating we quickly realized we'd need TypeScript if this was ever going to work because Kysely (the underlying query builder we used) heavily relied on types being there. So from the very first day we were doing 2 things: migrating the database to SQLite, and migrating the codebase to TypeScript.
I won't bore you with too many technical details but we had a few primary goals behind all this upheaval:
The clients should perform predictably regardless of how much data you have.
The clients should use as less RAM as possible to work in extremely constrained enviroments (e.g. iOS limits all Share Extensions to around 50 MB before crashing).
With v3 we have acheived both of these goals.
Fixing the Sync
Sync has notoriously been one of the least stable parts of Notesnook. From the beginning, we opted for a decentralized syncing system where each client could independently sync items without depending on a central server. This had a few drawbacks:
Since each client was independent, it was a nightmare to debug why something wasn't syncing.
In order to be efficient, we detected changed items based on their modified timestamp, but this forced us to juggle with the various inconsistencies of time on different devices.
Building everything on top of timestamps meant resumability during sync could never be stable.
In short, our old sync logic heavily depended on time to be the exact same (down to the last millisecond) for things to work. As you can imagine, this didn't work out that well.
While migrating everything to SQLite, we greatly simplified the sync logic opting for a centralized system this time. This allowed us to completely get rid of all the time juggling resolving all the edge cases in our previous logic.
As a result, in v3 you'll notice a bug free sync that "just works" regardless of where you are, how many devices you are on, the time difference between them etc.
Features, Features
In every new release, it is always a struggle to decide which features to add and which features to leave behind for later. v3 was no different because ultimately each feature you add pushes the deadline further and further away. Even then, v3 is one of our biggest releases ever.
Note linking
The crown jewel of v3! Yes, finally, you can link 2 notes together and even link directly to a specific block inside a note.
We have also added controls to quickly see which notes you have linked to, and which notes link to a particular note.
To keep things simple, a note link is no different than a normal hyperlink except that clicking on it will take you to the note instead of an external page. This also means that when you export your notes, your note links are automatically converted into hyperlinks that directly open the linked Markdown or HTML files of the notes. This is something no other app does instead keeping the links in their proprietary format making them essentially useless.
Tabs
The only reason we added tabs was to allow quick navigation to/from a note on clicking a note link. You can, of course, use tabs without ever linking a note.
Notesnook is one of the few note taking apps (besides Obsidian & OneNote) that has a full fledged tab experience. With v3, we are slowly upgrading Notesnook to become a power user's tool while keeping things just as simple as before.
Nested notebooks
At rest encryption
Thanks to SQLite, at rest encryption is now a thing on all platforms. The encryption key is randomly generated on database creation without requiring any user intervention. In other words, it "just works" keeping your notes secure even if your device is compromised. Which brings me to...
App lock
App lock is an enhancement on at rest encryption. When you enable app lock, it further encrypts your database encryption key with your app lock pin (or security key) so it's not just an "overlay". If you forget your app lock pin, the only way into the app is to reset & clear the database and start over.
At Notesnook, we take your security & privacy very seriously.
Export attachments with notes
Exports got a lot of love in v3 with things like automatic downloading & linking of attachments, organization of note files based on your notebook structure, and resolution of internal note links to actual HTML/MD files.
User profile
Custom colors for note organization
Fixed colors were nice but not nicer than custom colors.
Customizable side bar
You can now drag/drop and reorganize how things in your side bar looks including hiding things that you don't use. It can be as simple or as complex as you want.
Callouts
Beta release channels
Nested notebooks/topics
Note linking
Tabs
Table of Contents
Customizable/sortable sidebar
User profile
Custom colors
Yearly reminders
Callouts in editor
Migration to SQLite
New sync system
At rest encryption
app lock
export attachments with notes.`;
const average = (array: number[]) =>
array.reduce((a, b) => a + b) / array.length;
function createTensorWithBatchSize(opt: [number, number]) {
const size = opt.reduce((n, i) => n * i, 1);
return new Tensor("int64", new BigInt64Array(size).fill(BigInt(1)), opt);
}
function createBatch(batchSize: number, sequenceLength: number) {
const tensor = createTensorWithBatchSize([batchSize, sequenceLength]);
return {
input_ids: tensor,
attention_mask: tensor
};
}
function chunkify(tokens: string[], chunkSize: number, overlap: number) {
const chunks = [];
const totalParts = Math.ceil(tokens.length / chunkSize);
for (let i = 0; i < totalParts; ++i) {
const start = i === 0 ? 0 : i * chunkSize - i * overlap;
const end = start + chunkSize;
chunks.push(tokens.slice(start, end));
}
return chunks;
}
/**
*
* Helper function for padding values of an object, which are each arrays.
* NOTE: No additional checks are made here for validity of arguments.
* @param {Record<string, any[]>} item The input object.
* @param {number} length The length to pad to.
* @param {(key: string) => any} value_fn Determine the value to fill the array, based on its key.
* @param {string} side Which side to pad the array.
* @private
*/
function padHelper(
item: Record<string, any[]>,
length: number,
value_fn: (key: string) => any,
side: string
) {
for (const key of Object.keys(item)) {
const diff = length - item[key].length;
const value = value_fn(key);
const padData = new Array(diff).fill(value);
item[key] =
side === "right"
? [...item[key], ...padData]
: [...padData, ...item[key]];
}
}
function tokenizeInput(
pipeline: FeatureExtractionPipeline,
options: { max_length: number }
) {
const { tokenizer } = pipeline;
const { max_length } = options;
const encoded = tokenizer._encode_text(text) ?? [];
const encodedTokens = chunkify(encoded, max_length - 12, 20).map((chunk) => {
const { tokens, token_type_ids } = tokenizer.post_processor._call(
chunk,
[],
{ add_special_tokens: true }
);
const input_ids = tokenizer.model.convert_tokens_to_ids(tokens);
return {
input_ids,
attention_mask: new Array(input_ids.length).fill(1),
token_type_ids: token_type_ids || []
};
});
for (let i = 0; i < encodedTokens.length; ++i) {
if (encodedTokens[i].input_ids.length === max_length) {
continue;
} else if (encodedTokens[i].input_ids.length > max_length) {
throw new Error("Truncation is not allowed.");
} else {
// t.length < max_length
// possibly pad
padHelper(
encodedTokens[i],
max_length,
(key) => (key === "input_ids" ? tokenizer.pad_token_id : 0),
tokenizer.padding_side
);
}
}
const dims = [encodedTokens.length, encodedTokens[0].input_ids.length];
const input: Record<string, Tensor> = {};
for (const key of Object.keys(encodedTokens[0])) {
input[key] = new Tensor(
"int64",
BigInt64Array.from(encodedTokens.flatMap((x) => x[key]).map(BigInt)),
dims
);
}
return input;
}
async function generateEmbeddings(
pipeline: FeatureExtractionPipeline,
input: Record<string, Tensor>
) {
const { tokenizer, model } = pipeline;
const outputs = await model._call(input);
let result =
outputs.last_hidden_state ?? outputs.logits ?? outputs.token_embeddings;
const pooling: "mean" | "cls" = tokenizer._tokenizer_config.cls_token
? "cls"
: "mean";
if (pooling === "mean") {
result = mean_pooling(result, input.attention_mask);
} else if (pooling === "cls") {
result = result.slice(null, 0);
}
return result;
}
export const CREATE_BUTTON_MAP = {
notes: {
title: "Add a note",
onClick: () => useEditorStore.getState().newSession()
onClick: async () => {
const models = [
// ["Xenova/jina-embeddings-v2-small-en", 87]
["Snowflake/snowflake-arctic-embed-s", 41],
// ["Snowflake/snowflake-arctic-embed-m", 20],
["Snowflake/snowflake-arctic-embed-xs", 62],
// ["Xenova/GIST-small-Embedding-v0", 57],
["Xenova/GIST-all-MiniLM-L6-v2", 88],
// ["Xenova/NoInstruct-small-Embedding-v0", 40],
["TaylorAI/bge-micro-v2", 100]
// ["TaylorAI/gte-tiny", 88],
// ["Xenova/gte-small", 63]
] as const;
// env.backends.onnx.wasm.proxy = false;
// env.backends.onnx.webgpu.profiling = {
// mode: "default"
// };
// env.webgpu.profiling = {
// mode: "default"
// };
console.log(env);
for (const provider of ["webgpu"] as const) {
if (provider === "webgpu") env.backends.onnx.wasm.proxy = false;
else env.backends.onnx.wasm.proxy = true;
for (const [modelId, rank] of models) {
console.log("loading model", modelId);
const extractor = await pipeline("feature-extraction", modelId, {
// progress_callback: console.log,
device: provider,
dtype: "fp32",
cache_dir: "/models",
local_files_only: true
// session_options: {
// // enableGraphCapture: true
// }
});
const input = tokenizeInput(extractor, { max_length: 512 });
// console.time(`[warming up] ${rank}. ${modelId} (${provider})`);
for (let i = 0; i < 3; ++i) {
console.time(`${rank}. ${modelId} (${provider})`);
await generateEmbeddings(extractor, input);
console.timeEnd(`${rank}. ${modelId} (${provider})`);
}
// console.timeEnd(`[warming up] ${rank}. ${modelId} (${provider})`);
// const timings: number[] = [];
// for (let i = 0; i < 10; ++i) {
// const now = performance.now();
// await generateEmbeddings(extractor, input);
// timings.push(performance.now() - now);
// }
// console.log(
// `[bench] ${rank}. ${modelId} (${provider})`,
// `avg: ${average(timings)}ms`,
// `min: ${Math.min(...timings)}ms`,
// `max: ${Math.max(...timings)}ms`
// );
}
}
} // useEditorStore.getState().newSession()
},
notebooks: {
title: "Create a notebook",
@@ -67,7 +331,7 @@ export async function introduceFeatures() {
const features: FeatureKeys[] = [];
for (const feature of features) {
if (!Config.get(`feature:${feature}`)) {
await FeatureDialog.show({ featureName: feature });
await showFeatureDialog(feature);
}
}
}
@@ -170,12 +434,10 @@ export async function restoreBackupFile(backupFile: File) {
const backup = JSON.parse(await readFile(backupFile));
if (backup.data.iv && backup.data.salt) {
await BackupPasswordDialog.show({
validate: async ({ password, key }) => {
if (!password && !key) return false;
const error = await restoreWithProgress(backup, password, key);
return !error;
}
await showBackupPasswordDialog(async ({ password, key }) => {
if (!password && !key) return false;
const error = await restoreWithProgress(backup, password, key);
return !error;
});
} else {
await restoreWithProgress(backup);
@@ -211,15 +473,15 @@ export async function restoreBackupFile(backupFile: File) {
const backup = JSON.parse(await entry.text());
if (backup.encrypted) {
if (!cachedPassword && !cachedKey) {
const result = await BackupPasswordDialog.show({
validate: async ({ password, key }) => {
const result = await showBackupPasswordDialog(
async ({ password, key }) => {
if (!password && !key) return false;
await db.backup?.import(backup, password, key);
cachedPassword = password;
cachedKey = key;
return true;
}
});
);
if (!result) break;
} else await db.backup?.import(backup, cachedPassword, cachedKey);
} else {
@@ -317,9 +579,9 @@ export async function showUpgradeReminderDialogs() {
const isTrial = user.subscription?.type === SUBSCRIPTION_STATUS.TRIAL;
const isBasic = user.subscription?.type === SUBSCRIPTION_STATUS.BASIC;
if (isBasic && consumed >= 100) {
await ReminderDialog.show({ reminderKey: "trialexpired" });
await showReminderDialog("trialexpired");
} else if (isTrial && consumed >= 75) {
await ReminderDialog.show({ reminderKey: "trialexpiring" });
await showReminderDialog("trialexpiring");
}
}

View File

@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { confirm, showMultiDeleteConfirmation } from "./dialog-controller";
import { store as noteStore } from "../stores/note-store";
import { store as notebookStore } from "../stores/notebook-store";
import { store as attachmentStore } from "../stores/attachment-store";
@@ -26,7 +27,6 @@ import { showToast } from "../utils/toast";
import Vault from "./vault";
import { TaskManager } from "./task-manager";
import { pluralize } from "@notesnook/common";
import { ConfirmDialog, showMultiDeleteConfirmation } from "../dialogs/confirm";
async function moveNotesToTrash(ids: string[], confirm = true) {
if (confirm && !(await showMultiDeleteConfirmation(ids.length))) return;
@@ -79,7 +79,7 @@ async function moveNotebooksToTrash(ids: string[]) {
async function deleteAttachments(ids: string[]) {
if (
!(await ConfirmDialog.show({
!(await confirm({
title: "Are you sure?",
message:
"Are you sure you want to permanently delete these attachments? This action is IRREVERSIBLE.",

View File

@@ -23,12 +23,12 @@ import { db } from "./db";
import { store as appStore } from "../stores/app-store";
import { Backup, User, Email, Warn, Icon } from "../components/icons";
import dayjs from "dayjs";
import { showBuyDialog, showRecoveryKeyDialog } from "./dialog-controller";
import { hardNavigate, hashNavigate } from "../navigation";
import { isUserPremium } from "../hooks/use-is-user-premium";
import { showToast } from "../utils/toast";
import { TaskScheduler } from "../utils/task-scheduler";
import { BuyDialog } from "../dialogs/buy-dialog";
import { RecoveryKeyDialog } from "../dialogs/recovery-key-dialog";
export type NoticeType = "autoBackupsOff" | "login" | "email" | "recoverykey";
@@ -119,7 +119,7 @@ export const NoticesData: Record<NoticeType, NoticeData> = {
key: "autoBackupsOff",
title: "Automatic backups disabled",
subtitle: "Please upgrade to Pro to enable automatic backups.",
action: () => BuyDialog.show({}),
action: () => showBuyDialog(),
dismissable: true,
icon: Backup
},
@@ -143,7 +143,7 @@ export const NoticesData: Record<NoticeType, NoticeData> = {
subtitle: "Keep your recovery key safe",
dismissable: true,
action: async () => {
if (await verifyAccount()) await RecoveryKeyDialog.show({});
if (await verifyAccount()) await showRecoveryKeyDialog();
},
icon: Warn
}

View File

@@ -213,7 +213,7 @@ export class AccessHandlePoolVFS extends VFS.Base {
}
async delete() {
for await (const [name] of await this.#directoryHandle.entries()) {
for await (const [name] of this.#directoryHandle) {
await this.#directoryHandle.removeEntry(name, { recursive: true });
}
}
@@ -300,7 +300,7 @@ export class AccessHandlePoolVFS extends VFS.Base {
async #acquireAccessHandles() {
// Enumerate all the files in the directory.
const files = [];
for await (const [name, handle] of await this.#directoryHandle.entries()) {
for await (const [name, handle] of this.#directoryHandle) {
if (handle.kind === "file") {
files.push([name, handle]);
}

View File

@@ -1,7 +1,7 @@
/* eslint-disable header/header */
// Copyright 2022 Roy T. Hashimoto. All Rights Reserved.
import * as VFS from "./VFS.js";
import { WebLocksShared as WebLocks } from "./WebLocks.js";
import { WebLocksExclusive as WebLocks } from "./WebLocks.js";
import { IDBContext } from "./IDBContext.js";
const SECTOR_SIZE = 512;

View File

@@ -32,7 +32,6 @@ import Worker from "./sqlite.worker.desktop.ts?worker";
import type { SQLiteWorker } from "./sqlite.worker.desktop";
import { wrap, Remote } from "comlink";
import { Mutex } from "async-mutex";
import { DialectOptions } from ".";
class SqliteDriver implements Driver {
connection?: DatabaseConnection;
@@ -101,11 +100,11 @@ class SqliteWorkerConnection implements DatabaseConnection {
}
}
export const createDialect = (options: DialectOptions): Dialect => {
export const createDialect = (name: string, _encrypted: boolean): Dialect => {
return {
createDriver: () =>
new SqliteDriver({
name: options.name
name
}),
createAdapter: () => new SqliteAdapter(),
createIntrospector: (db) => new SqliteIntrospector(db),

View File

@@ -23,10 +23,8 @@ import {
SqliteIntrospector,
Dialect
} from "kysely";
import {
WaSqliteWorkerMultipleTabDriver,
WaSqliteWorkerSingleTabDriver
} from "./wa-sqlite-kysely-driver";
import { WaSqliteWorkerDriver } from "./wa-sqlite-kysely-driver";
import { isFeatureSupported } from "../../utils/feature-check";
declare module "kysely" {
interface Driver {
@@ -34,29 +32,19 @@ declare module "kysely" {
}
}
export type DialectOptions = {
name: string;
encrypted: boolean;
async: boolean;
multiTab: boolean;
init?: () => Promise<void>;
};
export const createDialect = (options: DialectOptions): Dialect => {
const { async, encrypted, multiTab, name, init } = options;
export const createDialect = (
name: string,
encrypted: boolean,
init?: () => Promise<void>
): Dialect => {
return {
createDriver: () =>
multiTab
? new WaSqliteWorkerMultipleTabDriver({
async,
dbName: name,
encrypted,
init
})
: new WaSqliteWorkerSingleTabDriver({
async,
dbName: name,
encrypted
}),
new WaSqliteWorkerDriver({
async: !isFeatureSupported("opfs"),
dbName: name,
encrypted,
init
}),
createAdapter: () => new SqliteAdapter(),
createIntrospector: (db) => new SqliteIntrospector(db),
createQueryCompiler: () => new SqliteQueryCompiler()

View File

@@ -182,9 +182,7 @@ export class SharedService<T extends object> extends EventTarget {
}
#sendPortToClient(message: any, port: MessagePort) {
if (!sharedWorker)
throw new Error("Shared worker is not supported in this environment.");
sharedWorker.port.postMessage(message, [port]);
sharedWorker?.port.postMessage(message, [port]);
}
async #getClientId() {

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import type { SQLiteAPI, SQLiteCompatibleType } from "./sqlite-types";
import { Factory, SQLITE_ROW, SQLiteError } from "./sqlite-api";
import { expose, transfer } from "comlink";
import { transfer } from "comlink";
import type { RunMode } from "./type";
import { QueryResult } from "kysely";
import { DatabaseSource } from "./sqlite-export";
@@ -32,12 +32,6 @@ type PreparedStatement = {
columns: string[];
};
type SQLiteOptions = {
async: boolean;
url?: string;
encrypted: boolean;
};
class _SQLiteWorker {
sqlite!: SQLiteAPI;
db: number | undefined = undefined;
@@ -45,22 +39,21 @@ class _SQLiteWorker {
initialized = false;
preparedStatements: Map<string, PreparedStatement> = new Map();
retryCounter: Record<string, number> = {};
encrypted = false;
name = "";
async = false;
constructor(
private readonly dbName: string,
private readonly encrypted: boolean
) {
console.log("new sqlite worker", dbName, encrypted);
}
async open(name: string, options: SQLiteOptions) {
async open(async: boolean, url?: string) {
if (this.db) {
console.error("Database is already initialized", this.db);
return;
}
this.encrypted = options.encrypted;
this.name = name;
this.async = options.async;
const option = options.url ? { locateFile: () => options.url } : {};
const sqliteModule = options.async
const option = url ? { locateFile: () => url } : {};
const sqliteModule = async
? await import("./wa-sqlite-async").then(
({ default: SQLiteAsyncESMFactory }) => SQLiteAsyncESMFactory(option)
)
@@ -68,11 +61,11 @@ class _SQLiteWorker {
SQLiteSyncESMFactory(option)
);
this.sqlite = Factory(sqliteModule);
this.vfs = await this.getVFS(name, options.async);
this.vfs = await this.getVFS(this.dbName, async);
this.sqlite.vfs_register(this.vfs, false);
this.db = await this.sqlite.open_v2(
name,
this.dbName,
undefined,
`multipleciphers-${this.vfs.name}`
);
@@ -170,7 +163,7 @@ class _SQLiteWorker {
if (this.encrypted && !sql.startsWith("PRAGMA key")) {
await this.waitForDatabase();
}
if (!this.db) throw new Error("Database is not opened.");
if (!this.db) throw new Error("No database is not opened.");
const rows = (await this.exec(sql, mode, parameters)) as R[];
if (mode === "query") return { rows };
@@ -201,16 +194,16 @@ class _SQLiteWorker {
this.initialized = false;
}
async export() {
const vfs = await this.getVFS(this.name, this.async);
const stream = new ReadableStream(new DatabaseSource(vfs, this.name));
async export(dbName: string, async: boolean) {
const vfs = await this.getVFS(dbName, async);
const stream = new ReadableStream(new DatabaseSource(vfs, dbName));
return transfer(stream, [stream]);
}
async delete() {
async delete(dbName: string, async: boolean) {
await this.close();
if (this.vfs) await this.vfs.delete();
else await (await this.getVFS(this.name, this.async)).delete();
else await (await this.getVFS(dbName, async)).delete();
}
async getVFS(dbName: string, async: boolean) {
@@ -229,7 +222,7 @@ class _SQLiteWorker {
async initialize() {
self.dispatchEvent(
new MessageEvent("message", {
data: { type: "databaseInitialized", dbName: this.name }
data: { type: "databaseInitialized", dbName: this.dbName }
})
);
console.log("Database initialized", this.db);
@@ -244,7 +237,7 @@ class _SQLiteWorker {
self.addEventListener("message", (ev) => {
if (
ev.data.type === "databaseInitialized" &&
ev.data.dbName === this.name
ev.data.dbName === this.dbName
)
resolve(true);
})
@@ -258,17 +251,11 @@ export type SQLiteWorker = typeof _SQLiteWorker.prototype;
addEventListener("message", async (event) => {
if (!event.data.type) {
const worker = new _SQLiteWorker();
await worker.open(event.data.dbName, {
async: event.data.async,
encrypted: event.data.encrypted,
url: event.data.uri
});
const worker = new _SQLiteWorker(event.data.dbName, event.data.encrypted);
await worker.open(event.data.async, event.data.uri);
const providerPort = createSharedServicePort(worker);
postMessage(null, [providerPort]);
self.addEventListener("beforeunload", () => worker.close());
}
});
const worker = new _SQLiteWorker();
expose(worker);

View File

@@ -7,139 +7,140 @@ function(moduleArg = {}) {
var d=moduleArg,aa,ba;d.ready=new Promise((a,b)=>{aa=a;ba=b});var ca=Object.assign({},d),da="./this.program",ea=(a,b)=>{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,g="",ia;
if(fa||ha)ha?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptDir&&(g=_scriptDir),0!==g.indexOf("blob:")?g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):g="",ha&&(ia=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ja=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,ca);ca=null;d.thisProgram&&(da=d.thisProgram);
d.quit&&(ea=d.quit);var la;d.wasmBinary&&(la=d.wasmBinary);"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,v=!1,na,w,x,z,oa,A,C,pa,qa;function ra(){var a=ma.buffer;d.HEAP8=w=new Int8Array(a);d.HEAP16=z=new Int16Array(a);d.HEAPU8=x=new Uint8Array(a);d.HEAPU16=oa=new Uint16Array(a);d.HEAP32=A=new Int32Array(a);d.HEAPU32=C=new Uint32Array(a);d.HEAPF32=pa=new Float32Array(a);d.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[];
function wa(){var a=d.preRun.shift();sa.unshift(a)}var xa=0,ya=null,za=null;function u(a){if(d.onAbort)d.onAbort(a);a="Aborted("+a+")";r(a);v=!0;na=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Aa=a=>a.startsWith("data:application/octet-stream;base64,"),Ba;if(d.locateFile){if(Ba="wa-sqlite-async.wasm",!Aa(Ba)){var Ca=Ba;Ba=d.locateFile?d.locateFile(Ca,g):g+Ca}}else Ba=(new URL("wa-sqlite-async.wasm",import.meta.url)).href;
function Da(a){if(a==Ba&&la)return new Uint8Array(la);if(ia)return ia(a);throw"both async and sync fetching of the wasm failed";}function Ea(a){return la||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Da(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Da(a))}
function Fa(a,b,c){return Ea(a).then(e=>WebAssembly.instantiate(e,b)).then(e=>e).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);u(e)})}function Ga(a,b){var c=Ba;return la||"function"!=typeof WebAssembly.instantiateStreaming||Aa(c)||"function"!=typeof fetch?Fa(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Fa(c,a,b)}))}var D,F;
function Ha(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ia=a=>{for(;0<a.length;)a.shift()(d)};function H(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return w[a>>0];case "i8":return w[a>>0];case "i16":return z[a>>1];case "i32":return A[a>>2];case "i64":u("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return C[a>>2];default:u(`invalid type for getValue: ${b}`)}}
var Ja=d.noExitRuntime||!0;function J(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":w[a>>0]=b;break;case "i8":w[a>>0]=b;break;case "i16":z[a>>1]=b;break;case "i32":A[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":C[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}}
var Ka="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&Ka)return Ka.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var h=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|h);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|h<<6|k:(f&7)<<18|h<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},
La=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},M=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=La(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Ma=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Na=a=>{if("/"===
a)return"/";a=M(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Oa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);u("initRandomDevice")},Pa=a=>(Pa=Oa())(a);
function Qa(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=La(a.split("/").filter(e=>!!e),!b).join("/");return(b?"/":"")+a||"."}
var Ra=[],Sa=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},Ta=(a,b,c,e)=>{if(!(0<e))return 0;var f=c;e=c+e-1;for(var h=0;h<a.length;++h){var k=a.charCodeAt(h);if(55296<=k&&57343>=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;b[c++]=240|k>>18;b[c++]=128|k>>
12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f};function Ua(a,b,c){c=Array(0<c?c:Sa(a)+1);a=Ta(a,c,0,c.length);b&&(c.length=a);return c}var Va=[];function Wa(a,b){Va[a]={input:[],Pf:[],$f:b};Xa(a,Ya)}
var Ya={open(a){var b=Va[a.node.cg];if(!b)throw new N(43);a.Qf=b;a.seekable=!1},close(a){a.Qf.$f.fg(a.Qf)},fg(a){a.Qf.$f.fg(a.Qf)},read(a,b,c,e){if(!a.Qf||!a.Qf.$f.ug)throw new N(60);for(var f=0,h=0;h<e;h++){try{var k=a.Qf.$f.ug(a.Qf)}catch(n){throw new N(29);}if(void 0===k&&0===f)throw new N(6);if(null===k||void 0===k)break;f++;b[c+h]=k}f&&(a.node.timestamp=Date.now());return f},write(a,b,c,e){if(!a.Qf||!a.Qf.$f.og)throw new N(60);try{for(var f=0;f<e;f++)a.Qf.$f.og(a.Qf,b[c+f])}catch(h){throw new N(29);
}e&&(a.node.timestamp=Date.now());return f}},Za={ug(){a:{if(!Ra.length){var a=null;"undefined"!=typeof window&&"function"==typeof window.prompt?(a=window.prompt("Input: "),null!==a&&(a+="\n")):"function"==typeof readline&&(a=readline(),null!==a&&(a+="\n"));if(!a){a=null;break a}Ra=Ua(a,!0)}a=Ra.shift()}return a},og(a,b){null===b||10===b?(ja(K(a.Pf,0)),a.Pf=[]):0!=b&&a.Pf.push(b)},fg(a){a.Pf&&0<a.Pf.length&&(ja(K(a.Pf,0)),a.Pf=[])},Vg(){return{Rg:25856,Tg:5,Qg:191,Sg:35387,Pg:[3,28,127,21,4,0,1,0,
17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Wg(){return 0},Xg(){return[24,80]}},$a={og(a,b){null===b||10===b?(r(K(a.Pf,0)),a.Pf=[]):0!=b&&a.Pf.push(b)},fg(a){a.Pf&&0<a.Pf.length&&(r(K(a.Pf,0)),a.Pf=[])}};function ab(a,b){var c=a.Lf?a.Lf.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Lf,a.Lf=new Uint8Array(b),0<a.Nf&&a.Lf.set(c.subarray(0,a.Nf),0))}
var O={Tf:null,Sf(){return O.createNode(null,"/",16895,0)},createNode(a,b,c,e){if(24576===(c&61440)||4096===(c&61440))throw new N(63);O.Tf||(O.Tf={dir:{node:{Rf:O.Jf.Rf,Of:O.Jf.Of,ag:O.Jf.ag,gg:O.Jf.gg,yg:O.Jf.yg,lg:O.Jf.lg,jg:O.Jf.jg,xg:O.Jf.xg,kg:O.Jf.kg},stream:{Xf:O.Kf.Xf}},file:{node:{Rf:O.Jf.Rf,Of:O.Jf.Of},stream:{Xf:O.Kf.Xf,read:O.Kf.read,write:O.Kf.write,rg:O.Kf.rg,hg:O.Kf.hg,ig:O.Kf.ig}},link:{node:{Rf:O.Jf.Rf,Of:O.Jf.Of,dg:O.Jf.dg},stream:{}},sg:{node:{Rf:O.Jf.Rf,Of:O.Jf.Of},stream:bb}});
c=cb(a,b,c,e);P(c.mode)?(c.Jf=O.Tf.dir.node,c.Kf=O.Tf.dir.stream,c.Lf={}):32768===(c.mode&61440)?(c.Jf=O.Tf.file.node,c.Kf=O.Tf.file.stream,c.Nf=0,c.Lf=null):40960===(c.mode&61440)?(c.Jf=O.Tf.link.node,c.Kf=O.Tf.link.stream):8192===(c.mode&61440)&&(c.Jf=O.Tf.sg.node,c.Kf=O.Tf.sg.stream);c.timestamp=Date.now();a&&(a.Lf[b]=c,a.timestamp=c.timestamp);return c},Ug(a){return a.Lf?a.Lf.subarray?a.Lf.subarray(0,a.Nf):new Uint8Array(a.Lf):new Uint8Array(0)},Jf:{Rf(a){var b={};b.Eg=8192===(a.mode&61440)?a.id:
1;b.vg=a.id;b.mode=a.mode;b.Kg=1;b.uid=0;b.Hg=0;b.cg=a.cg;P(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.Nf:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.Ag=new Date(a.timestamp);b.Jg=new Date(a.timestamp);b.Dg=new Date(a.timestamp);b.Bg=4096;b.Cg=Math.ceil(b.size/b.Bg);return b},Of(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);if(void 0!==b.size&&(b=b.size,a.Nf!=b))if(0==b)a.Lf=null,a.Nf=0;else{var c=a.Lf;a.Lf=new Uint8Array(b);c&&a.Lf.set(c.subarray(0,
Math.min(b,a.Nf)));a.Nf=b}},ag(){throw db[44];},gg(a,b,c,e){return O.createNode(a,b,c,e)},yg(a,b,c){if(P(a.mode)){try{var e=eb(b,c)}catch(h){}if(e)for(var f in e.Lf)throw new N(55);}delete a.parent.Lf[a.name];a.parent.timestamp=Date.now();a.name=c;b.Lf[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},lg(a,b){delete a.Lf[b];a.timestamp=Date.now()},jg(a,b){var c=eb(a,b),e;for(e in c.Lf)throw new N(55);delete a.Lf[b];a.timestamp=Date.now()},xg(a){var b=[".",".."],c;for(c in a.Lf)a.Lf.hasOwnProperty(c)&&
b.push(c);return b},kg(a,b,c){a=O.createNode(a,b,41471,0);a.link=c;return a},dg(a){if(40960!==(a.mode&61440))throw new N(28);return a.link}},Kf:{read(a,b,c,e,f){var h=a.node.Lf;if(f>=a.node.Nf)return 0;a=Math.min(a.node.Nf-f,e);if(8<a&&h.subarray)b.set(h.subarray(f,f+a),c);else for(e=0;e<a;e++)b[c+e]=h[f+e];return a},write(a,b,c,e,f,h){b.buffer===w.buffer&&(h=!1);if(!e)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Lf||a.Lf.subarray)){if(h)return a.Lf=b.subarray(c,c+e),a.Nf=e;if(0===
a.Nf&&0===f)return a.Lf=b.slice(c,c+e),a.Nf=e;if(f+e<=a.Nf)return a.Lf.set(b.subarray(c,c+e),f),e}ab(a,f+e);if(a.Lf.subarray&&b.subarray)a.Lf.set(b.subarray(c,c+e),f);else for(h=0;h<e;h++)a.Lf[f+h]=b[c+h];a.Nf=Math.max(a.Nf,f+e);return e},Xf(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Nf);if(0>b)throw new N(28);return b},rg(a,b,c){ab(a.node,b+c);a.node.Nf=Math.max(a.node.Nf,b+c)},hg(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new N(43);a=a.node.Lf;if(f&2||a.buffer!==
w.buffer){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);c=!0;b=65536*Math.ceil(b/65536);(f=fb(65536,b))?(x.fill(0,f,f+b),b=f):b=0;if(!b)throw new N(48);w.set(a,b)}else c=!1,b=a.byteOffset;return{Lg:b,zg:c}},ig(a,b,c,e){O.Kf.write(a,b,0,e,c,!1);return 0}}},gb=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},hb=null,ib={},jb=[],kb=1,Q=null,lb=!0,N=null,db={};
function R(a,b={}){a=Qa(a);if(!a)return{path:"",node:null};b=Object.assign({tg:!0,pg:0},b);if(8<b.pg)throw new N(32);a=a.split("/").filter(k=>!!k);for(var c=hb,e="/",f=0;f<a.length;f++){var h=f===a.length-1;if(h&&b.parent)break;c=eb(c,a[f]);e=M(e+"/"+a[f]);c.Yf&&(!h||h&&b.tg)&&(c=c.Yf.root);if(!h||b.Wf)for(h=0;40960===(c.mode&61440);)if(c=mb(e),e=Qa(Ma(e),c),c=R(e,{pg:b.pg+1}).node,40<h++)throw new N(32);}return{path:e,node:c}}
function nb(a){for(var b;;){if(a===a.parent)return a=a.Sf.wg,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function ob(a,b){for(var c=0,e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)|0;return(a+c>>>0)%Q.length}function pb(a){var b=ob(a.parent.id,a.name);if(Q[b]===a)Q[b]=a.Zf;else for(b=Q[b];b;){if(b.Zf===a){b.Zf=a.Zf;break}b=b.Zf}}
function eb(a,b){var c;if(c=(c=qb(a,"x"))?c:a.Jf.ag?0:2)throw new N(c,a);for(c=Q[ob(a.id,b)];c;c=c.Zf){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.Jf.ag(a,b)}function cb(a,b,c,e){a=new rb(a,b,c,e);b=ob(a.parent.id,a.name);a.Zf=Q[b];return Q[b]=a}function P(a){return 16384===(a&61440)}function sb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}
function qb(a,b){if(lb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function tb(a,b){try{return eb(a,b),20}catch(c){}return qb(a,"wx")}function ub(a,b,c){try{var e=eb(a,b)}catch(f){return f.Mf}if(a=qb(a,"wx"))return a;if(c){if(!P(e.mode))return 54;if(e===e.parent||"/"===nb(e))return 10}else if(P(e.mode))return 31;return 0}function vb(){for(var a=0;4096>=a;a++)if(!jb[a])return a;throw new N(33);}
function S(a){a=jb[a];if(!a)throw new N(8);return a}function wb(a,b=-1){xb||(xb=function(){this.eg={}},xb.prototype={},Object.defineProperties(xb.prototype,{object:{get(){return this.node},set(c){this.node=c}},flags:{get(){return this.eg.flags},set(c){this.eg.flags=c}},position:{get(){return this.eg.position},set(c){this.eg.position=c}}}));a=Object.assign(new xb,a);-1==b&&(b=vb());a.Uf=b;return jb[b]=a}var bb={open(a){a.Kf=ib[a.node.cg].Kf;a.Kf.open&&a.Kf.open(a)},Xf(){throw new N(70);}};
function Xa(a,b){ib[a]={Kf:b}}function yb(a,b){var c="/"===b,e=!b;if(c&&hb)throw new N(10);if(!c&&!e){var f=R(b,{tg:!1});b=f.path;f=f.node;if(f.Yf)throw new N(10);if(!P(f.mode))throw new N(54);}b={type:a,Zg:{},wg:b,Ig:[]};a=a.Sf(b);a.Sf=b;b.root=a;c?hb=a:f&&(f.Yf=b,f.Sf&&f.Sf.Ig.push(b))}function zb(a,b,c){var e=R(a,{parent:!0}).node;a=Na(a);if(!a||"."===a||".."===a)throw new N(28);var f=tb(e,a);if(f)throw new N(f);if(!e.Jf.gg)throw new N(63);return e.Jf.gg(e,a,b,c)}
function T(a,b){return zb(a,(void 0!==b?b:511)&1023|16384,0)}function Ab(a,b,c){"undefined"==typeof c&&(c=b,b=438);zb(a,b|8192,c)}function Bb(a,b){if(!Qa(a))throw new N(44);var c=R(b,{parent:!0}).node;if(!c)throw new N(44);b=Na(b);var e=tb(c,b);if(e)throw new N(e);if(!c.Jf.kg)throw new N(63);c.Jf.kg(c,b,a)}function Cb(a){var b=R(a,{parent:!0}).node;a=Na(a);var c=eb(b,a),e=ub(b,a,!0);if(e)throw new N(e);if(!b.Jf.jg)throw new N(63);if(c.Yf)throw new N(10);b.Jf.jg(b,a);pb(c)}
function mb(a){a=R(a).node;if(!a)throw new N(44);if(!a.Jf.dg)throw new N(28);return Qa(nb(a.parent),a.Jf.dg(a))}function Db(a,b){a=R(a,{Wf:!b}).node;if(!a)throw new N(44);if(!a.Jf.Rf)throw new N(63);return a.Jf.Rf(a)}function Eb(a){return Db(a,!0)}function Fb(a,b){a="string"==typeof a?R(a,{Wf:!0}).node:a;if(!a.Jf.Of)throw new N(63);a.Jf.Of(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})}
function Gb(a,b){if(0>b)throw new N(28);a="string"==typeof a?R(a,{Wf:!0}).node:a;if(!a.Jf.Of)throw new N(63);if(P(a.mode))throw new N(31);if(32768!==(a.mode&61440))throw new N(28);var c=qb(a,"w");if(c)throw new N(c);a.Jf.Of(a,{size:b,timestamp:Date.now()})}
function Hb(a,b,c){if(""===a)throw new N(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=M(a);try{f=R(a,{Wf:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new N(20);}else f=zb(a,c,0),e=!0;if(!f)throw new N(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!P(f.mode))throw new N(54);if(!e&&(c=
f?40960===(f.mode&61440)?32:P(f.mode)&&("r"!==sb(b)||b&512)?31:qb(f,sb(b)):44))throw new N(c);b&512&&!e&&Gb(f,0);b&=-131713;f=wb({node:f,path:nb(f),flags:b,seekable:!0,position:0,Kf:f.Kf,Og:[],error:!1});f.Kf.open&&f.Kf.open(f);!d.logReadFiles||b&1||(Ib||(Ib={}),a in Ib||(Ib[a]=1));return f}function Jb(a,b,c){if(null===a.Uf)throw new N(8);if(!a.seekable||!a.Kf.Xf)throw new N(70);if(0!=c&&1!=c&&2!=c)throw new N(28);a.position=a.Kf.Xf(a,b,c);a.Og=[]}
function Kb(){N||(N=function(a,b){this.name="ErrnoError";this.node=b;this.Mg=function(c){this.Mf=c};this.Mg(a);this.message="FS error"},N.prototype=Error(),N.prototype.constructor=N,[44].forEach(a=>{db[a]=new N(a);db[a].stack="<generic error, no stack>"}))}var Lb;
function Mb(a,b,c){a=M("/dev/"+a);var e=gb(!!b,!!c);Nb||(Nb=64);var f=Nb++<<8|0;Xa(f,{open(h){h.seekable=!1},close(){c&&c.buffer&&c.buffer.length&&c(10)},read(h,k,n,l){for(var m=0,q=0;q<l;q++){try{var p=b()}catch(t){throw new N(29);}if(void 0===p&&0===m)throw new N(6);if(null===p||void 0===p)break;m++;k[n+q]=p}m&&(h.node.timestamp=Date.now());return m},write(h,k,n,l){for(var m=0;m<l;m++)try{c(k[n+m])}catch(q){throw new N(29);}l&&(h.node.timestamp=Date.now());return m}});Ab(a,e,f)}var Nb,U={},xb,Ib;
function Ob(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":S(a).path;if(0==b.length){if(!c)throw new N(44);return a}return M(a+"/"+b)}
function Pb(a,b,c){try{var e=a(b)}catch(h){if(h&&h.node&&M(b)!==M(nb(h.node)))return-54;throw h;}A[c>>2]=e.Eg;A[c+4>>2]=e.mode;C[c+8>>2]=e.Kg;A[c+12>>2]=e.uid;A[c+16>>2]=e.Hg;A[c+20>>2]=e.cg;F=[e.size>>>0,(D=e.size,1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[c+24>>2]=F[0];A[c+28>>2]=F[1];A[c+32>>2]=4096;A[c+36>>2]=e.Cg;a=e.Ag.getTime();b=e.Jg.getTime();var f=e.Dg.getTime();F=[Math.floor(a/1E3)>>>0,(D=Math.floor(a/1E3),1<=+Math.abs(D)?0<D?+Math.floor(D/
4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[c+40>>2]=F[0];A[c+44>>2]=F[1];C[c+48>>2]=a%1E3*1E3;F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[c+56>>2]=F[0];A[c+60>>2]=F[1];C[c+64>>2]=b%1E3*1E3;F=[Math.floor(f/1E3)>>>0,(D=Math.floor(f/1E3),1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[c+72>>2]=F[0];A[c+76>>2]=F[1];C[c+80>>2]=
f%1E3*1E3;F=[e.vg>>>0,(D=e.vg,1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[c+88>>2]=F[0];A[c+92>>2]=F[1];return 0}var Qb=void 0;function Rb(){var a=A[+Qb>>2];Qb+=4;return a}
var Sb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Tb=[0,31,60,91,121,152,182,213,244,274,305,335],Ub=[0,31,59,90,120,151,181,212,243,273,304,334],Wb=a=>{var b=Sa(a)+1,c=Vb(b);c&&Ta(a,x,c,b);return c},Xb={},Zb=()=>{if(!Yb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in Xb)void 0===Xb[b]?delete a[b]:a[b]=Xb[b];
var c=[];for(b in a)c.push(`${b}=${a[b]}`);Yb=c}return Yb},Yb;function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}
function Cc(){}function Dc(){}function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}function Jc(){}function Kc(){}function Lc(){}var Mc=0,Nc=a=>{na=a;if(!(Ja||0<Mc)){if(d.onExit)d.onExit(a);v=!0}ea(a,new Ha(a))},Oc=a=>{a instanceof Ha||"unwind"==a||ea(1,a)},Pc=a=>{try{a()}catch(b){u(b)}};
function Qc(){var a=V,b={},c;for(c in a)(function(e){var f=a[e];b[e]="function"==typeof f?function(){Rc.push(e);try{return f.apply(null,arguments)}finally{v||(Rc.pop()===e||u(),W&&1===Y&&0===Rc.length&&(Y=0,Pc(Sc),"undefined"!=typeof Fibers&&Fibers.$g()))}}:f})(c);return b}var Y=0,W=null,Tc=0,Rc=[],Uc={},Vc={},Wc=0,Xc=null,Yc=[];function Zc(){return new Promise((a,b)=>{Xc={resolve:a,reject:b}})}
function $c(){var a=Vb(16396),b=a+12;C[a>>2]=b;C[a+4>>2]=b+16384;b=Rc[0];var c=Uc[b];void 0===c&&(c=Wc++,Uc[b]=c,Vc[c]=b);A[a+8>>2]=c;return a}
function ad(a){if(!v){if(0===Y){var b=!1,c=!1;a((e=0)=>{if(!v&&(Tc=e,b=!0,c)){Y=2;Pc(()=>bd(W));"undefined"!=typeof Browser&&Browser.ng.Gg&&Browser.ng.resume();e=!1;try{var f=(0,V[Vc[A[W+8>>2]]])()}catch(n){f=n,e=!0}var h=!1;if(!W){var k=Xc;k&&(Xc=null,(e?k.reject:k.resolve)(f),h=!0)}if(e&&!h)throw f;}});c=!0;b||(Y=1,W=$c(),"undefined"!=typeof Browser&&Browser.ng.Gg&&Browser.ng.pause(),Pc(()=>cd(W)))}else 2===Y?(Y=0,Pc(dd),ed(W),W=null,Yc.forEach(e=>{if(!v)try{if(e(),!(Ja||0<Mc))try{na=e=na,Nc(e)}catch(f){Oc(f)}}catch(f){Oc(f)}})):
u(`invalid state: ${Y}`);return Tc}}function fd(a){return ad(b=>{a().then(b)})}
var gd={},hd,jd,kd=[],Z=(a,b,c,e,f)=>{function h(p){--Mc;0!==l&&ld(l);return"string"===b?p?K(x,p):"":"boolean"===b?!!p:p}var k={string:p=>{var t=0;if(null!==p&&void 0!==p&&0!==p){t=Sa(p)+1;var y=md(t);Ta(p,x,y,t);t=y}return t},array:p=>{var t=md(p.length);w.set(p,t);return t}};a=d["_"+a];var n=[],l=0;if(e)for(var m=0;m<e.length;m++){var q=k[c[m]];q?(0===l&&(l=nd()),n[m]=q(e[m])):n[m]=e[m]}c=W;e=a.apply(null,n);f=f&&f.async;Mc+=1;if(W!=c)return Zc().then(h);e=h(e);return f?Promise.resolve(e):e},od=
"undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function rb(a,b,c,e){a||(a=this);this.parent=a;this.Sf=a.Sf;this.Yf=null;this.id=kb++;this.name=b;this.mode=c;this.Jf={};this.Kf={};this.cg=e}Object.defineProperties(rb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Kb();Q=Array(4096);yb(O,"/");T("/tmp");T("/home");
T("/home/web_user");(function(){T("/dev");Xa(259,{read:()=>0,write:(e,f,h,k)=>k});Ab("/dev/null",259);Wa(1280,Za);Wa(1536,$a);Ab("/dev/tty",1280);Ab("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Pa(a).byteLength);return a[--b]};Mb("random",c);Mb("urandom",c);T("/dev/shm");T("/dev/shm/tmp")})();
(function(){T("/proc");var a=T("/proc/self");T("/proc/self/fd");yb({Sf(){var b=cb(a,"fd",16895,73);b.Jf={ag(c,e){var f=S(+e);c={parent:null,Sf:{wg:"fake"},Jf:{dg:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})();
(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,qg:e}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};$b=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,qg:l}=a.get(b);return n(l,c,e?e?K(x,e):"":null,f?f?K(x,f):"":null,h?h?K(x,h):"":null,k?k?K(x,k):"":null)}return 0}})();
(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Vf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,Fg:l,Vf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};bc=function(c,e,f,h){c=a.get(c);b.set(e,
c.Vf);c.f(e,new Uint32Array(x.buffer,h,f));b.delete(e)};dc=function(c,e,f,h){c=a.get(c);b.set(e,c.Vf);c.step(e,new Uint32Array(x.buffer,h,f));b.delete(e)};ac=function(c,e){c=a.get(c);b.set(e,c.Vf);c.Fg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,qg:f}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};cc=function(b){if(a.has(b)){const {f:c,qg:e}=a.get(b);return c(e)}return 0}})();
(function(){function a(l,m){const q=`get${l}`,p=`set${l}`;return new Proxy(new DataView(x.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===q)return function(B,G){if(!G)throw Error("must be little endian");return t[y](B,G)};if(y===p)return function(B,G,E){if(!E)throw Error("must be little endian");return t[y](B,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof gd,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null,n=new Map;
uc=function(l,m,q,p){n.set(l?K(x,l):"",{size:m,bg:Array.from(new Uint32Array(x.buffer,p,q))})};d.createModule=function(l,m,q,p){b&&(q.handleAsync=fd);const t=c.size;c.set(t,{module:q,Vf:p});p=0;q.xCreate&&(p|=1);q.xConnect&&(p|=2);q.xBestIndex&&(p|=4);q.xDisconnect&&(p|=8);q.xDestroy&&(p|=16);q.xOpen&&(p|=32);q.xClose&&(p|=64);q.xFilter&&(p|=128);q.xNext&&(p|=256);q.xEof&&(p|=512);q.xColumn&&(p|=1024);q.xRowid&&(p|=2048);q.xUpdate&&(p|=4096);q.xBegin&&(p|=8192);q.xSync&&(p|=16384);q.xCommit&&(p|=
32768);q.xRollback&&(p|=65536);q.xFindFunction&&(p|=131072);q.xRename&&(p|=262144);return Z("create_module","number",["number","string","number","number"],[l,m,t,p])};kc=function(l,m,q,p,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const B of h)e.delete(B)}p=Array.from(new Uint32Array(x.buffer,p,q)).map(B=>B?K(x,B):"");return m.module.xCreate(l,m.Vf,p,t,a("Int32",y))};jc=function(l,m,q,p,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const B of h)e.delete(B)}p=Array.from(new Uint32Array(x.buffer,
p,q)).map(B=>B?K(x,B):"");return m.module.xConnect(l,m.Vf,p,t,a("Int32",y))};fc=function(l,m){var q=e.get(l),p=n.get("sqlite3_index_info").bg;const t={};t.nConstraint=H(m+p[0],"i32");t.aConstraint=[];var y=H(m+p[1],"*"),B=n.get("sqlite3_index_constraint").size;for(var G=0;G<t.nConstraint;++G){var E=t.aConstraint,L=E.push,I=y+G*B,ka=n.get("sqlite3_index_constraint").bg,X={};X.iColumn=H(I+ka[0],"i32");X.op=H(I+ka[1],"i8");X.usable=!!H(I+ka[2],"i8");L.call(E,X)}t.nOrderBy=H(m+p[2],"i32");t.aOrderBy=
[];y=H(m+p[3],"*");B=n.get("sqlite3_index_orderby").size;for(G=0;G<t.nOrderBy;++G)E=t.aOrderBy,L=E.push,I=y+G*B,ka=n.get("sqlite3_index_orderby").bg,X={},X.iColumn=H(I+ka[0],"i32"),X.desc=!!H(I+ka[1],"i8"),L.call(E,X);t.aConstraintUsage=[];for(y=0;y<t.nConstraint;++y)t.aConstraintUsage.push({argvIndex:0,omit:!1});t.idxNum=H(m+p[5],"i32");t.idxStr=null;t.orderByConsumed=!!H(m+p[8],"i8");t.estimatedCost=H(m+p[9],"double");t.estimatedRows=H(m+p[10],"i32");t.idxFlags=H(m+p[11],"i32");t.colUsed=H(m+p[12],
"i32");l=q.module.xBestIndex(l,t);q=n.get("sqlite3_index_info").bg;p=H(m+q[4],"*");y=n.get("sqlite3_index_constraint_usage").size;for(L=0;L<t.nConstraint;++L)B=p+L*y,E=t.aConstraintUsage[L],I=n.get("sqlite3_index_constraint_usage").bg,J(B+I[0],E.argvIndex,"i32"),J(B+I[1],E.omit?1:0,"i8");J(m+q[5],t.idxNum,"i32");"string"===typeof t.idxStr&&(p=Sa(t.idxStr),y=Z("sqlite3_malloc","number",["number"],[p+1]),Ta(t.idxStr,x,y,p+1),J(m+q[6],y,"*"),J(m+q[7],1,"i32"));J(m+q[8],t.orderByConsumed,"i32");J(m+q[9],
t.estimatedCost,"double");J(m+q[10],t.estimatedRows,"i32");J(m+q[11],t.idxFlags,"i32");return l};mc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDisconnect(l)};lc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDestroy(l)};qc=function(l,m){const q=e.get(l);f.set(m,q);if(b){k.delete(m);for(const p of k)f.delete(p)}return q.module.xOpen(l,m)};gc=function(l){const m=f.get(l);b?k.add(l):f.delete(l);return m.module.xClose(l)};nc=function(l){return f.get(l).module.xEof(l)?
1:0};oc=function(l,m,q,p,t){const y=f.get(l);q=q?q?K(x,q):"":null;t=new Uint32Array(x.buffer,t,p);return y.module.xFilter(l,m,q,t)};pc=function(l){return f.get(l).module.xNext(l)};hc=function(l,m,q){return f.get(l).module.xColumn(l,m,q)};tc=function(l,m){return f.get(l).module.xRowid(l,a("BigInt64",m))};wc=function(l,m,q,p){const t=e.get(l);q=new Uint32Array(x.buffer,q,m);return t.module.xUpdate(l,q,a("BigInt64",p))};ec=function(l){return e.get(l).module.xBegin(l)};vc=function(l){return e.get(l).module.xSync(l)};
ic=function(l){return e.get(l).module.xCommit(l)};sc=function(l){return e.get(l).module.xRollback(l)};rc=function(l,m){const q=e.get(l);m=m?K(x,m):"";return q.module.xRename(l,m)}})();
(function(){function a(h,k){const n=`get${h}`,l=`set${h}`;return new Proxy(new DataView(x.buffer,k,"Int32"===h?4:8),{get(m,q){if(q===n)return function(p,t){if(!t)throw Error("must be little endian");return m[q](p,t)};if(q===l)return function(p,t,y){if(!y)throw Error("must be little endian");return m[q](p,t,y)};if("string"===typeof q&&q.match(/^(get)|(set)/))throw Error("invalid type");return m[q]}})}const b="object"===typeof gd;b&&(d.handleAsync=fd);const c=new Map,e=new Map;d.registerVFS=function(h,
k){if(Z("sqlite3_vfs_find","number",["string"],[h.name]))throw Error(`VFS '${h.name}' already registered`);b&&(h.handleAsync=fd);var n=h.Yg??64;const l=d._malloc(4);k=Z("register_vfs","number",["string","number","number","number"],[h.name,n,k?1:0,l]);k||(n=H(l,"*"),c.set(n,h));d._free(l);return k};const f=b?new Set:null;zc=function(h){const k=e.get(h);b?f.add(h):e.delete(h);return k.xClose(h)};Gc=function(h,k,n,l,m){return e.get(h).xRead(h,x.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Lc=function(h,
k,n,l,m){return e.get(h).xWrite(h,x.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Jc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Ic=function(h,k){return e.get(h).xSync(h,k)};Dc=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};Ec=function(h,k){return e.get(h).xLock(h,k)};Kc=function(h,k){return e.get(h).xUnlock(h,k)};yc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};Cc=function(h,k,n){const l=e.get(h);n=new DataView(x.buffer,
n);return l.xFileControl(h,k,n)};Hc=function(h){return e.get(h).xSectorSize(h)};Bc=function(h){return e.get(h).xDeviceCharacteristics(h)};Fc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var q of f)e.delete(q)}q=null;if(l&64){q=1;const p=[];for(;q;){const t=x[k++];if(t)p.push(t);else switch(x[k]||(q=null),q){case 1:p.push(63);q=2;break;case 2:p.push(61);q=3;break;case 3:p.push(38),q=2}}q=(new TextDecoder).decode(new Uint8Array(p))}else k&&(q=k?K(x,k):"");m=a("Int32",m);return h.xOpen(q,
n,l,m)};Ac=function(h,k,n){return c.get(h).xDelete(k?K(x,k):"",n)};xc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?K(x,k):"",n,l)}})();
var qd={a:(a,b,c,e)=>{u(`Assertion failed: ${a?K(x,a):""}, at: `+[b?b?K(x,b):"":"unknown filename",c,e?e?K(x,e):"":"unknown function"])},N:function(a,b){try{return a=a?K(x,a):"",Fb(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Mf}},Q:function(a,b,c){try{b=b?K(x,b):"";b=Ob(a,b);if(c&-8)return-28;var e=R(b,{Wf:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&qb(e,a)?-2:0}catch(f){if("undefined"==typeof U||"ErrnoError"!==f.name)throw f;
return-f.Mf}},O:function(a,b){try{var c=S(a);Fb(c.node,b);return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Mf}},M:function(a){try{var b=S(a).node;var c="string"==typeof b?R(b,{Wf:!0}).node:b;if(!c.Jf.Of)throw new N(63);c.Jf.Of(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Mf}},b:function(a,b,c){Qb=c;try{var e=S(a);switch(b){case 0:var f=Rb();if(0>f)return-28;for(;jb[f];)f++;return wb(e,f).Uf;case 1:case 2:return 0;
case 3:return e.flags;case 4:return f=Rb(),e.flags|=f,0;case 5:return f=Rb(),z[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return A[pd()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Mf}},L:function(a,b){try{var c=S(a);return Pb(Db,c.path,b)}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Mf}},n:function(a,b,c){b=Sb(b,c);try{if(isNaN(b))return 61;var e=S(a);if(0===(e.flags&2097155))throw new N(28);
Gb(e.node,b);return 0}catch(f){if("undefined"==typeof U||"ErrnoError"!==f.name)throw f;return-f.Mf}},F:function(a,b){try{if(0===b)return-28;var c=Sa("/")+1;if(b<c)return-68;Ta("/",x,a,b);return c}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Mf}},J:function(a,b){try{return a=a?K(x,a):"",Pb(Eb,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Mf}},C:function(a,b,c){try{return b=b?K(x,b):"",b=Ob(a,b),b=M(b),"/"===b[b.length-1]&&(b=b.substr(0,
b.length-1)),T(b,c),0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Mf}},H:function(a,b,c,e){try{b=b?K(x,b):"";var f=e&256;b=Ob(a,b,e&4096);return Pb(f?Eb:Db,b,c)}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Mf}},B:function(a,b,c,e){Qb=e;try{b=b?K(x,b):"";b=Ob(a,b);var f=e?Rb():0;return Hb(b,c,f).Uf}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Mf}},z:function(a,b,c,e){try{b=b?K(x,b):"";b=Ob(a,b);if(0>=e)return-28;
var f=mb(b),h=Math.min(e,Sa(f)),k=w[c+h];Ta(f,x,c,e+1);w[c+h]=k;return h}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Mf}},y:function(a){try{return a=a?K(x,a):"",Cb(a),0}catch(b){if("undefined"==typeof U||"ErrnoError"!==b.name)throw b;return-b.Mf}},K:function(a,b){try{return a=a?K(x,a):"",Pb(Db,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Mf}},u:function(a,b,c){try{b=b?K(x,b):"";b=Ob(a,b);if(0===c){a=b;var e=R(a,{parent:!0}).node;if(!e)throw new N(44);
var f=Na(a),h=eb(e,f),k=ub(e,f,!1);if(k)throw new N(k);if(!e.Jf.lg)throw new N(63);if(h.Yf)throw new N(10);e.Jf.lg(e,f);pb(h)}else 512===c?Cb(b):u("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Mf}},t:function(a,b,c){try{b=b?K(x,b):"";b=Ob(a,b,!0);if(c){var e=C[c>>2]+4294967296*A[c+4>>2],f=A[c+8>>2];h=1E3*e+f/1E6;c+=16;e=C[c>>2]+4294967296*A[c+4>>2];f=A[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=R(b,{Wf:!0}).node;
n.Jf.Of(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"==typeof U||"ErrnoError"!==l.name)throw l;return-l.Mf}},k:function(a,b,c){a=new Date(1E3*Sb(a,b));A[c>>2]=a.getSeconds();A[c+4>>2]=a.getMinutes();A[c+8>>2]=a.getHours();A[c+12>>2]=a.getDate();A[c+16>>2]=a.getMonth();A[c+20>>2]=a.getFullYear()-1900;A[c+24>>2]=a.getDay();b=a.getFullYear();A[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Ub:Tb)[a.getMonth()]+a.getDate()-1|0;A[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),
6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();A[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Sb(f,h);try{if(isNaN(f))return 61;var l=S(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new N(2);if(1===(l.flags&2097155))throw new N(2);if(!l.Kf.hg)throw new N(43);var m=l.Kf.hg(l,a,f,b,c);var q=m.Lg;A[k>>2]=m.zg;C[n>>2]=q;return 0}catch(p){if("undefined"==typeof U||"ErrnoError"!==p.name)throw p;return-p.Mf}},j:function(a,
b,c,e,f,h,k){h=Sb(h,k);try{if(isNaN(h))return 61;var n=S(f);if(c&2){if(32768!==(n.node.mode&61440))throw new N(43);e&2||n.Kf.ig&&n.Kf.ig(n,x.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof U||"ErrnoError"!==l.name)throw l;return-l.Mf}},v:(a,b,c)=>{function e(l){return(l=l.toTimeString().match(/\(([A-Za-z ]+)\)$/))?l[1]:"GMT"}var f=(new Date).getFullYear(),h=new Date(f,0,1),k=new Date(f,6,1);f=h.getTimezoneOffset();var n=k.getTimezoneOffset();C[a>>2]=60*Math.max(f,n);A[b>>2]=Number(f!=n);a=e(h);
b=e(k);a=Wb(a);b=Wb(b);n<f?(C[c>>2]=a,C[c+4>>2]=b):(C[c>>2]=b,C[c+4>>2]=a)},ta:()=>{u("")},e:()=>Date.now(),d:()=>performance.now(),r:a=>{var b=x.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(f);ra();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},D:(a,b)=>{var c=0;Zb().forEach((e,f)=>{var h=b+c;f=C[a+
4*f>>2]=h;for(h=0;h<e.length;++h)w[f++>>0]=e.charCodeAt(h);w[f>>0]=0;c+=e.length+1});return 0},E:(a,b)=>{var c=Zb();C[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);C[b>>2]=e;return 0},f:function(a){try{var b=S(a);if(null===b.Uf)throw new N(8);b.mg&&(b.mg=null);try{b.Kf.close&&b.Kf.close(b)}catch(c){throw c;}finally{jb[b.Uf]=null}b.Uf=null;return 0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Mf}},s:function(a,b){try{var c=S(a);w[b>>0]=c.Qf?2:P(c.mode)?3:40960===(c.mode&
61440)?7:4;z[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[b+8>>2]=F[0];A[b+12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[b+16>>2]=F[0];A[b+20>>2]=F[1];return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return e.Mf}},A:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k<c;k++){var n=C[a>>2],l=C[a+4>>2];a+=8;var m=f,q=n,p=
l,t=h,y=w;if(0>p||0>t)throw new N(28);if(null===m.Uf)throw new N(8);if(1===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.Kf.read)throw new N(28);var B="undefined"!=typeof t;if(!B)t=m.position;else if(!m.seekable)throw new N(70);var G=m.Kf.read(m,y,q,p,t);B||(m.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;if(E<l)break;"undefined"!==typeof h&&(h+=E)}L=b}C[e>>2]=L;return 0}catch(I){if("undefined"==typeof U||"ErrnoError"!==I.name)throw I;return I.Mf}},l:function(a,b,c,
e,f){b=Sb(b,c);try{if(isNaN(b))return 61;var h=S(a);Jb(h,b,e);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0<D?+Math.floor(D/4294967296)>>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];A[f>>2]=F[0];A[f+4>>2]=F[1];h.mg&&0===b&&0===e&&(h.mg=null);return 0}catch(k){if("undefined"==typeof U||"ErrnoError"!==k.name)throw k;return k.Mf}},G:function(a){try{var b=S(a);return ad(c=>{var e=b.node.Sf;e.type.Ng?e.type.Ng(e,!1,f=>{f?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;
return c.Mf}},w:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k<c;k++){var n=C[a>>2],l=C[a+4>>2];a+=8;var m=f,q=n,p=l,t=h,y=w;if(0>p||0>t)throw new N(28);if(null===m.Uf)throw new N(8);if(0===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.Kf.write)throw new N(28);m.seekable&&m.flags&1024&&Jb(m,0,2);var B="undefined"!=typeof t;if(!B)t=m.position;else if(!m.seekable)throw new N(70);var G=m.Kf.write(m,y,q,p,t,void 0);B||(m.position+=G);var E=G;if(0>E){var L=-1;break a}b+=
E;"undefined"!==typeof h&&(h+=E)}L=b}C[e>>2]=L;return 0}catch(I){if("undefined"==typeof U||"ErrnoError"!==I.name)throw I;return I.Mf}},sa:(a,b)=>{Pa(x.subarray(a,a+b));return 0},_:$b,x:ac,P:bc,ca:cc,I:dc,ka:ec,m:fc,ra:gc,na:hc,ia:ic,ea:jc,fa:kc,g:lc,h:mc,oa:nc,qa:oc,pa:pc,da:qc,ga:rc,ha:sc,ma:tc,c:uc,ja:vc,la:wc,aa:xc,V:yc,$:zc,ba:Ac,S:Bc,U:Cc,Y:Dc,X:Ec,R:Fc,q:Gc,T:Hc,Z:Ic,o:Jc,W:Kc,p:Lc},V=function(){function a(c){V=c.exports;V=Qc();ma=V.ua;ra();hd=V.zf;ta.unshift(V.va);xa--;d.monitorRunDependencies&&
d.monitorRunDependencies(xa);0==xa&&(null!==ya&&(clearInterval(ya),ya=null),za&&(c=za,za=null,c()));return V}var b={a:qd};xa++;d.monitorRunDependencies&&d.monitorRunDependencies(xa);if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ga(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=V.wa)(a,b,c,e);d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=V.xa)(a,b,c,e);
d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=V.ya)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=V.za)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=V.Aa)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=V.Ba)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=V.Ca)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=V.Da)(a);d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=V.Ea)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=V.Fa)();
d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=V.Ga)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=V.Ha)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=V.Ia)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=V.Ja)(a,b);d._sqlite3_free=a=>(d._sqlite3_free=V.Ka)(a);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=V.La)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=V.Ma)(a,b,c);d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=V.Na)(a,b,c);
d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=V.Oa)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=V.Pa)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=V.Qa)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=V.Ra)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=V.Sa)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=V.Ta)(a);d._sqlite3_str_length=a=>(d._sqlite3_str_length=V.Ua)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=V.Va)(a);
d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=V.Wa)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=V.Xa)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=V.Ya)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=V.Za)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=V._a)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=V.$a)(a,b,c,e);d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=V.ab)(a,b,c);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=V.bb)(a,b);
d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=V.cb)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=V.db)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=V.eb)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=V.fb)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=V.gb)(a,b,c,e);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=V.hb)(a,b,c,e,f);d._sqlite3_step=a=>(d._sqlite3_step=V.ib)(a);d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=V.jb)(a,b);
d._sqlite3_reset=a=>(d._sqlite3_reset=V.kb)(a);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=V.lb)(a,b,c,e,f);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=V.mb)(a,b);d._sqlite3_finalize=a=>(d._sqlite3_finalize=V.nb)(a);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=V.ob)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=V.pb)(a);d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=V.qb)(a,b,c,e);
d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=V.rb)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=V.sb)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=V.tb)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=V.ub)(a);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=V.vb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=V.wb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=V.xb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=V.yb)(a);
d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=V.zb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=V.Ab)(a);d._sqlite3_value_int=a=>(d._sqlite3_value_int=V.Bb)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=V.Cb)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=V.Db)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=V.Eb)(a,b);d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=V.Fb)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=V.Gb)(a);
d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=V.Hb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=V.Ib)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=V.Jb)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=V.Kb)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=V.Lb)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=V.Mb)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=V.Nb)(a);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=V.Ob)(a,b,c,e);
d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=V.Pb)(a,b,c,e,f);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=V.Qb)(a,b);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=V.Rb)(a,b,c);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=V.Sb)(a,b,c);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=V.Tb)(a,b);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=V.Ub)(a,b,c);d._sqlite3_result_null=a=>(d._sqlite3_result_null=V.Vb)(a);
d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=V.Wb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=V.Xb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=V.Yb)(a,b,c,e);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=V.Zb)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=V._b)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=V.$b)(a,b,c,e);
d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=V.ac)(a,b,c,e);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=V.bc)(a,b);d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=V.cc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=V.dc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=V.ec)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=V.fc)(a,b);
d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=V.gc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=V.hc)(a);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=V.ic)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=V.jc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=V.kc)(a,b);d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=V.lc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=V.mc)(a,b);
d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=V.nc)(a,b);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=V.oc)(a,b,c,e);d._sqlite3_column_count=a=>(d._sqlite3_column_count=V.pc)(a);d._sqlite3_data_count=a=>(d._sqlite3_data_count=V.qc)(a);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=V.rc)(a,b);d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=V.sc)(a,b);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=V.tc)(a,b);
d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=V.uc)(a,b);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=V.vc)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=V.wc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=V.xc)(a,b);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=V.yc)(a,b);d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=V.zc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=V.Ac)(a,b);
d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=V.Bc)(a,b,c,e,f);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=V.Cc)(a,b,c,e,f,h);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=V.Dc)(a,b,c);d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=V.Ec)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=V.Fc)(a,b,c,e);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=V.Gc)(a,b);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=V.Hc)(a,b,c,e,f);
d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=V.Ic)(a,b,c,e,f);d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=V.Jc)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=V.Kc)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=V.Lc)(a,b,c);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=V.Mc)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=V.Nc)(a,b,c,e);
d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=V.Oc)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=V.Pc)(a,b);d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=V.Qc)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=V.Rc)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=V.Sc)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=V.Tc)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=V.Uc)(a,b);
d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=V.Vc)(a);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=V.Wc)(a,b);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=V.Xc)(a,b,c);d._sqlite3_sql=a=>(d._sqlite3_sql=V.Yc)(a);d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=V.Zc)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=V._c)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=V.$c)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=V.ad)(a);
d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=V.bd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=V.cd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=V.dd)(a);d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=V.ed)(a,b,c);d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=V.fd)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=V.gd)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=V.hd)(a,b,c);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=V.id)(a);
d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=V.jd)(a);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=V.kd)(a);d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=V.ld)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=V.md)(a,b,c,e,f);d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=V.nd)(a,b,c,e,f,h);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=V.od)(a,b,c,e,f);
d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=V.pd)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=V.qd)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=V.rd)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=V.sd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=V.td)(a,b,c,e);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=V.ud)(a,b,c,e,f);
d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=V.vd)(a,b);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=V.wd)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=V.xd)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=V.yd)(a,b,c);d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=V.zd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=V.Ad)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=V.Bd)(a,b,c);
d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=V.Cd)(a);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=V.Dd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=V.Ed)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=V.Fd)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=V.Gd)(a);d._sqlite3_complete16=a=>(d._sqlite3_complete16=V.Hd)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=V.Id)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=V.Jd)();
d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=V.Kd)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=V.Ld)();d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=V.Md)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=V.Nd)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=V.Od)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=V.Pd)(a);d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=V.Qd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=V.Rd)(a,b,c);
d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=V.Sd)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=V.Td)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=V.Ud)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=V.Vd)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=V.Wd)(a);d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=V.Xd)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=V.Yd)(a,b);d._sqlite3_close=a=>(d._sqlite3_close=V.Zd)(a);
d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=V._d)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=V.$d)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=V.ae)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=V.be)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=V.ce)(a);d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=V.de)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=V.ee)(a,b,c,e,f,h,k,n);
d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=V.fe)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=V.ge)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=V.he)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=V.ie)(a,b,c);d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=V.je)(a,b,c,e);
d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=V.ke)(a,b,c);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=V.le)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=V.me)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=V.ne)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=V.oe)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=V.pe)(a,b,c);
d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=V.qe)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=V.re)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=V.se)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=V.te)(a);d._sqlite3_errcode=a=>(d._sqlite3_errcode=V.ue)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=V.ve)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=V.we)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=V.xe)(a);
d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=V.ye)(a,b,c);d._sqlite3_open=(a,b)=>(d._sqlite3_open=V.ze)(a,b);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=V.Ae)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=V.Be)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=V.Ce)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=V.De)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=V.Ee)(a,b,c,e,f);
d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=V.Fe)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=V.Ge)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=V.He)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=V.Ie)(a,b,c,e);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=V.Je)(a);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=V.Ke)(a,b,c,e,f,h,k,n,l);
d._sqlite3_sleep=a=>(d._sqlite3_sleep=V.Le)(a);d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=V.Me)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=V.Ne)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=V.Oe)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=V.Pe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=V.Qe)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=V.Re)(a,b);
d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=V.Se)(a,b);d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=V.Te)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=V.Ue)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=V.Ve)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=V.We)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=V.Xe)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=V.Ye)(a,b);
d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=V.Ze)(a,b);d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=V._e)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=V.$e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=V.af)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=V.bf)();d._sqlite3mc_config=(a,b,c)=>(d._sqlite3mc_config=V.cf)(a,b,c);d._sqlite3mc_cipher_count=()=>(d._sqlite3mc_cipher_count=V.df)();
d._sqlite3mc_cipher_index=a=>(d._sqlite3mc_cipher_index=V.ef)(a);d._sqlite3mc_cipher_name=a=>(d._sqlite3mc_cipher_name=V.ff)(a);d._sqlite3mc_config_cipher=(a,b,c,e)=>(d._sqlite3mc_config_cipher=V.gf)(a,b,c,e);d._sqlite3mc_codec_data=(a,b,c)=>(d._sqlite3mc_codec_data=V.hf)(a,b,c);d._sqlite3_key=(a,b,c)=>(d._sqlite3_key=V.jf)(a,b,c);d._sqlite3_key_v2=(a,b,c,e)=>(d._sqlite3_key_v2=V.kf)(a,b,c,e);d._sqlite3_rekey_v2=(a,b,c,e)=>(d._sqlite3_rekey_v2=V.lf)(a,b,c,e);
d._sqlite3_rekey=(a,b,c)=>(d._sqlite3_rekey=V.mf)(a,b,c);d._sqlite3mc_register_cipher=(a,b,c)=>(d._sqlite3mc_register_cipher=V.nf)(a,b,c);var pd=()=>(pd=V.of)(),Vb=d._malloc=a=>(Vb=d._malloc=V.pf)(a),ed=d._free=a=>(ed=d._free=V.qf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=V.rf)(a);d._set_authorizer=a=>(d._set_authorizer=V.sf)(a);d._create_function=(a,b,c,e,f,h)=>(d._create_function=V.tf)(a,b,c,e,f,h);d._create_module=(a,b,c,e)=>(d._create_module=V.uf)(a,b,c,e);
d._progress_handler=(a,b)=>(d._progress_handler=V.vf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=V.wf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=V.xf)();var rd=d._main=(a,b)=>(rd=d._main=V.yf)(a,b),fb=(a,b)=>(fb=V.Af)(a,b),sd=()=>(sd=V.Bf)(),nd=()=>(nd=V.Cf)(),ld=a=>(ld=V.Df)(a),md=a=>(md=V.Ef)(a),cd=a=>(cd=V.Ff)(a),Sc=()=>(Sc=V.Gf)(),bd=a=>(bd=V.Hf)(a),dd=()=>(dd=V.If)();d._sqlite3_version=3232;d.getTempRet0=sd;d.ccall=Z;
d.quit&&(ea=d.quit);var ka;d.wasmBinary&&(ka=d.wasmBinary);"object"!=typeof WebAssembly&&u("no native wasm support detected");var ma,na=!1,oa,v,w,x,pa,z,A,qa,ra;function sa(){var a=ma.buffer;d.HEAP8=v=new Int8Array(a);d.HEAP16=x=new Int16Array(a);d.HEAPU8=w=new Uint8Array(a);d.HEAPU16=pa=new Uint16Array(a);d.HEAP32=z=new Int32Array(a);d.HEAPU32=A=new Uint32Array(a);d.HEAPF32=qa=new Float32Array(a);d.HEAPF64=ra=new Float64Array(a)}var ta=[],ua=[],va=[],wa=[];
function xa(){var a=d.preRun.shift();ta.unshift(a)}var ya=0,za=null,Aa=null;function u(a){if(d.onAbort)d.onAbort(a);a="Aborted("+a+")";r(a);na=!0;oa=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ba=a=>a.startsWith("data:application/octet-stream;base64,"),Ca;if(d.locateFile){if(Ca="wa-sqlite-async.wasm",!Ba(Ca)){var Da=Ca;Ca=d.locateFile?d.locateFile(Da,g):g+Da}}else Ca=(new URL("wa-sqlite-async.wasm",import.meta.url)).href;
function Ea(a){if(a==Ca&&ka)return new Uint8Array(ka);if(ia)return ia(a);throw"both async and sync fetching of the wasm failed";}function Fa(a){return ka||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Ea(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw"failed to load wasm binary file at '"+a+"'";return b.arrayBuffer()}).catch(()=>Ea(a))}
function Ga(a,b,c){return Fa(a).then(e=>WebAssembly.instantiate(e,b)).then(e=>e).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);u(e)})}function Ha(a,b){var c=Ca;return ka||"function"!=typeof WebAssembly.instantiateStreaming||Ba(c)||"function"!=typeof fetch?Ga(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Ga(c,a,b)}))}var C,D;
function Ia(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ja=a=>{for(;0<a.length;)a.shift()(d)};function F(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return v[a>>0];case "i8":return v[a>>0];case "i16":return x[a>>1];case "i32":return z[a>>2];case "i64":u("to do getValue(i64) use WASM_BIGINT");case "float":return qa[a>>2];case "double":return ra[a>>3];case "*":return A[a>>2];default:u(`invalid type for getValue: ${b}`)}}
var Ka=d.noExitRuntime||!0;function H(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":v[a>>0]=b;break;case "i8":v[a>>0]=b;break;case "i16":x[a>>1]=b;break;case "i32":z[a>>2]=b;break;case "i64":u("to do setValue(i64) use WASM_BIGINT");case "float":qa[a>>2]=b;break;case "double":ra[a>>3]=b;break;case "*":A[a>>2]=b;break;default:u(`invalid type for setValue: ${c}`)}}
var La="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,J=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&La)return La.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var h=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|h);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|h<<6|k:(f&7)<<18|h<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},
Ma=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},K=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ma(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Na=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},Oa=a=>{if("/"===
a)return"/";a=K(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Pa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);u("initRandomDevice")},Qa=a=>(Qa=Pa())(a);
function Ra(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Ma(a.split("/").filter(e=>!!e),!b).join("/");return(b?"/":"")+a||"."}
var Sa=[],Ta=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},Ua=(a,b,c,e)=>{if(!(0<e))return 0;var f=c;e=c+e-1;for(var h=0;h<a.length;++h){var k=a.charCodeAt(h);if(55296<=k&&57343>=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;b[c++]=240|k>>18;b[c++]=128|k>>
12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f};function Va(a,b,c){c=Array(0<c?c:Ta(a)+1);a=Ua(a,c,0,c.length);b&&(c.length=a);return c}var Wa=[];function Xa(a,b){Wa[a]={input:[],Qf:[],ag:b};Ya(a,Za)}
var Za={open(a){var b=Wa[a.node.dg];if(!b)throw new M(43);a.Rf=b;a.seekable=!1},close(a){a.Rf.ag.gg(a.Rf)},gg(a){a.Rf.ag.gg(a.Rf)},read(a,b,c,e){if(!a.Rf||!a.Rf.ag.vg)throw new M(60);for(var f=0,h=0;h<e;h++){try{var k=a.Rf.ag.vg(a.Rf)}catch(n){throw new M(29);}if(void 0===k&&0===f)throw new M(6);if(null===k||void 0===k)break;f++;b[c+h]=k}f&&(a.node.timestamp=Date.now());return f},write(a,b,c,e){if(!a.Rf||!a.Rf.ag.pg)throw new M(60);try{for(var f=0;f<e;f++)a.Rf.ag.pg(a.Rf,b[c+f])}catch(h){throw new M(29);
}e&&(a.node.timestamp=Date.now());return f}},$a={vg(){a:{if(!Sa.length){var a=null;"undefined"!=typeof window&&"function"==typeof window.prompt?(a=window.prompt("Input: "),null!==a&&(a+="\n")):"function"==typeof readline&&(a=readline(),null!==a&&(a+="\n"));if(!a){a=null;break a}Sa=Va(a,!0)}a=Sa.shift()}return a},pg(a,b){null===b||10===b?(ja(J(a.Qf,0)),a.Qf=[]):0!=b&&a.Qf.push(b)},gg(a){a.Qf&&0<a.Qf.length&&(ja(J(a.Qf,0)),a.Qf=[])},Wg(){return{Sg:25856,Ug:5,Rg:191,Tg:35387,Qg:[3,28,127,21,4,0,1,0,
17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Xg(){return 0},Yg(){return[24,80]}},ab={pg(a,b){null===b||10===b?(r(J(a.Qf,0)),a.Qf=[]):0!=b&&a.Qf.push(b)},gg(a){a.Qf&&0<a.Qf.length&&(r(J(a.Qf,0)),a.Qf=[])}};function bb(a,b){var c=a.Mf?a.Mf.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Mf,a.Mf=new Uint8Array(b),0<a.Of&&a.Mf.set(c.subarray(0,a.Of),0))}
var N={Uf:null,Tf(){return N.createNode(null,"/",16895,0)},createNode(a,b,c,e){if(24576===(c&61440)||4096===(c&61440))throw new M(63);N.Uf||(N.Uf={dir:{node:{Sf:N.Kf.Sf,Pf:N.Kf.Pf,bg:N.Kf.bg,hg:N.Kf.hg,zg:N.Kf.zg,mg:N.Kf.mg,kg:N.Kf.kg,yg:N.Kf.yg,lg:N.Kf.lg},stream:{Yf:N.Lf.Yf}},file:{node:{Sf:N.Kf.Sf,Pf:N.Kf.Pf},stream:{Yf:N.Lf.Yf,read:N.Lf.read,write:N.Lf.write,sg:N.Lf.sg,ig:N.Lf.ig,jg:N.Lf.jg}},link:{node:{Sf:N.Kf.Sf,Pf:N.Kf.Pf,eg:N.Kf.eg},stream:{}},tg:{node:{Sf:N.Kf.Sf,Pf:N.Kf.Pf},stream:cb}});
c=db(a,b,c,e);O(c.mode)?(c.Kf=N.Uf.dir.node,c.Lf=N.Uf.dir.stream,c.Mf={}):32768===(c.mode&61440)?(c.Kf=N.Uf.file.node,c.Lf=N.Uf.file.stream,c.Of=0,c.Mf=null):40960===(c.mode&61440)?(c.Kf=N.Uf.link.node,c.Lf=N.Uf.link.stream):8192===(c.mode&61440)&&(c.Kf=N.Uf.tg.node,c.Lf=N.Uf.tg.stream);c.timestamp=Date.now();a&&(a.Mf[b]=c,a.timestamp=c.timestamp);return c},Vg(a){return a.Mf?a.Mf.subarray?a.Mf.subarray(0,a.Of):new Uint8Array(a.Mf):new Uint8Array(0)},Kf:{Sf(a){var b={};b.Fg=8192===(a.mode&61440)?a.id:
1;b.wg=a.id;b.mode=a.mode;b.Lg=1;b.uid=0;b.Ig=0;b.dg=a.dg;O(a.mode)?b.size=4096:32768===(a.mode&61440)?b.size=a.Of:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.Bg=new Date(a.timestamp);b.Kg=new Date(a.timestamp);b.Eg=new Date(a.timestamp);b.Cg=4096;b.Dg=Math.ceil(b.size/b.Cg);return b},Pf(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);if(void 0!==b.size&&(b=b.size,a.Of!=b))if(0==b)a.Mf=null,a.Of=0;else{var c=a.Mf;a.Mf=new Uint8Array(b);c&&a.Mf.set(c.subarray(0,
Math.min(b,a.Of)));a.Of=b}},bg(){throw eb[44];},hg(a,b,c,e){return N.createNode(a,b,c,e)},zg(a,b,c){if(O(a.mode)){try{var e=fb(b,c)}catch(h){}if(e)for(var f in e.Mf)throw new M(55);}delete a.parent.Mf[a.name];a.parent.timestamp=Date.now();a.name=c;b.Mf[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},mg(a,b){delete a.Mf[b];a.timestamp=Date.now()},kg(a,b){var c=fb(a,b),e;for(e in c.Mf)throw new M(55);delete a.Mf[b];a.timestamp=Date.now()},yg(a){var b=[".",".."],c;for(c in a.Mf)a.Mf.hasOwnProperty(c)&&
b.push(c);return b},lg(a,b,c){a=N.createNode(a,b,41471,0);a.link=c;return a},eg(a){if(40960!==(a.mode&61440))throw new M(28);return a.link}},Lf:{read(a,b,c,e,f){var h=a.node.Mf;if(f>=a.node.Of)return 0;a=Math.min(a.node.Of-f,e);if(8<a&&h.subarray)b.set(h.subarray(f,f+a),c);else for(e=0;e<a;e++)b[c+e]=h[f+e];return a},write(a,b,c,e,f,h){b.buffer===v.buffer&&(h=!1);if(!e)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Mf||a.Mf.subarray)){if(h)return a.Mf=b.subarray(c,c+e),a.Of=e;if(0===
a.Of&&0===f)return a.Mf=b.slice(c,c+e),a.Of=e;if(f+e<=a.Of)return a.Mf.set(b.subarray(c,c+e),f),e}bb(a,f+e);if(a.Mf.subarray&&b.subarray)a.Mf.set(b.subarray(c,c+e),f);else for(h=0;h<e;h++)a.Mf[f+h]=b[c+h];a.Of=Math.max(a.Of,f+e);return e},Yf(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Of);if(0>b)throw new M(28);return b},sg(a,b,c){bb(a.node,b+c);a.node.Of=Math.max(a.node.Of,b+c)},ig(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new M(43);a=a.node.Mf;if(f&2||a.buffer!==
v.buffer){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);c=!0;b=65536*Math.ceil(b/65536);(f=gb(65536,b))?(w.fill(0,f,f+b),b=f):b=0;if(!b)throw new M(48);v.set(a,b)}else c=!1,b=a.byteOffset;return{Mg:b,Ag:c}},jg(a,b,c,e){N.Lf.write(a,b,0,e,c,!1);return 0}}},hb=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},ib=null,jb={},kb=[],lb=1,P=null,mb=!0,M=null,eb={};
function Q(a,b={}){a=Ra(a);if(!a)return{path:"",node:null};b=Object.assign({ug:!0,qg:0},b);if(8<b.qg)throw new M(32);a=a.split("/").filter(k=>!!k);for(var c=ib,e="/",f=0;f<a.length;f++){var h=f===a.length-1;if(h&&b.parent)break;c=fb(c,a[f]);e=K(e+"/"+a[f]);c.Zf&&(!h||h&&b.ug)&&(c=c.Zf.root);if(!h||b.Xf)for(h=0;40960===(c.mode&61440);)if(c=nb(e),e=Ra(Na(e),c),c=Q(e,{qg:b.qg+1}).node,40<h++)throw new M(32);}return{path:e,node:c}}
function ob(a){for(var b;;){if(a===a.parent)return a=a.Tf.xg,b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}}function pb(a,b){for(var c=0,e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)|0;return(a+c>>>0)%P.length}function qb(a){var b=pb(a.parent.id,a.name);if(P[b]===a)P[b]=a.$f;else for(b=P[b];b;){if(b.$f===a){b.$f=a.$f;break}b=b.$f}}
function fb(a,b){var c;if(c=(c=rb(a,"x"))?c:a.Kf.bg?0:2)throw new M(c,a);for(c=P[pb(a.id,b)];c;c=c.$f){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.Kf.bg(a,b)}function db(a,b,c,e){a=new sb(a,b,c,e);b=pb(a.parent.id,a.name);a.$f=P[b];return P[b]=a}function O(a){return 16384===(a&61440)}function tb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}
function rb(a,b){if(mb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0}function ub(a,b){try{return fb(a,b),20}catch(c){}return rb(a,"wx")}function vb(a,b,c){try{var e=fb(a,b)}catch(f){return f.Nf}if(a=rb(a,"wx"))return a;if(c){if(!O(e.mode))return 54;if(e===e.parent||"/"===ob(e))return 10}else if(O(e.mode))return 31;return 0}function wb(){for(var a=0;4096>=a;a++)if(!kb[a])return a;throw new M(33);}
function R(a){a=kb[a];if(!a)throw new M(8);return a}function xb(a,b=-1){yb||(yb=function(){this.fg={}},yb.prototype={},Object.defineProperties(yb.prototype,{object:{get(){return this.node},set(c){this.node=c}},flags:{get(){return this.fg.flags},set(c){this.fg.flags=c}},position:{get(){return this.fg.position},set(c){this.fg.position=c}}}));a=Object.assign(new yb,a);-1==b&&(b=wb());a.Vf=b;return kb[b]=a}var cb={open(a){a.Lf=jb[a.node.dg].Lf;a.Lf.open&&a.Lf.open(a)},Yf(){throw new M(70);}};
function Ya(a,b){jb[a]={Lf:b}}function zb(a,b){var c="/"===b,e=!b;if(c&&ib)throw new M(10);if(!c&&!e){var f=Q(b,{ug:!1});b=f.path;f=f.node;if(f.Zf)throw new M(10);if(!O(f.mode))throw new M(54);}b={type:a,$g:{},xg:b,Jg:[]};a=a.Tf(b);a.Tf=b;b.root=a;c?ib=a:f&&(f.Zf=b,f.Tf&&f.Tf.Jg.push(b))}function Ab(a,b,c){var e=Q(a,{parent:!0}).node;a=Oa(a);if(!a||"."===a||".."===a)throw new M(28);var f=ub(e,a);if(f)throw new M(f);if(!e.Kf.hg)throw new M(63);return e.Kf.hg(e,a,b,c)}
function S(a,b){return Ab(a,(void 0!==b?b:511)&1023|16384,0)}function Bb(a,b,c){"undefined"==typeof c&&(c=b,b=438);Ab(a,b|8192,c)}function Cb(a,b){if(!Ra(a))throw new M(44);var c=Q(b,{parent:!0}).node;if(!c)throw new M(44);b=Oa(b);var e=ub(c,b);if(e)throw new M(e);if(!c.Kf.lg)throw new M(63);c.Kf.lg(c,b,a)}function Db(a){var b=Q(a,{parent:!0}).node;a=Oa(a);var c=fb(b,a),e=vb(b,a,!0);if(e)throw new M(e);if(!b.Kf.kg)throw new M(63);if(c.Zf)throw new M(10);b.Kf.kg(b,a);qb(c)}
function nb(a){a=Q(a).node;if(!a)throw new M(44);if(!a.Kf.eg)throw new M(28);return Ra(ob(a.parent),a.Kf.eg(a))}function Eb(a,b){a=Q(a,{Xf:!b}).node;if(!a)throw new M(44);if(!a.Kf.Sf)throw new M(63);return a.Kf.Sf(a)}function Fb(a){return Eb(a,!0)}function Gb(a,b){a="string"==typeof a?Q(a,{Xf:!0}).node:a;if(!a.Kf.Pf)throw new M(63);a.Kf.Pf(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})}
function Hb(a,b){if(0>b)throw new M(28);a="string"==typeof a?Q(a,{Xf:!0}).node:a;if(!a.Kf.Pf)throw new M(63);if(O(a.mode))throw new M(31);if(32768!==(a.mode&61440))throw new M(28);var c=rb(a,"w");if(c)throw new M(c);a.Kf.Pf(a,{size:b,timestamp:Date.now()})}
function Ib(a,b,c){if(""===a)throw new M(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=K(a);try{f=Q(a,{Xf:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new M(20);}else f=Ab(a,c,0),e=!0;if(!f)throw new M(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!O(f.mode))throw new M(54);if(!e&&(c=
f?40960===(f.mode&61440)?32:O(f.mode)&&("r"!==tb(b)||b&512)?31:rb(f,tb(b)):44))throw new M(c);b&512&&!e&&Hb(f,0);b&=-131713;f=xb({node:f,path:ob(f),flags:b,seekable:!0,position:0,Lf:f.Lf,Pg:[],error:!1});f.Lf.open&&f.Lf.open(f);!d.logReadFiles||b&1||(Jb||(Jb={}),a in Jb||(Jb[a]=1));return f}function Kb(a,b,c){if(null===a.Vf)throw new M(8);if(!a.seekable||!a.Lf.Yf)throw new M(70);if(0!=c&&1!=c&&2!=c)throw new M(28);a.position=a.Lf.Yf(a,b,c);a.Pg=[]}
function Lb(){M||(M=function(a,b){this.name="ErrnoError";this.node=b;this.Ng=function(c){this.Nf=c};this.Ng(a);this.message="FS error"},M.prototype=Error(),M.prototype.constructor=M,[44].forEach(a=>{eb[a]=new M(a);eb[a].stack="<generic error, no stack>"}))}var Mb;
function Nb(a,b,c){a=K("/dev/"+a);var e=hb(!!b,!!c);Ob||(Ob=64);var f=Ob++<<8|0;Ya(f,{open(h){h.seekable=!1},close(){c&&c.buffer&&c.buffer.length&&c(10)},read(h,k,n,l){for(var m=0,q=0;q<l;q++){try{var p=b()}catch(t){throw new M(29);}if(void 0===p&&0===m)throw new M(6);if(null===p||void 0===p)break;m++;k[n+q]=p}m&&(h.node.timestamp=Date.now());return m},write(h,k,n,l){for(var m=0;m<l;m++)try{c(k[n+m])}catch(q){throw new M(29);}l&&(h.node.timestamp=Date.now());return m}});Bb(a,e,f)}var Ob,T={},yb,Jb;
function Pb(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":R(a).path;if(0==b.length){if(!c)throw new M(44);return a}return K(a+"/"+b)}
function Qb(a,b,c){try{var e=a(b)}catch(h){if(h&&h.node&&K(b)!==K(ob(h.node)))return-54;throw h;}z[c>>2]=e.Fg;z[c+4>>2]=e.mode;A[c+8>>2]=e.Lg;z[c+12>>2]=e.uid;z[c+16>>2]=e.Ig;z[c+20>>2]=e.dg;D=[e.size>>>0,(C=e.size,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[c+24>>2]=D[0];z[c+28>>2]=D[1];z[c+32>>2]=4096;z[c+36>>2]=e.Dg;a=e.Bg.getTime();b=e.Kg.getTime();var f=e.Eg.getTime();D=[Math.floor(a/1E3)>>>0,(C=Math.floor(a/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/
4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[c+40>>2]=D[0];z[c+44>>2]=D[1];A[c+48>>2]=a%1E3*1E3;D=[Math.floor(b/1E3)>>>0,(C=Math.floor(b/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[c+56>>2]=D[0];z[c+60>>2]=D[1];A[c+64>>2]=b%1E3*1E3;D=[Math.floor(f/1E3)>>>0,(C=Math.floor(f/1E3),1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[c+72>>2]=D[0];z[c+76>>2]=D[1];A[c+80>>2]=
f%1E3*1E3;D=[e.wg>>>0,(C=e.wg,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[c+88>>2]=D[0];z[c+92>>2]=D[1];return 0}var Rb=void 0;function Sb(){var a=z[+Rb>>2];Rb+=4;return a}
var Tb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Ub=[0,31,60,91,121,152,182,213,244,274,305,335],Vb=[0,31,59,90,120,151,181,212,243,273,304,334],Xb=a=>{var b=Ta(a)+1,c=Wb(b);c&&Ua(a,w,c,b);return c},Yb={},$b=()=>{if(!Zb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in Yb)void 0===Yb[b]?delete a[b]:a[b]=Yb[b];
var c=[];for(b in a)c.push(`${b}=${a[b]}`);Zb=c}return Zb},Zb;function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}
function Dc(){}function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}function Jc(){}function Kc(){}function Lc(){}function Mc(){}var Nc=0,Oc=a=>{oa=a;if(!(Ka||0<Nc)){if(d.onExit)d.onExit(a);na=!0}ea(a,new Ia(a))},Pc=a=>{a instanceof Ia||"unwind"==a||ea(1,a)},Qc=a=>{try{a()}catch(b){u(b)}};
function Rc(){var a=U,b={},c;for(c in a)(function(e){var f=a[e];b[e]="function"==typeof f?function(){Sc.push(e);try{return f.apply(null,arguments)}finally{na||(Sc.pop()===e||u(),V&&1===W&&0===Sc.length&&(W=0,Qc(Tc),"undefined"!=typeof Fibers&&Fibers.ah()))}}:f})(c);return b}var W=0,V=null,Uc=0,Sc=[],Vc={},Wc={},Xc=0,Yc=null,Zc=[];function $c(){return new Promise((a,b)=>{Yc={resolve:a,reject:b}})}
function ad(){var a=Wb(16396),b=a+12;A[a>>2]=b;A[a+4>>2]=b+16384;b=Sc[0];var c=Vc[b];void 0===c&&(c=Xc++,Vc[b]=c,Wc[c]=b);z[a+8>>2]=c;return a}
function bd(a){if(!na){if(0===W){var b=!1,c=!1;a((e=0)=>{if(!na&&(Uc=e,b=!0,c)){W=2;Qc(()=>cd(V));"undefined"!=typeof Browser&&Browser.og.Hg&&Browser.og.resume();e=!1;try{var f=(0,U[Wc[z[V+8>>2]]])()}catch(n){f=n,e=!0}var h=!1;if(!V){var k=Yc;k&&(Yc=null,(e?k.reject:k.resolve)(f),h=!0)}if(e&&!h)throw f;}});c=!0;b||(W=1,V=ad(),"undefined"!=typeof Browser&&Browser.og.Hg&&Browser.og.pause(),Qc(()=>dd(V)))}else 2===W?(W=0,Qc(ed),fd(V),V=null,Zc.forEach(e=>{if(!na)try{if(e(),!(Ka||0<Nc))try{oa=e=oa,Oc(e)}catch(f){Pc(f)}}catch(f){Pc(f)}})):
u(`invalid state: ${W}`);return Uc}}function gd(a){return bd(b=>{a().then(b)})}
var hd={},jd=[],X,kd,ld=[],Z=(a,b,c,e,f)=>{function h(p){--Nc;0!==l&&md(l);return"string"===b?p?J(w,p):"":"boolean"===b?!!p:p}var k={string:p=>{var t=0;if(null!==p&&void 0!==p&&0!==p){t=Ta(p)+1;var y=nd(t);Ua(p,w,y,t);t=y}return t},array:p=>{var t=nd(p.length);v.set(p,t);return t}};a=d["_"+a];var n=[],l=0;if(e)for(var m=0;m<e.length;m++){var q=k[c[m]];q?(0===l&&(l=od()),n[m]=q(e[m])):n[m]=e[m]}c=V;e=a.apply(null,n);f=f&&f.async;Nc+=1;if(V!=c)return $c().then(h);e=h(e);return f?Promise.resolve(e):
e},pd="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function sb(a,b,c,e){a||(a=this);this.parent=a;this.Tf=a.Tf;this.Zf=null;this.id=lb++;this.name=b;this.mode=c;this.Kf={};this.Lf={};this.dg=e}Object.defineProperties(sb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Lb();P=Array(4096);zb(N,"/");S("/tmp");S("/home");
S("/home/web_user");(function(){S("/dev");Ya(259,{read:()=>0,write:(e,f,h,k)=>k});Bb("/dev/null",259);Xa(1280,$a);Xa(1536,ab);Bb("/dev/tty",1280);Bb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Qa(a).byteLength);return a[--b]};Nb("random",c);Nb("urandom",c);S("/dev/shm");S("/dev/shm/tmp")})();
(function(){S("/proc");var a=S("/proc/self");S("/proc/self/fd");zb({Tf(){var b=db(a,"fd",16895,73);b.Kf={bg(c,e){var f=R(+e);c={parent:null,Tf:{xg:"fake"},Kf:{eg:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})();
(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,rg:e}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};ac=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,rg:l}=a.get(b);return n(l,c,e?e?J(w,e):"":null,f?f?J(w,f):"":null,h?h?J(w,h):"":null,k?k?J(w,k):"":null)}return 0}})();
(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Wf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,Gg:l,Wf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};cc=function(c,e,f,h){c=a.get(c);b.set(e,
c.Wf);c.f(e,new Uint32Array(w.buffer,h,f));b.delete(e)};ec=function(c,e,f,h){c=a.get(c);b.set(e,c.Wf);c.step(e,new Uint32Array(w.buffer,h,f));b.delete(e)};bc=function(c,e){c=a.get(c);b.set(e,c.Wf);c.Gg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,rg:f}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};dc=function(b){if(a.has(b)){const {f:c,rg:e}=a.get(b);return c(e)}return 0}})();
(function(){function a(l,m){const q=`get${l}`,p=`set${l}`;return new Proxy(new DataView(w.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===q)return function(B,G){if(!G)throw Error("must be little endian");return t[y](B,G)};if(y===p)return function(B,G,E){if(!E)throw Error("must be little endian");return t[y](B,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof hd,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null,n=new Map;
vc=function(l,m,q,p){n.set(l?J(w,l):"",{size:m,cg:Array.from(new Uint32Array(w.buffer,p,q))})};d.createModule=function(l,m,q,p){b&&(q.handleAsync=gd);const t=c.size;c.set(t,{module:q,Wf:p});p=0;q.xCreate&&(p|=1);q.xConnect&&(p|=2);q.xBestIndex&&(p|=4);q.xDisconnect&&(p|=8);q.xDestroy&&(p|=16);q.xOpen&&(p|=32);q.xClose&&(p|=64);q.xFilter&&(p|=128);q.xNext&&(p|=256);q.xEof&&(p|=512);q.xColumn&&(p|=1024);q.xRowid&&(p|=2048);q.xUpdate&&(p|=4096);q.xBegin&&(p|=8192);q.xSync&&(p|=16384);q.xCommit&&(p|=
32768);q.xRollback&&(p|=65536);q.xFindFunction&&(p|=131072);q.xRename&&(p|=262144);return Z("create_module","number",["number","string","number","number"],[l,m,t,p])};lc=function(l,m,q,p,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const B of h)e.delete(B)}p=Array.from(new Uint32Array(w.buffer,p,q)).map(B=>B?J(w,B):"");return m.module.xCreate(l,m.Wf,p,t,a("Int32",y))};kc=function(l,m,q,p,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const B of h)e.delete(B)}p=Array.from(new Uint32Array(w.buffer,
p,q)).map(B=>B?J(w,B):"");return m.module.xConnect(l,m.Wf,p,t,a("Int32",y))};gc=function(l,m){var q=e.get(l),p=n.get("sqlite3_index_info").cg;const t={};t.nConstraint=F(m+p[0],"i32");t.aConstraint=[];var y=F(m+p[1],"*"),B=n.get("sqlite3_index_constraint").size;for(var G=0;G<t.nConstraint;++G){var E=t.aConstraint,L=E.push,I=y+G*B,la=n.get("sqlite3_index_constraint").cg,Y={};Y.iColumn=F(I+la[0],"i32");Y.op=F(I+la[1],"i8");Y.usable=!!F(I+la[2],"i8");L.call(E,Y)}t.nOrderBy=F(m+p[2],"i32");t.aOrderBy=
[];y=F(m+p[3],"*");B=n.get("sqlite3_index_orderby").size;for(G=0;G<t.nOrderBy;++G)E=t.aOrderBy,L=E.push,I=y+G*B,la=n.get("sqlite3_index_orderby").cg,Y={},Y.iColumn=F(I+la[0],"i32"),Y.desc=!!F(I+la[1],"i8"),L.call(E,Y);t.aConstraintUsage=[];for(y=0;y<t.nConstraint;++y)t.aConstraintUsage.push({argvIndex:0,omit:!1});t.idxNum=F(m+p[5],"i32");t.idxStr=null;t.orderByConsumed=!!F(m+p[8],"i8");t.estimatedCost=F(m+p[9],"double");t.estimatedRows=F(m+p[10],"i32");t.idxFlags=F(m+p[11],"i32");t.colUsed=F(m+p[12],
"i32");l=q.module.xBestIndex(l,t);q=n.get("sqlite3_index_info").cg;p=F(m+q[4],"*");y=n.get("sqlite3_index_constraint_usage").size;for(L=0;L<t.nConstraint;++L)B=p+L*y,E=t.aConstraintUsage[L],I=n.get("sqlite3_index_constraint_usage").cg,H(B+I[0],E.argvIndex,"i32"),H(B+I[1],E.omit?1:0,"i8");H(m+q[5],t.idxNum,"i32");"string"===typeof t.idxStr&&(p=Ta(t.idxStr),y=Z("sqlite3_malloc","number",["number"],[p+1]),Ua(t.idxStr,w,y,p+1),H(m+q[6],y,"*"),H(m+q[7],1,"i32"));H(m+q[8],t.orderByConsumed,"i32");H(m+q[9],
t.estimatedCost,"double");H(m+q[10],t.estimatedRows,"i32");H(m+q[11],t.idxFlags,"i32");return l};nc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDisconnect(l)};mc=function(l){const m=e.get(l);b?h.add(l):e.delete(l);return m.module.xDestroy(l)};rc=function(l,m){const q=e.get(l);f.set(m,q);if(b){k.delete(m);for(const p of k)f.delete(p)}return q.module.xOpen(l,m)};hc=function(l){const m=f.get(l);b?k.add(l):f.delete(l);return m.module.xClose(l)};oc=function(l){return f.get(l).module.xEof(l)?
1:0};pc=function(l,m,q,p,t){const y=f.get(l);q=q?q?J(w,q):"":null;t=new Uint32Array(w.buffer,t,p);return y.module.xFilter(l,m,q,t)};qc=function(l){return f.get(l).module.xNext(l)};ic=function(l,m,q){return f.get(l).module.xColumn(l,m,q)};uc=function(l,m){return f.get(l).module.xRowid(l,a("BigInt64",m))};xc=function(l,m,q,p){const t=e.get(l);q=new Uint32Array(w.buffer,q,m);return t.module.xUpdate(l,q,a("BigInt64",p))};fc=function(l){return e.get(l).module.xBegin(l)};wc=function(l){return e.get(l).module.xSync(l)};
jc=function(l){return e.get(l).module.xCommit(l)};tc=function(l){return e.get(l).module.xRollback(l)};sc=function(l,m){const q=e.get(l);m=m?J(w,m):"";return q.module.xRename(l,m)}})();
(function(){function a(h,k){const n=`get${h}`,l=`set${h}`;return new Proxy(new DataView(w.buffer,k,"Int32"===h?4:8),{get(m,q){if(q===n)return function(p,t){if(!t)throw Error("must be little endian");return m[q](p,t)};if(q===l)return function(p,t,y){if(!y)throw Error("must be little endian");return m[q](p,t,y)};if("string"===typeof q&&q.match(/^(get)|(set)/))throw Error("invalid type");return m[q]}})}const b="object"===typeof hd;b&&(d.handleAsync=gd);const c=new Map,e=new Map;d.registerVFS=function(h,
k){if(Z("sqlite3_vfs_find","number",["string"],[h.name]))throw Error(`VFS '${h.name}' already registered`);b&&(h.handleAsync=gd);var n=h.Zg??64;const l=d._malloc(4);k=Z("register_vfs","number",["string","number","number","number"],[h.name,n,k?1:0,l]);k||(n=F(l,"*"),c.set(n,h));d._free(l);return k};const f=b?new Set:null;Ac=function(h){const k=e.get(h);b?f.add(h):e.delete(h);return k.xClose(h)};Hc=function(h,k,n,l,m){return e.get(h).xRead(h,w.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Mc=function(h,
k,n,l,m){return e.get(h).xWrite(h,w.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Kc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Jc=function(h,k){return e.get(h).xSync(h,k)};Ec=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};Fc=function(h,k){return e.get(h).xLock(h,k)};Lc=function(h,k){return e.get(h).xUnlock(h,k)};zc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};Dc=function(h,k,n){const l=e.get(h);n=new DataView(w.buffer,
n);return l.xFileControl(h,k,n)};Ic=function(h){return e.get(h).xSectorSize(h)};Cc=function(h){return e.get(h).xDeviceCharacteristics(h)};Gc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var q of f)e.delete(q)}q=null;if(l&64){q=1;const p=[];for(;q;){const t=w[k++];if(t)p.push(t);else switch(w[k]||(q=null),q){case 1:p.push(63);q=2;break;case 2:p.push(61);q=3;break;case 3:p.push(38),q=2}}q=(new TextDecoder).decode(new Uint8Array(p))}else k&&(q=k?J(w,k):"");m=a("Int32",m);return h.xOpen(q,
n,l,m)};Bc=function(h,k,n){return c.get(h).xDelete(k?J(w,k):"",n)};yc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?J(w,k):"",n,l)}})();
var rd={a:(a,b,c,e)=>{u(`Assertion failed: ${a?J(w,a):""}, at: `+[b?b?J(w,b):"":"unknown filename",c,e?e?J(w,e):"":"unknown function"])},P:function(a,b){try{return a=a?J(w,a):"",Gb(a,b),0}catch(c){if("undefined"==typeof T||"ErrnoError"!==c.name)throw c;return-c.Nf}},S:function(a,b,c){try{b=b?J(w,b):"";b=Pb(a,b);if(c&-8)return-28;var e=Q(b,{Xf:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&rb(e,a)?-2:0}catch(f){if("undefined"==typeof T||"ErrnoError"!==f.name)throw f;
return-f.Nf}},Q:function(a,b){try{var c=R(a);Gb(c.node,b);return 0}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return-e.Nf}},O:function(a){try{var b=R(a).node;var c="string"==typeof b?Q(b,{Xf:!0}).node:b;if(!c.Kf.Pf)throw new M(63);c.Kf.Pf(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return-e.Nf}},b:function(a,b,c){Rb=c;try{var e=R(a);switch(b){case 0:var f=Sb();if(0>f)return-28;for(;kb[f];)f++;return xb(e,f).Vf;case 1:case 2:return 0;
case 3:return e.flags;case 4:return f=Sb(),e.flags|=f,0;case 5:return f=Sb(),x[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return z[qd()>>2]=28,-1;default:return-28}}catch(h){if("undefined"==typeof T||"ErrnoError"!==h.name)throw h;return-h.Nf}},N:function(a,b){try{var c=R(a);return Qb(Eb,c.path,b)}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return-e.Nf}},n:function(a,b,c){b=Tb(b,c);try{if(isNaN(b))return 61;var e=R(a);if(0===(e.flags&2097155))throw new M(28);
Hb(e.node,b);return 0}catch(f){if("undefined"==typeof T||"ErrnoError"!==f.name)throw f;return-f.Nf}},H:function(a,b){try{if(0===b)return-28;var c=Ta("/")+1;if(b<c)return-68;Ua("/",w,a,b);return c}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return-e.Nf}},L:function(a,b){try{return a=a?J(w,a):"",Qb(Fb,a,b)}catch(c){if("undefined"==typeof T||"ErrnoError"!==c.name)throw c;return-c.Nf}},E:function(a,b,c){try{return b=b?J(w,b):"",b=Pb(a,b),b=K(b),"/"===b[b.length-1]&&(b=b.substr(0,
b.length-1)),S(b,c),0}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return-e.Nf}},J:function(a,b,c,e){try{b=b?J(w,b):"";var f=e&256;b=Pb(a,b,e&4096);return Qb(f?Fb:Eb,b,c)}catch(h){if("undefined"==typeof T||"ErrnoError"!==h.name)throw h;return-h.Nf}},D:function(a,b,c,e){Rb=e;try{b=b?J(w,b):"";b=Pb(a,b);var f=e?Sb():0;return Ib(b,c,f).Vf}catch(h){if("undefined"==typeof T||"ErrnoError"!==h.name)throw h;return-h.Nf}},B:function(a,b,c,e){try{b=b?J(w,b):"";b=Pb(a,b);if(0>=e)return-28;
var f=nb(b),h=Math.min(e,Ta(f)),k=v[c+h];Ua(f,w,c,e+1);v[c+h]=k;return h}catch(n){if("undefined"==typeof T||"ErrnoError"!==n.name)throw n;return-n.Nf}},A:function(a){try{return a=a?J(w,a):"",Db(a),0}catch(b){if("undefined"==typeof T||"ErrnoError"!==b.name)throw b;return-b.Nf}},M:function(a,b){try{return a=a?J(w,a):"",Qb(Eb,a,b)}catch(c){if("undefined"==typeof T||"ErrnoError"!==c.name)throw c;return-c.Nf}},v:function(a,b,c){try{b=b?J(w,b):"";b=Pb(a,b);if(0===c){a=b;var e=Q(a,{parent:!0}).node;if(!e)throw new M(44);
var f=Oa(a),h=fb(e,f),k=vb(e,f,!1);if(k)throw new M(k);if(!e.Kf.mg)throw new M(63);if(h.Zf)throw new M(10);e.Kf.mg(e,f);qb(h)}else 512===c?Db(b):u("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof T||"ErrnoError"!==n.name)throw n;return-n.Nf}},u:function(a,b,c){try{b=b?J(w,b):"";b=Pb(a,b,!0);if(c){var e=A[c>>2]+4294967296*z[c+4>>2],f=z[c+8>>2];h=1E3*e+f/1E6;c+=16;e=A[c>>2]+4294967296*z[c+4>>2];f=z[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=Q(b,{Xf:!0}).node;
n.Kf.Pf(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"==typeof T||"ErrnoError"!==l.name)throw l;return-l.Nf}},l:function(a,b,c){a=new Date(1E3*Tb(a,b));z[c>>2]=a.getSeconds();z[c+4>>2]=a.getMinutes();z[c+8>>2]=a.getHours();z[c+12>>2]=a.getDate();z[c+16>>2]=a.getMonth();z[c+20>>2]=a.getFullYear()-1900;z[c+24>>2]=a.getDay();b=a.getFullYear();z[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Vb:Ub)[a.getMonth()]+a.getDate()-1|0;z[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),
6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();z[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:function(a,b,c,e,f,h,k,n){f=Tb(f,h);try{if(isNaN(f))return 61;var l=R(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new M(2);if(1===(l.flags&2097155))throw new M(2);if(!l.Lf.ig)throw new M(43);var m=l.Lf.ig(l,a,f,b,c);var q=m.Mg;z[k>>2]=m.Ag;A[n>>2]=q;return 0}catch(p){if("undefined"==typeof T||"ErrnoError"!==p.name)throw p;return-p.Nf}},k:function(a,
b,c,e,f,h,k){h=Tb(h,k);try{if(isNaN(h))return 61;var n=R(f);if(c&2){if(32768!==(n.node.mode&61440))throw new M(43);e&2||n.Lf.jg&&n.Lf.jg(n,w.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof T||"ErrnoError"!==l.name)throw l;return-l.Nf}},w:(a,b,c)=>{function e(l){return(l=l.toTimeString().match(/\(([A-Za-z ]+)\)$/))?l[1]:"GMT"}var f=(new Date).getFullYear(),h=new Date(f,0,1),k=new Date(f,6,1);f=h.getTimezoneOffset();var n=k.getTimezoneOffset();A[a>>2]=60*Math.max(f,n);z[b>>2]=Number(f!=n);a=e(h);
b=e(k);a=Xb(a);b=Xb(b);n<f?(A[c>>2]=a,A[c+4>>2]=b):(A[c>>2]=b,A[c+4>>2]=a)},ua:()=>{u("")},e:()=>Date.now(),d:()=>performance.now(),x:(a,b,c)=>w.copyWithin(a,b,b+c),s:a=>{var b=w.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(f);sa();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},F:(a,b)=>{var c=0;$b().forEach((e,
f)=>{var h=b+c;f=A[a+4*f>>2]=h;for(h=0;h<e.length;++h)v[f++>>0]=e.charCodeAt(h);v[f>>0]=0;c+=e.length+1});return 0},G:(a,b)=>{var c=$b();A[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);A[b>>2]=e;return 0},f:function(a){try{var b=R(a);if(null===b.Vf)throw new M(8);b.ng&&(b.ng=null);try{b.Lf.close&&b.Lf.close(b)}catch(c){throw c;}finally{kb[b.Vf]=null}b.Vf=null;return 0}catch(c){if("undefined"==typeof T||"ErrnoError"!==c.name)throw c;return c.Nf}},t:function(a,b){try{var c=R(a);v[b>>0]=c.Rf?2:
O(c.mode)?3:40960===(c.mode&61440)?7:4;x[b+2>>1]=0;D=[0,(C=0,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[b+8>>2]=D[0];z[b+12>>2]=D[1];D=[0,(C=0,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[b+16>>2]=D[0];z[b+20>>2]=D[1];return 0}catch(e){if("undefined"==typeof T||"ErrnoError"!==e.name)throw e;return e.Nf}},C:function(a,b,c,e){try{a:{var f=R(a);a=b;for(var h,k=b=0;k<c;k++){var n=A[a>>2],l=
A[a+4>>2];a+=8;var m=f,q=n,p=l,t=h,y=v;if(0>p||0>t)throw new M(28);if(null===m.Vf)throw new M(8);if(1===(m.flags&2097155))throw new M(8);if(O(m.node.mode))throw new M(31);if(!m.Lf.read)throw new M(28);var B="undefined"!=typeof t;if(!B)t=m.position;else if(!m.seekable)throw new M(70);var G=m.Lf.read(m,y,q,p,t);B||(m.position+=G);var E=G;if(0>E){var L=-1;break a}b+=E;if(E<l)break;"undefined"!==typeof h&&(h+=E)}L=b}A[e>>2]=L;return 0}catch(I){if("undefined"==typeof T||"ErrnoError"!==I.name)throw I;return I.Nf}},
m:function(a,b,c,e,f){b=Tb(b,c);try{if(isNaN(b))return 61;var h=R(a);Kb(h,b,e);D=[h.position>>>0,(C=h.position,1<=+Math.abs(C)?0<C?+Math.floor(C/4294967296)>>>0:~~+Math.ceil((C-+(~~C>>>0))/4294967296)>>>0:0)];z[f>>2]=D[0];z[f+4>>2]=D[1];h.ng&&0===b&&0===e&&(h.ng=null);return 0}catch(k){if("undefined"==typeof T||"ErrnoError"!==k.name)throw k;return k.Nf}},I:function(a){try{var b=R(a);return bd(c=>{var e=b.node.Tf;e.type.Og?e.type.Og(e,!1,f=>{f?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof T||
"ErrnoError"!==c.name)throw c;return c.Nf}},y:function(a,b,c,e){try{a:{var f=R(a);a=b;for(var h,k=b=0;k<c;k++){var n=A[a>>2],l=A[a+4>>2];a+=8;var m=f,q=n,p=l,t=h,y=v;if(0>p||0>t)throw new M(28);if(null===m.Vf)throw new M(8);if(0===(m.flags&2097155))throw new M(8);if(O(m.node.mode))throw new M(31);if(!m.Lf.write)throw new M(28);m.seekable&&m.flags&1024&&Kb(m,0,2);var B="undefined"!=typeof t;if(!B)t=m.position;else if(!m.seekable)throw new M(70);var G=m.Lf.write(m,y,q,p,t,void 0);B||(m.position+=G);
var E=G;if(0>E){var L=-1;break a}b+=E;"undefined"!==typeof h&&(h+=E)}L=b}A[e>>2]=L;return 0}catch(I){if("undefined"==typeof T||"ErrnoError"!==I.name)throw I;return I.Nf}},g:(a,b)=>{Qa(w.subarray(a,a+b));return 0},aa:ac,z:bc,R:cc,ea:dc,K:ec,ma:fc,o:gc,ta:hc,pa:ic,ka:jc,ga:kc,ha:lc,h:mc,i:nc,qa:oc,sa:pc,ra:qc,fa:rc,ia:sc,ja:tc,oa:uc,c:vc,la:wc,na:xc,ca:yc,X:zc,ba:Ac,da:Bc,U:Cc,W:Dc,_:Ec,Z:Fc,T:Gc,r:Hc,V:Ic,$:Jc,p:Kc,Y:Lc,q:Mc},U=function(){function a(c){U=c.exports;U=Rc();ma=U.va;sa();X=U.Af;ua.unshift(U.wa);
ya--;d.monitorRunDependencies&&d.monitorRunDependencies(ya);0==ya&&(null!==za&&(clearInterval(za),za=null),Aa&&(c=Aa,Aa=null,c()));return U}var b={a:rd};ya++;d.monitorRunDependencies&&d.monitorRunDependencies(ya);if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ha(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=U.xa)(a,b,c,e);
d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=U.ya)(a,b,c,e);d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=U.za)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=U.Aa)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=U.Ba)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=U.Ca)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=U.Da)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=U.Ea)(a);
d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=U.Fa)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=U.Ga)();d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=U.Ha)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=U.Ia)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=U.Ja)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=U.Ka)(a,b);d._sqlite3_free=a=>(d._sqlite3_free=U.La)(a);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=U.Ma)(a,b);
d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=U.Na)(a,b,c);d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=U.Oa)(a,b,c);d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=U.Pa)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=U.Qa)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=U.Ra)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=U.Sa)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=U.Ta)(a);
d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=U.Ua)(a);d._sqlite3_str_length=a=>(d._sqlite3_str_length=U.Va)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=U.Wa)(a);d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=U.Xa)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=U.Ya)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=U.Za)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=U._a)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=U.$a)(a,b,c,e);
d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=U.ab)(a,b,c,e);d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=U.bb)(a,b,c);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=U.cb)(a,b);d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=U.db)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=U.eb)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=U.fb)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=U.gb)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=U.hb)(a,b,c,e);
d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=U.ib)(a,b,c,e,f);d._sqlite3_step=a=>(d._sqlite3_step=U.jb)(a);d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=U.kb)(a,b);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=U.lb)(a,b);d._sqlite3_finalize=a=>(d._sqlite3_finalize=U.mb)(a);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=U.nb)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=U.ob)(a);
d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=U.pb)(a,b,c,e);d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=U.qb)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=U.rb)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=U.sb)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=U.tb)(a);d._sqlite3_reset=a=>(d._sqlite3_reset=U.ub)(a);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=U.vb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=U.wb)(a);
d._sqlite3_value_text=a=>(d._sqlite3_value_text=U.xb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=U.yb)(a);d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=U.zb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=U.Ab)(a);d._sqlite3_value_int=a=>(d._sqlite3_value_int=U.Bb)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=U.Cb)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=U.Db)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=U.Eb)(a,b);
d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=U.Fb)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=U.Gb)(a);d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=U.Hb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=U.Ib)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=U.Jb)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=U.Kb)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=U.Lb)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=U.Mb)(a);
d._sqlite3_value_free=a=>(d._sqlite3_value_free=U.Nb)(a);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=U.Ob)(a,b,c,e);d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=U.Pb)(a,b,c,e,f);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=U.Qb)(a,b);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=U.Rb)(a,b,c);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=U.Sb)(a,b,c);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=U.Tb)(a,b);
d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=U.Ub)(a,b,c);d._sqlite3_result_null=a=>(d._sqlite3_result_null=U.Vb)(a);d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=U.Wb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=U.Xb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=U.Yb)(a,b,c,e);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=U.Zb)(a,b,c,e,f,h);
d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=U._b)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=U.$b)(a,b,c,e);d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=U.ac)(a,b,c,e);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=U.bc)(a,b);d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=U.cc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=U.dc)(a,b);
d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=U.ec)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=U.fc)(a,b);d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=U.gc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=U.hc)(a);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=U.ic)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=U.jc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=U.kc)(a,b);
d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=U.lc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=U.mc)(a,b);d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=U.nc)(a,b);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=U.oc)(a,b,c,e);d._sqlite3_column_count=a=>(d._sqlite3_column_count=U.pc)(a);d._sqlite3_data_count=a=>(d._sqlite3_data_count=U.qc)(a);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=U.rc)(a,b);
d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=U.sc)(a,b);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=U.tc)(a,b);d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=U.uc)(a,b);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=U.vc)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=U.wc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=U.xc)(a,b);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=U.yc)(a,b);
d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=U.zc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=U.Ac)(a,b);d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=U.Bc)(a,b,c,e,f);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=U.Cc)(a,b,c,e,f,h);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=U.Dc)(a,b,c);d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=U.Ec)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=U.Fc)(a,b,c,e);
d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=U.Gc)(a,b);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=U.Hc)(a,b,c,e,f);d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=U.Ic)(a,b,c,e,f);d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=U.Jc)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=U.Kc)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=U.Lc)(a,b,c);
d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=U.Mc)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=U.Nc)(a,b,c,e);d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=U.Oc)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=U.Pc)(a,b);d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=U.Qc)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=U.Rc)(a);
d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=U.Sc)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=U.Tc)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=U.Uc)(a,b);d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=U.Vc)(a);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=U.Wc)(a,b);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=U.Xc)(a,b,c);d._sqlite3_sql=a=>(d._sqlite3_sql=U.Yc)(a);d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=U.Zc)(a);
d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=U._c)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=U.$c)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=U.ad)(a);d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=U.bd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=U.cd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=U.dd)(a);d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=U.ed)(a,b,c);
d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=U.fd)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=U.gd)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=U.hd)(a,b,c);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=U.id)(a,b,c,e,f);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=U.jd)(a);d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=U.kd)(a);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=U.ld)(a);
d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=U.md)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=U.nd)(a,b,c,e,f);d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=U.od)(a,b,c,e,f,h);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=U.pd)(a,b,c,e,f);d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=U.qd)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=U.rd)(a,b,c,e,f,h);
d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=U.sd)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=U.td)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=U.ud)(a,b,c,e);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=U.vd)(a,b,c,e,f);d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=U.wd)(a,b);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=U.xd)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=U.yd)(a);
d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=U.zd)(a,b,c);d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=U.Ad)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=U.Bd)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=U.Cd)(a,b,c);d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=U.Dd)(a);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=U.Ed)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=U.Fd)();
d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=U.Gd)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=U.Hd)(a);d._sqlite3_complete16=a=>(d._sqlite3_complete16=U.Id)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=U.Jd)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=U.Kd)();d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=U.Ld)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=U.Md)();d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=U.Nd)();
d._sqlite3_config=(a,b)=>(d._sqlite3_config=U.Od)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=U.Pd)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=U.Qd)(a);d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=U.Rd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=U.Sd)(a,b,c);d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=U.Td)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=U.Ud)(a,b,c);
d._sqlite3_changes64=a=>(d._sqlite3_changes64=U.Vd)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=U.Wd)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=U.Xd)(a);d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=U.Yd)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=U.Zd)(a,b);d._sqlite3_close=a=>(d._sqlite3_close=U._d)(a);d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=U.$d)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=U.ae)(a,b,c);
d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=U.be)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=U.ce)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=U.de)(a);d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=U.ee)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=U.fe)(a,b,c,e,f,h,k,n);d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=U.ge)(a,b,c,e,f,h,k,n,l);
d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=U.he)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=U.ie)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=U.je)(a,b,c);d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=U.ke)(a,b,c,e);d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=U.le)(a,b,c);
d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=U.me)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=U.ne)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=U.oe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=U.pe)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=U.qe)(a,b,c);d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=U.re)(a,b,c,e,f);
d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=U.se)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=U.te)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=U.ue)(a);d._sqlite3_errcode=a=>(d._sqlite3_errcode=U.ve)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=U.we)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=U.xe)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=U.ye)(a);d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=U.ze)(a,b,c);
d._sqlite3_open=(a,b)=>(d._sqlite3_open=U.Ae)(a,b);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=U.Be)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=U.Ce)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=U.De)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=U.Ee)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=U.Fe)(a,b,c,e,f);
d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=U.Ge)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=U.He)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=U.Ie)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=U.Je)(a,b,c,e);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=U.Ke)(a);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=U.Le)(a,b,c,e,f,h,k,n,l);
d._sqlite3_sleep=a=>(d._sqlite3_sleep=U.Me)(a);d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=U.Ne)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=U.Oe)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=U.Pe)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=U.Qe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=U.Re)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=U.Se)(a,b);
d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=U.Te)(a,b);d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=U.Ue)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=U.Ve)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=U.We)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=U.Xe)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=U.Ye)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=U.Ze)(a,b);
d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=U._e)(a,b);d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=U.$e)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=U.af)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=U.bf)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=U.cf)();d._sqlite3mc_config=(a,b,c)=>(d._sqlite3mc_config=U.df)(a,b,c);d._sqlite3mc_cipher_count=()=>(d._sqlite3mc_cipher_count=U.ef)();
d._sqlite3mc_cipher_index=a=>(d._sqlite3mc_cipher_index=U.ff)(a);d._sqlite3mc_cipher_name=a=>(d._sqlite3mc_cipher_name=U.gf)(a);d._sqlite3mc_config_cipher=(a,b,c,e)=>(d._sqlite3mc_config_cipher=U.hf)(a,b,c,e);d._sqlite3mc_codec_data=(a,b,c)=>(d._sqlite3mc_codec_data=U.jf)(a,b,c);d._sqlite3_key=(a,b,c)=>(d._sqlite3_key=U.kf)(a,b,c);d._sqlite3_key_v2=(a,b,c,e)=>(d._sqlite3_key_v2=U.lf)(a,b,c,e);d._sqlite3_rekey_v2=(a,b,c,e)=>(d._sqlite3_rekey_v2=U.mf)(a,b,c,e);
d._sqlite3_rekey=(a,b,c)=>(d._sqlite3_rekey=U.nf)(a,b,c);d._sqlite3mc_register_cipher=(a,b,c)=>(d._sqlite3mc_register_cipher=U.of)(a,b,c);var qd=()=>(qd=U.pf)(),Wb=d._malloc=a=>(Wb=d._malloc=U.qf)(a),fd=d._free=a=>(fd=d._free=U.rf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=U.sf)(a);d._set_authorizer=a=>(d._set_authorizer=U.tf)(a);d._create_function=(a,b,c,e,f,h)=>(d._create_function=U.uf)(a,b,c,e,f,h);d._create_module=(a,b,c,e)=>(d._create_module=U.vf)(a,b,c,e);
d._progress_handler=(a,b)=>(d._progress_handler=U.wf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=U.xf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=U.yf)();var sd=d._main=(a,b)=>(sd=d._main=U.zf)(a,b),gb=(a,b)=>(gb=U.Bf)(a,b),td=()=>(td=U.Cf)(),od=()=>(od=U.Df)(),md=a=>(md=U.Ef)(a),nd=a=>(nd=U.Ff)(a),dd=a=>(dd=U.Gf)(a),Tc=()=>(Tc=U.Hf)(),cd=a=>(cd=U.If)(a),ed=()=>(ed=U.Jf)();d._sqlite3_version=11592;d.getTempRet0=td;d.ccall=Z;
d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:function(){return Z(a,b,c,arguments,e)}};
d.addFunction=(a,b)=>{if(!jd){jd=new WeakMap;var c=hd.length;if(jd)for(var e=0;e<0+c;e++){var f=hd.get(e);f&&jd.set(f,e)}}if(c=jd.get(a)||0)return c;if(kd.length)c=kd.pop();else{try{hd.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=hd.length-1}try{hd.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h=
{parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)h.parameters.push(f[b[k]]);b=new e(h,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);h={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(h[b[k]]);"v"==f?e.push(0):e.push(1,h[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push.apply(b,e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));
b=(new WebAssembly.Instance(b,{e:{f:a}})).exports.f}hd.set(c,b)}jd.set(a,c);return c};d.setValue=J;d.getValue=H;d.UTF8ToString=(a,b)=>a?K(x,a,b):"";d.stringToUTF8=(a,b,c)=>Ta(a,x,b,c);d.lengthBytesUTF8=Sa;d.intArrayFromString=Ua;d.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);b.push(String.fromCharCode(e))}return b.join("")};d.AsciiToString=a=>{for(var b="";;){var c=x[a++>>0];if(!c)return b;b+=String.fromCharCode(c)}};
d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&oa[c];)++c;c<<=1;if(32<c-a&&od)return od.decode(x.subarray(a,c));c="";for(e=0;!(e>=b/2);++e){var f=z[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)z[b>>1]=a.charCodeAt(f),b+=2;z[b>>1]=0;return b-e};
d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=A[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{void 0===c&&(c=2147483647);if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var h=a.charCodeAt(f);if(55296<=h&&57343>=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}A[b>>2]=h;b+=4;if(b+4>c)break}A[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{w.set(a,b)};var td;
za=function ud(){td||vd();td||(za=ud)};
function vd(){function a(){if(!td&&(td=!0,d.calledRun=!0,!v)){d.noFSInit||Lb||(Lb=!0,Kb(),d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Mb("stdin",d.stdin):Bb("/dev/tty","/dev/stdin"),d.stdout?Mb("stdout",null,d.stdout):Bb("/dev/tty","/dev/stdout"),d.stderr?Mb("stderr",null,d.stderr):Bb("/dev/tty1","/dev/stderr"),Hb("/dev/stdin",0),Hb("/dev/stdout",1),Hb("/dev/stderr",1));lb=!1;Ia(ta);Ia(ua);aa(d);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(wd){var b=rd;try{var c=b(0,0);na=
c;Nc(c)}catch(e){Oc(e)}}if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),va.unshift(b);Ia(va)}}if(!(0<xa)){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)wa();Ia(sa);0<xa||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1);a()},1)):a())}}if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.pop()();
var wd=!0;d.noInitialRun&&(wd=!1);vd();
d.addFunction=(a,b)=>{if(!kd){kd=new WeakMap;var c=X.length;if(kd)for(var e=0;e<0+c;e++){var f=e;var h=jd[f];h||(f>=jd.length&&(jd.length=f+1),jd[f]=h=X.get(f));(f=h)&&kd.set(f,e)}}if(c=kd.get(a)||0)return c;if(ld.length)c=ld.pop();else{try{X.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=X.length-1}try{e=c,X.set(e,a),jd[e]=X.get(e)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;
f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};h={parameters:[],results:"v"==b[0]?[]:[f[b[0]]]};for(var k=1;k<b.length;++k)h.parameters.push(f[b[k]]);b=new e(h,a)}else{e=[1];f=b.slice(0,1);b=b.slice(1);h={i:127,p:127,j:126,f:125,d:124,e:111};e.push(96);k=b.length;128>k?e.push(k):e.push(k%128|128,k>>7);for(k=0;k<b.length;++k)e.push(h[b[k]]);"v"==f?e.push(0):e.push(1,h[f]);b=[0,97,115,109,1,0,0,0,1];f=e.length;128>f?b.push(f):b.push(f%128|128,f>>7);b.push.apply(b,e);b.push(2,7,1,1,101,1,
102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,{e:{f:a}})).exports.f}e=c;X.set(e,b);jd[e]=X.get(e)}kd.set(a,c);return c};d.setValue=H;d.getValue=F;d.UTF8ToString=(a,b)=>a?J(w,a,b):"";d.stringToUTF8=(a,b,c)=>Ua(a,w,b,c);d.lengthBytesUTF8=Ta;d.intArrayFromString=Va;d.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];255<e&&(e&=255);b.push(String.fromCharCode(e))}return b.join("")};
d.AsciiToString=a=>{for(var b="";;){var c=w[a++>>0];if(!c)return b;b+=String.fromCharCode(c)}};d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&pa[c];)++c;c<<=1;if(32<c-a&&pd)return pd.decode(w.subarray(a,c));c="";for(e=0;!(e>=b/2);++e){var f=x[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)x[b>>1]=a.charCodeAt(f),b+=2;x[b>>1]=0;return b-e};
d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=z[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{void 0===c&&(c=2147483647);if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var h=a.charCodeAt(f);if(55296<=h&&57343>=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}z[b>>2]=h;b+=4;if(b+4>c)break}z[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{v.set(a,b)};var ud;
Aa=function vd(){ud||wd();ud||(Aa=vd)};
function wd(){function a(){if(!ud&&(ud=!0,d.calledRun=!0,!na)){d.noFSInit||Mb||(Mb=!0,Lb(),d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Nb("stdin",d.stdin):Cb("/dev/tty","/dev/stdin"),d.stdout?Nb("stdout",null,d.stdout):Cb("/dev/tty","/dev/stdout"),d.stderr?Nb("stderr",null,d.stderr):Cb("/dev/tty1","/dev/stderr"),Ib("/dev/stdin",0),Ib("/dev/stdout",1),Ib("/dev/stderr",1));mb=!1;Ja(ua);Ja(va);aa(d);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(xd){var b=sd;try{var c=b(0,0);oa=
c;Oc(c)}catch(e){Pc(e)}}if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),wa.unshift(b);Ja(wa)}}if(!(0<ya)){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)xa();Ja(ta);0<ya||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1);a()},1)):a())}}if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.pop()();
var xd=!0;d.noInitialRun&&(xd=!1);wd();
return moduleArg.ready

Some files were not shown because too many files have changed in this diff Show More