diff --git a/frontend/.svelte-kit/ambient.d.ts b/frontend/.svelte-kit/ambient.d.ts
new file mode 100644
index 0000000..38f289b
--- /dev/null
+++ b/frontend/.svelte-kit/ambient.d.ts
@@ -0,0 +1,440 @@
+
+// this file is generated — do not edit it
+
+
+///
+
+/**
+ * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are limited to _private_ access.
+ *
+ * | | Runtime | Build time |
+ * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+ * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
+ * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
+ *
+ * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
+ *
+ * **_Private_ access:**
+ *
+ * - This module cannot be imported into client-side code
+ * - This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
+ *
+ * For example, given the following build time environment:
+ *
+ * ```env
+ * ENVIRONMENT=production
+ * PUBLIC_BASE_URL=http://site.com
+ * ```
+ *
+ * With the default `publicPrefix` and `privatePrefix`:
+ *
+ * ```ts
+ * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/private';
+ *
+ * console.log(ENVIRONMENT); // => "production"
+ * console.log(PUBLIC_BASE_URL); // => throws error during build
+ * ```
+ *
+ * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
+ */
+declare module '$env/static/private' {
+ export const SHELL: string;
+ export const npm_command: string;
+ export const UV_CACHE_DIR: string;
+ export const npm_config_userconfig: string;
+ export const COLORTERM: string;
+ export const HYPRLAND_CMD: string;
+ export const XDG_CONFIG_DIRS: string;
+ export const npm_config_cache: string;
+ export const LESS: string;
+ export const GREP_COLOR: string;
+ export const XDG_MENU_PREFIX: string;
+ export const XDG_BACKEND: string;
+ export const CLUTTER_BACKEND: string;
+ export const QT_WAYLAND_DISABLE_WINDOWDECORATION: string;
+ export const NODE: string;
+ export const SCIKIT_LEARN_DATA: string;
+ export const LC_ADDRESS: string;
+ export const SSH_AUTH_SOCK: string;
+ export const XDG_DATA_HOME: string;
+ export const XDG_CONFIG_HOME: string;
+ export const MEMORY_PRESSURE_WRITE: string;
+ export const COLOR: string;
+ export const npm_config_local_prefix: string;
+ export const DIFFPROG: string;
+ export const LC_MONETARY: string;
+ export const SSH_AGENT_PID: string;
+ export const ELECTRON_OZONE_PLATFORM_HINT: string;
+ export const HL_INITIAL_WORKSPACE_TOKEN: string;
+ export const KITTY_PID: string;
+ export const GREP_COLORS: string;
+ export const npm_config_globalconfig: string;
+ export const XCURSOR_SIZE: string;
+ export const EDITOR: string;
+ export const XDG_SEAT: string;
+ export const PWD: string;
+ export const XDG_SESSION_DESKTOP: string;
+ export const LOGNAME: string;
+ export const QT_QPA_PLATFORMTHEME: string;
+ export const XDG_SESSION_TYPE: string;
+ export const npm_config_init_module: string;
+ export const SYSTEMD_EXEC_PID: string;
+ export const _: string;
+ export const KITTY_PUBLIC_KEY: string;
+ export const MOTD_SHOWN: string;
+ export const HOME: string;
+ export const LC_PAPER: string;
+ export const LANG: string;
+ export const _JAVA_AWT_WM_NONREPARENTING: string;
+ export const LS_COLORS: string;
+ export const XDG_CURRENT_DESKTOP: string;
+ export const npm_package_version: string;
+ export const MEMORY_PRESSURE_WATCH: string;
+ export const WAYLAND_DISPLAY: string;
+ export const KITTY_WINDOW_ID: string;
+ export const MANROFFOPT: string;
+ export const INVOCATION_ID: string;
+ export const MANAGERPID: string;
+ export const INIT_CWD: string;
+ export const UWSM_WAIT_VARNAMES: string;
+ export const QT_QPA_PLATFORM: string;
+ export const XDG_CACHE_HOME: string;
+ export const npm_lifecycle_script: string;
+ export const npm_config_npm_version: string;
+ export const ANDROID_HOME: string;
+ export const TERM: string;
+ export const TERMINFO: string;
+ export const npm_package_name: string;
+ export const LESS_TERMCAP_mb: string;
+ export const LESS_TERMCAP_me: string;
+ export const LESS_TERMCAP_md: string;
+ export const npm_config_prefix: string;
+ export const ZDOTDIR: string;
+ export const USER: string;
+ export const GIT_PAGER: string;
+ export const SDL_VIDEODRIVER: string;
+ export const HYPRLAND_INSTANCE_SIGNATURE: string;
+ export const MANPAGER: string;
+ export const NOTIFY_SOCKET: string;
+ export const DISPLAY: string;
+ export const npm_lifecycle_event: string;
+ export const SHLVL: string;
+ export const LESS_TERMCAP_ue: string;
+ export const MOZ_ENABLE_WAYLAND: string;
+ export const LESS_TERMCAP_us: string;
+ export const PAGER: string;
+ export const LC_TELEPHONE: string;
+ export const ANDROID_SDK_ROOT: string;
+ export const LC_MESSAGES: string;
+ export const LC_MEASUREMENT: string;
+ export const XDG_VTNR: string;
+ export const XDG_SESSION_ID: string;
+ export const MANAGERPIDFDID: string;
+ export const npm_config_user_agent: string;
+ export const ROCM_PATH: string;
+ export const XDG_STATE_HOME: string;
+ export const npm_execpath: string;
+ export const LD_LIBRARY_PATH: string;
+ export const LC_CTYPE: string;
+ export const XDG_RUNTIME_DIR: string;
+ export const KITTY_LISTEN_ON: string;
+ export const GRIMBLAST_EDITOR: string;
+ export const GEMINI_CLI: string;
+ export const DEBUGINFOD_URLS: string;
+ export const npm_package_json: string;
+ export const LC_TIME: string;
+ export const HYPRCURSOR_THEME: string;
+ export const GEMINI_CLI_NO_RELAUNCH: string;
+ export const JOURNAL_STREAM: string;
+ export const LC_COLLATE: string;
+ export const XCURSOR_THEME: string;
+ export const XDG_DATA_DIRS: string;
+ export const GDK_BACKEND: string;
+ export const npm_config_noproxy: string;
+ export const PATH: string;
+ export const npm_config_node_gyp: string;
+ export const HSA_OVERRIDE_GFX_VERSION: string;
+ export const DBUS_SESSION_BUS_ADDRESS: string;
+ export const FZF_DEFAULT_OPTS: string;
+ export const npm_config_global_prefix: string;
+ export const HG: string;
+ export const MAIL: string;
+ export const UWSM_FINALIZE_VARNAMES: string;
+ export const KITTY_INSTALLATION_DIR: string;
+ export const npm_node_execpath: string;
+ export const LC_NUMERIC: string;
+ export const OLDPWD: string;
+ export const HYPRCURSOR_SIZE: string;
+ export const NODE_ENV: string;
+}
+
+/**
+ * This module provides access to environment variables that are injected _statically_ into your bundle at build time and are _publicly_ accessible.
+ *
+ * | | Runtime | Build time |
+ * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+ * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
+ * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
+ *
+ * Static environment variables are [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env` at build time and then statically injected into your bundle at build time, enabling optimisations like dead code elimination.
+ *
+ * **_Public_ access:**
+ *
+ * - This module _can_ be imported into client-side code
+ * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
+ *
+ * For example, given the following build time environment:
+ *
+ * ```env
+ * ENVIRONMENT=production
+ * PUBLIC_BASE_URL=http://site.com
+ * ```
+ *
+ * With the default `publicPrefix` and `privatePrefix`:
+ *
+ * ```ts
+ * import { ENVIRONMENT, PUBLIC_BASE_URL } from '$env/static/public';
+ *
+ * console.log(ENVIRONMENT); // => throws error during build
+ * console.log(PUBLIC_BASE_URL); // => "http://site.com"
+ * ```
+ *
+ * The above values will be the same _even if_ different values for `ENVIRONMENT` or `PUBLIC_BASE_URL` are set at runtime, as they are statically replaced in your code with their build time values.
+ */
+declare module '$env/static/public' {
+
+}
+
+/**
+ * This module provides access to environment variables set _dynamically_ at runtime and that are limited to _private_ access.
+ *
+ * | | Runtime | Build time |
+ * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+ * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
+ * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
+ *
+ * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
+ *
+ * **_Private_ access:**
+ *
+ * - This module cannot be imported into client-side code
+ * - This module includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://svelte.dev/docs/kit/configuration#env) (if configured)
+ *
+ * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
+ *
+ * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
+ * >
+ * > ```env
+ * > MY_FEATURE_FLAG=
+ * > ```
+ * >
+ * > You can override `.env` values from the command line like so:
+ * >
+ * > ```sh
+ * > MY_FEATURE_FLAG="enabled" npm run dev
+ * > ```
+ *
+ * For example, given the following runtime environment:
+ *
+ * ```env
+ * ENVIRONMENT=production
+ * PUBLIC_BASE_URL=http://site.com
+ * ```
+ *
+ * With the default `publicPrefix` and `privatePrefix`:
+ *
+ * ```ts
+ * import { env } from '$env/dynamic/private';
+ *
+ * console.log(env.ENVIRONMENT); // => "production"
+ * console.log(env.PUBLIC_BASE_URL); // => undefined
+ * ```
+ */
+declare module '$env/dynamic/private' {
+ export const env: {
+ SHELL: string;
+ npm_command: string;
+ UV_CACHE_DIR: string;
+ npm_config_userconfig: string;
+ COLORTERM: string;
+ HYPRLAND_CMD: string;
+ XDG_CONFIG_DIRS: string;
+ npm_config_cache: string;
+ LESS: string;
+ GREP_COLOR: string;
+ XDG_MENU_PREFIX: string;
+ XDG_BACKEND: string;
+ CLUTTER_BACKEND: string;
+ QT_WAYLAND_DISABLE_WINDOWDECORATION: string;
+ NODE: string;
+ SCIKIT_LEARN_DATA: string;
+ LC_ADDRESS: string;
+ SSH_AUTH_SOCK: string;
+ XDG_DATA_HOME: string;
+ XDG_CONFIG_HOME: string;
+ MEMORY_PRESSURE_WRITE: string;
+ COLOR: string;
+ npm_config_local_prefix: string;
+ DIFFPROG: string;
+ LC_MONETARY: string;
+ SSH_AGENT_PID: string;
+ ELECTRON_OZONE_PLATFORM_HINT: string;
+ HL_INITIAL_WORKSPACE_TOKEN: string;
+ KITTY_PID: string;
+ GREP_COLORS: string;
+ npm_config_globalconfig: string;
+ XCURSOR_SIZE: string;
+ EDITOR: string;
+ XDG_SEAT: string;
+ PWD: string;
+ XDG_SESSION_DESKTOP: string;
+ LOGNAME: string;
+ QT_QPA_PLATFORMTHEME: string;
+ XDG_SESSION_TYPE: string;
+ npm_config_init_module: string;
+ SYSTEMD_EXEC_PID: string;
+ _: string;
+ KITTY_PUBLIC_KEY: string;
+ MOTD_SHOWN: string;
+ HOME: string;
+ LC_PAPER: string;
+ LANG: string;
+ _JAVA_AWT_WM_NONREPARENTING: string;
+ LS_COLORS: string;
+ XDG_CURRENT_DESKTOP: string;
+ npm_package_version: string;
+ MEMORY_PRESSURE_WATCH: string;
+ WAYLAND_DISPLAY: string;
+ KITTY_WINDOW_ID: string;
+ MANROFFOPT: string;
+ INVOCATION_ID: string;
+ MANAGERPID: string;
+ INIT_CWD: string;
+ UWSM_WAIT_VARNAMES: string;
+ QT_QPA_PLATFORM: string;
+ XDG_CACHE_HOME: string;
+ npm_lifecycle_script: string;
+ npm_config_npm_version: string;
+ ANDROID_HOME: string;
+ TERM: string;
+ TERMINFO: string;
+ npm_package_name: string;
+ LESS_TERMCAP_mb: string;
+ LESS_TERMCAP_me: string;
+ LESS_TERMCAP_md: string;
+ npm_config_prefix: string;
+ ZDOTDIR: string;
+ USER: string;
+ GIT_PAGER: string;
+ SDL_VIDEODRIVER: string;
+ HYPRLAND_INSTANCE_SIGNATURE: string;
+ MANPAGER: string;
+ NOTIFY_SOCKET: string;
+ DISPLAY: string;
+ npm_lifecycle_event: string;
+ SHLVL: string;
+ LESS_TERMCAP_ue: string;
+ MOZ_ENABLE_WAYLAND: string;
+ LESS_TERMCAP_us: string;
+ PAGER: string;
+ LC_TELEPHONE: string;
+ ANDROID_SDK_ROOT: string;
+ LC_MESSAGES: string;
+ LC_MEASUREMENT: string;
+ XDG_VTNR: string;
+ XDG_SESSION_ID: string;
+ MANAGERPIDFDID: string;
+ npm_config_user_agent: string;
+ ROCM_PATH: string;
+ XDG_STATE_HOME: string;
+ npm_execpath: string;
+ LD_LIBRARY_PATH: string;
+ LC_CTYPE: string;
+ XDG_RUNTIME_DIR: string;
+ KITTY_LISTEN_ON: string;
+ GRIMBLAST_EDITOR: string;
+ GEMINI_CLI: string;
+ DEBUGINFOD_URLS: string;
+ npm_package_json: string;
+ LC_TIME: string;
+ HYPRCURSOR_THEME: string;
+ GEMINI_CLI_NO_RELAUNCH: string;
+ JOURNAL_STREAM: string;
+ LC_COLLATE: string;
+ XCURSOR_THEME: string;
+ XDG_DATA_DIRS: string;
+ GDK_BACKEND: string;
+ npm_config_noproxy: string;
+ PATH: string;
+ npm_config_node_gyp: string;
+ HSA_OVERRIDE_GFX_VERSION: string;
+ DBUS_SESSION_BUS_ADDRESS: string;
+ FZF_DEFAULT_OPTS: string;
+ npm_config_global_prefix: string;
+ HG: string;
+ MAIL: string;
+ UWSM_FINALIZE_VARNAMES: string;
+ KITTY_INSTALLATION_DIR: string;
+ npm_node_execpath: string;
+ LC_NUMERIC: string;
+ OLDPWD: string;
+ HYPRCURSOR_SIZE: string;
+ NODE_ENV: string;
+ [key: `PUBLIC_${string}`]: undefined;
+ [key: `${string}`]: string | undefined;
+ }
+}
+
+/**
+ * This module provides access to environment variables set _dynamically_ at runtime and that are _publicly_ accessible.
+ *
+ * | | Runtime | Build time |
+ * | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
+ * | Private | [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private) | [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private) |
+ * | Public | [`$env/dynamic/public`](https://svelte.dev/docs/kit/$env-dynamic-public) | [`$env/static/public`](https://svelte.dev/docs/kit/$env-static-public) |
+ *
+ * Dynamic environment variables are defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://svelte.dev/docs/kit/cli)), this is equivalent to `process.env`.
+ *
+ * **_Public_ access:**
+ *
+ * - This module _can_ be imported into client-side code
+ * - **Only** variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`) are included
+ *
+ * > [!NOTE] In `dev`, `$env/dynamic` includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
+ *
+ * > [!NOTE] To get correct types, environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
+ * >
+ * > ```env
+ * > MY_FEATURE_FLAG=
+ * > ```
+ * >
+ * > You can override `.env` values from the command line like so:
+ * >
+ * > ```sh
+ * > MY_FEATURE_FLAG="enabled" npm run dev
+ * > ```
+ *
+ * For example, given the following runtime environment:
+ *
+ * ```env
+ * ENVIRONMENT=production
+ * PUBLIC_BASE_URL=http://example.com
+ * ```
+ *
+ * With the default `publicPrefix` and `privatePrefix`:
+ *
+ * ```ts
+ * import { env } from '$env/dynamic/public';
+ * console.log(env.ENVIRONMENT); // => undefined, not public
+ * console.log(env.PUBLIC_BASE_URL); // => "http://example.com"
+ * ```
+ *
+ * ```
+ *
+ * ```
+ */
+declare module '$env/dynamic/public' {
+ export const env: {
+ [key: `PUBLIC_${string}`]: string | undefined;
+ }
+}
diff --git a/frontend/.svelte-kit/generated/client-optimized/app.js b/frontend/.svelte-kit/generated/client-optimized/app.js
new file mode 100644
index 0000000..c3c7b78
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client-optimized/app.js
@@ -0,0 +1,29 @@
+export { matchers } from './matchers.js';
+
+export const nodes = [
+ () => import('./nodes/0'),
+ () => import('./nodes/1'),
+ () => import('./nodes/2')
+];
+
+export const server_loads = [];
+
+export const dictionary = {
+ "/": [2]
+ };
+
+export const hooks = {
+ handleError: (({ error }) => { console.error(error) }),
+
+ reroute: (() => {}),
+ transport: {}
+};
+
+export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
+export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
+
+export const hash = false;
+
+export const decode = (type, value) => decoders[type](value);
+
+export { default as root } from '../root.js';
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client-optimized/matchers.js b/frontend/.svelte-kit/generated/client-optimized/matchers.js
new file mode 100644
index 0000000..f6bd30a
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client-optimized/matchers.js
@@ -0,0 +1 @@
+export const matchers = {};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client-optimized/nodes/0.js b/frontend/.svelte-kit/generated/client-optimized/nodes/0.js
new file mode 100644
index 0000000..fed1375
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client-optimized/nodes/0.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../src/routes/+layout.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client-optimized/nodes/1.js b/frontend/.svelte-kit/generated/client-optimized/nodes/1.js
new file mode 100644
index 0000000..bf58bad
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client-optimized/nodes/1.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client-optimized/nodes/2.js b/frontend/.svelte-kit/generated/client-optimized/nodes/2.js
new file mode 100644
index 0000000..1cb4f85
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client-optimized/nodes/2.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../src/routes/+page.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client/app.js b/frontend/.svelte-kit/generated/client/app.js
new file mode 100644
index 0000000..c3c7b78
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client/app.js
@@ -0,0 +1,29 @@
+export { matchers } from './matchers.js';
+
+export const nodes = [
+ () => import('./nodes/0'),
+ () => import('./nodes/1'),
+ () => import('./nodes/2')
+];
+
+export const server_loads = [];
+
+export const dictionary = {
+ "/": [2]
+ };
+
+export const hooks = {
+ handleError: (({ error }) => { console.error(error) }),
+
+ reroute: (() => {}),
+ transport: {}
+};
+
+export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
+export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
+
+export const hash = false;
+
+export const decode = (type, value) => decoders[type](value);
+
+export { default as root } from '../root.js';
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client/matchers.js b/frontend/.svelte-kit/generated/client/matchers.js
new file mode 100644
index 0000000..f6bd30a
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client/matchers.js
@@ -0,0 +1 @@
+export const matchers = {};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client/nodes/0.js b/frontend/.svelte-kit/generated/client/nodes/0.js
new file mode 100644
index 0000000..fed1375
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client/nodes/0.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../src/routes/+layout.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client/nodes/1.js b/frontend/.svelte-kit/generated/client/nodes/1.js
new file mode 100644
index 0000000..bf58bad
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client/nodes/1.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/client/nodes/2.js b/frontend/.svelte-kit/generated/client/nodes/2.js
new file mode 100644
index 0000000..1cb4f85
--- /dev/null
+++ b/frontend/.svelte-kit/generated/client/nodes/2.js
@@ -0,0 +1 @@
+export { default as component } from "../../../../src/routes/+page.svelte";
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/root.js b/frontend/.svelte-kit/generated/root.js
new file mode 100644
index 0000000..4d1e892
--- /dev/null
+++ b/frontend/.svelte-kit/generated/root.js
@@ -0,0 +1,3 @@
+import { asClassComponent } from 'svelte/legacy';
+import Root from './root.svelte';
+export default asClassComponent(Root);
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/root.svelte b/frontend/.svelte-kit/generated/root.svelte
new file mode 100644
index 0000000..0795183
--- /dev/null
+++ b/frontend/.svelte-kit/generated/root.svelte
@@ -0,0 +1,68 @@
+
+
+
+
+{#if constructors[1]}
+ {@const Pyramid_0 = constructors[0]}
+
+
+
+
+
+
+{:else}
+ {@const Pyramid_0 = constructors[0]}
+
+
+
+{/if}
+
+{#if mounted}
+
+ {#if navigated}
+ {title}
+ {/if}
+
+{/if}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/generated/server/internal.js b/frontend/.svelte-kit/generated/server/internal.js
new file mode 100644
index 0000000..f600346
--- /dev/null
+++ b/frontend/.svelte-kit/generated/server/internal.js
@@ -0,0 +1,54 @@
+
+import root from '../root.js';
+import { set_building, set_prerendering } from '__sveltekit/environment';
+import { set_assets } from '$app/paths/internal/server';
+import { set_manifest, set_read_implementation } from '__sveltekit/server';
+import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js';
+
+export const options = {
+ app_template_contains_nonce: false,
+ async: false,
+ csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
+ csrf_check_origin: true,
+ csrf_trusted_origins: [],
+ embedded: false,
+ env_public_prefix: 'PUBLIC_',
+ env_private_prefix: '',
+ hash_routing: false,
+ hooks: null, // added lazily, via `get_hooks`
+ preload_strategy: "modulepreload",
+ root,
+ service_worker: false,
+ service_worker_options: undefined,
+ server_error_boundaries: false,
+ templates: {
+ app: ({ head, body, assets, nonce, env }) => "\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t" + head + "\n\t\n\t\n\t\t" + body + "
\n\t\n\n",
+ error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t\n\t\t\t
" + status + "\n\t\t\t
\n\t\t\t\t
" + message + "
\n\t\t\t\n\t\t
\n\t\n\n"
+ },
+ version_hash: "4xp95d"
+};
+
+export async function get_hooks() {
+ let handle;
+ let handleFetch;
+ let handleError;
+ let handleValidationError;
+ let init;
+
+
+ let reroute;
+ let transport;
+
+
+ return {
+ handle,
+ handleFetch,
+ handleError,
+ handleValidationError,
+ init,
+ reroute,
+ transport
+ };
+}
+
+export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation };
diff --git a/frontend/.svelte-kit/non-ambient.d.ts b/frontend/.svelte-kit/non-ambient.d.ts
new file mode 100644
index 0000000..aa7bd8d
--- /dev/null
+++ b/frontend/.svelte-kit/non-ambient.d.ts
@@ -0,0 +1,43 @@
+
+// this file is generated — do not edit it
+
+
+declare module "svelte/elements" {
+ export interface HTMLAttributes {
+ 'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null;
+ 'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null;
+ 'data-sveltekit-preload-code'?:
+ | true
+ | ''
+ | 'eager'
+ | 'viewport'
+ | 'hover'
+ | 'tap'
+ | 'off'
+ | undefined
+ | null;
+ 'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null;
+ 'data-sveltekit-reload'?: true | '' | 'off' | undefined | null;
+ 'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null;
+ }
+}
+
+export {};
+
+
+declare module "$app/types" {
+ type MatcherParam = M extends (param : string) => param is (infer U extends string) ? U : string;
+
+ export interface AppTypes {
+ RouteId(): "/";
+ RouteParams(): {
+
+ };
+ LayoutParams(): {
+ "/": Record
+ };
+ Pathname(): "/";
+ ResolvedPathname(): `${"" | `/${string}`}${ReturnType}`;
+ Asset(): string & {};
+ }
+}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/.vite/manifest.json b/frontend/.svelte-kit/output/client/.vite/manifest.json
new file mode 100644
index 0000000..680388c
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/.vite/manifest.json
@@ -0,0 +1,86 @@
+{
+ ".svelte-kit/generated/client-optimized/app.js": {
+ "file": "_app/immutable/entry/app.nZlaNymk.js",
+ "name": "entry/app",
+ "src": ".svelte-kit/generated/client-optimized/app.js",
+ "isEntry": true,
+ "imports": [
+ "_BymsAeK4.js",
+ "_smLyJ_zi.js",
+ "_DEDqjojZ.js"
+ ],
+ "dynamicImports": [
+ ".svelte-kit/generated/client-optimized/nodes/0.js",
+ ".svelte-kit/generated/client-optimized/nodes/1.js",
+ ".svelte-kit/generated/client-optimized/nodes/2.js"
+ ]
+ },
+ ".svelte-kit/generated/client-optimized/nodes/0.js": {
+ "file": "_app/immutable/nodes/0.BI2104Lw.js",
+ "name": "nodes/0",
+ "src": ".svelte-kit/generated/client-optimized/nodes/0.js",
+ "isEntry": true,
+ "imports": [
+ "_BymsAeK4.js",
+ "_DEDqjojZ.js",
+ "_BLiAG49H.js"
+ ]
+ },
+ ".svelte-kit/generated/client-optimized/nodes/1.js": {
+ "file": "_app/immutable/nodes/1.7VgG-JZk.js",
+ "name": "nodes/1",
+ "src": ".svelte-kit/generated/client-optimized/nodes/1.js",
+ "isEntry": true,
+ "imports": [
+ "_BymsAeK4.js",
+ "_bq2dQ5MW.js",
+ "_DEDqjojZ.js"
+ ]
+ },
+ ".svelte-kit/generated/client-optimized/nodes/2.js": {
+ "file": "_app/immutable/nodes/2.DsEO-gDS.js",
+ "name": "nodes/2",
+ "src": ".svelte-kit/generated/client-optimized/nodes/2.js",
+ "isEntry": true,
+ "imports": [
+ "_BymsAeK4.js",
+ "_DEDqjojZ.js",
+ "_BLiAG49H.js"
+ ]
+ },
+ "_BLiAG49H.js": {
+ "file": "_app/immutable/chunks/BLiAG49H.js",
+ "name": "legacy",
+ "imports": [
+ "_BymsAeK4.js"
+ ]
+ },
+ "_BymsAeK4.js": {
+ "file": "_app/immutable/chunks/BymsAeK4.js",
+ "name": "index-client"
+ },
+ "_DEDqjojZ.js": {
+ "file": "_app/immutable/chunks/DEDqjojZ.js",
+ "name": "disclose-version"
+ },
+ "_bq2dQ5MW.js": {
+ "file": "_app/immutable/chunks/bq2dQ5MW.js",
+ "name": "client",
+ "imports": [
+ "_BymsAeK4.js"
+ ]
+ },
+ "_smLyJ_zi.js": {
+ "file": "_app/immutable/chunks/smLyJ_zi.js",
+ "name": "preload-helper"
+ },
+ "node_modules/@sveltejs/kit/src/runtime/client/entry.js": {
+ "file": "_app/immutable/entry/start.2LB97QYQ.js",
+ "name": "entry/start",
+ "src": "node_modules/@sveltejs/kit/src/runtime/client/entry.js",
+ "isEntry": true,
+ "imports": [
+ "_bq2dQ5MW.js"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/chunks/BLiAG49H.js b/frontend/.svelte-kit/output/client/_app/immutable/chunks/BLiAG49H.js
new file mode 100644
index 0000000..bfb259a
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/chunks/BLiAG49H.js
@@ -0,0 +1 @@
+import{M as e}from"./BymsAeK4.js";e();
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/chunks/BymsAeK4.js b/frontend/.svelte-kit/output/client/_app/immutable/chunks/BymsAeK4.js
new file mode 100644
index 0000000..7f974db
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/chunks/BymsAeK4.js
@@ -0,0 +1,2 @@
+var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=Array.isArray,r=Array.prototype.indexOf,i=Array.prototype.includes,a=Array.from,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible,f=()=>{};function p(e){for(var t=0;t{e=n,t=r}),resolve:e,reject:t}}var h=1024,g=2048,_=4096,v=8192,ee=16384,te=32768,ne=1<<25,re=65536,ie=1<<19,ae=1<<20,oe=65536,se=1<<21,ce=1<<22,le=1<<23,ue=Symbol(`$state`),de=Symbol(`legacy props`),y=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"};globalThis.document?.contentType;function fe(e){throw Error(`https://svelte.dev/e/experimental_async_required`)}function pe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function me(){throw Error(`https://svelte.dev/e/missing_context`)}function he(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ge(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function _e(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ve(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function ye(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function be(){throw Error(`https://svelte.dev/e/fork_discarded`)}function xe(){throw Error(`https://svelte.dev/e/fork_timing`)}function Se(){throw Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`)}function Ce(){throw Error(`https://svelte.dev/e/hydration_failed`)}function we(e){throw Error(`https://svelte.dev/e/lifecycle_legacy_only`)}function Te(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ee(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function De(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Oe(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function ke(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ae(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var je={},b=Symbol();function Me(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ne(e){console.warn(`https://svelte.dev/e/hydratable_missing_but_expected`)}function Pe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Fe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var x=!1;function S(e){x=e}var C;function w(e){if(e===null)throw Pe(),je;return C=e}function Ie(){return w(R(C))}function Le(e){if(x){if(R(C)!==null)throw Pe(),je;C=e}}function Re(e=1){if(x){for(var t=e,n=C;t--;)n=R(n);C=n}}function ze(e=!0){for(var t=0,n=C;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=R(n);e&&n.remove(),n=i}}function Be(e){if(!e||e.nodeType!==8)throw Pe(),je;return e.data}function Ve(e){return e===this.v}function He(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ue(e){return!He(e,this.v)}var T=!1,We=!1;function Ge(){We=!0}var E=null;function Ke(e){E=e}function qe(){let e={};return[()=>(Xe(e)||me(),Je(e)),t=>Ye(e,t)]}function Je(e){return tt(`getContext`).get(e)}function Ye(e,t){let n=tt(`setContext`);if(T){var r=K.f;!U&&r&32&&!E.i||Ee()}return n.set(e,t),t}function Xe(e){return tt(`hasContext`).has(e)}function Ze(){return tt(`getAllContexts`)}function Qe(e,t=!1,n){E={p:E,i:!1,c:null,e:null,s:e,x:null,r:K,l:We&&!t?{s:null,u:null,$:[]}:null}}function $e(e){var t=E,n=t.e;if(n!==null){t.e=null;for(var r of n)Dn(r)}return e!==void 0&&(t.x=e),t.i=!0,E=t.p,e??{}}function et(){return!We||E!==null&&E.l===null}function tt(e){return E===null&&pe(e),E.c??=new Map(nt(E)||void 0)}function nt(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var rt=[];function it(){var e=rt;rt=[],p(e)}function at(e){if(rt.length===0&&!vt){var t=rt;queueMicrotask(()=>{t===rt&&it()})}rt.push(e)}function ot(){for(;rt.length>0;)it()}function st(e){var t=K;if(t===null)return U.f|=le,e;if(!(t.f&32768)&&!(t.f&4))throw e;D(e,t)}function D(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var ct=~(g|_|h);function O(e,t){e.f=e.f&ct|t}function lt(e){e.f&512||e.deps===null?O(e,h):O(e,_)}function ut(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=oe,ut(t.deps))}function dt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),ut(e.deps),O(e,h)}var ft=[];function pt(e,t=f){let n=null,r=new Set;function i(t){if(He(e,t)&&(e=t,n)){let t=!ft.length;for(let t of r)t[1](),ft.push(t,e);if(t){for(let e=0;e{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var mt=!1,ht=!1;function gt(e){var t=ht;try{return ht=!1,[e(),ht]}finally{ht=t}}var k=new Set,A=null,j=null,_t=null,vt=!1,yt=!1,bt=null,xt=null,St=0,Ct=1,M=class e{id=Ct++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=new Set;#r=new Map;#i=new Map;#a=null;#o=[];#s=[];#c=new Set;#l=new Set;#u=new Map;#d=new Set;is_fork=!1;#f=!1;#p=new Set;#m(){return this.is_fork||this.#i.size>0}#h(){for(let n of this.#p)for(let r of n.#i.keys()){for(var e=!1,t=r;t.parent!==null;){if(this.#u.has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}skip_effect(e){this.#u.has(e)||this.#u.set(e,{d:[],m:[]}),this.#d.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#u.get(e);if(n){this.#u.delete(e);for(var r of n.d)O(r,g),t(r);for(r of n.m)O(r,_),t(r)}this.#d.add(e)}#g(){if(St++>1e3&&(k.delete(this),Tt()),!this.#m()){for(let e of this.#c)this.#l.delete(e),O(e,g),this.schedule(e);for(let e of this.#l)O(e,_),this.schedule(e)}let t=this.#o;this.#o=[],this.apply();var n=bt=[],r=[],i=xt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Mt(e),t}if(A=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(bt=null,xt=null,this.#m()||this.#h()){this.#v(r),this.#v(n);for(let[e,t]of this.#u)jt(e,t)}else{this.#r.size===0&&k.delete(this),this.#c.clear(),this.#l.clear();for(let e of this.#e)e(this);this.#e.clear(),Et(r),Et(n),this.#a?.resolve()}var o=A;if(this.#o.length>0){let e=o??=this;e.#o.push(...this.#o.filter(t=>!e.#o.includes(t)))}o!==null&&(k.add(o),o.#g()),T&&!k.has(this)&&this.#y()}#_(e,t,n){e.f^=h;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#u.has(r))&&r.fn!==null){a?r.f^=h:i&4?t.push(r):T&&i&16777224?n.push(r):tr(r)&&(i&16&&this.#l.add(r),or(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(e){for(var t=0;t!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#d)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#v([e])});l.activate();var i=new Set,a=new Map;for(var o of t)Dt(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e:!0);for(let e of this.#s)!(e.f&155648)&&kt(e,s,a)&&(e.f&4194320?(O(e,g),l.schedule(e)):l.#c.add(e));if(l.#o.length>0){l.apply();for(var c of l.#o)l.#_(c,[],[]);l.#o=[]}l.deactivate()}}for(let e of k)e.#p.has(this)&&(e.#p.delete(this),e.#p.size===0&&!e.#m()&&(e.activate(),e.#g()))}increment(e,t){let n=this.#r.get(t)??0;if(this.#r.set(t,n+1),e){let e=this.#i.get(t)??0;this.#i.set(t,e+1)}}decrement(e,t,n){let r=this.#r.get(t)??0;if(r===1?this.#r.delete(t):this.#r.set(t,r-1),e){let e=this.#i.get(t)??0;e===1?this.#i.delete(t):this.#i.set(t,e-1)}this.#f||n||(this.#f=!0,at(()=>{this.#f=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#c.add(t);for(let e of t)this.#l.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}on_fork_commit(e){this.#n.add(e)}run_fork_commit_callbacks(){for(let e of this.#n)e(this);this.#n.clear()}settled(){return(this.#a??=m()).promise}static ensure(){if(A===null){let t=A=new e;yt||(k.add(A),vt||at(()=>{A===t&&t.flush()}))}return A}apply(){if(!T||!this.is_fork&&k.size===1){j=null;return}j=new Map;for(let[e,[t]]of this.current)j.set(e,t);for(let n of k)if(!(n===this||n.is_fork)){var e=!1,t=!1;if(n.id0)){P.clear();for(let e of N){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)N.has(n)&&(N.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||or(n)}}N.clear()}}N=null}}function Dt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Dt(i,t,n,r):e&4194320&&!(e&2048)&&kt(i,t,r)&&(O(i,g),At(i))}}function Ot(e,t){if(e.reactions!==null)for(let n of e.reactions){let e=n.f;e&2?Ot(n,t):e&131072&&(O(n,g),t.add(n))}}function kt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(i.call(t,r))return!0;if(r.f&2&&kt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function At(e){A.schedule(e)}function jt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),O(e,h);for(var n=e.first;n!==null;)jt(n,t),n=n.next}}function Mt(e){O(e,h);for(var t=e.first;t!==null;)Mt(t),t=t.next}function Nt(e){T||fe(`fork`),A!==null&&xe();var t=M.ensure();t.is_fork=!0,j=new Map;var n=!1,r=t.settled();return wt(e),{commit:async()=>{if(n){await r;return}k.has(t)||be(),n=!0,t.is_fork=!1;for(var[e,[i]]of t.current)e.v=i,e.wv=er();t.activate(),t.run_fork_commit_callbacks(),t.deactivate(),wt(()=>{var e=new Set;for(var n of t.current.keys())Ot(n,e);Qt(e),rn()}),t.flush(),await r},discard:()=>{for(var e of t.current.keys())e.wv=er();!n&&k.has(t)&&t.discard()}}}function Pt(e){let t=0,n=en(0),r;return()=>{wn()&&(Q(n),Mn(()=>(t===0&&(r=dr(()=>e(()=>an(n)))),t+=1,()=>{at(()=>{--t,t===0&&(r?.(),r=void 0,an(n))})})))}}var Ft=re|ie;function It(e,t,n,r){new Lt(e,t,n,r)}var Lt=class{parent;is_pending=!1;transform_error;#e;#t=x?C:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Pt(()=>(this.#m=en(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=K;t.b=this,t.f|=128,n(e)},this.parent=K.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Pn(()=>{if(x){let e=this.#t;Ie();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Ft),x&&(this.#e=C)}#g(){try{this.#a=B(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=B(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=B(()=>e(this.#e)),at(()=>{var e=this.#c=document.createDocumentFragment(),t=L();e.append(t),this.#a=this.#x(()=>B(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Bn(this.#o,()=>{this.#o=null}),this.#b(A))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=B(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Wn(this.#a,e);let t=this.#n.pending;this.#o=B(()=>t(this.#e))}else this.#b(A)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){dt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=K,n=U,r=E;q(this.#i),G(this.#i),Ke(this.#i.ctx);try{return M.ensure(),e()}catch(e){return st(e),null}finally{q(t),G(n),Ke(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Bn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,at(()=>{this.#d=!1,this.#m&&nn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),Q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;A?.is_fork?(this.#a&&A.skip_effect(this.#a),this.#o&&A.skip_effect(this.#o),this.#s&&A.skip_effect(this.#s),A.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(V(this.#a),null),this.#o&&=(V(this.#o),null),this.#s&&=(V(this.#s),null),x&&(w(this.#t),Re(),w(ze()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Fe();return}r=!0,i&&Ae(),this.#s!==null&&Bn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){D(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return B(()=>{var t=K;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return D(e,this.#i.parent),null}}))};at(()=>{var t;try{t=this.transform_error(e)}catch(e){D(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>D(e,this.#i&&this.#i.parent)):o(t)})}};function Rt(e,t,n,r){let i=et()?Ht:Gt;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=K,s=zt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||D(e,o)}Bt()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=Vt();function d(){Promise.all(n.map(e=>Ut(e))).then(e=>l([...t.map(i),...e])).catch(e=>D(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),Bt()}):d()}function zt(){var e=K,t=U,n=E,r=A;return function(i=!0){q(e),G(t),Ke(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Bt(e=!0){q(null),G(null),Ke(null),e&&A?.deactivate()}function Vt(){var e=K,t=e.b,n=A,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Ht(e){var t=2|g;return K!==null&&(K.f|=ie),{ctx:E,deps:null,effects:null,equals:Ve,f:t,fn:e,reactions:null,rv:0,v:b,wv:0,parent:K,ac:null}}function Ut(e,t,n){let r=K;r===null&&he();var i=void 0,a=en(b),o=!U,s=new Map;return jn(()=>{var t=K,n=m();i=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(Bt)}catch(e){n.reject(e),Bt()}var c=A;if(o){if(t.f&32768)var l=Vt();if(r.b.is_rendered())s.get(c)?.reject(y),s.delete(c);else{for(let e of s.values())e.reject(y);s.clear()}s.set(c,n)}let u=(e,n=void 0)=>{if(l&&l(n===y),!(n===y||t.f&16384)){if(c.activate(),n)a.f|=le,nn(a,n);else{a.f&8388608&&(a.f^=le),nn(a,e);for(let[e,t]of s){if(s.delete(e),e===c)break;t.reject(y)}}c.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),Tn(()=>{for(let e of s.values())e.reject(y)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function Wt(e){let t=Ht(e);return T||Jn(t),t}function Gt(e){let t=Ht(e);return t.equals=Ue,t}function Kt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!$t&&rn()}return t}function rn(){$t=!1;for(let e of Zt)e.f&1024&&O(e,_),tr(e)&&or(e);Zt.clear()}function an(e){I(e,e.v+1)}function on(e,t,n){var r=e.reactions;if(r!==null)for(var i=et(),a=r.length,o=0;o{if(Qn===d)return e();var t=U,n=Qn;G(null),$n(d);var r=e();return G(t),$n(n),r};return i&&r.set(`length`,F(e.length,o)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&De();var i=r.get(t);return i===void 0?f(()=>{var e=F(n.value,o);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>F(b,o));r.set(t,e),an(a)}}else I(n,b),an(a);return!0},get(t,n,i){if(n===ue)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||s(t,n)?.writable)&&(a=f(()=>F(sn(c?t[n]:b),o)),r.set(n,a)),a!==void 0){var l=Q(a);return l===b?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=Q(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==b)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===ue)return!0;var n=r.get(t),i=n!==void 0&&n.v!==b||Reflect.has(e,t);return(n!==void 0||K!==null&&(!i||s(e,t)?.writable))&&(n===void 0&&(n=f(()=>F(i?sn(e[t]):b,o)),r.set(t,n)),Q(n)===b)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;dF(b,o)),r.set(d+``,p)):I(p,b)}if(l===void 0)(!u||s(e,t)?.writable)&&(l=f(()=>F(void 0,o)),I(l,sn(n)),r.set(t,l));else{u=l.v!==b;var m=f(()=>sn(n));I(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&I(g,_+1)}an(a)}return!0},ownKeys(e){Q(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==b});for(var[n,i]of r)i.v!==b&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Oe()}})}var cn,ln,un,dn;function fn(){if(cn===void 0){cn=window,ln=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;un=s(t,`firstChild`).get,dn=s(t,`nextSibling`).get,d(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),d(n)&&(n.__t=void 0)}}function L(e=``){return document.createTextNode(e)}function pn(e){return un.call(e)}function R(e){return dn.call(e)}function mn(e,t){if(!x)return pn(e);var n=pn(C);if(n===null)n=C.appendChild(L());else if(t&&n.nodeType!==3){var r=L();return n?.before(r),w(r),r}return t&&bn(n),w(n),n}function hn(e,t=!1){if(!x){var n=pn(e);return n instanceof Comment&&n.data===``?R(n):n}if(t){if(C?.nodeType!==3){var r=L();return C?.before(r),w(r),r}bn(C)}return C}function gn(e,t=1,n=!1){let r=x?C:e;for(var i;t--;)i=r,r=R(r);if(!x)return r;if(n){if(r?.nodeType!==3){var a=L();return r===null?i?.after(a):r.before(a),w(a),a}bn(r)}return w(r),r}function _n(e){e.textContent=``}function vn(){return!T||N!==null?!1:(K.f&te)!==0}function yn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function bn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function xn(e){var t=U,n=K;G(null),q(null);try{return e()}finally{G(t),q(n)}}function Sn(e){K===null&&(U===null&&ve(e),_e()),H&&ge(e)}function Cn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function z(e,t){var n=K;n!==null&&n.f&8192&&(e|=v);var r={ctx:E,deps:null,nodes:null,f:e|g|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(r);var i=r;if(e&4)bt===null?M.ensure().schedule(r):bt.push(r);else if(t!==null){try{or(r)}catch(e){throw V(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=re))}if(i!==null&&(i.parent=n,n!==null&&Cn(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function wn(){return U!==null&&!W}function Tn(e){let t=z(8,null);return O(t,h),t.teardown=e,t}function En(e){Sn(`$effect`);var t=K.f;if(!U&&t&32&&!(t&32768)){var n=E;(n.e??=[]).push(e)}else return Dn(e)}function Dn(e){return z(4|ae,e)}function On(e){return Sn(`$effect.pre`),z(8|ae,e)}function kn(e){M.ensure();let t=z(64|ie,e);return(e={})=>new Promise(n=>{e.outro?Bn(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function An(e){return z(4,e)}function jn(e){return z(ce|ie,e)}function Mn(e,t=0){return z(8|t,e)}function Nn(e,t=[],n=[],r=[]){Rt(r,t,n,t=>{z(8,()=>e(...t.map(Q)))})}function Pn(e,t=0){return z(16|t,e)}function B(e){return z(32|ie,e)}function Fn(e){var t=e.teardown;if(t!==null){let e=H,n=U;qn(!0),G(null);try{t.call(null)}finally{qn(e),G(n)}}}function In(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&xn(()=>{e.abort(y)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||V(t),t=n}}function V(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Rn(e.nodes.start,e.nodes.end),n=!0),O(e,ne),In(e,t&&!n),ar(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Fn(e),e.f^=ne,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&zn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Rn(e,t){for(;e!==null;){var n=e===t?null:R(e);e.remove(),e=n}}function zn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Bn(e,t,n=!0){var r=[];Vn(e,r,!0);var i=()=>{n&&V(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Vn(e,t,n){if(!(e.f&8192)){e.f^=v;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Vn(i,t,o?n:!1)}i=a}}}function Hn(e){Un(e,!0)}function Un(e,t){if(e.f&8192){e.f^=v,e.f&1024||(O(e,g),M.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Un(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Wn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:R(n);t.append(n),n=i}}var Gn=null,Kn=!1,H=!1;function qn(e){H=e}var U=null,W=!1;function G(e){U=e}var K=null;function q(e){K=e}var J=null;function Jn(e){U!==null&&(!T||U.f&2)&&(J===null?J=[e]:J.push(e))}var Y=null,X=0,Z=null;function Yn(e){Z=e}var Xn=1,Zn=0,Qn=Zn;function $n(e){Qn=e}function er(){return++Xn}function tr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~oe),t&4096){for(var n=e.deps,r=n.length,i=0;ie.wv)return!0}t&512&&j===null&&O(e,h)}return!1}function nr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!T&&J!==null&&i.call(J,e)))for(var a=0;a{e.ac.abort(y)}),e.ac=null);try{e.f|=se;var u=e.fn,d=u();e.f|=te;var f=e.deps,p=A?.is_fork;if(Y!==null){var m;if(p||ar(e,X),f!==null&&X>0)for(f.length=X+Y.length,m=0;m{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),wt()}function cr(){return M.ensure().settled()}function Q(e){var t=(e.f&2)!=0;if(Gn?.add(e),U!==null&&!W&&!(K!==null&&K.f&16384)&&(J===null||!i.call(J,e))){var n=U.deps;if(U.f&2097152)e.rv{throw e});throw p}}finally{e[mr]=t,delete e.currentTarget,G(d),q(f)}}}var yr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function br(e){return yr?.createHTML(e)??e}function xr(e){var t=yn(`template`);return t.innerHTML=br(e.replaceAll(``,``)),t.content}function $(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Sr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(``);return()=>{if(x)return $(C,null),C;i===void 0&&(i=xr(a?e:``+e),n||(i=pn(i)));var t=r||ln?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=pn(t),s=t.lastChild;$(o,s)}else $(t,t);return t}}function Cr(e=``){if(!x){var t=L(e+``);return $(t,t),t}var n=C;return n.nodeType===3?bn(n):(n.before(n=L()),w(n)),$(n,n),n}function wr(){if(x)return $(C,null),C;var e=document.createDocumentFragment(),t=document.createComment(``),n=L();return e.append(t,n),$(t,n),e}function Tr(e,t){if(x){var n=K;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=C),Ie();return}e!==null&&e.before(t)}function Er(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Dr(e,t){return Ar(e,t)}function Or(e,t){fn(),t.intro=t.intro??!1;let n=t.target,r=x,i=C;try{for(var a=pn(n);a&&(a.nodeType!==8||a.data!==`[`);)a=R(a);if(!a)throw je;S(!0),w(a);let r=Ar(e,{...t,anchor:a});return S(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
+`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==je&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&Ce(),fn(),_n(n),S(!1),Dr(e,t)}finally{S(r),w(i)}}var kr=new Map;function Ar(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:c}){fn();var l=void 0,u=kn(()=>{var s=n??t.appendChild(L());It(s,{pending:()=>{}},t=>{Qe({});var n=E;if(o&&(n.c=o),i&&(r.$$events=i),x&&$(t,null),l=e(t,r)||{},x&&(K.nodes.end=C,C===null||C.nodeType!==8||C.data!==`]`))throw Pe(),je;$e()},c);var u=new Set,d=e=>{for(var n=0;n{for(var e of u)for(let n of[t,document]){var r=kr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,vr),r.delete(e),r.size===0&&kr.delete(n)):r.set(e,i)}gr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return jr.set(l,u),l}var jr=new WeakMap;function Mr(e,t){let n=jr.get(e);return n?(jr.delete(e),n(t)):Promise.resolve()}var Nr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Hn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(V(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Wn(r,t),t.append(L()),this.#n.set(e,{effect:r,fragment:t})}else V(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Bn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(V(n.effect),this.#n.delete(e))};ensure(e,t){var n=A,r=vn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=L();i.append(a),this.#n.set(e,{effect:B(()=>t(a)),fragment:i})}else this.#t.set(e,B(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else x&&(this.anchor=C),this.#a(n)}};function Pr(e,t,n=!1){var r;x&&(r=C,Ie());var i=new Nr(e),a=n?re:0;function o(e,t){if(x){var n=Be(r);if(e!==parseInt(n.substring(1))){var a=ze();w(a),i.anchor=a,S(!1),i.ensure(e,t),S(!0);return}}i.ensure(e,t)}Pn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Fr(e,t,n,r,i){x&&Ie();var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n===`default`?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}function Ir(e){return(t,...n)=>{var r=e(...n),i;x?(i=C,Ie()):(i=pn(xr(r.render().trim())),t.before(i));let a=r.setup?.(i);$(i,i),typeof a==`function`&&Tn(a)}}function Lr(e,t,n){var r;x&&(r=C,Ie());var i=new Nr(e);Pn(()=>{var e=t()??null;if(x&&Be(r)===`[`!=(e!==null)){var a=ze();w(a),i.anchor=a,S(!1),i.ensure(e,e&&(t=>n(t,e))),S(!0);return}i.ensure(e,e&&(t=>n(t,e)))},re)}function Rr(e,t){return e===t||e?.[ue]===t}function zr(e={},t,n,r){var i=E.r,a=K;return An(()=>{var o,s;return Mn(()=>{o=s,s=r?.()||[],dr(()=>{e!==n(...s)&&(t(e,...s),o&&Rr(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Rr(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Br(e,t,n,r){var i=!We||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,c=r,l=!0,u=()=>(l&&(l=!1,c=o?dr(r):r),c);let d;if(a){var f=ue in e||de in e;d=s(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=gt(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Te(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?Ht:Gt)(()=>(_=!1,h()));a&&Q(v);var ee=K;return(function(e,t){if(arguments.length>0){let n=t?Q(v):i&&a?sn(e):e;return I(v,n),_=!0,c!==void 0&&(c=n),e}return H&&_||ee.f&16384?v.v:Q(v)})}function Vr(e){return class extends Hr{constructor(t){super({component:e,...t})}}}var Hr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=tn(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return Q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(Q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Or:Dr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!T&&(!e?.props?.$$host||e.sync===!1)&&wt(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||o(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Mr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}};function Ur(e,t){if(T||fe(`hydratable`),x){let t=window.__svelte?.h;if(t?.has(e))return t.get(e);Ne(e)}return t()}var Wr=t({afterUpdate:()=>Zr,beforeUpdate:()=>Xr,createContext:()=>qe,createEventDispatcher:()=>Yr,createRawSnippet:()=>Ir,flushSync:()=>wt,fork:()=>Nt,getAbortSignal:()=>Gr,getAllContexts:()=>Ze,getContext:()=>Je,hasContext:()=>Xe,hydratable:()=>Ur,hydrate:()=>Or,mount:()=>Dr,onDestroy:()=>qr,onMount:()=>Kr,setContext:()=>Ye,settled:()=>cr,tick:()=>sr,unmount:()=>Mr,untrack:()=>dr});function Gr(){return U===null&&Se(),(U.ac??=new AbortController).signal}function Kr(e){E===null&&pe(`onMount`),We&&E.l!==null?Qr(E).m.push(e):En(()=>{let t=dr(e);if(typeof t==`function`)return t})}function qr(e){E===null&&pe(`onDestroy`),Kr(()=>()=>dr(e))}function Jr(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function Yr(){let e=E;return e===null&&pe(`createEventDispatcher`),(t,r,i)=>{let a=e.s.$$events?.[t];if(a){let o=n(a)?a.slice():[a],s=Jr(t,r,i);for(let t of o)t.call(e.x,s);return!s.defaultPrevented}return!0}}function Xr(e){E===null&&pe(`beforeUpdate`),E.l===null&&we(`beforeUpdate`),Qr(E).b.push(e)}function Zr(e){E===null&&pe(`afterUpdate`),E.l===null&&we(`afterUpdate`),Qr(E).a.push(e)}function Qr(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{Qe as A,gn as C,pt as D,Wt as E,Ge as M,Re as N,Je as O,Le as P,hn as S,F as T,dr as _,zr as a,On as b,Pr as c,wr as d,Sr as f,sr as g,cr as h,Br as i,Ye as j,$e as k,Er as l,Q as m,Kr as n,Lr as o,Cr as p,Vr as r,Fr as s,Wr as t,Tr as u,Nn as v,I as w,mn as x,En as y};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/chunks/DEDqjojZ.js b/frontend/.svelte-kit/output/client/_app/immutable/chunks/DEDqjojZ.js
new file mode 100644
index 0000000..afdd2d0
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/chunks/DEDqjojZ.js
@@ -0,0 +1 @@
+typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/chunks/bq2dQ5MW.js b/frontend/.svelte-kit/output/client/_app/immutable/chunks/bq2dQ5MW.js
new file mode 100644
index 0000000..c08175a
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/chunks/bq2dQ5MW.js
@@ -0,0 +1 @@
+import{D as e,T as t,g as n,h as r,m as i,n as a,t as o,w as s}from"./BymsAeK4.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function ee(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder,new TextDecoder;function g(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),_(e,t));var v=new Map;function te(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=g(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function y(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now(){let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return ae(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return ae(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=x.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return ae(e)}).join(``)}).join(``)}/?$`),params:t}}function S(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function re(e){return e.slice(1).split(`/`).filter(S)}function ie(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;ee).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function ae(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function oe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ne(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ie(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function se(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ce(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var C=globalThis.__sveltekit_4xp95d?.base??``,le=globalThis.__sveltekit_4xp95d?.assets??C??``,ue=`1777346172513`,de=`sveltekit:snapshot`,fe=`sveltekit:scroll`,pe=`sveltekit:states`,w=`sveltekit:history`,T=`sveltekit:navigation`,E={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},me=location.origin;function he(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function O(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ge={...E,"":E.hover};function _e(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function ve(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=_e(e)}}function ye(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||Ce(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===me&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function k(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=O(s,`preload-code`)),i===null&&(i=O(s,`preload-data`)),t===null&&(t=O(s,`keepfocus`)),n===null&&(n=O(s,`noscroll`)),a===null&&(a=O(s,`reload`)),o===null&&(o=O(s,`replacestate`)),s=_e(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ge[r??`off`],preload_data:ge[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function be(t){let n=e(t),r=!0;function i(){r=!0,n.update(e=>e)}function a(e){r=!1,n.set(e)}function o(e){let t;return n.subscribe(n=>{(t===void 0||r&&n!==t)&&e(t=n)})}return{notify:i,set:a,subscribe:o}}var xe={v:h};function Se(){let{set:t,subscribe:n}=e(!1);async function r(){clearTimeout(void 0);try{let e=await fetch(`${le}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!e.ok)return!1;let n=(await e.json()).version!==ue;return n&&(t(!0),xe.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:n,check:r}}function Ce(e,t,n){return e.origin!==me||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function we(e){}var Te=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Te,`entries`]);var Ee=new Set([...Te]);new Set([...Ee,`actions`,`entries`]);function De(e){return e.filter(e=>e!=null)}function Oe(e){return e instanceof c||e instanceof u?e.status:500}function ke(e){return e instanceof u?e.text:`Internal Error`}var A,j,Ae,je=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Me=`a:`;je?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Me)},j={current:null},Ae={current:!1}):(A=new class{#e=t({});get data(){return i(this.#e)}set data(e){s(this.#e,e)}#t=t(null);get form(){return i(this.#t)}set form(e){s(this.#t,e)}#n=t(null);get error(){return i(this.#n)}set error(e){s(this.#n,e)}#r=t({});get params(){return i(this.#r)}set params(e){s(this.#r,e)}#i=t({id:null});get route(){return i(this.#i)}set route(e){s(this.#i,e)}#a=t({});get state(){return i(this.#a)}set state(e){s(this.#a,e)}#o=t(-1);get status(){return i(this.#o)}set status(e){s(this.#o,e)}#s=t(new URL(Me));get url(){return i(this.#s)}set url(e){s(this.#s,e)}},j=new class{#e=t(null);get current(){return i(this.#e)}set current(e){s(this.#e,e)}},Ae=new class{#e=t(!1);get current(){return i(this.#e)}set current(e){s(this.#e,e)}},xe.v=()=>Ae.current=!0);function Ne(e){Object.assign(A,e)}var{onMount:Pe,tick:Fe}=o,Ie=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=se(`sveltekit:scroll`)??{},P=se(`sveltekit:snapshot`)??{},F={url:be({}),page:be({}),navigating:e(null),updated:Se()};function Le(e){N[e]=D()}function Re(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function ze(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(C||`/`);e&&await e.update()}}var Be,Ve,L,R,He,z,B=[],V=[],H=null;function U(){H?.fork?.then(e=>e?.discard()),H=null}var W=new Map,Ue=new Set,We=new Set,G=new Set,K={branch:[],error:null,url:null,nav:null},Ge=!1,Ke=!1,qe=!0,q=!1,J=!1,Je=!1,Ye=!1,Xe,Y,X,Z,Ze=new Set,Qe=new Map;async function $e(e,t,n){globalThis.__sveltekit_4xp95d&&(globalThis.__sveltekit_4xp95d.query,globalThis.__sveltekit_4xp95d.prerender),document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Be=oe(e),R=document.documentElement,He=t,Ve=e.nodes[0],L=e.nodes[1],Ve(),L(),Y=history.state?.[w],X=history.state?.[T],Y||(Y=X=Date.now(),history.replaceState({...history.state,[w]:Y,[T]:X},``));let r=N[Y];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Dt(He,n)):(await Q({type:`enter`,url:he(z.hash?Nt(new URL(location.href)):location.href),replace_state:!0}),i()),Et()}function et(){B.length=0,Ye=!1}function tt(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function nt(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function rt(){Le(Y),ce(fe,N),tt(X),ce(de,P)}async function it(e,t,r,i){let a;t.invalidateAll&&U(),await Q({type:`goto`,url:he(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:i,accept:()=>{t.invalidateAll&&(Ye=!0,a=[],Qe.forEach((e,t)=>{for(let n of e.keys())a.push(t+`/`+n)})),t.invalidate&&t.invalidate.forEach(Tt)}}),t.invalidateAll&&n().then(n).then(()=>{Qe.forEach((e,t)=>{e.forEach(({resource:e},n)=>{a?.includes(t+`/`+n)&&e.refresh?.()})})})}async function at(e){if(e.id!==H?.id){U();let t={};Ze.add(t),H={id:e.id,token:t,promise:ht({...e,preload:t}).then(e=>(Ze.delete(t),e.type===`loaded`&&e.state.error&&U(),e)),fork:null}}return H.promise}async function ot(e){let t=(await yt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function st(e,t,n){let r={params:K.params,route:{id:K.route?.id??null},url:new URL(location.href)};K={...e.state,nav:r};let i=document.querySelector(`style[data-sveltekit]`);if(i&&i.remove(),Object.assign(A,e.props.page),Xe=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),nt(X),n){let e={from:null,to:{...r,scroll:N[Y]??D()},willUnload:!1,type:`enter`,complete:Promise.resolve()};G.forEach(t=>t(e))}Ke=!0}async function ct({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(C&&(e.pathname===C||e.pathname===C+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:De(n).map(e=>e.node.component),page:Mt(A)}};s!==void 0&&(l.props.form=s);let u={},f=!A,p=0;for(let e=0;et(new URL(e))))return!0;return!1}function ft(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function pt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function mt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Mt(A),constructors:[]}}}async function ht({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return Ze.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=K.url?e!==xt(K.url):!1,p=K.route?i.id!==K.route.id:!1,m=pt(K.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=K.branch[t];return e[1]===a?.loader&&!dt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,lt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;nPromise.resolve({}),server_data_node:ft(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return it(new URL(e.location,location.href),{},0);throw e}}async function vt(e){let t=e.href;if(W.has(t))return W.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ut(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();W.set(t,r),n=await r}catch{W.delete(t);return}return n}async function yt(e,t){if(e&&!Ce(e,C,z.hash)){let n=await vt(e);if(!n)return;let r=bt(n);for(let n of Be){let i=n.exec(r);if(i)return{id:xt(e),invalidating:t,route:n,params:p(i),url:e}}}}function bt(e){return f(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(C.length))||`/`}function xt(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function St({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=jt(K,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return q||Ue.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:t,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Z;Z=d;let g=await yt(t,!1),_=e===`enter`?jt(K,g,t,e):St({url:t,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Z===d&&(Z=ee);return}let v=Y,te=X;f(),q=!0,Ke&&_.navigation.type!==`enter`&&F.navigating.set(j.current=_.navigation);let y=g&&await ht(g);if(!y){if(Ce(t,C,z.hash))return await I(t,s);y=await Ct(t,{id:null},await $(new u(404,`Not Found`,`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=g?.url||t,Z!==d)return _.reject(Error(`navigation aborted`)),!1;if(y.type===`redirect`){if(l<20){await Q({type:e,url:new URL(y.location,t),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}y=await _t({status:500,error:await $(Error(`Redirect loop`),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else y.props.page.status>=400&&await F.updated.check()&&(await ze(),await I(t,s));if(et(),Le(v),tt(te),y.props.page.url.pathname!==t.pathname&&(t.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,n={[w]:Y+=e,[T]:X+=e,[pe]:c};(s?history.replaceState:history.pushState).call(history,n,``,t),s||Re(Y,X)}let b=g&&H?.id===g.id?H.fork:null;H?.fork&&!b&&U(),H=null,y.props.page.state=c;let x;if(Ke){let e=(await Promise.all(Array.from(We,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{G.delete(e)})}e.push(t),e.forEach(e=>{G.add(e)})}let n=_.navigation.to;K={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=t);let i=b&&await b;i?x=i.commit():(M=null,Xe.$set(y.props),M&&Object.assign(y.props.page,M),Ne(y.props.page),x=r?.()),Je=!0}else await st(y,He,!1);let{activeElement:ne}=document;await x,await n(),await n();let S=null;if(qe){let e=i?i.scroll:o?D():null;e?scrollTo(e.x,e.y):(S=t.hash&&document.getElementById(Pt(t)))?S.scrollIntoView():scrollTo(0,0)}let re=document.activeElement!==ne&&document.activeElement!==document.body;!a&&!re&&At(t,!S),qe=!0,y.props.page&&(M&&Object.assign(y.props.page,M),Object.assign(A,y.props.page)),q=!1,e===`popstate`&&nt(X),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=D()),G.forEach(e=>e(_.navigation)),F.navigating.set(j.current=null)}async function Ct(e,t,n,r,i){return e.origin===me&&e.pathname===location.pathname&&!Ge?await _t({status:r,error:n,url:e,route:t}):await I(e,i)}function wt(){let e,t={element:void 0,href:void 0},n;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,E.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],E.tap)}R.addEventListener(`mousedown`,r),R.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(ot(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=ve(e,R),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=ye(i,C,z.hash);if(s||c)return;let l=k(i),u=o&&xt(K.url)===xt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=E.tap;let e=await yt(o,!1);if(!e)return;at(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,ot(o))}function o(){i.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:r}=ye(e,C,z.hash);if(n||r)continue;let a=k(e);a.reload||(a.preload_code===E.viewport&&i.observe(e),a.preload_code===E.eager&&ot(t))}}G.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=Oe(e),r=ke(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Tt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function Et(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(rt(),!q){let e=jt(K,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};Ue.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&rt()}),navigator.connection?.saveData||wt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=ve(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=ye(n,C,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=k(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){St({url:r,type:`link`,event:t})?q=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=K.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(J=!0,Le(Y),e(r),!s.replace_state)return;J=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(Ce(r,C,!1))return;let i=e.target,a=k(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!kt)if(t.state?.[`sveltekit:history`]){let n=t.state[w];if(Z={},n===Y)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[T],s=K.url?m(location)===m(K.url):!1;if(o===X&&(Je||s)){i!==A.state&&(A.state=i),e(a),N[Y]=D(),r&&scrollTo(r.x,r.y),Y=n;return}let c=n-Y;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{Y=n,X=o},block:()=>{history.go(-c)},nav_token:Z,event:t})}else J||(e(new URL(location.href)),z.hash&&location.reload())}),addEventListener(`hashchange`,()=>{J&&(J=!1,history.replaceState({...history.state,[w]:++Y,[T]:X},``,location.href))});for(let e of document.querySelectorAll(`link`))Ie.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(j.current=null)});function e(e){K.url=A.url=e,F.page.set(Mt(A)),F.page.notify()}}async function Dt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ge=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await yt(u,!1)||{}),d=Be.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Ot(r.uses)),lt({loader:z.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r{let a=history.state;kt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),kt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t{if(r.rangeCount===e.length){for(let t=0;t{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Mt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Nt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Pt(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Ae as a,A as i,F as n,we as o,j as r,$e as t};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/chunks/smLyJ_zi.js b/frontend/.svelte-kit/output/client/_app/immutable/chunks/smLyJ_zi.js
new file mode 100644
index 0000000..79afc17
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/chunks/smLyJ_zi.js
@@ -0,0 +1 @@
+var e=`modulepreload`,t=function(e){return`/`+e},n={},r=function(r,i,a){let o=Promise.resolve();if(i&&i.length>0){let r=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(i.map(i=>{if(i=t(i,a),i in n)return;n[i]=!0;let o=i.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let e=r.length-1;e>=0;e--){let t=r[e];if(t.href===i&&(!o||t.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:e,o||(l.as=`script`),l.crossOrigin=``,l.href=i,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,t)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${i}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(e=>{for(let t of e||[])t.status===`rejected`&&s(t.reason);return r().catch(s)})};export{r as t};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/entry/app.nZlaNymk.js b/frontend/.svelte-kit/output/client/_app/immutable/entry/app.nZlaNymk.js
new file mode 100644
index 0000000..99676dd
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/entry/app.nZlaNymk.js
@@ -0,0 +1,2 @@
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.BI2104Lw.js","_app/immutable/chunks/BymsAeK4.js","_app/immutable/chunks/DEDqjojZ.js","_app/immutable/chunks/BLiAG49H.js","_app/immutable/nodes/1.7VgG-JZk.js","_app/immutable/chunks/bq2dQ5MW.js","_app/immutable/nodes/2.DsEO-gDS.js"])))=>i.map(i=>d[i]);
+import{A as e,C as t,E as n,P as r,S as i,T as a,a as o,b as s,c,d as l,f as u,g as d,i as f,k as p,l as m,m as h,n as g,o as _,p as v,r as y,u as b,v as x,w as S,x as C,y as w}from"../chunks/BymsAeK4.js";import{t as T}from"../chunks/smLyJ_zi.js";import"../chunks/DEDqjojZ.js";var E={},D=u(``),O=u(` `,1);function k(u,y){e(y,!0);let T=f(y,`components`,23,()=>[]),E=f(y,`data_0`,3,null),k=f(y,`data_1`,3,null);s(()=>y.stores.page.set(y.page)),w(()=>{y.stores,y.page,y.constructors,T(),y.form,E(),k(),y.stores.page.notify()});let A=a(!1),j=a(!1),M=a(null);g(()=>{let e=y.stores.page.subscribe(()=>{h(A)&&(S(j,!0),d().then(()=>{S(M,document.title||`untitled page`,!0)}))});return S(A,!0),e});let N=n(()=>y.constructors[1]);var P=O(),F=i(P),I=e=>{let t=n(()=>y.constructors[0]);var r=l();_(i(r),()=>h(t),(e,t)=>{o(t(e,{get data(){return E()},get form(){return y.form},get params(){return y.page.params},children:(e,t)=>{var n=l();_(i(n),()=>h(N),(e,t)=>{o(t(e,{get data(){return k()},get form(){return y.form},get params(){return y.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),b(e,n)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),b(e,r)},L=e=>{let t=n(()=>y.constructors[0]);var r=l();_(i(r),()=>h(t),(e,t)=>{o(t(e,{get data(){return E()},get form(){return y.form},get params(){return y.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),b(e,r)};c(F,e=>{y.constructors[1]?e(I):e(L,-1)});var R=t(F,2),z=e=>{var t=D(),n=C(t),i=e=>{var t=v();x(()=>m(t,h(M))),b(e,t)};c(n,e=>{h(j)&&e(i)}),r(t),b(e,t)};c(R,e=>{h(A)&&e(z)}),b(u,P),p()}var A=y(k),j=[()=>T(()=>import(`../nodes/0.BI2104Lw.js`),__vite__mapDeps([0,1,2,3])),()=>T(()=>import(`../nodes/1.7VgG-JZk.js`),__vite__mapDeps([4,1,5,2])),()=>T(()=>import(`../nodes/2.DsEO-gDS.js`),__vite__mapDeps([6,1,2,3]))],M=[],N={"/":[2]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t);export{R as decode,F as decoders,N as dictionary,I as encoders,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/entry/start.2LB97QYQ.js b/frontend/.svelte-kit/output/client/_app/immutable/entry/start.2LB97QYQ.js
new file mode 100644
index 0000000..cfae210
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/entry/start.2LB97QYQ.js
@@ -0,0 +1 @@
+import{o as e,t}from"../chunks/bq2dQ5MW.js";export{e as load_css,t as start};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/nodes/0.BI2104Lw.js b/frontend/.svelte-kit/output/client/_app/immutable/nodes/0.BI2104Lw.js
new file mode 100644
index 0000000..2b5e2a8
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/nodes/0.BI2104Lw.js
@@ -0,0 +1 @@
+import{S as e,d as t,s as n,u as r}from"../chunks/BymsAeK4.js";import"../chunks/DEDqjojZ.js";import"../chunks/BLiAG49H.js";function i(i,a){var o=t();n(e(o),a,`default`,{},null),r(i,o)}export{i as component};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/nodes/1.7VgG-JZk.js b/frontend/.svelte-kit/output/client/_app/immutable/nodes/1.7VgG-JZk.js
new file mode 100644
index 0000000..574128f
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/nodes/1.7VgG-JZk.js
@@ -0,0 +1 @@
+import{A as e,C as t,P as n,S as r,f as i,k as a,l as o,u as s,v as c,x as l}from"../chunks/BymsAeK4.js";import{i as u,n as d,r as f}from"../chunks/bq2dQ5MW.js";import"../chunks/DEDqjojZ.js";var p={get data(){return u.data},get error(){return u.error},get form(){return u.form},get params(){return u.params},get route(){return u.route},get state(){return u.state},get status(){return u.status},get url(){return u.url}};Object.defineProperty({get from(){return f.current?f.current.from:null},get to(){return f.current?f.current.to:null},get type(){return f.current?f.current.type:null},get willUnload(){return f.current?f.current.willUnload:null},get delta(){return f.current?f.current.delta:null},get complete(){return f.current?f.current.complete:null}},`current`,{get(){throw Error(`Replace navigating.current. with navigating.`)}}),d.updated.check;var m=p,h=i(`
`,1);function g(i,u){e(u,!0);var d=h(),f=r(d),p=l(f,!0);n(f);var g=t(f,2),_=l(g,!0);n(g),c(()=>{o(p,m.status),o(_,m.error?.message)}),s(i,d),a()}export{g as component};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/immutable/nodes/2.DsEO-gDS.js b/frontend/.svelte-kit/output/client/_app/immutable/nodes/2.DsEO-gDS.js
new file mode 100644
index 0000000..54887a3
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/immutable/nodes/2.DsEO-gDS.js
@@ -0,0 +1 @@
+import{N as e,f as t,u as n}from"../chunks/BymsAeK4.js";import"../chunks/DEDqjojZ.js";import"../chunks/BLiAG49H.js";var r=t(`Attendance Tool
Login`,1);function i(t){var i=r();e(2),n(t,i)}export{i as component};
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/client/_app/version.json b/frontend/.svelte-kit/output/client/_app/version.json
new file mode 100644
index 0000000..5fac2e6
--- /dev/null
+++ b/frontend/.svelte-kit/output/client/_app/version.json
@@ -0,0 +1 @@
+{"version":"1777346172513"}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/prerendered/dependencies/_app/env.js b/frontend/.svelte-kit/output/prerendered/dependencies/_app/env.js
new file mode 100644
index 0000000..f5427da
--- /dev/null
+++ b/frontend/.svelte-kit/output/prerendered/dependencies/_app/env.js
@@ -0,0 +1 @@
+export const env={}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/server/.vite/manifest.json b/frontend/.svelte-kit/output/server/.vite/manifest.json
new file mode 100644
index 0000000..fb352bf
--- /dev/null
+++ b/frontend/.svelte-kit/output/server/.vite/manifest.json
@@ -0,0 +1,109 @@
+{
+ ".svelte-kit/generated/server/internal.js": {
+ "file": "internal.js",
+ "name": "internal",
+ "src": ".svelte-kit/generated/server/internal.js",
+ "isEntry": true,
+ "imports": [
+ "_environment.js",
+ "_internal.js"
+ ]
+ },
+ "_dev.js": {
+ "file": "chunks/dev.js",
+ "name": "dev"
+ },
+ "_environment.js": {
+ "file": "chunks/environment.js",
+ "name": "environment",
+ "imports": [
+ "_dev.js"
+ ]
+ },
+ "_exports.js": {
+ "file": "chunks/exports.js",
+ "name": "exports",
+ "imports": [
+ "_dev.js"
+ ]
+ },
+ "_internal.js": {
+ "file": "chunks/internal.js",
+ "name": "internal",
+ "imports": [
+ "_environment.js",
+ "_dev.js"
+ ]
+ },
+ "_shared.js": {
+ "file": "chunks/shared.js",
+ "name": "shared",
+ "imports": [
+ "_environment.js"
+ ]
+ },
+ "_utils.js": {
+ "file": "chunks/utils.js",
+ "name": "utils",
+ "imports": [
+ "_environment.js",
+ "_shared.js"
+ ]
+ },
+ "node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js": {
+ "file": "remote-entry.js",
+ "name": "remote-entry",
+ "src": "node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js",
+ "isEntry": true,
+ "imports": [
+ "_environment.js",
+ "_utils.js",
+ "_shared.js"
+ ]
+ },
+ "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte": {
+ "file": "entries/fallbacks/error.svelte.js",
+ "name": "entries/fallbacks/error.svelte",
+ "src": "node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte",
+ "isEntry": true,
+ "imports": [
+ "_environment.js",
+ "_internal.js",
+ "_exports.js",
+ "_shared.js",
+ "_dev.js"
+ ]
+ },
+ "node_modules/@sveltejs/kit/src/runtime/server/index.js": {
+ "file": "index.js",
+ "name": "index",
+ "src": "node_modules/@sveltejs/kit/src/runtime/server/index.js",
+ "isEntry": true,
+ "imports": [
+ "_environment.js",
+ "_internal.js",
+ "_utils.js",
+ "_exports.js",
+ "_shared.js",
+ "_dev.js"
+ ]
+ },
+ "src/routes/+layout.svelte": {
+ "file": "entries/pages/_layout.svelte.js",
+ "name": "entries/pages/_layout.svelte",
+ "src": "src/routes/+layout.svelte",
+ "isEntry": true,
+ "imports": [
+ "_dev.js"
+ ]
+ },
+ "src/routes/+page.svelte": {
+ "file": "entries/pages/_page.svelte.js",
+ "name": "entries/pages/_page.svelte",
+ "src": "src/routes/+page.svelte",
+ "isEntry": true,
+ "imports": [
+ "_dev.js"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/frontend/.svelte-kit/output/server/chunks/dev.js b/frontend/.svelte-kit/output/server/chunks/dev.js
new file mode 100644
index 0000000..adbf8df
--- /dev/null
+++ b/frontend/.svelte-kit/output/server/chunks/dev.js
@@ -0,0 +1,3963 @@
+import * as devalue from "devalue";
+import { clsx } from "clsx";
+//#region node_modules/svelte/src/internal/shared/errors.js
+/**
+* Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
+* @param {string} name
+* @returns {never}
+*/
+function experimental_async_required(name) {
+ throw new Error(`https://svelte.dev/e/experimental_async_required`);
+}
+/**
+* `%name%(...)` can only be used during component initialisation
+* @param {string} name
+* @returns {never}
+*/
+function lifecycle_outside_component(name) {
+ throw new Error(`https://svelte.dev/e/lifecycle_outside_component`);
+}
+/**
+* Context was not set in a parent component
+* @returns {never}
+*/
+function missing_context() {
+ throw new Error(`https://svelte.dev/e/missing_context`);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/errors.js
+/**
+* The node API `AsyncLocalStorage` is not available, but is required to use async server rendering.
+* @returns {never}
+*/
+function async_local_storage_unavailable() {
+ const error = /* @__PURE__ */ new Error(`async_local_storage_unavailable\nThe node API \`AsyncLocalStorage\` is not available, but is required to use async server rendering.\nhttps://svelte.dev/e/async_local_storage_unavailable`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* Encountered asynchronous work while rendering synchronously.
+* @returns {never}
+*/
+function await_invalid() {
+ const error = /* @__PURE__ */ new Error(`await_invalid\nEncountered asynchronous work while rendering synchronously.\nhttps://svelte.dev/e/await_invalid`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* The `html` property of server render results has been deprecated. Use `body` instead.
+* @returns {never}
+*/
+function html_deprecated() {
+ const error = /* @__PURE__ */ new Error(`html_deprecated\nThe \`html\` property of server render results has been deprecated. Use \`body\` instead.\nhttps://svelte.dev/e/html_deprecated`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* Attempted to set `hydratable` with key `%key%` twice with different values.
+*
+* %stack%
+* @param {string} key
+* @param {string} stack
+* @returns {never}
+*/
+function hydratable_clobbering(key, stack) {
+ const error = /* @__PURE__ */ new Error(`hydratable_clobbering\nAttempted to set \`hydratable\` with key \`${key}\` twice with different values.
+
+${stack}\nhttps://svelte.dev/e/hydratable_clobbering`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* Failed to serialize `hydratable` data for key `%key%`.
+*
+* `hydratable` can serialize anything [`uneval` from `devalue`](https://npmjs.com/package/uneval) can, plus Promises.
+*
+* Cause:
+* %stack%
+* @param {string} key
+* @param {string} stack
+* @returns {never}
+*/
+function hydratable_serialization_failed(key, stack) {
+ const error = /* @__PURE__ */ new Error(`hydratable_serialization_failed\nFailed to serialize \`hydratable\` data for key \`${key}\`.
+
+\`hydratable\` can serialize anything [\`uneval\` from \`devalue\`](https://npmjs.com/package/uneval) can, plus Promises.
+
+Cause:
+${stack}\nhttps://svelte.dev/e/hydratable_serialization_failed`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* `csp.nonce` was set while `csp.hash` was `true`. These options cannot be used simultaneously.
+* @returns {never}
+*/
+function invalid_csp() {
+ const error = /* @__PURE__ */ new Error(`invalid_csp\n\`csp.nonce\` was set while \`csp.hash\` was \`true\`. These options cannot be used simultaneously.\nhttps://svelte.dev/e/invalid_csp`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* The `idPrefix` option cannot include `--`.
+* @returns {never}
+*/
+function invalid_id_prefix() {
+ const error = /* @__PURE__ */ new Error(`invalid_id_prefix\nThe \`idPrefix\` option cannot include \`--\`.\nhttps://svelte.dev/e/invalid_id_prefix`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* `%name%(...)` is not available on the server
+* @param {string} name
+* @returns {never}
+*/
+function lifecycle_function_unavailable(name) {
+ const error = /* @__PURE__ */ new Error(`lifecycle_function_unavailable\n\`${name}(...)\` is not available on the server\nhttps://svelte.dev/e/lifecycle_function_unavailable`);
+ error.name = "Svelte error";
+ throw error;
+}
+/**
+* Could not resolve `render` context.
+* @returns {never}
+*/
+function server_context_required() {
+ const error = /* @__PURE__ */ new Error(`server_context_required\nCould not resolve \`render\` context.\nhttps://svelte.dev/e/server_context_required`);
+ error.name = "Svelte error";
+ throw error;
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/context.js
+/** @import { SSRContext } from '#server' */
+/** @type {SSRContext | null} */
+var ssr_context = null;
+/** @param {SSRContext | null} v */
+function set_ssr_context(v) {
+ ssr_context = v;
+}
+/**
+* @template T
+* @returns {[() => T, (context: T) => T]}
+* @since 5.40.0
+*/
+function createContext() {
+ const key = {};
+ return [() => {
+ if (!hasContext(key)) missing_context();
+ return getContext(key);
+ }, (context) => setContext(key, context)];
+}
+/**
+* @template T
+* @param {any} key
+* @returns {T}
+*/
+function getContext(key) {
+ return get_or_init_context_map("getContext").get(key);
+}
+/**
+* @template T
+* @param {any} key
+* @param {T} context
+* @returns {T}
+*/
+function setContext(key, context) {
+ get_or_init_context_map("setContext").set(key, context);
+ return context;
+}
+/**
+* @param {any} key
+* @returns {boolean}
+*/
+function hasContext(key) {
+ return get_or_init_context_map("hasContext").has(key);
+}
+/** @returns {Map} */
+function getAllContexts() {
+ return get_or_init_context_map("getAllContexts");
+}
+/**
+* @param {string} name
+* @returns {Map}
+*/
+function get_or_init_context_map(name) {
+ if (ssr_context === null) lifecycle_outside_component(name);
+ return ssr_context.c ??= new Map(get_parent_context(ssr_context) || void 0);
+}
+/**
+* @param {Function} [fn]
+*/
+function push$1(fn) {
+ ssr_context = {
+ p: ssr_context,
+ c: null,
+ r: null
+ };
+}
+function pop$1() {
+ ssr_context = ssr_context.p;
+}
+/**
+* @param {SSRContext} ssr_context
+* @returns {Map | null}
+*/
+function get_parent_context(ssr_context) {
+ let parent = ssr_context.p;
+ while (parent !== null) {
+ const context_map = parent.c;
+ if (context_map !== null) return context_map;
+ parent = parent.p;
+ }
+ return null;
+}
+//#endregion
+//#region node_modules/svelte/src/internal/shared/utils.js
+var is_array = Array.isArray;
+var index_of = Array.prototype.indexOf;
+var includes = Array.prototype.includes;
+var array_from = Array.from;
+var define_property = Object.defineProperty;
+var get_descriptor = Object.getOwnPropertyDescriptor;
+var object_prototype = Object.prototype;
+var array_prototype = Array.prototype;
+var get_prototype_of = Object.getPrototypeOf;
+var is_extensible = Object.isExtensible;
+var has_own_property = Object.prototype.hasOwnProperty;
+var noop = () => {};
+/** @param {Function} fn */
+function run(fn) {
+ return fn();
+}
+/** @param {Array<() => void>} arr */
+function run_all(arr) {
+ for (var i = 0; i < arr.length; i++) arr[i]();
+}
+/**
+* TODO replace with Promise.withResolvers once supported widely enough
+* @template [T=void]
+*/
+function deferred() {
+ /** @type {(value: T) => void} */
+ var resolve;
+ /** @type {(reason: any) => void} */
+ var reject;
+ return {
+ promise: new Promise((res, rej) => {
+ resolve = res;
+ reject = rej;
+ }),
+ resolve,
+ reject
+ };
+}
+var CLEAN = 1024;
+var DIRTY = 2048;
+var MAYBE_DIRTY = 4096;
+var INERT = 8192;
+var DESTROYED = 16384;
+/** Set once a reaction has run for the first time */
+var REACTION_RAN = 32768;
+/** Effect is in the process of getting destroyed. Can be observed in child teardown functions */
+var DESTROYING = 1 << 25;
+/**
+* 'Transparent' effects do not create a transition boundary.
+* This is on a block effect 99% of the time but may also be on a branch effect if its parent block effect was pruned
+*/
+var EFFECT_TRANSPARENT = 65536;
+var EFFECT_PRESERVED = 1 << 19;
+var USER_EFFECT = 1 << 20;
+/**
+* Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
+* Will be lifted during execution of the derived and during checking its dirty state (both are necessary
+* because a derived might be checked but not executed). This is a pure performance optimization flag and
+* should not be used for any other purpose!
+*/
+var WAS_MARKED = 65536;
+var REACTION_IS_UPDATING = 1 << 21;
+var ERROR_VALUE = 1 << 23;
+var STATE_SYMBOL = Symbol("$state");
+var LEGACY_PROPS = Symbol("legacy props");
+/** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
+var STALE_REACTION = new class StaleReactionError extends Error {
+ name = "StaleReactionError";
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
+}();
+globalThis.document?.contentType;
+//#endregion
+//#region node_modules/svelte/src/internal/server/abort-signal.js
+/** @type {AbortController | null} */
+var controller = null;
+function abort() {
+ controller?.abort(STALE_REACTION);
+ controller = null;
+}
+function getAbortSignal() {
+ return (controller ??= new AbortController()).signal;
+}
+//#endregion
+//#region node_modules/svelte/src/internal/flags/index.js
+/** True if experimental.async=true */
+var async_mode_flag = false;
+/** True if we're not certain that we only have Svelte 5 code in the compilation */
+var legacy_mode_flag = false;
+//#endregion
+//#region node_modules/svelte/src/internal/server/render-context.js
+/** @import { AsyncLocalStorage } from 'node:async_hooks' */
+/** @import { RenderContext } from '#server' */
+/** @type {Promise | null} */
+var current_render = null;
+/** @type {RenderContext | null} */
+var context = null;
+/** @returns {RenderContext} */
+function get_render_context() {
+ const store = context ?? als?.getStore();
+ if (!store) server_context_required();
+ return store;
+}
+/**
+* @template T
+* @param {() => Promise} fn
+* @returns {Promise}
+*/
+async function with_render_context(fn) {
+ context = { hydratable: {
+ lookup: /* @__PURE__ */ new Map(),
+ comparisons: [],
+ unresolved_promises: /* @__PURE__ */ new Map()
+ } };
+ if (in_webcontainer()) {
+ const { promise, resolve } = deferred();
+ const previous_render = current_render;
+ current_render = promise;
+ await previous_render;
+ return fn().finally(resolve);
+ }
+ try {
+ if (als === null) async_local_storage_unavailable();
+ return als.run(context, fn);
+ } finally {
+ context = null;
+ }
+}
+/** @type {AsyncLocalStorage | null} */
+var als = null;
+/** @type {Promise | null} */
+var als_import = null;
+/**
+*
+* @returns {Promise}
+*/
+function init_render_context() {
+ als_import ??= import("node:async_hooks").then((hooks) => {
+ als = new hooks.AsyncLocalStorage();
+ }).then(noop, noop);
+ return als_import;
+}
+function in_webcontainer() {
+ return !!globalThis.process?.versions?.webcontainer;
+}
+/**
+* @returns {string[]}
+*/
+function get_stack() {
+ const limit = Error.stackTraceLimit;
+ Error.stackTraceLimit = Infinity;
+ const stack = (/* @__PURE__ */ new Error()).stack;
+ Error.stackTraceLimit = limit;
+ if (!stack) return [];
+ const lines = stack.split("\n");
+ const new_lines = [];
+ for (let i = 0; i < lines.length; i++) {
+ const line = lines[i];
+ const posixified = line.replaceAll("\\", "/");
+ if (line.trim() === "Error") continue;
+ if (line.includes("validate_each_keys")) return [];
+ if (posixified.includes("svelte/src/internal") || posixified.includes("node_modules/.vite")) continue;
+ new_lines.push(line);
+ }
+ return new_lines;
+}
+//#endregion
+//#region node_modules/svelte/src/constants.js
+var HYDRATION_ERROR = {};
+var UNINITIALIZED = Symbol();
+/**
+* A `hydratable` value with key `%key%` was created, but at least part of it was not used during the render.
+*
+* The `hydratable` was initialized in:
+* %stack%
+* @param {string} key
+* @param {string} stack
+*/
+function unresolved_hydratable(key, stack) {
+ console.warn(`https://svelte.dev/e/unresolved_hydratable`);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/hydration.js
+var BLOCK_OPEN = ``;
+var BLOCK_CLOSE = ``;
+//#endregion
+//#region node_modules/svelte/src/escaping.js
+var ATTR_REGEX = /[&"<]/g;
+var CONTENT_REGEX = /[&<]/g;
+/**
+* @template V
+* @param {V} value
+* @param {boolean} [is_attr]
+*/
+function escape_html(value, is_attr) {
+ const str = String(value ?? "");
+ const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
+ pattern.lastIndex = 0;
+ let escaped = "";
+ let last = 0;
+ while (pattern.test(str)) {
+ const i = pattern.lastIndex - 1;
+ const ch = str[i];
+ escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === "\"" ? """ : "<");
+ last = i + 1;
+ }
+ return escaped + str.substring(last);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/shared/attributes.js
+/**
+* `` should be rendered as `
` and _not_
+* `
`, which is equivalent to `
`. There
+* may be other odd cases that need to be added to this list in future
+* @type {Record
>}
+*/
+var replacements = { translate: new Map([[true, "yes"], [false, "no"]]) };
+/**
+* @template V
+* @param {string} name
+* @param {V} value
+* @param {boolean} [is_boolean]
+* @returns {string}
+*/
+function attr(name, value, is_boolean = false) {
+ if (name === "hidden" && value !== "until-found") is_boolean = true;
+ if (value == null || !value && is_boolean) return "";
+ const normalized = has_own_property.call(replacements, name) && replacements[name].get(value) || value;
+ return ` ${name}${is_boolean ? `=""` : `="${escape_html(normalized, true)}"`}`;
+}
+/**
+* Small wrapper around clsx to preserve Svelte's (weird) handling of falsy values.
+* TODO Svelte 6 revisit this, and likely turn all falsy values into the empty string (what clsx also does)
+* @param {any} value
+*/
+function clsx$1(value) {
+ if (typeof value === "object") return clsx(value);
+ else return value ?? "";
+}
+var whitespace = [..." \n\r\f\xA0\v"];
+/**
+* @param {any} value
+* @param {string | null} [hash]
+* @param {Record} [directives]
+* @returns {string | null}
+*/
+function to_class(value, hash, directives) {
+ var classname = value == null ? "" : "" + value;
+ if (hash) classname = classname ? classname + " " + hash : hash;
+ if (directives) {
+ for (var key of Object.keys(directives)) if (directives[key]) classname = classname ? classname + " " + key : key;
+ else if (classname.length) {
+ var len = key.length;
+ var a = 0;
+ while ((a = classname.indexOf(key, a)) >= 0) {
+ var b = a + len;
+ if ((a === 0 || whitespace.includes(classname[a - 1])) && (b === classname.length || whitespace.includes(classname[b]))) classname = (a === 0 ? "" : classname.substring(0, a)) + classname.substring(b + 1);
+ else a = b;
+ }
+ }
+ }
+ return classname === "" ? null : classname;
+}
+/**
+*
+* @param {Record} styles
+* @param {boolean} important
+*/
+function append_styles(styles, important = false) {
+ var separator = important ? " !important;" : ";";
+ var css = "";
+ for (var key of Object.keys(styles)) {
+ var value = styles[key];
+ if (value != null && value !== "") css += " " + key + ": " + value + separator;
+ }
+ return css;
+}
+/**
+* @param {string} name
+* @returns {string}
+*/
+function to_css_name(name) {
+ if (name[0] !== "-" || name[1] !== "-") return name.toLowerCase();
+ return name;
+}
+/**
+* @param {any} value
+* @param {Record | [Record, Record]} [styles]
+* @returns {string | null}
+*/
+function to_style(value, styles) {
+ if (styles) {
+ var new_style = "";
+ /** @type {Record | undefined} */
+ var normal_styles;
+ /** @type {Record | undefined} */
+ var important_styles;
+ if (Array.isArray(styles)) {
+ normal_styles = styles[0];
+ important_styles = styles[1];
+ } else normal_styles = styles;
+ if (value) {
+ value = String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
+ /** @type {boolean | '"' | "'"} */
+ var in_str = false;
+ var in_apo = 0;
+ var in_comment = false;
+ var reserved_names = [];
+ if (normal_styles) reserved_names.push(...Object.keys(normal_styles).map(to_css_name));
+ if (important_styles) reserved_names.push(...Object.keys(important_styles).map(to_css_name));
+ var start_index = 0;
+ var name_index = -1;
+ const len = value.length;
+ for (var i = 0; i < len; i++) {
+ var c = value[i];
+ if (in_comment) {
+ if (c === "/" && value[i - 1] === "*") in_comment = false;
+ } else if (in_str) {
+ if (in_str === c) in_str = false;
+ } else if (c === "/" && value[i + 1] === "*") in_comment = true;
+ else if (c === "\"" || c === "'") in_str = c;
+ else if (c === "(") in_apo++;
+ else if (c === ")") in_apo--;
+ if (!in_comment && in_str === false && in_apo === 0) {
+ if (c === ":" && name_index === -1) name_index = i;
+ else if (c === ";" || i === len - 1) {
+ if (name_index !== -1) {
+ var name = to_css_name(value.substring(start_index, name_index).trim());
+ if (!reserved_names.includes(name)) {
+ if (c !== ";") i++;
+ var property = value.substring(start_index, i).trim();
+ new_style += " " + property + ";";
+ }
+ }
+ start_index = i + 1;
+ name_index = -1;
+ }
+ }
+ }
+ }
+ if (normal_styles) new_style += append_styles(normal_styles);
+ if (important_styles) new_style += append_styles(important_styles, true);
+ new_style = new_style.trim();
+ return new_style === "" ? null : new_style;
+ }
+ return value == null ? null : String(value);
+}
+/**
+* Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
+* @returns {never}
+*/
+function effect_update_depth_exceeded() {
+ throw new Error(`https://svelte.dev/e/effect_update_depth_exceeded`);
+}
+/**
+* Failed to hydrate the application
+* @returns {never}
+*/
+function hydration_failed() {
+ throw new Error(`https://svelte.dev/e/hydration_failed`);
+}
+/**
+* Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
+* @returns {never}
+*/
+function state_descriptors_fixed() {
+ throw new Error(`https://svelte.dev/e/state_descriptors_fixed`);
+}
+/**
+* Cannot set prototype of `$state` object
+* @returns {never}
+*/
+function state_prototype_fixed() {
+ throw new Error(`https://svelte.dev/e/state_prototype_fixed`);
+}
+/**
+* Updating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
+* @returns {never}
+*/
+function state_unsafe_mutation() {
+ throw new Error(`https://svelte.dev/e/state_unsafe_mutation`);
+}
+/**
+* A `` `reset` function cannot be called while an error is still being handled
+* @returns {never}
+*/
+function svelte_boundary_reset_onerror() {
+ throw new Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`);
+}
+/**
+* Reading a derived belonging to a now-destroyed effect may result in stale values
+*/
+function derived_inert() {
+ console.warn(`https://svelte.dev/e/derived_inert`);
+}
+/**
+* Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
+* @param {string | undefined | null} [location]
+*/
+function hydration_mismatch(location) {
+ console.warn(`https://svelte.dev/e/hydration_mismatch`);
+}
+/**
+* Tried to unmount a component that was not mounted
+*/
+function lifecycle_double_unmount() {
+ console.warn(`https://svelte.dev/e/lifecycle_double_unmount`);
+}
+/**
+* Tried to unmount a state proxy, rather than a component
+*/
+function state_proxy_unmount() {
+ console.warn(`https://svelte.dev/e/state_proxy_unmount`);
+}
+/**
+* A `` `reset` function only resets the boundary the first time it is called
+*/
+function svelte_boundary_reset_noop() {
+ console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/dom/hydration.js
+/** @import { TemplateNode } from '#client' */
+/**
+* Use this variable to guard everything related to hydration code so it can be treeshaken out
+* if the user doesn't use the `hydrate` method and these code paths are therefore not needed.
+*/
+var hydrating = false;
+/** @param {boolean} value */
+function set_hydrating(value) {
+ hydrating = value;
+}
+/**
+* The node that is currently being hydrated. This starts out as the first node inside the opening
+* comment, and updates each time a component calls `$.child(...)` or `$.sibling(...)`.
+* When entering a block (e.g. `{#if ...}`), `hydrate_node` is the block opening comment; by the
+* time we leave the block it is the closing comment, which serves as the block's anchor.
+* @type {TemplateNode}
+*/
+var hydrate_node;
+/** @param {TemplateNode | null} node */
+function set_hydrate_node(node) {
+ if (node === null) {
+ hydration_mismatch();
+ throw HYDRATION_ERROR;
+ }
+ return hydrate_node = node;
+}
+function hydrate_next() {
+ return set_hydrate_node(/* @__PURE__ */ get_next_sibling(hydrate_node));
+}
+function next(count = 1) {
+ if (hydrating) {
+ var i = count;
+ var node = hydrate_node;
+ while (i--) node = /* @__PURE__ */ get_next_sibling(node);
+ hydrate_node = node;
+ }
+}
+/**
+* Skips or removes (depending on {@link remove}) all nodes starting at `hydrate_node` up until the next hydration end comment
+* @param {boolean} remove
+*/
+function skip_nodes(remove = true) {
+ var depth = 0;
+ var node = hydrate_node;
+ while (true) {
+ if (node.nodeType === 8) {
+ var data = node.data;
+ if (data === "]") {
+ if (depth === 0) return node;
+ depth -= 1;
+ } else if (data === "[" || data === "[!" || data[0] === "[" && !isNaN(Number(data.slice(1)))) depth += 1;
+ }
+ var next = /* @__PURE__ */ get_next_sibling(node);
+ if (remove) node.remove();
+ node = next;
+ }
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/equality.js
+/** @import { Equals } from '#client' */
+/** @type {Equals} */
+function equals(value) {
+ return value === this.v;
+}
+/**
+* @param {unknown} a
+* @param {unknown} b
+* @returns {boolean}
+*/
+function safe_not_equal(a, b) {
+ return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
+}
+/** @type {Equals} */
+function safe_equals(value) {
+ return !safe_not_equal(value, this.v);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/context.js
+/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
+/** @type {ComponentContext | null} */
+var component_context = null;
+/** @param {ComponentContext | null} context */
+function set_component_context(context) {
+ component_context = context;
+}
+/**
+* @param {Record} props
+* @param {any} runes
+* @param {Function} [fn]
+* @returns {void}
+*/
+function push(props, runes = false, fn) {
+ component_context = {
+ p: component_context,
+ i: false,
+ c: null,
+ e: null,
+ s: props,
+ x: null,
+ r: active_effect,
+ l: legacy_mode_flag && !runes ? {
+ s: null,
+ u: null,
+ $: []
+ } : null
+ };
+}
+/**
+* @template {Record} T
+* @param {T} [component]
+* @returns {T}
+*/
+function pop(component) {
+ var context = component_context;
+ var effects = context.e;
+ if (effects !== null) {
+ context.e = null;
+ for (var fn of effects) create_user_effect(fn);
+ }
+ if (component !== void 0) context.x = component;
+ context.i = true;
+ component_context = context.p;
+ return component ?? {};
+}
+/** @returns {boolean} */
+function is_runes() {
+ return !legacy_mode_flag || component_context !== null && component_context.l === null;
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/dom/task.js
+/** @type {Array<() => void>} */
+var micro_tasks = [];
+function run_micro_tasks() {
+ var tasks = micro_tasks;
+ micro_tasks = [];
+ run_all(tasks);
+}
+/**
+* @param {() => void} fn
+*/
+function queue_micro_task(fn) {
+ if (micro_tasks.length === 0 && !is_flushing_sync) {
+ var tasks = micro_tasks;
+ queueMicrotask(() => {
+ if (tasks === micro_tasks) run_micro_tasks();
+ });
+ }
+ micro_tasks.push(fn);
+}
+/**
+* Synchronously run any queued tasks.
+*/
+function flush_tasks() {
+ while (micro_tasks.length > 0) run_micro_tasks();
+}
+/**
+* @param {unknown} error
+*/
+function handle_error(error) {
+ var effect = active_effect;
+ if (effect === null) {
+ /** @type {Derived} */ active_reaction.f |= ERROR_VALUE;
+ return error;
+ }
+ if ((effect.f & 32768) === 0 && (effect.f & 4) === 0) throw error;
+ invoke_error_boundary(error, effect);
+}
+/**
+* @param {unknown} error
+* @param {Effect | null} effect
+*/
+function invoke_error_boundary(error, effect) {
+ while (effect !== null) {
+ if ((effect.f & 128) !== 0) {
+ if ((effect.f & 32768) === 0) throw error;
+ try {
+ /** @type {Boundary} */ effect.b.error(error);
+ return;
+ } catch (e) {
+ error = e;
+ }
+ }
+ effect = effect.parent;
+ }
+ throw error;
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/status.js
+/** @import { Derived, Signal } from '#client' */
+var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
+/**
+* @param {Signal} signal
+* @param {number} status
+*/
+function set_signal_status(signal, status) {
+ signal.f = signal.f & STATUS_MASK | status;
+}
+/**
+* Set a derived's status to CLEAN or MAYBE_DIRTY based on its connection state.
+* @param {Derived} derived
+*/
+function update_derived_status(derived) {
+ if ((derived.f & 512) !== 0 || derived.deps === null) set_signal_status(derived, CLEAN);
+ else set_signal_status(derived, MAYBE_DIRTY);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/utils.js
+/** @import { Derived, Effect, Value } from '#client' */
+/**
+* @param {Value[] | null} deps
+*/
+function clear_marked(deps) {
+ if (deps === null) return;
+ for (const dep of deps) {
+ if ((dep.f & 2) === 0 || (dep.f & 65536) === 0) continue;
+ dep.f ^= WAS_MARKED;
+ clear_marked(
+ /** @type {Derived} */
+ dep.deps
+ );
+ }
+}
+/**
+* @param {Effect} effect
+* @param {Set} dirty_effects
+* @param {Set} maybe_dirty_effects
+*/
+function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
+ if ((effect.f & 2048) !== 0) dirty_effects.add(effect);
+ else if ((effect.f & 4096) !== 0) maybe_dirty_effects.add(effect);
+ clear_marked(effect.deps);
+ set_signal_status(effect, CLEAN);
+}
+//#endregion
+//#region node_modules/svelte/src/store/shared/index.js
+/** @import { Readable, StartStopNotifier, Subscriber, Unsubscriber, Updater, Writable } from '../public.js' */
+/** @import { Stores, StoresValues, SubscribeInvalidateTuple } from '../private.js' */
+/**
+* @type {Array | any>}
+*/
+var subscriber_queue = [];
+/**
+* Creates a `Readable` store that allows reading by subscription.
+*
+* @template T
+* @param {T} [value] initial value
+* @param {StartStopNotifier} [start]
+* @returns {Readable}
+*/
+function readable(value, start) {
+ return { subscribe: writable(value, start).subscribe };
+}
+/**
+* Create a `Writable` store that allows both updating and reading by subscription.
+*
+* @template T
+* @param {T} [value] initial value
+* @param {StartStopNotifier} [start]
+* @returns {Writable}
+*/
+function writable(value, start = noop) {
+ /** @type {Unsubscriber | null} */
+ let stop = null;
+ /** @type {Set>} */
+ const subscribers = /* @__PURE__ */ new Set();
+ /**
+ * @param {T} new_value
+ * @returns {void}
+ */
+ function set(new_value) {
+ if (safe_not_equal(value, new_value)) {
+ value = new_value;
+ if (stop) {
+ const run_queue = !subscriber_queue.length;
+ for (const subscriber of subscribers) {
+ subscriber[1]();
+ subscriber_queue.push(subscriber, value);
+ }
+ if (run_queue) {
+ for (let i = 0; i < subscriber_queue.length; i += 2) subscriber_queue[i][0](subscriber_queue[i + 1]);
+ subscriber_queue.length = 0;
+ }
+ }
+ }
+ }
+ /**
+ * @param {Updater} fn
+ * @returns {void}
+ */
+ function update(fn) {
+ set(fn(value));
+ }
+ /**
+ * @param {Subscriber} run
+ * @param {() => void} [invalidate]
+ * @returns {Unsubscriber}
+ */
+ function subscribe(run, invalidate = noop) {
+ /** @type {SubscribeInvalidateTuple} */
+ const subscriber = [run, invalidate];
+ subscribers.add(subscriber);
+ if (subscribers.size === 1) stop = start(set, update) || noop;
+ run(value);
+ return () => {
+ subscribers.delete(subscriber);
+ if (subscribers.size === 0 && stop) {
+ stop();
+ stop = null;
+ }
+ };
+ }
+ return {
+ set,
+ update,
+ subscribe
+ };
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/store.js
+/**
+* We set this to `true` when updating a store so that we correctly
+* schedule effects if the update takes place inside a `$:` effect
+*/
+var legacy_is_updating_store = false;
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/batch.js
+/** @import { Fork } from 'svelte' */
+/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
+/** @type {Set} */
+var batches = /* @__PURE__ */ new Set();
+/** @type {Batch | null} */
+var current_batch = null;
+/**
+* When time travelling (i.e. working in one batch, while other batches
+* still have ongoing work), we ignore the real values of affected
+* signals in favour of their values within the batch
+* @type {Map | null}
+*/
+var batch_values = null;
+/** @type {Effect | null} */
+var last_scheduled_effect = null;
+var is_flushing_sync = false;
+var is_processing = false;
+/**
+* During traversal, this is an array. Newly created effects are (if not immediately
+* executed) pushed to this array, rather than going through the scheduling
+* rigamarole that would cause another turn of the flush loop.
+* @type {Effect[] | null}
+*/
+var collected_effects = null;
+/**
+* An array of effects that are marked during traversal as a result of a `set`
+* (not `internal_set`) call. These will be added to the next batch and
+* trigger another `batch.process()`
+* @type {Effect[] | null}
+* @deprecated when we get rid of legacy mode and stores, we can get rid of this
+*/
+var legacy_updates = null;
+var flush_count = 0;
+var uid = 1;
+var Batch = class Batch {
+ id = uid++;
+ /**
+ * The current values of any signals that are updated in this batch.
+ * Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
+ * They keys of this map are identical to `this.#previous`
+ * @type {Map}
+ */
+ current = /* @__PURE__ */ new Map();
+ /**
+ * The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
+ * They keys of this map are identical to `this.#current`
+ * @type {Map}
+ */
+ previous = /* @__PURE__ */ new Map();
+ /**
+ * When the batch is committed (and the DOM is updated), we need to remove old branches
+ * and append new ones by calling the functions added inside (if/each/key/etc) blocks
+ * @type {Set<(batch: Batch) => void>}
+ */
+ #commit_callbacks = /* @__PURE__ */ new Set();
+ /**
+ * If a fork is discarded, we need to destroy any effects that are no longer needed
+ * @type {Set<(batch: Batch) => void>}
+ */
+ #discard_callbacks = /* @__PURE__ */ new Set();
+ /**
+ * Callbacks that should run only when a fork is committed.
+ * @type {Set<(batch: Batch) => void>}
+ */
+ #fork_commit_callbacks = /* @__PURE__ */ new Set();
+ /**
+ * Async effects that are currently in flight
+ * @type {Map}
+ */
+ #pending = /* @__PURE__ */ new Map();
+ /**
+ * Async effects that are currently in flight, _not_ inside a pending boundary
+ * @type {Map}
+ */
+ #blocking_pending = /* @__PURE__ */ new Map();
+ /**
+ * A deferred that resolves when the batch is committed, used with `settled()`
+ * TODO replace with Promise.withResolvers once supported widely enough
+ * @type {{ promise: Promise, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
+ */
+ #deferred = null;
+ /**
+ * The root effects that need to be flushed
+ * @type {Effect[]}
+ */
+ #roots = [];
+ /**
+ * Effects created while this batch was active.
+ * @type {Effect[]}
+ */
+ #new_effects = [];
+ /**
+ * Deferred effects (which run after async work has completed) that are DIRTY
+ * @type {Set}
+ */
+ #dirty_effects = /* @__PURE__ */ new Set();
+ /**
+ * Deferred effects that are MAYBE_DIRTY
+ * @type {Set}
+ */
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
+ /**
+ * A map of branches that still exist, but will be destroyed when this batch
+ * is committed — we skip over these during `process`.
+ * The value contains child effects that were dirty/maybe_dirty before being reset,
+ * so they can be rescheduled if the branch survives.
+ * @type {Map}
+ */
+ #skipped_branches = /* @__PURE__ */ new Map();
+ /**
+ * Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
+ * @type {Set}
+ */
+ #unskipped_branches = /* @__PURE__ */ new Set();
+ is_fork = false;
+ #decrement_queued = false;
+ /** @type {Set} */
+ #blockers = /* @__PURE__ */ new Set();
+ #is_deferred() {
+ return this.is_fork || this.#blocking_pending.size > 0;
+ }
+ #is_blocked() {
+ for (const batch of this.#blockers) for (const effect of batch.#blocking_pending.keys()) {
+ var skipped = false;
+ var e = effect;
+ while (e.parent !== null) {
+ if (this.#skipped_branches.has(e)) {
+ skipped = true;
+ break;
+ }
+ e = e.parent;
+ }
+ if (!skipped) return true;
+ }
+ return false;
+ }
+ /**
+ * Add an effect to the #skipped_branches map and reset its children
+ * @param {Effect} effect
+ */
+ skip_effect(effect) {
+ if (!this.#skipped_branches.has(effect)) this.#skipped_branches.set(effect, {
+ d: [],
+ m: []
+ });
+ this.#unskipped_branches.delete(effect);
+ }
+ /**
+ * Remove an effect from the #skipped_branches map and reschedule
+ * any tracked dirty/maybe_dirty child effects
+ * @param {Effect} effect
+ * @param {(e: Effect) => void} callback
+ */
+ unskip_effect(effect, callback = (e) => this.schedule(e)) {
+ var tracked = this.#skipped_branches.get(effect);
+ if (tracked) {
+ this.#skipped_branches.delete(effect);
+ for (var e of tracked.d) {
+ set_signal_status(e, DIRTY);
+ callback(e);
+ }
+ for (e of tracked.m) {
+ set_signal_status(e, MAYBE_DIRTY);
+ callback(e);
+ }
+ }
+ this.#unskipped_branches.add(effect);
+ }
+ #process() {
+ if (flush_count++ > 1e3) {
+ batches.delete(this);
+ infinite_loop_guard();
+ }
+ if (!this.#is_deferred()) {
+ for (const e of this.#dirty_effects) {
+ this.#maybe_dirty_effects.delete(e);
+ set_signal_status(e, DIRTY);
+ this.schedule(e);
+ }
+ for (const e of this.#maybe_dirty_effects) {
+ set_signal_status(e, MAYBE_DIRTY);
+ this.schedule(e);
+ }
+ }
+ const roots = this.#roots;
+ this.#roots = [];
+ this.apply();
+ /** @type {Effect[]} */
+ var effects = collected_effects = [];
+ /** @type {Effect[]} */
+ var render_effects = [];
+ /**
+ * @type {Effect[]}
+ * @deprecated when we get rid of legacy mode and stores, we can get rid of this
+ */
+ var updates = legacy_updates = [];
+ for (const root of roots) try {
+ this.#traverse(root, effects, render_effects);
+ } catch (e) {
+ reset_all(root);
+ throw e;
+ }
+ current_batch = null;
+ if (updates.length > 0) {
+ var batch = Batch.ensure();
+ for (const e of updates) batch.schedule(e);
+ }
+ collected_effects = null;
+ legacy_updates = null;
+ if (this.#is_deferred() || this.#is_blocked()) {
+ this.#defer_effects(render_effects);
+ this.#defer_effects(effects);
+ for (const [e, t] of this.#skipped_branches) reset_branch(e, t);
+ } else {
+ if (this.#pending.size === 0) batches.delete(this);
+ this.#dirty_effects.clear();
+ this.#maybe_dirty_effects.clear();
+ for (const fn of this.#commit_callbacks) fn(this);
+ this.#commit_callbacks.clear();
+ flush_queued_effects(render_effects);
+ flush_queued_effects(effects);
+ this.#deferred?.resolve();
+ }
+ var next_batch = current_batch;
+ if (this.#roots.length > 0) {
+ const batch = next_batch ??= this;
+ batch.#roots.push(...this.#roots.filter((r) => !batch.#roots.includes(r)));
+ }
+ if (next_batch !== null) {
+ batches.add(next_batch);
+ next_batch.#process();
+ }
+ if (async_mode_flag && !batches.has(this)) this.#commit();
+ }
+ /**
+ * Traverse the effect tree, executing effects or stashing
+ * them for later execution as appropriate
+ * @param {Effect} root
+ * @param {Effect[]} effects
+ * @param {Effect[]} render_effects
+ */
+ #traverse(root, effects, render_effects) {
+ root.f ^= CLEAN;
+ var effect = root.first;
+ while (effect !== null) {
+ var flags = effect.f;
+ var is_branch = (flags & 96) !== 0;
+ if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || this.#skipped_branches.has(effect)) && effect.fn !== null) {
+ if (is_branch) effect.f ^= CLEAN;
+ else if ((flags & 4) !== 0) effects.push(effect);
+ else if (async_mode_flag && (flags & 16777224) !== 0) render_effects.push(effect);
+ else if (is_dirty(effect)) {
+ if ((flags & 16) !== 0) this.#maybe_dirty_effects.add(effect);
+ update_effect(effect);
+ }
+ var child = effect.first;
+ if (child !== null) {
+ effect = child;
+ continue;
+ }
+ }
+ while (effect !== null) {
+ var next = effect.next;
+ if (next !== null) {
+ effect = next;
+ break;
+ }
+ effect = effect.parent;
+ }
+ }
+ }
+ /**
+ * @param {Effect[]} effects
+ */
+ #defer_effects(effects) {
+ for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
+ }
+ /**
+ * Associate a change to a given source with the current
+ * batch, noting its previous and current values
+ * @param {Value} source
+ * @param {any} value
+ * @param {boolean} [is_derived]
+ */
+ capture(source, value, is_derived = false) {
+ if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
+ if ((source.f & 8388608) === 0) {
+ this.current.set(source, [value, is_derived]);
+ batch_values?.set(source, value);
+ }
+ if (!this.is_fork) source.v = value;
+ }
+ activate() {
+ current_batch = this;
+ }
+ deactivate() {
+ current_batch = null;
+ batch_values = null;
+ }
+ flush() {
+ try {
+ is_processing = true;
+ current_batch = this;
+ this.#process();
+ } finally {
+ flush_count = 0;
+ last_scheduled_effect = null;
+ collected_effects = null;
+ legacy_updates = null;
+ is_processing = false;
+ current_batch = null;
+ batch_values = null;
+ old_values.clear();
+ }
+ }
+ discard() {
+ for (const fn of this.#discard_callbacks) fn(this);
+ this.#discard_callbacks.clear();
+ this.#fork_commit_callbacks.clear();
+ batches.delete(this);
+ }
+ /**
+ * @param {Effect} effect
+ */
+ register_created_effect(effect) {
+ this.#new_effects.push(effect);
+ }
+ #commit() {
+ for (const batch of batches) {
+ var is_earlier = batch.id < this.id;
+ /** @type {Source[]} */
+ var sources = [];
+ for (const [source, [value, is_derived]] of this.current) {
+ if (batch.current.has(source)) {
+ var batch_value = batch.current.get(source)[0];
+ if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
+ else continue;
+ }
+ sources.push(source);
+ }
+ var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
+ if (others.length === 0) {
+ if (is_earlier) batch.discard();
+ } else if (sources.length > 0) {
+ if (is_earlier) for (const unskipped of this.#unskipped_branches) batch.unskip_effect(unskipped, (e) => {
+ if ((e.f & 4194320) !== 0) batch.schedule(e);
+ else batch.#defer_effects([e]);
+ });
+ batch.activate();
+ /** @type {Set} */
+ var marked = /* @__PURE__ */ new Set();
+ /** @type {Map} */
+ var checked = /* @__PURE__ */ new Map();
+ for (var source of sources) mark_effects(source, others, marked, checked);
+ checked = /* @__PURE__ */ new Map();
+ var current_unequal = [...batch.current.keys()].filter((c) => this.current.has(c) ? this.current.get(c)[0] !== c : true);
+ for (const effect of this.#new_effects) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
+ set_signal_status(effect, DIRTY);
+ batch.schedule(effect);
+ } else batch.#dirty_effects.add(effect);
+ if (batch.#roots.length > 0) {
+ batch.apply();
+ for (var root of batch.#roots) batch.#traverse(root, [], []);
+ batch.#roots = [];
+ }
+ batch.deactivate();
+ }
+ }
+ for (const batch of batches) if (batch.#blockers.has(this)) {
+ batch.#blockers.delete(this);
+ if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
+ batch.activate();
+ batch.#process();
+ }
+ }
+ }
+ /**
+ * @param {boolean} blocking
+ * @param {Effect} effect
+ */
+ increment(blocking, effect) {
+ let pending_count = this.#pending.get(effect) ?? 0;
+ this.#pending.set(effect, pending_count + 1);
+ if (blocking) {
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
+ this.#blocking_pending.set(effect, blocking_pending_count + 1);
+ }
+ }
+ /**
+ * @param {boolean} blocking
+ * @param {Effect} effect
+ * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
+ */
+ decrement(blocking, effect, skip) {
+ let pending_count = this.#pending.get(effect) ?? 0;
+ if (pending_count === 1) this.#pending.delete(effect);
+ else this.#pending.set(effect, pending_count - 1);
+ if (blocking) {
+ let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
+ if (blocking_pending_count === 1) this.#blocking_pending.delete(effect);
+ else this.#blocking_pending.set(effect, blocking_pending_count - 1);
+ }
+ if (this.#decrement_queued || skip) return;
+ this.#decrement_queued = true;
+ queue_micro_task(() => {
+ this.#decrement_queued = false;
+ this.flush();
+ });
+ }
+ /**
+ * @param {Set} dirty_effects
+ * @param {Set} maybe_dirty_effects
+ */
+ transfer_effects(dirty_effects, maybe_dirty_effects) {
+ for (const e of dirty_effects) this.#dirty_effects.add(e);
+ for (const e of maybe_dirty_effects) this.#maybe_dirty_effects.add(e);
+ dirty_effects.clear();
+ maybe_dirty_effects.clear();
+ }
+ /** @param {(batch: Batch) => void} fn */
+ oncommit(fn) {
+ this.#commit_callbacks.add(fn);
+ }
+ /** @param {(batch: Batch) => void} fn */
+ ondiscard(fn) {
+ this.#discard_callbacks.add(fn);
+ }
+ /** @param {(batch: Batch) => void} fn */
+ on_fork_commit(fn) {
+ this.#fork_commit_callbacks.add(fn);
+ }
+ run_fork_commit_callbacks() {
+ for (const fn of this.#fork_commit_callbacks) fn(this);
+ this.#fork_commit_callbacks.clear();
+ }
+ settled() {
+ return (this.#deferred ??= deferred()).promise;
+ }
+ static ensure() {
+ if (current_batch === null) {
+ const batch = current_batch = new Batch();
+ if (!is_processing) {
+ batches.add(current_batch);
+ if (!is_flushing_sync) queue_micro_task(() => {
+ if (current_batch !== batch) return;
+ batch.flush();
+ });
+ }
+ }
+ return current_batch;
+ }
+ apply() {
+ if (!async_mode_flag || !this.is_fork && batches.size === 1) {
+ batch_values = null;
+ return;
+ }
+ batch_values = /* @__PURE__ */ new Map();
+ for (const [source, [value]] of this.current) batch_values.set(source, value);
+ for (const batch of batches) {
+ if (batch === this || batch.is_fork) continue;
+ var intersects = false;
+ var differs = false;
+ if (batch.id < this.id) for (const [source, [, is_derived]] of batch.current) {
+ if (is_derived) continue;
+ intersects ||= this.current.has(source);
+ differs ||= !this.current.has(source);
+ }
+ if (intersects && differs) this.#blockers.add(batch);
+ else for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
+ }
+ }
+ /**
+ *
+ * @param {Effect} effect
+ */
+ schedule(effect) {
+ last_scheduled_effect = effect;
+ if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
+ effect.b.defer_effect(effect);
+ return;
+ }
+ var e = effect;
+ while (e.parent !== null) {
+ e = e.parent;
+ var flags = e.f;
+ if (collected_effects !== null && e === active_effect) {
+ if (async_mode_flag) return;
+ if ((active_reaction === null || (active_reaction.f & 2) === 0) && !legacy_is_updating_store) return;
+ }
+ if ((flags & 96) !== 0) {
+ if ((flags & 1024) === 0) return;
+ e.f ^= CLEAN;
+ }
+ }
+ this.#roots.push(e);
+ }
+};
+/**
+* Synchronously flush any pending updates.
+* Returns void if no callback is provided, otherwise returns the result of calling the callback.
+* @template [T=void]
+* @param {(() => T) | undefined} [fn]
+* @returns {T}
+*/
+function flushSync(fn) {
+ var was_flushing_sync = is_flushing_sync;
+ is_flushing_sync = true;
+ try {
+ var result;
+ if (fn) {
+ if (current_batch !== null && !current_batch.is_fork) current_batch.flush();
+ result = fn();
+ }
+ while (true) {
+ flush_tasks();
+ if (current_batch === null) return result;
+ current_batch.flush();
+ }
+ } finally {
+ is_flushing_sync = was_flushing_sync;
+ }
+}
+function infinite_loop_guard() {
+ try {
+ effect_update_depth_exceeded();
+ } catch (error) {
+ invoke_error_boundary(error, last_scheduled_effect);
+ }
+}
+/** @type {Set | null} */
+var eager_block_effects = null;
+/**
+* @param {Array} effects
+* @returns {void}
+*/
+function flush_queued_effects(effects) {
+ var length = effects.length;
+ if (length === 0) return;
+ var i = 0;
+ while (i < length) {
+ var effect = effects[i++];
+ if ((effect.f & 24576) === 0 && is_dirty(effect)) {
+ eager_block_effects = /* @__PURE__ */ new Set();
+ update_effect(effect);
+ if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) unlink_effect(effect);
+ if (eager_block_effects?.size > 0) {
+ old_values.clear();
+ for (const e of eager_block_effects) {
+ if ((e.f & 24576) !== 0) continue;
+ /** @type {Effect[]} */
+ const ordered_effects = [e];
+ let ancestor = e.parent;
+ while (ancestor !== null) {
+ if (eager_block_effects.has(ancestor)) {
+ eager_block_effects.delete(ancestor);
+ ordered_effects.push(ancestor);
+ }
+ ancestor = ancestor.parent;
+ }
+ for (let j = ordered_effects.length - 1; j >= 0; j--) {
+ const e = ordered_effects[j];
+ if ((e.f & 24576) !== 0) continue;
+ update_effect(e);
+ }
+ }
+ eager_block_effects.clear();
+ }
+ }
+ }
+ eager_block_effects = null;
+}
+/**
+* This is similar to `mark_reactions`, but it only marks async/block effects
+* depending on `value` and at least one of the other `sources`, so that
+* these effects can re-run after another batch has been committed
+* @param {Value} value
+* @param {Source[]} sources
+* @param {Set} marked
+* @param {Map} checked
+*/
+function mark_effects(value, sources, marked, checked) {
+ if (marked.has(value)) return;
+ marked.add(value);
+ if (value.reactions !== null) for (const reaction of value.reactions) {
+ const flags = reaction.f;
+ if ((flags & 2) !== 0) mark_effects(reaction, sources, marked, checked);
+ else if ((flags & 4194320) !== 0 && (flags & 2048) === 0 && depends_on(reaction, sources, checked)) {
+ set_signal_status(reaction, DIRTY);
+ schedule_effect(reaction);
+ }
+ }
+}
+/**
+* @param {Reaction} reaction
+* @param {Source[]} sources
+* @param {Map} checked
+*/
+function depends_on(reaction, sources, checked) {
+ const depends = checked.get(reaction);
+ if (depends !== void 0) return depends;
+ if (reaction.deps !== null) for (const dep of reaction.deps) {
+ if (includes.call(sources, dep)) return true;
+ if ((dep.f & 2) !== 0 && depends_on(dep, sources, checked)) {
+ checked.set(dep, true);
+ return true;
+ }
+ }
+ checked.set(reaction, false);
+ return false;
+}
+/**
+* @param {Effect} effect
+* @returns {void}
+*/
+function schedule_effect(effect) {
+ /** @type {Batch} */ current_batch.schedule(effect);
+}
+/**
+* Mark all the effects inside a skipped branch CLEAN, so that
+* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
+* effects so they can be rescheduled if the branch survives.
+* @param {Effect} effect
+* @param {{ d: Effect[], m: Effect[] }} tracked
+*/
+function reset_branch(effect, tracked) {
+ if ((effect.f & 32) !== 0 && (effect.f & 1024) !== 0) return;
+ if ((effect.f & 2048) !== 0) tracked.d.push(effect);
+ else if ((effect.f & 4096) !== 0) tracked.m.push(effect);
+ set_signal_status(effect, CLEAN);
+ var e = effect.first;
+ while (e !== null) {
+ reset_branch(e, tracked);
+ e = e.next;
+ }
+}
+/**
+* Mark an entire effect tree clean following an error
+* @param {Effect} effect
+*/
+function reset_all(effect) {
+ set_signal_status(effect, CLEAN);
+ var e = effect.first;
+ while (e !== null) {
+ reset_all(e);
+ e = e.next;
+ }
+}
+//#endregion
+//#region node_modules/svelte/src/reactivity/create-subscriber.js
+/**
+* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
+* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
+*
+* If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
+* the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
+*
+* If `start` returns a cleanup function, it will be called when the effect is destroyed.
+*
+* If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
+* are active, and the returned teardown function will only be called when all effects are destroyed.
+*
+* It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
+*
+* ```js
+* import { createSubscriber } from 'svelte/reactivity';
+* import { on } from 'svelte/events';
+*
+* export class MediaQuery {
+* #query;
+* #subscribe;
+*
+* constructor(query) {
+* this.#query = window.matchMedia(`(${query})`);
+*
+* this.#subscribe = createSubscriber((update) => {
+* // when the `change` event occurs, re-run any effects that read `this.current`
+* const off = on(this.#query, 'change', update);
+*
+* // stop listening when all the effects are destroyed
+* return () => off();
+* });
+* }
+*
+* get current() {
+* // This makes the getter reactive, if read in an effect
+* this.#subscribe();
+*
+* // Return the current state of the query, whether or not we're in an effect
+* return this.#query.matches;
+* }
+* }
+* ```
+* @param {(update: () => void) => (() => void) | void} start
+* @since 5.7.0
+*/
+function createSubscriber(start) {
+ let subscribers = 0;
+ let version = source(0);
+ /** @type {(() => void) | void} */
+ let stop;
+ return () => {
+ if (effect_tracking()) {
+ get(version);
+ render_effect(() => {
+ if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
+ subscribers += 1;
+ return () => {
+ queue_micro_task(() => {
+ subscribers -= 1;
+ if (subscribers === 0) {
+ stop?.();
+ stop = void 0;
+ increment(version);
+ }
+ });
+ };
+ });
+ }
+ };
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/dom/blocks/boundary.js
+/** @import { Effect, Source, TemplateNode, } from '#client' */
+/**
+* @typedef {{
+* onerror?: (error: unknown, reset: () => void) => void;
+* failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void;
+* pending?: (anchor: Node) => void;
+* }} BoundaryProps
+*/
+var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
+/**
+* @param {TemplateNode} node
+* @param {BoundaryProps} props
+* @param {((anchor: Node) => void)} children
+* @param {((error: unknown) => unknown) | undefined} [transform_error]
+* @returns {void}
+*/
+function boundary(node, props, children, transform_error) {
+ new Boundary(node, props, children, transform_error);
+}
+var Boundary = class {
+ /** @type {Boundary | null} */
+ parent;
+ is_pending = false;
+ /**
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
+ * Inherited from parent boundary, or defaults to identity.
+ * @type {(error: unknown) => unknown}
+ */
+ transform_error;
+ /** @type {TemplateNode} */
+ #anchor;
+ /** @type {TemplateNode | null} */
+ #hydrate_open = hydrating ? hydrate_node : null;
+ /** @type {BoundaryProps} */
+ #props;
+ /** @type {((anchor: Node) => void)} */
+ #children;
+ /** @type {Effect} */
+ #effect;
+ /** @type {Effect | null} */
+ #main_effect = null;
+ /** @type {Effect | null} */
+ #pending_effect = null;
+ /** @type {Effect | null} */
+ #failed_effect = null;
+ /** @type {DocumentFragment | null} */
+ #offscreen_fragment = null;
+ #local_pending_count = 0;
+ #pending_count = 0;
+ #pending_count_update_queued = false;
+ /** @type {Set} */
+ #dirty_effects = /* @__PURE__ */ new Set();
+ /** @type {Set} */
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
+ /**
+ * A source containing the number of pending async deriveds/expressions.
+ * Only created if `$effect.pending()` is used inside the boundary,
+ * otherwise updating the source results in needless `Batch.ensure()`
+ * calls followed by no-op flushes
+ * @type {Source | null}
+ */
+ #effect_pending = null;
+ #effect_pending_subscriber = createSubscriber(() => {
+ this.#effect_pending = source(this.#local_pending_count);
+ return () => {
+ this.#effect_pending = null;
+ };
+ });
+ /**
+ * @param {TemplateNode} node
+ * @param {BoundaryProps} props
+ * @param {((anchor: Node) => void)} children
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
+ */
+ constructor(node, props, children, transform_error) {
+ this.#anchor = node;
+ this.#props = props;
+ this.#children = (anchor) => {
+ var effect = active_effect;
+ effect.b = this;
+ effect.f |= 128;
+ children(anchor);
+ };
+ this.parent = active_effect.b;
+ this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
+ this.#effect = block(() => {
+ if (hydrating) {
+ const comment = this.#hydrate_open;
+ hydrate_next();
+ const server_rendered_pending = comment.data === "[!";
+ if (comment.data.startsWith("[?")) {
+ const serialized_error = JSON.parse(comment.data.slice(2));
+ this.#hydrate_failed_content(serialized_error);
+ } else if (server_rendered_pending) this.#hydrate_pending_content();
+ else this.#hydrate_resolved_content();
+ } else this.#render();
+ }, flags);
+ if (hydrating) this.#anchor = hydrate_node;
+ }
+ #hydrate_resolved_content() {
+ try {
+ this.#main_effect = branch(() => this.#children(this.#anchor));
+ } catch (error) {
+ this.error(error);
+ }
+ }
+ /**
+ * @param {unknown} error The deserialized error from the server's hydration comment
+ */
+ #hydrate_failed_content(error) {
+ const failed = this.#props.failed;
+ if (!failed) return;
+ this.#failed_effect = branch(() => {
+ failed(this.#anchor, () => error, () => () => {});
+ });
+ }
+ #hydrate_pending_content() {
+ const pending = this.#props.pending;
+ if (!pending) return;
+ this.is_pending = true;
+ this.#pending_effect = branch(() => pending(this.#anchor));
+ queue_micro_task(() => {
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
+ var anchor = create_text();
+ fragment.append(anchor);
+ this.#main_effect = this.#run(() => {
+ return branch(() => this.#children(anchor));
+ });
+ if (this.#pending_count === 0) {
+ this.#anchor.before(fragment);
+ this.#offscreen_fragment = null;
+ pause_effect(this.#pending_effect, () => {
+ this.#pending_effect = null;
+ });
+ this.#resolve(current_batch);
+ }
+ });
+ }
+ #render() {
+ try {
+ this.is_pending = this.has_pending_snippet();
+ this.#pending_count = 0;
+ this.#local_pending_count = 0;
+ this.#main_effect = branch(() => {
+ this.#children(this.#anchor);
+ });
+ if (this.#pending_count > 0) {
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
+ move_effect(this.#main_effect, fragment);
+ const pending = this.#props.pending;
+ this.#pending_effect = branch(() => pending(this.#anchor));
+ } else this.#resolve(current_batch);
+ } catch (error) {
+ this.error(error);
+ }
+ }
+ /**
+ * @param {Batch} batch
+ */
+ #resolve(batch) {
+ this.is_pending = false;
+ batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
+ }
+ /**
+ * Defer an effect inside a pending boundary until the boundary resolves
+ * @param {Effect} effect
+ */
+ defer_effect(effect) {
+ defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
+ }
+ /**
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
+ * @returns {boolean}
+ */
+ is_rendered() {
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
+ }
+ has_pending_snippet() {
+ return !!this.#props.pending;
+ }
+ /**
+ * @template T
+ * @param {() => T} fn
+ */
+ #run(fn) {
+ var previous_effect = active_effect;
+ var previous_reaction = active_reaction;
+ var previous_ctx = component_context;
+ set_active_effect(this.#effect);
+ set_active_reaction(this.#effect);
+ set_component_context(this.#effect.ctx);
+ try {
+ Batch.ensure();
+ return fn();
+ } catch (e) {
+ handle_error(e);
+ return null;
+ } finally {
+ set_active_effect(previous_effect);
+ set_active_reaction(previous_reaction);
+ set_component_context(previous_ctx);
+ }
+ }
+ /**
+ * Updates the pending count associated with the currently visible pending snippet,
+ * if any, such that we can replace the snippet with content once work is done
+ * @param {1 | -1} d
+ * @param {Batch} batch
+ */
+ #update_pending_count(d, batch) {
+ if (!this.has_pending_snippet()) {
+ if (this.parent) this.parent.#update_pending_count(d, batch);
+ return;
+ }
+ this.#pending_count += d;
+ if (this.#pending_count === 0) {
+ this.#resolve(batch);
+ if (this.#pending_effect) pause_effect(this.#pending_effect, () => {
+ this.#pending_effect = null;
+ });
+ if (this.#offscreen_fragment) {
+ this.#anchor.before(this.#offscreen_fragment);
+ this.#offscreen_fragment = null;
+ }
+ }
+ }
+ /**
+ * Update the source that powers `$effect.pending()` inside this boundary,
+ * and controls when the current `pending` snippet (if any) is removed.
+ * Do not call from inside the class
+ * @param {1 | -1} d
+ * @param {Batch} batch
+ */
+ update_pending_count(d, batch) {
+ this.#update_pending_count(d, batch);
+ this.#local_pending_count += d;
+ if (!this.#effect_pending || this.#pending_count_update_queued) return;
+ this.#pending_count_update_queued = true;
+ queue_micro_task(() => {
+ this.#pending_count_update_queued = false;
+ if (this.#effect_pending) internal_set(this.#effect_pending, this.#local_pending_count);
+ });
+ }
+ get_effect_pending() {
+ this.#effect_pending_subscriber();
+ return get(this.#effect_pending);
+ }
+ /** @param {unknown} error */
+ error(error) {
+ if (!this.#props.onerror && !this.#props.failed) throw error;
+ if (current_batch?.is_fork) {
+ if (this.#main_effect) current_batch.skip_effect(this.#main_effect);
+ if (this.#pending_effect) current_batch.skip_effect(this.#pending_effect);
+ if (this.#failed_effect) current_batch.skip_effect(this.#failed_effect);
+ current_batch.on_fork_commit(() => {
+ this.#handle_error(error);
+ });
+ } else this.#handle_error(error);
+ }
+ /**
+ * @param {unknown} error
+ */
+ #handle_error(error) {
+ if (this.#main_effect) {
+ destroy_effect(this.#main_effect);
+ this.#main_effect = null;
+ }
+ if (this.#pending_effect) {
+ destroy_effect(this.#pending_effect);
+ this.#pending_effect = null;
+ }
+ if (this.#failed_effect) {
+ destroy_effect(this.#failed_effect);
+ this.#failed_effect = null;
+ }
+ if (hydrating) {
+ set_hydrate_node(this.#hydrate_open);
+ next();
+ set_hydrate_node(skip_nodes());
+ }
+ var onerror = this.#props.onerror;
+ let failed = this.#props.failed;
+ var did_reset = false;
+ var calling_on_error = false;
+ const reset = () => {
+ if (did_reset) {
+ svelte_boundary_reset_noop();
+ return;
+ }
+ did_reset = true;
+ if (calling_on_error) svelte_boundary_reset_onerror();
+ if (this.#failed_effect !== null) pause_effect(this.#failed_effect, () => {
+ this.#failed_effect = null;
+ });
+ this.#run(() => {
+ this.#render();
+ });
+ };
+ /** @param {unknown} transformed_error */
+ const handle_error_result = (transformed_error) => {
+ try {
+ calling_on_error = true;
+ onerror?.(transformed_error, reset);
+ calling_on_error = false;
+ } catch (error) {
+ invoke_error_boundary(error, this.#effect && this.#effect.parent);
+ }
+ if (failed) this.#failed_effect = this.#run(() => {
+ try {
+ return branch(() => {
+ var effect = active_effect;
+ effect.b = this;
+ effect.f |= 128;
+ failed(this.#anchor, () => transformed_error, () => reset);
+ });
+ } catch (error) {
+ invoke_error_boundary(error, this.#effect.parent);
+ return null;
+ }
+ });
+ };
+ queue_micro_task(() => {
+ /** @type {unknown} */
+ var result;
+ try {
+ result = this.transform_error(error);
+ } catch (e) {
+ invoke_error_boundary(e, this.#effect && this.#effect.parent);
+ return;
+ }
+ if (result !== null && typeof result === "object" && typeof result.then === "function")
+ /** @type {any} */ result.then(
+ handle_error_result,
+ /** @param {unknown} e */
+ (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
+ );
+ else handle_error_result(result);
+ });
+ }
+};
+/**
+* @param {Derived} derived
+* @returns {void}
+*/
+function destroy_derived_effects(derived) {
+ var effects = derived.effects;
+ if (effects !== null) {
+ derived.effects = null;
+ for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
+ }
+}
+/**
+* @template T
+* @param {Derived} derived
+* @returns {T}
+*/
+function execute_derived(derived) {
+ var value;
+ var prev_active_effect = active_effect;
+ var parent = derived.parent;
+ if (!is_destroying_effect && parent !== null && (parent.f & 24576) !== 0) {
+ derived_inert();
+ return derived.v;
+ }
+ set_active_effect(parent);
+ try {
+ derived.f &= ~WAS_MARKED;
+ destroy_derived_effects(derived);
+ value = update_reaction(derived);
+ } finally {
+ set_active_effect(prev_active_effect);
+ }
+ return value;
+}
+/**
+* @param {Derived} derived
+* @returns {void}
+*/
+function update_derived(derived) {
+ var value = execute_derived(derived);
+ if (!derived.equals(value)) {
+ derived.wv = increment_write_version();
+ if (!current_batch?.is_fork || derived.deps === null) {
+ if (current_batch !== null) current_batch.capture(derived, value, true);
+ else derived.v = value;
+ if (derived.deps === null) {
+ set_signal_status(derived, CLEAN);
+ return;
+ }
+ }
+ }
+ if (is_destroying_effect) return;
+ if (batch_values !== null) {
+ if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
+ } else update_derived_status(derived);
+}
+/**
+* @param {Derived} derived
+*/
+function freeze_derived_effects(derived) {
+ if (derived.effects === null) return;
+ for (const e of derived.effects) if (e.teardown || e.ac) {
+ e.teardown?.();
+ e.ac?.abort(STALE_REACTION);
+ e.teardown = noop;
+ e.ac = null;
+ remove_reactions(e, 0);
+ destroy_effect_children(e);
+ }
+}
+/**
+* @param {Derived} derived
+*/
+function unfreeze_derived_effects(derived) {
+ if (derived.effects === null) return;
+ for (const e of derived.effects) if (e.teardown) update_effect(e);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/sources.js
+/** @import { Derived, Effect, Source, Value } from '#client' */
+/** @type {Set} */
+var eager_effects = /* @__PURE__ */ new Set();
+/** @type {Map} */
+var old_values = /* @__PURE__ */ new Map();
+var eager_effects_deferred = false;
+/**
+* @template V
+* @param {V} v
+* @param {Error | null} [stack]
+* @returns {Source}
+*/
+function source(v, stack) {
+ return {
+ f: 0,
+ v,
+ reactions: null,
+ equals,
+ rv: 0,
+ wv: 0
+ };
+}
+/**
+* @template V
+* @param {V} v
+* @param {Error | null} [stack]
+*/
+/* @__NO_SIDE_EFFECTS__ */
+function state(v, stack) {
+ const s = source(v, stack);
+ push_reaction_value(s);
+ return s;
+}
+/**
+* @template V
+* @param {V} initial_value
+* @param {boolean} [immutable]
+* @returns {Source}
+*/
+/* @__NO_SIDE_EFFECTS__ */
+function mutable_source(initial_value, immutable = false, trackable = true) {
+ const s = source(initial_value);
+ if (!immutable) s.equals = safe_equals;
+ if (legacy_mode_flag && trackable && component_context !== null && component_context.l !== null) (component_context.l.s ??= []).push(s);
+ return s;
+}
+/**
+* @template V
+* @param {Source} source
+* @param {V} value
+* @param {boolean} [should_proxy]
+* @returns {V}
+*/
+function set(source, value, should_proxy = false) {
+ if (active_reaction !== null && (!untracking || (active_reaction.f & 131072) !== 0) && is_runes() && (active_reaction.f & 4325394) !== 0 && (current_sources === null || !includes.call(current_sources, source))) state_unsafe_mutation();
+ return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
+}
+/**
+* @template V
+* @param {Source} source
+* @param {V} value
+* @param {Effect[] | null} [updated_during_traversal]
+* @returns {V}
+*/
+function internal_set(source, value, updated_during_traversal = null) {
+ if (!source.equals(value)) {
+ old_values.set(source, is_destroying_effect ? value : source.v);
+ var batch = Batch.ensure();
+ batch.capture(source, value);
+ if ((source.f & 2) !== 0) {
+ const derived = source;
+ if ((source.f & 2048) !== 0) execute_derived(derived);
+ if (batch_values === null) update_derived_status(derived);
+ }
+ source.wv = increment_write_version();
+ mark_reactions(source, DIRTY, updated_during_traversal);
+ if (is_runes() && active_effect !== null && (active_effect.f & 1024) !== 0 && (active_effect.f & 96) === 0) if (untracked_writes === null) set_untracked_writes([source]);
+ else untracked_writes.push(source);
+ if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) flush_eager_effects();
+ }
+ return value;
+}
+function flush_eager_effects() {
+ eager_effects_deferred = false;
+ for (const effect of eager_effects) {
+ if ((effect.f & 1024) !== 0) set_signal_status(effect, MAYBE_DIRTY);
+ if (is_dirty(effect)) update_effect(effect);
+ }
+ eager_effects.clear();
+}
+/**
+* Silently (without using `get`) increment a source
+* @param {Source} source
+*/
+function increment(source) {
+ set(source, source.v + 1);
+}
+/**
+* @param {Value} signal
+* @param {number} status should be DIRTY or MAYBE_DIRTY
+* @param {Effect[] | null} updated_during_traversal
+* @returns {void}
+*/
+function mark_reactions(signal, status, updated_during_traversal) {
+ var reactions = signal.reactions;
+ if (reactions === null) return;
+ var runes = is_runes();
+ var length = reactions.length;
+ for (var i = 0; i < length; i++) {
+ var reaction = reactions[i];
+ var flags = reaction.f;
+ if (!runes && reaction === active_effect) continue;
+ var not_dirty = (flags & DIRTY) === 0;
+ if (not_dirty) set_signal_status(reaction, status);
+ if ((flags & 2) !== 0) {
+ var derived = reaction;
+ batch_values?.delete(derived);
+ if ((flags & 65536) === 0) {
+ if (flags & 512 && (active_effect === null || (active_effect.f & 2097152) === 0)) reaction.f |= WAS_MARKED;
+ mark_reactions(derived, MAYBE_DIRTY, updated_during_traversal);
+ }
+ } else if (not_dirty) {
+ var effect = reaction;
+ if ((flags & 16) !== 0 && eager_block_effects !== null) eager_block_effects.add(effect);
+ if (updated_during_traversal !== null) updated_during_traversal.push(effect);
+ else schedule_effect(effect);
+ }
+ }
+}
+/**
+* @template T
+* @param {T} value
+* @returns {T}
+*/
+function proxy(value) {
+ if (typeof value !== "object" || value === null || STATE_SYMBOL in value) return value;
+ const prototype = get_prototype_of(value);
+ if (prototype !== object_prototype && prototype !== array_prototype) return value;
+ /** @type {Map>} */
+ var sources = /* @__PURE__ */ new Map();
+ var is_proxied_array = is_array(value);
+ var version = /* @__PURE__ */ state(0);
+ var stack = null;
+ var parent_version = update_version;
+ /**
+ * Executes the proxy in the context of the reaction it was originally created in, if any
+ * @template T
+ * @param {() => T} fn
+ */
+ var with_parent = (fn) => {
+ if (update_version === parent_version) return fn();
+ var reaction = active_reaction;
+ var version = update_version;
+ set_active_reaction(null);
+ set_update_version(parent_version);
+ var result = fn();
+ set_active_reaction(reaction);
+ set_update_version(version);
+ return result;
+ };
+ if (is_proxied_array) sources.set("length", /* @__PURE__ */ state(
+ /** @type {any[]} */
+ value.length,
+ stack
+ ));
+ return new Proxy(value, {
+ defineProperty(_, prop, descriptor) {
+ if (!("value" in descriptor) || descriptor.configurable === false || descriptor.enumerable === false || descriptor.writable === false) state_descriptors_fixed();
+ var s = sources.get(prop);
+ if (s === void 0) with_parent(() => {
+ var s = /* @__PURE__ */ state(descriptor.value, stack);
+ sources.set(prop, s);
+ return s;
+ });
+ else set(s, descriptor.value, true);
+ return true;
+ },
+ deleteProperty(target, prop) {
+ var s = sources.get(prop);
+ if (s === void 0) {
+ if (prop in target) {
+ const s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED, stack));
+ sources.set(prop, s);
+ increment(version);
+ }
+ } else {
+ set(s, UNINITIALIZED);
+ increment(version);
+ }
+ return true;
+ },
+ get(target, prop, receiver) {
+ if (prop === STATE_SYMBOL) return value;
+ var s = sources.get(prop);
+ var exists = prop in target;
+ if (s === void 0 && (!exists || get_descriptor(target, prop)?.writable)) {
+ s = with_parent(() => {
+ return /* @__PURE__ */ state(proxy(exists ? target[prop] : UNINITIALIZED), stack);
+ });
+ sources.set(prop, s);
+ }
+ if (s !== void 0) {
+ var v = get(s);
+ return v === UNINITIALIZED ? void 0 : v;
+ }
+ return Reflect.get(target, prop, receiver);
+ },
+ getOwnPropertyDescriptor(target, prop) {
+ var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
+ if (descriptor && "value" in descriptor) {
+ var s = sources.get(prop);
+ if (s) descriptor.value = get(s);
+ } else if (descriptor === void 0) {
+ var source = sources.get(prop);
+ var value = source?.v;
+ if (source !== void 0 && value !== UNINITIALIZED) return {
+ enumerable: true,
+ configurable: true,
+ value,
+ writable: true
+ };
+ }
+ return descriptor;
+ },
+ has(target, prop) {
+ if (prop === STATE_SYMBOL) return true;
+ var s = sources.get(prop);
+ var has = s !== void 0 && s.v !== UNINITIALIZED || Reflect.has(target, prop);
+ if (s !== void 0 || active_effect !== null && (!has || get_descriptor(target, prop)?.writable)) {
+ if (s === void 0) {
+ s = with_parent(() => {
+ return /* @__PURE__ */ state(has ? proxy(target[prop]) : UNINITIALIZED, stack);
+ });
+ sources.set(prop, s);
+ }
+ if (get(s) === UNINITIALIZED) return false;
+ }
+ return has;
+ },
+ set(target, prop, value, receiver) {
+ var s = sources.get(prop);
+ var has = prop in target;
+ if (is_proxied_array && prop === "length") for (var i = value; i < s.v; i += 1) {
+ var other_s = sources.get(i + "");
+ if (other_s !== void 0) set(other_s, UNINITIALIZED);
+ else if (i in target) {
+ other_s = with_parent(() => /* @__PURE__ */ state(UNINITIALIZED, stack));
+ sources.set(i + "", other_s);
+ }
+ }
+ if (s === void 0) {
+ if (!has || get_descriptor(target, prop)?.writable) {
+ s = with_parent(() => /* @__PURE__ */ state(void 0, stack));
+ set(s, proxy(value));
+ sources.set(prop, s);
+ }
+ } else {
+ has = s.v !== UNINITIALIZED;
+ var p = with_parent(() => proxy(value));
+ set(s, p);
+ }
+ var descriptor = Reflect.getOwnPropertyDescriptor(target, prop);
+ if (descriptor?.set) descriptor.set.call(receiver, value);
+ if (!has) {
+ if (is_proxied_array && typeof prop === "string") {
+ var ls = sources.get("length");
+ var n = Number(prop);
+ if (Number.isInteger(n) && n >= ls.v) set(ls, n + 1);
+ }
+ increment(version);
+ }
+ return true;
+ },
+ ownKeys(target) {
+ get(version);
+ var own_keys = Reflect.ownKeys(target).filter((key) => {
+ var source = sources.get(key);
+ return source === void 0 || source.v !== UNINITIALIZED;
+ });
+ for (var [key, source] of sources) if (source.v !== UNINITIALIZED && !(key in target)) own_keys.push(key);
+ return own_keys;
+ },
+ setPrototypeOf() {
+ state_prototype_fixed();
+ }
+ });
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/dom/operations.js
+/** @type {Window} */
+var $window;
+/** @type {() => Node | null} */
+var first_child_getter;
+/** @type {() => Node | null} */
+var next_sibling_getter;
+/**
+* Initialize these lazily to avoid issues when using the runtime in a server context
+* where these globals are not available while avoiding a separate server entry point
+*/
+function init_operations() {
+ if ($window !== void 0) return;
+ $window = window;
+ /Firefox/.test(navigator.userAgent);
+ var element_prototype = Element.prototype;
+ var node_prototype = Node.prototype;
+ var text_prototype = Text.prototype;
+ first_child_getter = get_descriptor(node_prototype, "firstChild").get;
+ next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
+ if (is_extensible(element_prototype)) {
+ element_prototype.__click = void 0;
+ element_prototype.__className = void 0;
+ element_prototype.__attributes = null;
+ element_prototype.__style = void 0;
+ element_prototype.__e = void 0;
+ }
+ if (is_extensible(text_prototype)) text_prototype.__t = void 0;
+}
+/**
+* @param {string} value
+* @returns {Text}
+*/
+function create_text(value = "") {
+ return document.createTextNode(value);
+}
+/**
+* @template {Node} N
+* @param {N} node
+*/
+/* @__NO_SIDE_EFFECTS__ */
+function get_first_child(node) {
+ return first_child_getter.call(node);
+}
+/**
+* @template {Node} N
+* @param {N} node
+*/
+/* @__NO_SIDE_EFFECTS__ */
+function get_next_sibling(node) {
+ return next_sibling_getter.call(node);
+}
+/**
+* @template {Node} N
+* @param {N} node
+* @returns {void}
+*/
+function clear_text_content(node) {
+ node.textContent = "";
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
+/**
+* @template T
+* @param {() => T} fn
+*/
+function without_reactive_context(fn) {
+ var previous_reaction = active_reaction;
+ var previous_effect = active_effect;
+ set_active_reaction(null);
+ set_active_effect(null);
+ try {
+ return fn();
+ } finally {
+ set_active_reaction(previous_reaction);
+ set_active_effect(previous_effect);
+ }
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/reactivity/effects.js
+/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
+/**
+* @param {Effect} effect
+* @param {Effect} parent_effect
+*/
+function push_effect(effect, parent_effect) {
+ var parent_last = parent_effect.last;
+ if (parent_last === null) parent_effect.last = parent_effect.first = effect;
+ else {
+ parent_last.next = effect;
+ effect.prev = parent_last;
+ parent_effect.last = effect;
+ }
+}
+/**
+* @param {number} type
+* @param {null | (() => void | (() => void))} fn
+* @returns {Effect}
+*/
+function create_effect(type, fn) {
+ var parent = active_effect;
+ if (parent !== null && (parent.f & 8192) !== 0) type |= INERT;
+ /** @type {Effect} */
+ var effect = {
+ ctx: component_context,
+ deps: null,
+ nodes: null,
+ f: type | DIRTY | 512,
+ first: null,
+ fn,
+ last: null,
+ next: null,
+ parent,
+ b: parent && parent.b,
+ prev: null,
+ teardown: null,
+ wv: 0,
+ ac: null
+ };
+ current_batch?.register_created_effect(effect);
+ /** @type {Effect | null} */
+ var e = effect;
+ if ((type & 4) !== 0) if (collected_effects !== null) collected_effects.push(effect);
+ else Batch.ensure().schedule(effect);
+ else if (fn !== null) {
+ try {
+ update_effect(effect);
+ } catch (e) {
+ destroy_effect(effect);
+ throw e;
+ }
+ if (e.deps === null && e.teardown === null && e.nodes === null && e.first === e.last && (e.f & 524288) === 0) {
+ e = e.first;
+ if ((type & 16) !== 0 && (type & 65536) !== 0 && e !== null) e.f |= EFFECT_TRANSPARENT;
+ }
+ }
+ if (e !== null) {
+ e.parent = parent;
+ if (parent !== null) push_effect(e, parent);
+ if (active_reaction !== null && (active_reaction.f & 2) !== 0 && (type & 64) === 0) {
+ var derived = active_reaction;
+ (derived.effects ??= []).push(e);
+ }
+ }
+ return effect;
+}
+/**
+* Internal representation of `$effect.tracking()`
+* @returns {boolean}
+*/
+function effect_tracking() {
+ return active_reaction !== null && !untracking;
+}
+/**
+* @param {() => void | (() => void)} fn
+*/
+function create_user_effect(fn) {
+ return create_effect(4 | USER_EFFECT, fn);
+}
+/**
+* An effect root whose children can transition out
+* @param {() => void} fn
+* @returns {(options?: { outro?: boolean }) => Promise}
+*/
+function component_root(fn) {
+ Batch.ensure();
+ const effect = create_effect(64 | EFFECT_PRESERVED, fn);
+ return (options = {}) => {
+ return new Promise((fulfil) => {
+ if (options.outro) pause_effect(effect, () => {
+ destroy_effect(effect);
+ fulfil(void 0);
+ });
+ else {
+ destroy_effect(effect);
+ fulfil(void 0);
+ }
+ });
+ };
+}
+/**
+* @param {() => void | (() => void)} fn
+* @returns {Effect}
+*/
+function render_effect(fn, flags = 0) {
+ return create_effect(8 | flags, fn);
+}
+/**
+* @param {(() => void)} fn
+* @param {number} flags
+*/
+function block(fn, flags = 0) {
+ return create_effect(16 | flags, fn);
+}
+/**
+* @param {(() => void)} fn
+*/
+function branch(fn) {
+ return create_effect(32 | EFFECT_PRESERVED, fn);
+}
+/**
+* @param {Effect} effect
+*/
+function execute_effect_teardown(effect) {
+ var teardown = effect.teardown;
+ if (teardown !== null) {
+ const previously_destroying_effect = is_destroying_effect;
+ const previous_reaction = active_reaction;
+ set_is_destroying_effect(true);
+ set_active_reaction(null);
+ try {
+ teardown.call(null);
+ } finally {
+ set_is_destroying_effect(previously_destroying_effect);
+ set_active_reaction(previous_reaction);
+ }
+ }
+}
+/**
+* @param {Effect} signal
+* @param {boolean} remove_dom
+* @returns {void}
+*/
+function destroy_effect_children(signal, remove_dom = false) {
+ var effect = signal.first;
+ signal.first = signal.last = null;
+ while (effect !== null) {
+ const controller = effect.ac;
+ if (controller !== null) without_reactive_context(() => {
+ controller.abort(STALE_REACTION);
+ });
+ var next = effect.next;
+ if ((effect.f & 64) !== 0) effect.parent = null;
+ else destroy_effect(effect, remove_dom);
+ effect = next;
+ }
+}
+/**
+* @param {Effect} signal
+* @returns {void}
+*/
+function destroy_block_effect_children(signal) {
+ var effect = signal.first;
+ while (effect !== null) {
+ var next = effect.next;
+ if ((effect.f & 32) === 0) destroy_effect(effect);
+ effect = next;
+ }
+}
+/**
+* @param {Effect} effect
+* @param {boolean} [remove_dom]
+* @returns {void}
+*/
+function destroy_effect(effect, remove_dom = true) {
+ var removed = false;
+ if ((remove_dom || (effect.f & 262144) !== 0) && effect.nodes !== null && effect.nodes.end !== null) {
+ remove_effect_dom(effect.nodes.start, effect.nodes.end);
+ removed = true;
+ }
+ set_signal_status(effect, DESTROYING);
+ destroy_effect_children(effect, remove_dom && !removed);
+ remove_reactions(effect, 0);
+ var transitions = effect.nodes && effect.nodes.t;
+ if (transitions !== null) for (const transition of transitions) transition.stop();
+ execute_effect_teardown(effect);
+ effect.f ^= DESTROYING;
+ effect.f |= DESTROYED;
+ var parent = effect.parent;
+ if (parent !== null && parent.first !== null) unlink_effect(effect);
+ effect.next = effect.prev = effect.teardown = effect.ctx = effect.deps = effect.fn = effect.nodes = effect.ac = effect.b = null;
+}
+/**
+*
+* @param {TemplateNode | null} node
+* @param {TemplateNode} end
+*/
+function remove_effect_dom(node, end) {
+ while (node !== null) {
+ /** @type {TemplateNode | null} */
+ var next = node === end ? null : /* @__PURE__ */ get_next_sibling(node);
+ node.remove();
+ node = next;
+ }
+}
+/**
+* Detach an effect from the effect tree, freeing up memory and
+* reducing the amount of work that happens on subsequent traversals
+* @param {Effect} effect
+*/
+function unlink_effect(effect) {
+ var parent = effect.parent;
+ var prev = effect.prev;
+ var next = effect.next;
+ if (prev !== null) prev.next = next;
+ if (next !== null) next.prev = prev;
+ if (parent !== null) {
+ if (parent.first === effect) parent.first = next;
+ if (parent.last === effect) parent.last = prev;
+ }
+}
+/**
+* When a block effect is removed, we don't immediately destroy it or yank it
+* out of the DOM, because it might have transitions. Instead, we 'pause' it.
+* It stays around (in memory, and in the DOM) until outro transitions have
+* completed, and if the state change is reversed then we _resume_ it.
+* A paused effect does not update, and the DOM subtree becomes inert.
+* @param {Effect} effect
+* @param {() => void} [callback]
+* @param {boolean} [destroy]
+*/
+function pause_effect(effect, callback, destroy = true) {
+ /** @type {TransitionManager[]} */
+ var transitions = [];
+ pause_children(effect, transitions, true);
+ var fn = () => {
+ if (destroy) destroy_effect(effect);
+ if (callback) callback();
+ };
+ var remaining = transitions.length;
+ if (remaining > 0) {
+ var check = () => --remaining || fn();
+ for (var transition of transitions) transition.out(check);
+ } else fn();
+}
+/**
+* @param {Effect} effect
+* @param {TransitionManager[]} transitions
+* @param {boolean} local
+*/
+function pause_children(effect, transitions, local) {
+ if ((effect.f & 8192) !== 0) return;
+ effect.f ^= INERT;
+ var t = effect.nodes && effect.nodes.t;
+ if (t !== null) {
+ for (const transition of t) if (transition.is_global || local) transitions.push(transition);
+ }
+ var child = effect.first;
+ while (child !== null) {
+ var sibling = child.next;
+ if ((child.f & 64) === 0) {
+ var transparent = (child.f & 65536) !== 0 || (child.f & 32) !== 0 && (effect.f & 16) !== 0;
+ pause_children(child, transitions, transparent ? local : false);
+ }
+ child = sibling;
+ }
+}
+/**
+* @param {Effect} effect
+* @param {DocumentFragment} fragment
+*/
+function move_effect(effect, fragment) {
+ if (!effect.nodes) return;
+ /** @type {TemplateNode | null} */
+ var node = effect.nodes.start;
+ var end = effect.nodes.end;
+ while (node !== null) {
+ /** @type {TemplateNode | null} */
+ var next = node === end ? null : /* @__PURE__ */ get_next_sibling(node);
+ fragment.append(node);
+ node = next;
+ }
+}
+//#endregion
+//#region node_modules/svelte/src/internal/client/legacy.js
+/**
+* @type {Set | null}
+* @deprecated
+*/
+var captured_signals = null;
+//#endregion
+//#region node_modules/svelte/src/internal/client/runtime.js
+/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
+var is_updating_effect = false;
+var is_destroying_effect = false;
+/** @param {boolean} value */
+function set_is_destroying_effect(value) {
+ is_destroying_effect = value;
+}
+/** @type {null | Reaction} */
+var active_reaction = null;
+var untracking = false;
+/** @param {null | Reaction} reaction */
+function set_active_reaction(reaction) {
+ active_reaction = reaction;
+}
+/** @type {null | Effect} */
+var active_effect = null;
+/** @param {null | Effect} effect */
+function set_active_effect(effect) {
+ active_effect = effect;
+}
+/**
+* When sources are created within a reaction, reading and writing
+* them within that reaction should not cause a re-run
+* @type {null | Source[]}
+*/
+var current_sources = null;
+/** @param {Value} value */
+function push_reaction_value(value) {
+ if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) if (current_sources === null) current_sources = [value];
+ else current_sources.push(value);
+}
+/**
+* The dependencies of the reaction that is currently being executed. In many cases,
+* the dependencies are unchanged between runs, and so this will be `null` unless
+* and until a new dependency is accessed — we track this via `skipped_deps`
+* @type {null | Value[]}
+*/
+var new_deps = null;
+var skipped_deps = 0;
+/**
+* Tracks writes that the effect it's executed in doesn't listen to yet,
+* so that the dependency can be added to the effect later on if it then reads it
+* @type {null | Source[]}
+*/
+var untracked_writes = null;
+/** @param {null | Source[]} value */
+function set_untracked_writes(value) {
+ untracked_writes = value;
+}
+/**
+* @type {number} Used by sources and deriveds for handling updates.
+* Version starts from 1 so that unowned deriveds differentiate between a created effect and a run one for tracing
+**/
+var write_version = 1;
+/** @type {number} Used to version each read of a source of derived to avoid duplicating depedencies inside a reaction */
+var read_version = 0;
+var update_version = read_version;
+/** @param {number} value */
+function set_update_version(value) {
+ update_version = value;
+}
+function increment_write_version() {
+ return ++write_version;
+}
+/**
+* Determines whether a derived or effect is dirty.
+* If it is MAYBE_DIRTY, will set the status to CLEAN
+* @param {Reaction} reaction
+* @returns {boolean}
+*/
+function is_dirty(reaction) {
+ var flags = reaction.f;
+ if ((flags & 2048) !== 0) return true;
+ if (flags & 2) reaction.f &= ~WAS_MARKED;
+ if ((flags & 4096) !== 0) {
+ var dependencies = reaction.deps;
+ var length = dependencies.length;
+ for (var i = 0; i < length; i++) {
+ var dependency = dependencies[i];
+ if (is_dirty(dependency)) update_derived(dependency);
+ if (dependency.wv > reaction.wv) return true;
+ }
+ if ((flags & 512) !== 0 && batch_values === null) set_signal_status(reaction, CLEAN);
+ }
+ return false;
+}
+/**
+* @param {Value} signal
+* @param {Effect} effect
+* @param {boolean} [root]
+*/
+function schedule_possible_effect_self_invalidation(signal, effect, root = true) {
+ var reactions = signal.reactions;
+ if (reactions === null) return;
+ if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) return;
+ for (var i = 0; i < reactions.length; i++) {
+ var reaction = reactions[i];
+ if ((reaction.f & 2) !== 0) schedule_possible_effect_self_invalidation(reaction, effect, false);
+ else if (effect === reaction) {
+ if (root) set_signal_status(reaction, DIRTY);
+ else if ((reaction.f & 1024) !== 0) set_signal_status(reaction, MAYBE_DIRTY);
+ schedule_effect(reaction);
+ }
+ }
+}
+/** @param {Reaction} reaction */
+function update_reaction(reaction) {
+ var previous_deps = new_deps;
+ var previous_skipped_deps = skipped_deps;
+ var previous_untracked_writes = untracked_writes;
+ var previous_reaction = active_reaction;
+ var previous_sources = current_sources;
+ var previous_component_context = component_context;
+ var previous_untracking = untracking;
+ var previous_update_version = update_version;
+ var flags = reaction.f;
+ new_deps = null;
+ skipped_deps = 0;
+ untracked_writes = null;
+ active_reaction = (flags & 96) === 0 ? reaction : null;
+ current_sources = null;
+ set_component_context(reaction.ctx);
+ untracking = false;
+ update_version = ++read_version;
+ if (reaction.ac !== null) {
+ without_reactive_context(() => {
+ /** @type {AbortController} */ reaction.ac.abort(STALE_REACTION);
+ });
+ reaction.ac = null;
+ }
+ try {
+ reaction.f |= REACTION_IS_UPDATING;
+ var fn = reaction.fn;
+ var result = fn();
+ reaction.f |= REACTION_RAN;
+ var deps = reaction.deps;
+ var is_fork = current_batch?.is_fork;
+ if (new_deps !== null) {
+ var i;
+ if (!is_fork) remove_reactions(reaction, skipped_deps);
+ if (deps !== null && skipped_deps > 0) {
+ deps.length = skipped_deps + new_deps.length;
+ for (i = 0; i < new_deps.length; i++) deps[skipped_deps + i] = new_deps[i];
+ } else reaction.deps = deps = new_deps;
+ if (effect_tracking() && (reaction.f & 512) !== 0) for (i = skipped_deps; i < deps.length; i++) (deps[i].reactions ??= []).push(reaction);
+ } else if (!is_fork && deps !== null && skipped_deps < deps.length) {
+ remove_reactions(reaction, skipped_deps);
+ deps.length = skipped_deps;
+ }
+ if (is_runes() && untracked_writes !== null && !untracking && deps !== null && (reaction.f & 6146) === 0) for (i = 0; i < untracked_writes.length; i++) schedule_possible_effect_self_invalidation(untracked_writes[i], reaction);
+ if (previous_reaction !== null && previous_reaction !== reaction) {
+ read_version++;
+ if (previous_reaction.deps !== null) for (let i = 0; i < previous_skipped_deps; i += 1) previous_reaction.deps[i].rv = read_version;
+ if (previous_deps !== null) for (const dep of previous_deps) dep.rv = read_version;
+ if (untracked_writes !== null) if (previous_untracked_writes === null) previous_untracked_writes = untracked_writes;
+ else previous_untracked_writes.push(...untracked_writes);
+ }
+ if ((reaction.f & 8388608) !== 0) reaction.f ^= ERROR_VALUE;
+ return result;
+ } catch (error) {
+ return handle_error(error);
+ } finally {
+ reaction.f ^= REACTION_IS_UPDATING;
+ new_deps = previous_deps;
+ skipped_deps = previous_skipped_deps;
+ untracked_writes = previous_untracked_writes;
+ active_reaction = previous_reaction;
+ current_sources = previous_sources;
+ set_component_context(previous_component_context);
+ untracking = previous_untracking;
+ update_version = previous_update_version;
+ }
+}
+/**
+* @template V
+* @param {Reaction} signal
+* @param {Value} dependency
+* @returns {void}
+*/
+function remove_reaction(signal, dependency) {
+ let reactions = dependency.reactions;
+ if (reactions !== null) {
+ var index = index_of.call(reactions, signal);
+ if (index !== -1) {
+ var new_length = reactions.length - 1;
+ if (new_length === 0) reactions = dependency.reactions = null;
+ else {
+ reactions[index] = reactions[new_length];
+ reactions.pop();
+ }
+ }
+ }
+ if (reactions === null && (dependency.f & 2) !== 0 && (new_deps === null || !includes.call(new_deps, dependency))) {
+ var derived = dependency;
+ if ((derived.f & 512) !== 0) {
+ derived.f ^= 512;
+ derived.f &= ~WAS_MARKED;
+ }
+ if (derived.v !== UNINITIALIZED) update_derived_status(derived);
+ freeze_derived_effects(derived);
+ remove_reactions(derived, 0);
+ }
+}
+/**
+* @param {Reaction} signal
+* @param {number} start_index
+* @returns {void}
+*/
+function remove_reactions(signal, start_index) {
+ var dependencies = signal.deps;
+ if (dependencies === null) return;
+ for (var i = start_index; i < dependencies.length; i++) remove_reaction(signal, dependencies[i]);
+}
+/**
+* @param {Effect} effect
+* @returns {void}
+*/
+function update_effect(effect) {
+ var flags = effect.f;
+ if ((flags & 16384) !== 0) return;
+ set_signal_status(effect, CLEAN);
+ var previous_effect = active_effect;
+ var was_updating_effect = is_updating_effect;
+ active_effect = effect;
+ is_updating_effect = true;
+ try {
+ if ((flags & 16777232) !== 0) destroy_block_effect_children(effect);
+ else destroy_effect_children(effect);
+ execute_effect_teardown(effect);
+ var teardown = update_reaction(effect);
+ effect.teardown = typeof teardown === "function" ? teardown : null;
+ effect.wv = write_version;
+ } finally {
+ is_updating_effect = was_updating_effect;
+ active_effect = previous_effect;
+ }
+}
+/**
+* @template V
+* @param {Value} signal
+* @returns {V}
+*/
+function get(signal) {
+ var is_derived = (signal.f & 2) !== 0;
+ captured_signals?.add(signal);
+ if (active_reaction !== null && !untracking) {
+ if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !includes.call(current_sources, signal))) {
+ var deps = active_reaction.deps;
+ if ((active_reaction.f & 2097152) !== 0) {
+ if (signal.rv < read_version) {
+ signal.rv = read_version;
+ if (new_deps === null && deps !== null && deps[skipped_deps] === signal) skipped_deps++;
+ else if (new_deps === null) new_deps = [signal];
+ else new_deps.push(signal);
+ }
+ } else {
+ (active_reaction.deps ??= []).push(signal);
+ var reactions = signal.reactions;
+ if (reactions === null) signal.reactions = [active_reaction];
+ else if (!includes.call(reactions, active_reaction)) reactions.push(active_reaction);
+ }
+ }
+ }
+ if (is_destroying_effect && old_values.has(signal)) return old_values.get(signal);
+ if (is_derived) {
+ var derived = signal;
+ if (is_destroying_effect) {
+ var value = derived.v;
+ if ((derived.f & 1024) === 0 && derived.reactions !== null || depends_on_old_values(derived)) value = execute_derived(derived);
+ old_values.set(derived, value);
+ return value;
+ }
+ var should_connect = (derived.f & 512) === 0 && !untracking && active_reaction !== null && (is_updating_effect || (active_reaction.f & 512) !== 0);
+ var is_new = (derived.f & REACTION_RAN) === 0;
+ if (is_dirty(derived)) {
+ if (should_connect) derived.f |= 512;
+ update_derived(derived);
+ }
+ if (should_connect && !is_new) {
+ unfreeze_derived_effects(derived);
+ reconnect(derived);
+ }
+ }
+ if (batch_values?.has(signal)) return batch_values.get(signal);
+ if ((signal.f & 8388608) !== 0) throw signal.v;
+ return signal.v;
+}
+/**
+* (Re)connect a disconnected derived, so that it is notified
+* of changes in `mark_reactions`
+* @param {Derived} derived
+*/
+function reconnect(derived) {
+ derived.f |= 512;
+ if (derived.deps === null) return;
+ for (const dep of derived.deps) {
+ (dep.reactions ??= []).push(derived);
+ if ((dep.f & 2) !== 0 && (dep.f & 512) === 0) {
+ unfreeze_derived_effects(dep);
+ reconnect(dep);
+ }
+ }
+}
+/** @param {Derived} derived */
+function depends_on_old_values(derived) {
+ if (derived.v === UNINITIALIZED) return true;
+ if (derived.deps === null) return false;
+ for (const dep of derived.deps) {
+ if (old_values.has(dep)) return true;
+ if ((dep.f & 2) !== 0 && depends_on_old_values(dep)) return true;
+ }
+ return false;
+}
+/**
+* When used inside a [`$derived`](https://svelte.dev/docs/svelte/$derived) or [`$effect`](https://svelte.dev/docs/svelte/$effect),
+* any state read inside `fn` will not be treated as a dependency.
+*
+* ```ts
+* $effect(() => {
+* // this will run when `data` changes, but not when `time` changes
+* save(data, {
+* timestamp: untrack(() => time)
+* });
+* });
+* ```
+* @template T
+* @param {() => T} fn
+* @returns {T}
+*/
+function untrack(fn) {
+ var previous_untracking = untracking;
+ try {
+ untracking = true;
+ return fn();
+ } finally {
+ untracking = previous_untracking;
+ }
+}
+//#endregion
+//#region node_modules/svelte/src/utils.js
+/**
+* Attributes that are boolean, i.e. they are present or not present.
+*/
+var DOM_BOOLEAN_ATTRIBUTES = [
+ "allowfullscreen",
+ "async",
+ "autofocus",
+ "autoplay",
+ "checked",
+ "controls",
+ "default",
+ "disabled",
+ "formnovalidate",
+ "indeterminate",
+ "inert",
+ "ismap",
+ "loop",
+ "multiple",
+ "muted",
+ "nomodule",
+ "novalidate",
+ "open",
+ "playsinline",
+ "readonly",
+ "required",
+ "reversed",
+ "seamless",
+ "selected",
+ "webkitdirectory",
+ "defer",
+ "disablepictureinpicture",
+ "disableremoteplayback"
+];
+/**
+* Returns `true` if `name` is a boolean attribute
+* @param {string} name
+*/
+function is_boolean_attribute(name) {
+ return DOM_BOOLEAN_ATTRIBUTES.includes(name);
+}
+[...DOM_BOOLEAN_ATTRIBUTES];
+/**
+* Subset of delegated events which should be passive by default.
+* These two are already passive via browser defaults on window, document and body.
+* But since
+* - we're delegating them
+* - they happen often
+* - they apply to mobile which is generally less performant
+* we're marking them as passive by default for other elements, too.
+*/
+var PASSIVE_EVENTS = ["touchstart", "touchmove"];
+/**
+* Returns `true` if `name` is a passive event
+* @param {string} name
+*/
+function is_passive_event(name) {
+ return PASSIVE_EVENTS.includes(name);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/index.js
+var INVALID_ATTR_NAME_CHAR_REGEX = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;
+/**
+* Only available on the server and when compiling with the `server` option.
+* Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
+* @template {Record} Props
+* @param {Component | ComponentType>} component
+* @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} [options]
+* @returns {RenderOutput}
+*/
+function render(component, options = {}) {
+ if (options.csp?.hash && options.csp.nonce) invalid_csp();
+ return Renderer.render(component, options);
+}
+/**
+* @param {Record} attrs
+* @param {string} [css_hash]
+* @param {Record} [classes]
+* @param {Record} [styles]
+* @param {number} [flags]
+* @returns {string}
+*/
+function attributes(attrs, css_hash, classes, styles, flags = 0) {
+ if (styles) attrs.style = to_style(attrs.style, styles);
+ if (attrs.class) attrs.class = clsx$1(attrs.class);
+ if (css_hash || classes) attrs.class = to_class(attrs.class, css_hash, classes);
+ let attr_str = "";
+ let name;
+ const is_html = (flags & 1) === 0;
+ const lowercase = (flags & 2) === 0;
+ const is_input = (flags & 4) !== 0;
+ for (name of Object.keys(attrs)) {
+ if (typeof attrs[name] === "function") continue;
+ if (name[0] === "$" && name[1] === "$") continue;
+ if (INVALID_ATTR_NAME_CHAR_REGEX.test(name)) continue;
+ var value = attrs[name];
+ var lower = name.toLowerCase();
+ if (lowercase) name = lower;
+ if (lower.length > 2 && lower.startsWith("on")) continue;
+ if (is_input) {
+ if (name === "defaultvalue" || name === "defaultchecked") {
+ name = name === "defaultvalue" ? "value" : "checked";
+ if (attrs[name]) continue;
+ }
+ }
+ attr_str += attr(name, value, is_html && is_boolean_attribute(name));
+ }
+ return attr_str;
+}
+/**
+* @param {Renderer} renderer
+* @param {Record} $$props
+* @param {string} name
+* @param {Record} slot_props
+* @param {null | (() => void)} fallback_fn
+* @returns {void}
+*/
+function slot(renderer, $$props, name, slot_props, fallback_fn) {
+ var slot_fn = $$props.$$slots?.[name];
+ if (slot_fn === true) slot_fn = $$props[name === "default" ? "children" : name];
+ if (slot_fn !== void 0) slot_fn(renderer, slot_props);
+ else fallback_fn?.();
+}
+/**
+* @template V
+* @param {() => V} get_value
+*/
+function once(get_value) {
+ let value = UNINITIALIZED;
+ return () => {
+ if (value === UNINITIALIZED) value = get_value();
+ return value;
+ };
+}
+/**
+* @template T
+* @param {()=>T} fn
+* @returns {(new_value?: T) => (T | void)}
+*/
+function derived(fn) {
+ const get_value = ssr_context === null ? fn : once(fn);
+ /** @type {T | undefined} */
+ let updated_value;
+ return function(new_value) {
+ if (arguments.length === 0) return updated_value ?? get_value();
+ updated_value = new_value;
+ return updated_value;
+ };
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/crypto.js
+var text_encoder;
+var crypto;
+/** @param {string} module_name */
+var obfuscated_import = (module_name) => import(
+ /* @vite-ignore */
+ module_name
+);
+/** @param {string} data */
+async function sha256(data) {
+ text_encoder ??= new TextEncoder();
+ crypto ??= globalThis.crypto?.subtle?.digest ? globalThis.crypto : (await obfuscated_import("node:crypto")).webcrypto;
+ return base64_encode(await crypto.subtle.digest("SHA-256", text_encoder.encode(data)));
+}
+/**
+* @param {Uint8Array} bytes
+* @returns {string}
+*/
+function base64_encode(bytes) {
+ if (globalThis.Buffer) return globalThis.Buffer.from(bytes).toString("base64");
+ let binary = "";
+ for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
+ return btoa(binary);
+}
+//#endregion
+//#region node_modules/svelte/src/internal/server/renderer.js
+/** @import { Component } from 'svelte' */
+/** @import { Csp, HydratableContext, RenderOutput, SSRContext, SyncRenderOutput, Sha256Source } from './types.js' */
+/** @import { MaybePromise } from '#shared' */
+/** @typedef {'head' | 'body'} RendererType */
+/** @typedef {{ [key in RendererType]: string }} AccumulatedContent */
+/**
+* @typedef {string | Renderer} RendererItem
+*/
+/**
+* Renderers are basically a tree of `string | Renderer`s, where each `Renderer` in the tree represents
+* work that may or may not have completed. A renderer can be {@link collect}ed to aggregate the
+* content from itself and all of its children, but this will throw if any of the children are
+* performing asynchronous work. To asynchronously collect a renderer, just `await` it.
+*
+* The `string` values within a renderer are always associated with the {@link type} of that renderer. To switch types,
+* call {@link child} with a different `type` argument.
+*/
+var Renderer = class Renderer {
+ /**
+ * The contents of the renderer.
+ * @type {RendererItem[]}
+ */
+ #out = [];
+ /**
+ * Any `onDestroy` callbacks registered during execution of this renderer.
+ * @type {(() => void)[] | undefined}
+ */
+ #on_destroy = void 0;
+ /**
+ * Whether this renderer is a component body.
+ * @type {boolean}
+ */
+ #is_component_body = false;
+ /**
+ * If set, this renderer is an error boundary. When async collection
+ * of the children fails, the failed snippet is rendered instead.
+ * @type {{
+ * failed: (renderer: Renderer, error: unknown, reset: () => void) => void;
+ * transformError: (error: unknown) => unknown;
+ * context: SSRContext | null;
+ * } | null}
+ */
+ #boundary = null;
+ /**
+ * The type of string content that this renderer is accumulating.
+ * @type {RendererType}
+ */
+ type;
+ /** @type {Renderer | undefined} */
+ #parent;
+ /**
+ * Asynchronous work associated with this renderer
+ * @type {Promise | undefined}
+ */
+ promise = void 0;
+ /**
+ * State which is associated with the content tree as a whole.
+ * It will be re-exposed, uncopied, on all children.
+ * @type {SSRState}
+ * @readonly
+ */
+ global;
+ /**
+ * State that is local to the branch it is declared in.
+ * It will be shallow-copied to all children.
+ *
+ * @type {{ select_value: string | undefined }}
+ */
+ local;
+ /**
+ * @param {SSRState} global
+ * @param {Renderer | undefined} [parent]
+ */
+ constructor(global, parent) {
+ this.#parent = parent;
+ this.global = global;
+ this.local = parent ? { ...parent.local } : { select_value: void 0 };
+ this.type = parent ? parent.type : "body";
+ }
+ /**
+ * @param {(renderer: Renderer) => void} fn
+ */
+ head(fn) {
+ const head = new Renderer(this.global, this);
+ head.type = "head";
+ this.#out.push(head);
+ head.child(fn);
+ }
+ /**
+ * @param {Array>} blockers
+ * @param {(renderer: Renderer) => void} fn
+ */
+ async_block(blockers, fn) {
+ this.#out.push(BLOCK_OPEN);
+ this.async(blockers, fn);
+ this.#out.push(BLOCK_CLOSE);
+ }
+ /**
+ * @param {Array>} blockers
+ * @param {(renderer: Renderer) => void} fn
+ */
+ async(blockers, fn) {
+ let callback = fn;
+ if (blockers.length > 0) {
+ const context = ssr_context;
+ callback = (renderer) => {
+ return Promise.all(blockers).then(() => {
+ const previous_context = ssr_context;
+ try {
+ set_ssr_context(context);
+ return fn(renderer);
+ } finally {
+ set_ssr_context(previous_context);
+ }
+ });
+ };
+ }
+ this.child(callback);
+ }
+ /**
+ * @param {Array<() => void>} thunks
+ */
+ run(thunks) {
+ const context = ssr_context;
+ let promise = Promise.resolve(thunks[0]());
+ const promises = [promise];
+ for (const fn of thunks.slice(1)) {
+ promise = promise.then(() => {
+ const previous_context = ssr_context;
+ set_ssr_context(context);
+ try {
+ return fn();
+ } finally {
+ set_ssr_context(previous_context);
+ }
+ });
+ promises.push(promise);
+ }
+ promise.catch(noop);
+ this.promise = promise;
+ return promises;
+ }
+ /**
+ * @param {(renderer: Renderer) => MaybePromise} fn
+ */
+ child_block(fn) {
+ this.#out.push(BLOCK_OPEN);
+ this.child(fn);
+ this.#out.push(BLOCK_CLOSE);
+ }
+ /**
+ * Create a child renderer. The child renderer inherits the state from the parent,
+ * but has its own content.
+ * @param {(renderer: Renderer) => MaybePromise} fn
+ */
+ child(fn) {
+ const child = new Renderer(this.global, this);
+ this.#out.push(child);
+ const parent = ssr_context;
+ set_ssr_context({
+ ...ssr_context,
+ p: parent,
+ c: null,
+ r: child
+ });
+ const result = fn(child);
+ set_ssr_context(parent);
+ if (result instanceof Promise) {
+ result.catch(noop);
+ result.finally(() => set_ssr_context(null)).catch(noop);
+ if (child.global.mode === "sync") await_invalid();
+ child.promise = result;
+ }
+ return child;
+ }
+ /**
+ * Render children inside an error boundary. If the children throw and the API-level
+ * `transformError` transform handles the error (doesn't re-throw), the `failed` snippet is
+ * rendered instead. Otherwise the error propagates.
+ *
+ * @param {{ failed?: (renderer: Renderer, error: unknown, reset: () => void) => void }} props
+ * @param {(renderer: Renderer) => MaybePromise} children_fn
+ */
+ boundary(props, children_fn) {
+ const child = new Renderer(this.global, this);
+ this.#out.push(child);
+ const parent_context = ssr_context;
+ if (props.failed) child.#boundary = {
+ failed: props.failed,
+ transformError: this.global.transformError,
+ context: parent_context
+ };
+ set_ssr_context({
+ ...ssr_context,
+ p: parent_context,
+ c: null,
+ r: child
+ });
+ try {
+ const result = children_fn(child);
+ set_ssr_context(parent_context);
+ if (result instanceof Promise) {
+ if (child.global.mode === "sync") await_invalid();
+ result.catch(noop);
+ child.promise = result;
+ }
+ } catch (error) {
+ set_ssr_context(parent_context);
+ const failed_snippet = props.failed;
+ if (!failed_snippet) throw error;
+ const result = this.global.transformError(error);
+ child.#out.length = 0;
+ child.#boundary = null;
+ if (result instanceof Promise) {
+ if (this.global.mode === "sync") await_invalid();
+ child.promise = result.then((transformed) => {
+ set_ssr_context(parent_context);
+ child.#out.push(Renderer.#serialize_failed_boundary(transformed));
+ failed_snippet(child, transformed, noop);
+ child.#out.push(BLOCK_CLOSE);
+ });
+ child.promise.catch(noop);
+ } else {
+ child.#out.push(Renderer.#serialize_failed_boundary(result));
+ failed_snippet(child, result, noop);
+ child.#out.push(BLOCK_CLOSE);
+ }
+ }
+ }
+ /**
+ * Create a component renderer. The component renderer inherits the state from the parent,
+ * but has its own content. It is treated as an ordering boundary for ondestroy callbacks.
+ * @param {(renderer: Renderer) => MaybePromise} fn
+ * @param {Function} [component_fn]
+ * @returns {void}
+ */
+ component(fn, component_fn) {
+ push$1(component_fn);
+ const child = this.child(fn);
+ child.#is_component_body = true;
+ pop$1();
+ }
+ /**
+ * @param {Record} attrs
+ * @param {(renderer: Renderer) => void} fn
+ * @param {string | undefined} [css_hash]
+ * @param {Record | undefined} [classes]
+ * @param {Record | undefined} [styles]
+ * @param {number | undefined} [flags]
+ * @param {boolean | undefined} [is_rich]
+ * @returns {void}
+ */
+ select(attrs, fn, css_hash, classes, styles, flags, is_rich) {
+ const { value, ...select_attrs } = attrs;
+ this.push(``);
+ }
+ /**
+ * @param {Record} attrs
+ * @param {string | number | boolean | ((renderer: Renderer) => void)} body
+ * @param {string | undefined} [css_hash]
+ * @param {Record | undefined} [classes]
+ * @param {Record | undefined} [styles]
+ * @param {number | undefined} [flags]
+ * @param {boolean | undefined} [is_rich]
+ */
+ option(attrs, body, css_hash, classes, styles, flags, is_rich) {
+ this.#out.push(``);
+ if (head) renderer.head((child) => child.push(head));
+ };
+ if (typeof body === "function") this.child((renderer) => {
+ const r = new Renderer(this.global, this);
+ body(r);
+ if (this.global.mode === "async") return r.#collect_content_async().then((content) => {
+ close(renderer, content.body.replaceAll("", ""), content);
+ });
+ else {
+ const content = r.#collect_content();
+ close(renderer, content.body.replaceAll("", ""), content);
+ }
+ });
+ else close(this, body, { body: escape_html(body) });
+ }
+ /**
+ * @param {(renderer: Renderer) => void} fn
+ */
+ title(fn) {
+ const path = this.get_path();
+ /** @param {string} head */
+ const close = (head) => {
+ this.global.set_title(head, path);
+ };
+ this.child((renderer) => {
+ const r = new Renderer(renderer.global, renderer);
+ fn(r);
+ if (renderer.global.mode === "async") return r.#collect_content_async().then((content) => {
+ close(content.head);
+ });
+ else close(r.#collect_content().head);
+ });
+ }
+ /**
+ * @param {string | (() => Promise)} content
+ */
+ push(content) {
+ if (typeof content === "function") this.child(async (renderer) => renderer.push(await content()));
+ else this.#out.push(content);
+ }
+ /**
+ * @param {() => void} fn
+ */
+ on_destroy(fn) {
+ (this.#on_destroy ??= []).push(fn);
+ }
+ /**
+ * @returns {number[]}
+ */
+ get_path() {
+ return this.#parent ? [...this.#parent.get_path(), this.#parent.#out.indexOf(this)] : [];
+ }
+ /**
+ * @deprecated this is needed for legacy component bindings
+ */
+ copy() {
+ const copy = new Renderer(this.global, this.#parent);
+ copy.#out = this.#out.map((item) => item instanceof Renderer ? item.copy() : item);
+ copy.promise = this.promise;
+ return copy;
+ }
+ /**
+ * @param {Renderer} other
+ * @deprecated this is needed for legacy component bindings
+ */
+ subsume(other) {
+ if (this.global.mode !== other.global.mode) throw new Error("invariant: A renderer cannot switch modes. If you're seeing this, there's a compiler bug. File an issue!");
+ this.local = other.local;
+ this.#out = other.#out.map((item, i) => {
+ const current = this.#out[i];
+ if (current instanceof Renderer && item instanceof Renderer) {
+ current.subsume(item);
+ return current;
+ }
+ return item;
+ });
+ this.promise = other.promise;
+ this.type = other.type;
+ }
+ get length() {
+ return this.#out.length;
+ }
+ /**
+ * Creates the hydration comment that marks the start of a failed boundary.
+ * The error is JSON-serialized and embedded inside an HTML comment for the client
+ * to parse during hydration. The JSON is escaped to prevent `-->` or ``;
+ }
+ /**
+ * Only available on the server and when compiling with the `server` option.
+ * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app.
+ * @template {Record} Props
+ * @param {Component} component
+ * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp }} [options]
+ * @returns {RenderOutput}
+ */
+ static render(component, options = {}) {
+ /** @type {AccumulatedContent | undefined} */
+ let sync;
+ /** @type {Promise | undefined} */
+ let async;
+ const result = {};
+ Object.defineProperties(result, {
+ html: { get: () => {
+ return (sync ??= Renderer.#render(component, options)).body;
+ } },
+ head: { get: () => {
+ return (sync ??= Renderer.#render(component, options)).head;
+ } },
+ body: { get: () => {
+ return (sync ??= Renderer.#render(component, options)).body;
+ } },
+ hashes: { value: { script: "" } },
+ then: { value: (onfulfilled, onrejected) => {
+ if (!async_mode_flag) {
+ const result = sync ??= Renderer.#render(component, options);
+ const user_result = onfulfilled({
+ head: result.head,
+ body: result.body,
+ html: result.body,
+ hashes: { script: [] }
+ });
+ return Promise.resolve(user_result);
+ }
+ async ??= init_render_context().then(() => with_render_context(() => Renderer.#render_async(component, options)));
+ return async.then((result) => {
+ Object.defineProperty(result, "html", { get: () => {
+ html_deprecated();
+ } });
+ return onfulfilled(result);
+ }, onrejected);
+ } }
+ });
+ return result;
+ }
+ /**
+ * Collect all of the `onDestroy` callbacks registered during rendering. In an async context, this is only safe to call
+ * after awaiting `collect_async`.
+ *
+ * Child renderers are "porous" and don't affect execution order, but component body renderers
+ * create ordering boundaries. Within a renderer, callbacks run in order until hitting a component boundary.
+ * @returns {Iterable<() => void>}
+ */
+ *#collect_on_destroy() {
+ for (const component of this.#traverse_components()) yield* component.#collect_ondestroy();
+ }
+ /**
+ * Performs a depth-first search of renderers, yielding the deepest components first, then additional components as we backtrack up the tree.
+ * @returns {Iterable}
+ */
+ *#traverse_components() {
+ for (const child of this.#out) if (typeof child !== "string") yield* child.#traverse_components();
+ if (this.#is_component_body) yield this;
+ }
+ /**
+ * @returns {Iterable<() => void>}
+ */
+ *#collect_ondestroy() {
+ if (this.#on_destroy) for (const fn of this.#on_destroy) yield fn;
+ for (const child of this.#out) if (child instanceof Renderer && !child.#is_component_body) yield* child.#collect_ondestroy();
+ }
+ /**
+ * Render a component. Throws if any of the children are performing asynchronous work.
+ *
+ * @template {Record} Props
+ * @param {Component} component
+ * @param {{ props?: Omit; context?: Map; idPrefix?: string }} options
+ * @returns {AccumulatedContent}
+ */
+ static #render(component, options) {
+ var previous_context = ssr_context;
+ try {
+ const renderer = Renderer.#open_render("sync", component, options);
+ const content = renderer.#collect_content();
+ return Renderer.#close_render(content, renderer);
+ } finally {
+ abort();
+ set_ssr_context(previous_context);
+ }
+ }
+ /**
+ * Render a component.
+ *
+ * @template {Record} Props
+ * @param {Component} component
+ * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp }} options
+ * @returns {Promise}
+ */
+ static async #render_async(component, options) {
+ const previous_context = ssr_context;
+ try {
+ const renderer = Renderer.#open_render("async", component, options);
+ const content = await renderer.#collect_content_async();
+ const hydratables = await renderer.#collect_hydratables();
+ if (hydratables !== null) content.head = hydratables + content.head;
+ return Renderer.#close_render(content, renderer);
+ } finally {
+ set_ssr_context(previous_context);
+ abort();
+ }
+ }
+ /**
+ * Collect all of the code from the `out` array and return it as a string, or a promise resolving to a string.
+ * @param {AccumulatedContent} content
+ * @returns {AccumulatedContent}
+ */
+ #collect_content(content = {
+ head: "",
+ body: ""
+ }) {
+ for (const item of this.#out) if (typeof item === "string") content[this.type] += item;
+ else if (item instanceof Renderer) item.#collect_content(content);
+ return content;
+ }
+ /**
+ * Collect all of the code from the `out` array and return it as a string.
+ * @param {AccumulatedContent} content
+ * @returns {Promise}
+ */
+ async #collect_content_async(content = {
+ head: "",
+ body: ""
+ }) {
+ await this.promise;
+ for (const item of this.#out) if (typeof item === "string") content[this.type] += item;
+ else if (item instanceof Renderer) if (item.#boundary) {
+ /** @type {AccumulatedContent} */
+ const boundary_content = {
+ head: "",
+ body: ""
+ };
+ try {
+ await item.#collect_content_async(boundary_content);
+ content.head += boundary_content.head;
+ content.body += boundary_content.body;
+ } catch (error) {
+ const { context, failed, transformError } = item.#boundary;
+ set_ssr_context(context);
+ let transformed = await transformError(error);
+ const failed_renderer = new Renderer(item.global, item);
+ failed_renderer.type = item.type;
+ failed_renderer.#out.push(Renderer.#serialize_failed_boundary(transformed));
+ failed(failed_renderer, transformed, noop);
+ failed_renderer.#out.push(BLOCK_CLOSE);
+ await failed_renderer.#collect_content_async(content);
+ }
+ } else await item.#collect_content_async(content);
+ return content;
+ }
+ async #collect_hydratables() {
+ const ctx = get_render_context().hydratable;
+ for (const [_, key] of ctx.unresolved_promises) unresolved_hydratable(key, ctx.lookup.get(key)?.stack ?? "");
+ for (const comparison of ctx.comparisons) await comparison;
+ return await this.#hydratable_block(ctx);
+ }
+ /**
+ * @template {Record} Props
+ * @param {'sync' | 'async'} mode
+ * @param {import('svelte').Component} component
+ * @param {{ props?: Omit; context?: Map; idPrefix?: string; csp?: Csp; transformError?: (error: unknown) => unknown }} options
+ * @returns {Renderer}
+ */
+ static #open_render(mode, component, options) {
+ if (options.idPrefix?.includes("--")) invalid_id_prefix();
+ var previous_context = ssr_context;
+ try {
+ const renderer = new Renderer(new SSRState(mode, options.idPrefix ? options.idPrefix + "-" : "", options.csp, options.transformError));
+ set_ssr_context({
+ p: null,
+ c: options.context ?? null,
+ r: renderer
+ });
+ renderer.push(BLOCK_OPEN);
+ component(renderer, options.props ?? {});
+ renderer.push(BLOCK_CLOSE);
+ return renderer;
+ } finally {
+ set_ssr_context(previous_context);
+ }
+ }
+ /**
+ * @param {AccumulatedContent} content
+ * @param {Renderer} renderer
+ * @returns {AccumulatedContent & { hashes: { script: Sha256Source[] } }}
+ */
+ static #close_render(content, renderer) {
+ for (const cleanup of renderer.#collect_on_destroy()) cleanup();
+ let head = content.head + renderer.global.get_title();
+ let body = content.body;
+ for (const { hash, code } of renderer.global.css) head += ``;
+ return {
+ head,
+ body,
+ hashes: { script: renderer.global.csp.script_hashes }
+ };
+ }
+ /**
+ * @param {HydratableContext} ctx
+ */
+ async #hydratable_block(ctx) {
+ if (ctx.lookup.size === 0) return null;
+ let entries = [];
+ let has_promises = false;
+ for (const [k, v] of ctx.lookup) {
+ if (v.promises) {
+ has_promises = true;
+ for (const p of v.promises) await p;
+ }
+ entries.push(`[${devalue.uneval(k)},${v.serialized}]`);
+ }
+ let prelude = `const h = (window.__svelte ??= {}).h ??= new Map();`;
+ if (has_promises) prelude = `const r = (v) => Promise.resolve(v);
+ ${prelude}`;
+ const body = `
+ {
+ ${prelude}
+
+ for (const [k, v] of [
+ ${entries.join(",\n ")}
+ ]) {
+ h.set(k, v);
+ }
+ }
+ `;
+ let csp_attr = "";
+ if (this.global.csp.nonce) csp_attr = ` nonce="${this.global.csp.nonce}"`;
+ else if (this.global.csp.hash) {
+ const hash = await sha256(body);
+ this.global.csp.script_hashes.push(`sha256-${hash}`);
+ }
+ return `\n\t\t
+
+