INIT
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s

This commit is contained in:
eewing
2026-02-18 15:17:47 -06:00
parent e74c106f85
commit ec317eb17c
11532 changed files with 1631690 additions and 1 deletions
@@ -0,0 +1,224 @@
{
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"name": "internal",
"src": ".svelte-kit/generated/server/internal.js",
"isEntry": true,
"imports": [
"_root.js",
"_environment.js",
"_internal.js"
]
},
"_button.js": {
"file": "chunks/button.js",
"name": "button",
"imports": [
"_index2.js",
"_utils2.js"
]
},
"_environment.js": {
"file": "chunks/environment.js",
"name": "environment"
},
"_exports.js": {
"file": "chunks/exports.js",
"name": "exports"
},
"_false.js": {
"file": "chunks/false.js",
"name": "false"
},
"_index.js": {
"file": "chunks/index.js",
"name": "index",
"imports": [
"_index2.js",
"_root.js"
]
},
"_index2.js": {
"file": "chunks/index2.js",
"name": "index"
},
"_internal.js": {
"file": "chunks/internal.js",
"name": "internal",
"imports": [
"_root.js",
"_environment.js"
],
"dynamicImports": [
"src/hooks.server.ts"
]
},
"_label.js": {
"file": "chunks/label.js",
"name": "label",
"imports": [
"_index2.js",
"_utils2.js"
]
},
"_root.js": {
"file": "chunks/root.js",
"name": "root",
"imports": [
"_index2.js",
"_false.js"
]
},
"_shared.js": {
"file": "chunks/shared.js",
"name": "shared",
"imports": [
"_utils.js"
]
},
"_state.svelte.js": {
"file": "chunks/state.svelte.js",
"name": "state.svelte",
"imports": [
"_index2.js",
"_exports.js",
"_root.js"
]
},
"_utils.js": {
"file": "chunks/utils.js",
"name": "utils"
},
"_utils2.js": {
"file": "chunks/utils2.js",
"name": "utils"
},
"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": [
"_shared.js",
"_false.js",
"_environment.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": [
"_index2.js",
"_state.svelte.js",
"_exports.js",
"_utils.js",
"_index.js",
"_root.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": [
"_false.js",
"_environment.js",
"_shared.js",
"_exports.js",
"_utils.js",
"_index.js",
"_internal.js"
]
},
"src/hooks.server.ts": {
"file": "entries/hooks.server.js",
"name": "entries/hooks.server",
"src": "src/hooks.server.ts",
"isEntry": true,
"isDynamicEntry": true
},
"src/routes/+layout.server.ts": {
"file": "entries/pages/_layout.server.ts.js",
"name": "entries/pages/_layout.server.ts",
"src": "src/routes/+layout.server.ts",
"isEntry": true
},
"src/routes/+layout.svelte": {
"file": "entries/pages/_layout.svelte.js",
"name": "entries/pages/_layout.svelte",
"src": "src/routes/+layout.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_utils2.js",
"_label.js"
],
"css": [
"_app/immutable/assets/_layout.Dc5DVfXz.css"
]
},
"src/routes/+page.svelte": {
"file": "entries/pages/_page.svelte.js",
"name": "entries/pages/_page.svelte",
"src": "src/routes/+page.svelte",
"isEntry": true,
"imports": [
"_button.js"
]
},
"src/routes/api/darkmode/+server.ts": {
"file": "entries/endpoints/api/darkmode/_server.ts.js",
"name": "entries/endpoints/api/darkmode/_server.ts",
"src": "src/routes/api/darkmode/+server.ts",
"isEntry": true
},
"src/routes/login/+page.server.ts": {
"file": "entries/pages/login/_page.server.ts.js",
"name": "entries/pages/login/_page.server.ts",
"src": "src/routes/login/+page.server.ts",
"isEntry": true
},
"src/routes/login/+page.svelte": {
"file": "entries/pages/login/_page.svelte.js",
"name": "entries/pages/login/_page.svelte",
"src": "src/routes/login/+page.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_button.js",
"_utils2.js",
"_label.js"
]
},
"src/routes/logout/+page.server.ts": {
"file": "entries/pages/logout/_page.server.ts.js",
"name": "entries/pages/logout/_page.server.ts",
"src": "src/routes/logout/+page.server.ts",
"isEntry": true
},
"src/routes/logout/+page.svelte": {
"file": "entries/pages/logout/_page.svelte.js",
"name": "entries/pages/logout/_page.svelte",
"src": "src/routes/logout/+page.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_button.js"
]
}
}
File diff suppressed because one or more lines are too long
+72
View File
@@ -0,0 +1,72 @@
import { b as attributes, j as clsx, c as bind_props } from "./index2.js";
import { c as cn } from "./utils2.js";
import { tv } from "tailwind-variants";
const buttonVariants = tv({
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline"
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
"icon-sm": "size-8",
"icon-lg": "size-10"
}
},
defaultVariants: { variant: "default", size: "default" }
});
function Button($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
class: className,
variant = "default",
size = "default",
ref = null,
href = void 0,
type = "button",
disabled,
children,
$$slots,
$$events,
...restProps
} = $$props;
if (href) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<a${attributes({
"data-slot": "button",
class: clsx(cn(buttonVariants({ variant, size }), className)),
href: disabled ? void 0 : href,
"aria-disabled": disabled,
role: disabled ? "link" : void 0,
tabindex: disabled ? -1 : void 0,
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></a>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<button${attributes({
"data-slot": "button",
class: clsx(cn(buttonVariants({ variant, size }), className)),
type,
disabled,
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></button>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
export {
Button as B
};
@@ -0,0 +1,34 @@
let base = "";
let assets = base;
const app_dir = "_app";
const relative = true;
const initial = { base, assets };
function override(paths) {
base = paths.base;
assets = paths.assets;
}
function reset() {
base = initial.base;
assets = initial.assets;
}
function set_assets(path) {
assets = initial.assets = path;
}
let prerendering = false;
function set_building() {
}
function set_prerendering() {
prerendering = true;
}
export {
assets as a,
base as b,
app_dir as c,
reset as d,
set_building as e,
set_prerendering as f,
override as o,
prerendering as p,
relative as r,
set_assets as s
};
+174
View File
@@ -0,0 +1,174 @@
const SCHEME = /^[a-z][a-z\d+\-.]+:/i;
const internal = new URL("sveltekit-internal://");
function resolve(base, path) {
if (path[0] === "/" && path[1] === "/") return path;
let url = new URL(base, internal);
url = new URL(path, url);
return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
}
function normalize_path(path, trailing_slash) {
if (path === "/" || trailing_slash === "ignore") return path;
if (trailing_slash === "never") {
return path.endsWith("/") ? path.slice(0, -1) : path;
} else if (trailing_slash === "always" && !path.endsWith("/")) {
return path + "/";
}
return path;
}
function decode_pathname(pathname) {
return pathname.split("%25").map(decodeURI).join("%25");
}
function decode_params(params) {
for (const key in params) {
params[key] = decodeURIComponent(params[key]);
}
return params;
}
function make_trackable(url, callback, search_params_callback, allow_hash = false) {
const tracked = new URL(url);
Object.defineProperty(tracked, "searchParams", {
value: new Proxy(tracked.searchParams, {
get(obj, key) {
if (key === "get" || key === "getAll" || key === "has") {
return (param, ...rest) => {
search_params_callback(param);
return obj[key](param, ...rest);
};
}
callback();
const value = Reflect.get(obj, key);
return typeof value === "function" ? value.bind(obj) : value;
}
}),
enumerable: true,
configurable: true
});
const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"];
if (allow_hash) tracked_url_properties.push("hash");
for (const property of tracked_url_properties) {
Object.defineProperty(tracked, property, {
get() {
callback();
return url[property];
},
enumerable: true,
configurable: true
});
}
{
tracked[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url, opts);
};
tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url.searchParams, opts);
};
}
if (!allow_hash) {
disable_hash(tracked);
}
return tracked;
}
function disable_hash(url) {
allow_nodejs_console_log(url);
Object.defineProperty(url, "hash", {
get() {
throw new Error(
"Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead"
);
}
});
}
function disable_search(url) {
allow_nodejs_console_log(url);
for (const property of ["search", "searchParams"]) {
Object.defineProperty(url, property, {
get() {
throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
}
});
}
}
function allow_nodejs_console_log(url) {
{
url[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(new URL(url), opts);
};
}
}
function validator(expected) {
function validate(module, file) {
if (!module) return;
for (const key in module) {
if (key[0] === "_" || expected.has(key)) continue;
const values = [...expected.values()];
const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
}
}
return validate;
}
function hint_for_supported_files(key, ext = ".js") {
const supported_files = [];
if (valid_layout_exports.has(key)) {
supported_files.push(`+layout${ext}`);
}
if (valid_page_exports.has(key)) {
supported_files.push(`+page${ext}`);
}
if (valid_layout_server_exports.has(key)) {
supported_files.push(`+layout.server${ext}`);
}
if (valid_page_server_exports.has(key)) {
supported_files.push(`+page.server${ext}`);
}
if (valid_server_exports.has(key)) {
supported_files.push(`+server${ext}`);
}
if (supported_files.length > 0) {
return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
}
}
const valid_layout_exports = /* @__PURE__ */ new Set([
"load",
"prerender",
"csr",
"ssr",
"trailingSlash",
"config"
]);
const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
const valid_server_exports = /* @__PURE__ */ new Set([
"GET",
"POST",
"PATCH",
"PUT",
"DELETE",
"OPTIONS",
"HEAD",
"fallback",
"prerender",
"trailingSlash",
"config",
"entries"
]);
const validate_layout_exports = validator(valid_layout_exports);
const validate_page_exports = validator(valid_page_exports);
const validate_layout_server_exports = validator(valid_layout_server_exports);
const validate_page_server_exports = validator(valid_page_server_exports);
const validate_server_exports = validator(valid_server_exports);
export {
SCHEME as S,
decode_params as a,
validate_layout_exports as b,
validate_page_server_exports as c,
disable_search as d,
validate_page_exports as e,
decode_pathname as f,
validate_server_exports as g,
make_trackable as m,
normalize_path as n,
resolve as r,
validate_layout_server_exports as v
};
+4
View File
@@ -0,0 +1,4 @@
const browser = false;
export {
browser as b
};
+60
View File
@@ -0,0 +1,60 @@
import { n as noop } from "./index2.js";
import { s as safe_not_equal } from "./root.js";
import "clsx";
const subscriber_queue = [];
function readable(value, start) {
return {
subscribe: writable(value, start).subscribe
};
}
function writable(value, start = noop) {
let stop = null;
const subscribers = /* @__PURE__ */ new Set();
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;
}
}
}
}
function update(fn) {
set(fn(
/** @type {T} */
value
));
}
function subscribe(run, invalidate = noop) {
const subscriber = [run, invalidate];
subscribers.add(subscriber);
if (subscribers.size === 1) {
stop = start(set, update) || noop;
}
run(
/** @type {T} */
value
);
return () => {
subscribers.delete(subscriber);
if (subscribers.size === 0 && stop) {
stop();
stop = null;
}
};
}
return { set, update, subscribe };
}
export {
readable as r,
writable as w
};
File diff suppressed because it is too large Load Diff
+134
View File
@@ -0,0 +1,134 @@
import { r as root } from "./root.js";
import "./environment.js";
let public_env = {};
function set_private_env(environment) {
}
function set_public_env(environment) {
public_env = environment;
}
let read_implementation = null;
function set_read_implementation(fn) {
read_implementation = fn;
}
function set_manifest(_) {
}
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: void 0,
templates: {
app: ({ head, body, assets, nonce, env }) => '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
<style>
body {
--bg: white;
--fg: #222;
--divider: #ccc;
background: var(--bg);
color: var(--fg);
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.error {
display: flex;
align-items: center;
max-width: 32rem;
margin: 0 1rem;
}
.status {
font-weight: 200;
font-size: 3rem;
line-height: 1;
position: relative;
top: -0.05rem;
}
.message {
border-left: 1px solid var(--divider);
padding: 0 0 0 1rem;
margin: 0 0 0 1rem;
min-height: 2.5rem;
display: flex;
align-items: center;
}
.message h1 {
font-weight: 400;
font-size: 1em;
margin: 0;
}
@media (prefers-color-scheme: dark) {
body {
--bg: #222;
--fg: #ddd;
--divider: #666;
}
}
</style>
</head>
<body>
<div class="error">
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
},
version_hash: "tyxfvh"
};
async function get_hooks() {
let handle;
let handleFetch;
let handleError;
let handleValidationError;
let init;
({ handle, handleFetch, handleError, handleValidationError, init } = await import("../entries/hooks.server.js"));
let reroute;
let transport;
return {
handle,
handleFetch,
handleError,
handleValidationError,
init,
reroute,
transport
};
}
export {
set_public_env as a,
set_read_implementation as b,
set_manifest as c,
get_hooks as g,
options as o,
public_env as p,
read_implementation as r,
set_private_env as s
};
+617
View File
@@ -0,0 +1,617 @@
import { A as ATTACHMENT_KEY, r as run, d as derived, p as props_id, b as attributes, c as bind_props, e as spread_props } from "./index2.js";
import { c as cn } from "./utils2.js";
import { clsx } from "clsx";
import parse from "style-to-object";
function createAttachmentKey() {
return Symbol(ATTACHMENT_KEY);
}
function isFunction(value) {
return typeof value === "function";
}
function isObject(value) {
return value !== null && typeof value === "object";
}
const CLASS_VALUE_PRIMITIVE_TYPES = ["string", "number", "bigint", "boolean"];
function isClassValue(value) {
if (value === null || value === void 0)
return true;
if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value))
return true;
if (Array.isArray(value))
return value.every((item) => isClassValue(item));
if (typeof value === "object") {
if (Object.getPrototypeOf(value) !== Object.prototype)
return false;
return true;
}
return false;
}
const BoxSymbol = Symbol("box");
const isWritableSymbol = Symbol("is-writable");
function boxWith(getter, setter) {
const derived2 = getter();
if (setter) {
return {
[BoxSymbol]: true,
[isWritableSymbol]: true,
get current() {
return derived2;
},
set current(v) {
setter(v);
}
};
}
return {
[BoxSymbol]: true,
get current() {
return getter();
}
};
}
function isBox(value) {
return isObject(value) && BoxSymbol in value;
}
function isWritableBox(value) {
return isBox(value) && isWritableSymbol in value;
}
function boxFrom(value) {
if (isBox(value)) return value;
if (isFunction(value)) return boxWith(value);
return simpleBox(value);
}
function boxFlatten(boxes) {
return Object.entries(boxes).reduce(
(acc, [key, b]) => {
if (!isBox(b)) {
return Object.assign(acc, { [key]: b });
}
if (isWritableBox(b)) {
Object.defineProperty(acc, key, {
get() {
return b.current;
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
set(v) {
b.current = v;
}
});
} else {
Object.defineProperty(acc, key, {
get() {
return b.current;
}
});
}
return acc;
},
{}
);
}
function toReadonlyBox(b) {
if (!isWritableBox(b)) return b;
return {
[BoxSymbol]: true,
get current() {
return b.current;
}
};
}
function simpleBox(initialValue) {
let current = initialValue;
return {
[BoxSymbol]: true,
[isWritableSymbol]: true,
get current() {
return current;
},
set current(v) {
current = v;
}
};
}
function composeHandlers(...handlers) {
return function(e) {
for (const handler of handlers) {
if (!handler)
continue;
if (e.defaultPrevented)
return;
if (typeof handler === "function") {
handler.call(this, e);
} else {
handler.current?.call(this, e);
}
}
};
}
const NUMBER_CHAR_RE = /\d/;
const STR_SPLITTERS = ["-", "_", "/", "."];
function isUppercase(char = "") {
if (NUMBER_CHAR_RE.test(char))
return void 0;
return char !== char.toLowerCase();
}
function splitByCase(str) {
const parts = [];
let buff = "";
let previousUpper;
let previousSplitter;
for (const char of str) {
const isSplitter = STR_SPLITTERS.includes(char);
if (isSplitter === true) {
parts.push(buff);
buff = "";
previousUpper = void 0;
continue;
}
const isUpper = isUppercase(char);
if (previousSplitter === false) {
if (previousUpper === false && isUpper === true) {
parts.push(buff);
buff = char;
previousUpper = isUpper;
continue;
}
if (previousUpper === true && isUpper === false && buff.length > 1) {
const lastChar = buff.at(-1);
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
buff = lastChar + char;
previousUpper = isUpper;
continue;
}
}
buff += char;
previousUpper = isUpper;
previousSplitter = isSplitter;
}
parts.push(buff);
return parts;
}
function pascalCase(str) {
if (!str)
return "";
return splitByCase(str).map((p) => upperFirst(p)).join("");
}
function camelCase(str) {
return lowerFirst(pascalCase(str || ""));
}
function upperFirst(str) {
return str ? str[0].toUpperCase() + str.slice(1) : "";
}
function lowerFirst(str) {
return str ? str[0].toLowerCase() + str.slice(1) : "";
}
function cssToStyleObj(css) {
if (!css)
return {};
const styleObj = {};
function iterator(name, value) {
if (name.startsWith("-moz-") || name.startsWith("-webkit-") || name.startsWith("-ms-") || name.startsWith("-o-")) {
styleObj[pascalCase(name)] = value;
return;
}
if (name.startsWith("--")) {
styleObj[name] = value;
return;
}
styleObj[camelCase(name)] = value;
}
parse(css, iterator);
return styleObj;
}
function executeCallbacks(...callbacks) {
return (...args) => {
for (const callback of callbacks) {
if (typeof callback === "function") {
callback(...args);
}
}
};
}
function createParser(matcher, replacer) {
const regex = RegExp(matcher, "g");
return (str) => {
if (typeof str !== "string") {
throw new TypeError(`expected an argument of type string, but got ${typeof str}`);
}
if (!str.match(regex))
return str;
return str.replace(regex, replacer);
};
}
const camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`);
function styleToCSS(styleObj) {
if (!styleObj || typeof styleObj !== "object" || Array.isArray(styleObj)) {
throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);
}
return Object.keys(styleObj).map((property) => `${camelToKebab(property)}: ${styleObj[property]};`).join("\n");
}
function styleToString(style = {}) {
return styleToCSS(style).replace("\n", " ");
}
const EVENT_LIST = [
"onabort",
"onanimationcancel",
"onanimationend",
"onanimationiteration",
"onanimationstart",
"onauxclick",
"onbeforeinput",
"onbeforetoggle",
"onblur",
"oncancel",
"oncanplay",
"oncanplaythrough",
"onchange",
"onclick",
"onclose",
"oncompositionend",
"oncompositionstart",
"oncompositionupdate",
"oncontextlost",
"oncontextmenu",
"oncontextrestored",
"oncopy",
"oncuechange",
"oncut",
"ondblclick",
"ondrag",
"ondragend",
"ondragenter",
"ondragleave",
"ondragover",
"ondragstart",
"ondrop",
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"onfocusin",
"onfocusout",
"onformdata",
"ongotpointercapture",
"oninput",
"oninvalid",
"onkeydown",
"onkeypress",
"onkeyup",
"onload",
"onloadeddata",
"onloadedmetadata",
"onloadstart",
"onlostpointercapture",
"onmousedown",
"onmouseenter",
"onmouseleave",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup",
"onpaste",
"onpause",
"onplay",
"onplaying",
"onpointercancel",
"onpointerdown",
"onpointerenter",
"onpointerleave",
"onpointermove",
"onpointerout",
"onpointerover",
"onpointerup",
"onprogress",
"onratechange",
"onreset",
"onresize",
"onscroll",
"onscrollend",
"onsecuritypolicyviolation",
"onseeked",
"onseeking",
"onselect",
"onselectionchange",
"onselectstart",
"onslotchange",
"onstalled",
"onsubmit",
"onsuspend",
"ontimeupdate",
"ontoggle",
"ontouchcancel",
"ontouchend",
"ontouchmove",
"ontouchstart",
"ontransitioncancel",
"ontransitionend",
"ontransitionrun",
"ontransitionstart",
"onvolumechange",
"onwaiting",
"onwebkitanimationend",
"onwebkitanimationiteration",
"onwebkitanimationstart",
"onwebkittransitionend",
"onwheel"
];
const EVENT_LIST_SET = new Set(EVENT_LIST);
function isEventHandler(key) {
return EVENT_LIST_SET.has(key);
}
function mergeProps(...args) {
const result = { ...args[0] };
for (let i = 1; i < args.length; i++) {
const props = args[i];
if (!props)
continue;
for (const key of Object.keys(props)) {
const a = result[key];
const b = props[key];
const aIsFunction = typeof a === "function";
const bIsFunction = typeof b === "function";
if (aIsFunction && typeof bIsFunction && isEventHandler(key)) {
const aHandler = a;
const bHandler = b;
result[key] = composeHandlers(aHandler, bHandler);
} else if (aIsFunction && bIsFunction) {
result[key] = executeCallbacks(a, b);
} else if (key === "class") {
const aIsClassValue = isClassValue(a);
const bIsClassValue = isClassValue(b);
if (aIsClassValue && bIsClassValue) {
result[key] = clsx(a, b);
} else if (aIsClassValue) {
result[key] = clsx(a);
} else if (bIsClassValue) {
result[key] = clsx(b);
}
} else if (key === "style") {
const aIsObject = typeof a === "object";
const bIsObject = typeof b === "object";
const aIsString = typeof a === "string";
const bIsString = typeof b === "string";
if (aIsObject && bIsObject) {
result[key] = { ...a, ...b };
} else if (aIsObject && bIsString) {
const parsedStyle = cssToStyleObj(b);
result[key] = { ...a, ...parsedStyle };
} else if (aIsString && bIsObject) {
const parsedStyle = cssToStyleObj(a);
result[key] = { ...parsedStyle, ...b };
} else if (aIsString && bIsString) {
const parsedStyleA = cssToStyleObj(a);
const parsedStyleB = cssToStyleObj(b);
result[key] = { ...parsedStyleA, ...parsedStyleB };
} else if (aIsObject) {
result[key] = a;
} else if (bIsObject) {
result[key] = b;
} else if (aIsString) {
result[key] = a;
} else if (bIsString) {
result[key] = b;
}
} else {
result[key] = b !== void 0 ? b : a;
}
}
for (const key of Object.getOwnPropertySymbols(props)) {
const a = result[key];
const b = props[key];
result[key] = b !== void 0 ? b : a;
}
}
if (typeof result.style === "object") {
result.style = styleToString(result.style).replaceAll("\n", " ");
}
if (result.hidden === false) {
result.hidden = void 0;
delete result.hidden;
}
if (result.disabled === false) {
result.disabled = void 0;
delete result.disabled;
}
return result;
}
function attachRef(ref, onChange) {
return {
[createAttachmentKey()]: (node) => {
if (isBox(ref)) {
ref.current = node;
run(() => onChange?.(node));
return () => {
if ("isConnected" in node && node.isConnected)
return;
ref.current = null;
onChange?.(null);
};
}
ref(node);
run(() => onChange?.(node));
return () => {
if ("isConnected" in node && node.isConnected)
return;
ref(null);
onChange?.(null);
};
}
};
}
function boolToStr(condition) {
return condition ? "true" : "false";
}
function boolToEmptyStrOrUndef(condition) {
return condition ? "" : void 0;
}
function boolToTrueOrUndef(condition) {
return condition ? true : void 0;
}
function getDataOpenClosed(condition) {
return condition ? "open" : "closed";
}
function getDataChecked(condition) {
return condition ? "checked" : "unchecked";
}
function getAriaChecked(checked, indeterminate) {
return checked ? "true" : "false";
}
class BitsAttrs {
#variant;
#prefix;
attrs;
constructor(config) {
this.#variant = config.getVariant ? config.getVariant() : null;
this.#prefix = this.#variant ? `data-${this.#variant}-` : `data-${config.component}-`;
this.getAttr = this.getAttr.bind(this);
this.selector = this.selector.bind(this);
this.attrs = Object.fromEntries(config.parts.map((part) => [part, this.getAttr(part)]));
}
getAttr(part, variantOverride) {
if (variantOverride)
return `data-${variantOverride}-${part}`;
return `${this.#prefix}${part}`;
}
selector(part, variantOverride) {
return `[${this.getAttr(part, variantOverride)}]`;
}
}
function createBitsAttrs(config) {
const bitsAttrs = new BitsAttrs(config);
return {
...bitsAttrs.attrs,
selector: bitsAttrs.selector,
getAttr: bitsAttrs.getAttr
};
}
function createId(prefixOrUid, uid) {
return `bits-${prefixOrUid}`;
}
const labelAttrs = createBitsAttrs({ component: "label", parts: ["root"] });
class LabelRootState {
static create(opts) {
return new LabelRootState(opts);
}
opts;
attachment;
constructor(opts) {
this.opts = opts;
this.attachment = attachRef(this.opts.ref);
this.onmousedown = this.onmousedown.bind(this);
}
onmousedown(e) {
if (e.detail > 1) e.preventDefault();
}
#props = derived(() => ({
id: this.opts.id.current,
[labelAttrs.root]: "",
onmousedown: this.onmousedown,
...this.attachment
}));
get props() {
return this.#props();
}
set props($$value) {
return this.#props($$value);
}
}
function Label$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
let {
children,
child,
id = createId(uid),
ref = null,
for: forProp,
$$slots,
$$events,
...restProps
} = $$props;
const rootState = LabelRootState.create({
id: boxWith(() => id),
ref: boxWith(() => ref, (v) => ref = v)
});
const mergedProps = mergeProps(restProps, rootState.props, { for: forProp });
if (child) {
$$renderer2.push("<!--[-->");
child($$renderer2, { props: mergedProps });
$$renderer2.push(`<!---->`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<label${attributes({ ...mergedProps, for: forProp })}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></label>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
function Label($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
$$slots,
$$events,
...restProps
} = $$props;
let $$settled = true;
let $$inner_renderer;
function $$render_inner($$renderer3) {
$$renderer3.push("<!---->");
Label$1?.($$renderer3, spread_props([
{
"data-slot": "label",
class: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className)
},
restProps,
{
get ref() {
return ref;
},
set ref($$value) {
ref = $$value;
$$settled = false;
}
}
]));
$$renderer3.push(`<!---->`);
}
do {
$$settled = true;
$$inner_renderer = $$renderer2.copy();
$$render_inner($$inner_renderer);
} while (!$$settled);
$$renderer2.subsume($$inner_renderer);
bind_props($$props, { ref });
});
}
export {
BoxSymbol as B,
Label as L,
boxWith as a,
boxFrom as b,
boxFlatten as c,
isBox as d,
isWritableBox as e,
isObject as f,
executeCallbacks as g,
attachRef as h,
isWritableSymbol as i,
createBitsAttrs as j,
getDataOpenClosed as k,
boolToEmptyStrOrUndef as l,
boolToStr as m,
simpleBox as n,
composeHandlers as o,
createId as p,
mergeProps as q,
cssToStyleObj as r,
styleToString as s,
toReadonlyBox as t,
getDataChecked as u,
getAriaChecked as v,
boolToTrueOrUndef as w
};
File diff suppressed because it is too large Load Diff
+777
View File
@@ -0,0 +1,777 @@
import { json, text } from "@sveltejs/kit";
import { SvelteKitError, HttpError } from "@sveltejs/kit/internal";
import { with_request_store } from "@sveltejs/kit/internal/server";
import * as devalue from "devalue";
import { t as text_decoder, b as base64_encode, c as base64_decode } from "./utils.js";
const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
const PAGE_METHODS = ["GET", "POST", "HEAD"];
function set_nested_value(object, path_string, value) {
if (path_string.startsWith("n:")) {
path_string = path_string.slice(2);
value = value === "" ? void 0 : parseFloat(value);
} else if (path_string.startsWith("b:")) {
path_string = path_string.slice(2);
value = value === "on";
}
deep_set(object, split_path(path_string), value);
}
function convert_formdata(data) {
const result = {};
for (let key of data.keys()) {
const is_array = key.endsWith("[]");
let values = data.getAll(key);
if (is_array) key = key.slice(0, -2);
if (values.length > 1 && !is_array) {
throw new Error(`Form cannot contain duplicated keys — "${key}" has ${values.length} values`);
}
values = values.filter(
(entry) => typeof entry === "string" || entry.name !== "" || entry.size > 0
);
if (key.startsWith("n:")) {
key = key.slice(2);
values = values.map((v) => v === "" ? void 0 : parseFloat(
/** @type {string} */
v
));
} else if (key.startsWith("b:")) {
key = key.slice(2);
values = values.map((v) => v === "on");
}
set_nested_value(result, key, is_array ? values : values[0]);
}
return result;
}
const BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata";
const BINARY_FORM_VERSION = 0;
const HEADER_BYTES = 1 + 4 + 2;
async function deserialize_binary_form(request) {
if (request.headers.get("content-type") !== BINARY_FORM_CONTENT_TYPE) {
const form_data = await request.formData();
return { data: convert_formdata(form_data), meta: {}, form_data };
}
if (!request.body) {
throw deserialize_error("no body");
}
const content_length = parseInt(request.headers.get("content-length") ?? "");
if (Number.isNaN(content_length)) {
throw deserialize_error("invalid Content-Length header");
}
const reader = request.body.getReader();
const chunks = [];
function get_chunk(index) {
if (index in chunks) return chunks[index];
let i = chunks.length;
while (i <= index) {
chunks[i] = reader.read().then((chunk) => chunk.value);
i++;
}
return chunks[index];
}
async function get_buffer(offset, length) {
let start_chunk;
let chunk_start = 0;
let chunk_index;
for (chunk_index = 0; ; chunk_index++) {
const chunk = await get_chunk(chunk_index);
if (!chunk) return null;
const chunk_end = chunk_start + chunk.byteLength;
if (offset >= chunk_start && offset < chunk_end) {
start_chunk = chunk;
break;
}
chunk_start = chunk_end;
}
if (offset + length <= chunk_start + start_chunk.byteLength) {
return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start);
}
const chunks2 = [start_chunk.subarray(offset - chunk_start)];
let cursor = start_chunk.byteLength - offset + chunk_start;
while (cursor < length) {
chunk_index++;
let chunk = await get_chunk(chunk_index);
if (!chunk) return null;
if (chunk.byteLength > length - cursor) {
chunk = chunk.subarray(0, length - cursor);
}
chunks2.push(chunk);
cursor += chunk.byteLength;
}
const buffer = new Uint8Array(length);
cursor = 0;
for (const chunk of chunks2) {
buffer.set(chunk, cursor);
cursor += chunk.byteLength;
}
return buffer;
}
const header = await get_buffer(0, HEADER_BYTES);
if (!header) throw deserialize_error("too short");
if (header[0] !== BINARY_FORM_VERSION) {
throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);
}
const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
const data_length = header_view.getUint32(1, true);
if (HEADER_BYTES + data_length > content_length) {
throw deserialize_error("data overflow");
}
const file_offsets_length = header_view.getUint16(5, true);
if (HEADER_BYTES + data_length + file_offsets_length > content_length) {
throw deserialize_error("file offset table overflow");
}
const data_buffer = await get_buffer(HEADER_BYTES, data_length);
if (!data_buffer) throw deserialize_error("data too short");
let file_offsets;
let files_start_offset;
if (file_offsets_length > 0) {
const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
if (!file_offsets_buffer) throw deserialize_error("file offset table too short");
const parsed_offsets = JSON.parse(text_decoder.decode(file_offsets_buffer));
if (!Array.isArray(parsed_offsets) || parsed_offsets.some((n) => typeof n !== "number" || !Number.isInteger(n) || n < 0)) {
throw deserialize_error("invalid file offset table");
}
file_offsets = /** @type {Array<number>} */
parsed_offsets;
files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
}
const [data, meta] = devalue.parse(text_decoder.decode(data_buffer), {
File: ([name, type, size, last_modified, index]) => {
if (typeof name !== "string" || typeof type !== "string" || typeof size !== "number" || typeof last_modified !== "number" || typeof index !== "number") {
throw deserialize_error("invalid file metadata");
}
if (files_start_offset + file_offsets[index] + size > content_length) {
throw deserialize_error("file data overflow");
}
return new Proxy(
new LazyFile(
name,
type,
size,
last_modified,
get_chunk,
files_start_offset + file_offsets[index]
),
{
getPrototypeOf() {
return File.prototype;
}
}
);
}
});
void (async () => {
let has_more = true;
while (has_more) {
const chunk = await get_chunk(chunks.length);
has_more = !!chunk;
}
})();
return { data, meta, form_data: null };
}
function deserialize_error(message) {
return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`);
}
class LazyFile {
/** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */
#get_chunk;
/** @type {number} */
#offset;
/**
* @param {string} name
* @param {string} type
* @param {number} size
* @param {number} last_modified
* @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk
* @param {number} offset
*/
constructor(name, type, size, last_modified, get_chunk, offset) {
this.name = name;
this.type = type;
this.size = size;
this.lastModified = last_modified;
this.webkitRelativePath = "";
this.#get_chunk = get_chunk;
this.#offset = offset;
this.arrayBuffer = this.arrayBuffer.bind(this);
this.bytes = this.bytes.bind(this);
this.slice = this.slice.bind(this);
this.stream = this.stream.bind(this);
this.text = this.text.bind(this);
}
/** @type {ArrayBuffer | undefined} */
#buffer;
async arrayBuffer() {
this.#buffer ??= await new Response(this.stream()).arrayBuffer();
return this.#buffer;
}
async bytes() {
return new Uint8Array(await this.arrayBuffer());
}
/**
* @param {number=} start
* @param {number=} end
* @param {string=} contentType
*/
slice(start = 0, end = this.size, contentType = this.type) {
if (start < 0) {
start = Math.max(this.size + start, 0);
} else {
start = Math.min(start, this.size);
}
if (end < 0) {
end = Math.max(this.size + end, 0);
} else {
end = Math.min(end, this.size);
}
const size = Math.max(end - start, 0);
const file = new LazyFile(
this.name,
contentType,
size,
this.lastModified,
this.#get_chunk,
this.#offset + start
);
return file;
}
stream() {
let cursor = 0;
let chunk_index = 0;
return new ReadableStream({
start: async (controller) => {
let chunk_start = 0;
let start_chunk = null;
for (chunk_index = 0; ; chunk_index++) {
const chunk = await this.#get_chunk(chunk_index);
if (!chunk) return null;
const chunk_end = chunk_start + chunk.byteLength;
if (this.#offset >= chunk_start && this.#offset < chunk_end) {
start_chunk = chunk;
break;
}
chunk_start = chunk_end;
}
if (this.#offset + this.size <= chunk_start + start_chunk.byteLength) {
controller.enqueue(
start_chunk.subarray(this.#offset - chunk_start, this.#offset + this.size - chunk_start)
);
controller.close();
} else {
controller.enqueue(start_chunk.subarray(this.#offset - chunk_start));
cursor = start_chunk.byteLength - this.#offset + chunk_start;
}
},
pull: async (controller) => {
chunk_index++;
let chunk = await this.#get_chunk(chunk_index);
if (!chunk) {
controller.error("incomplete file data");
controller.close();
return;
}
if (chunk.byteLength > this.size - cursor) {
chunk = chunk.subarray(0, this.size - cursor);
}
controller.enqueue(chunk);
cursor += chunk.byteLength;
if (cursor >= this.size) {
controller.close();
}
}
});
}
async text() {
return text_decoder.decode(await this.arrayBuffer());
}
}
const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/;
function split_path(path) {
if (!path_regex.test(path)) {
throw new Error(`Invalid path ${path}`);
}
return path.split(/\.|\[|\]/).filter(Boolean);
}
function check_prototype_pollution(key) {
if (key === "__proto__" || key === "constructor" || key === "prototype") {
throw new Error(
`Invalid key "${key}"`
);
}
}
function deep_set(object, keys, value) {
let current = object;
for (let i = 0; i < keys.length - 1; i += 1) {
const key = keys[i];
check_prototype_pollution(key);
const is_array = /^\d+$/.test(keys[i + 1]);
const exists = Object.hasOwn(current, key);
const inner = current[key];
if (exists && is_array !== Array.isArray(inner)) {
throw new Error(`Invalid array key ${keys[i + 1]}`);
}
if (!exists) {
current[key] = is_array ? [] : {};
}
current = current[key];
}
const final_key = keys[keys.length - 1];
check_prototype_pollution(final_key);
current[final_key] = value;
}
function normalize_issue(issue, server = false) {
const normalized = { name: "", path: [], message: issue.message, server };
if (issue.path !== void 0) {
let name = "";
for (const segment of issue.path) {
const key = (
/** @type {string | number} */
typeof segment === "object" ? segment.key : segment
);
normalized.path.push(key);
if (typeof key === "number") {
name += `[${key}]`;
} else if (typeof key === "string") {
name += name === "" ? key : "." + key;
}
}
normalized.name = name;
}
return normalized;
}
function flatten_issues(issues) {
const result = {};
for (const issue of issues) {
(result.$ ??= []).push(issue);
let name = "";
if (issue.path !== void 0) {
for (const key of issue.path) {
if (typeof key === "number") {
name += `[${key}]`;
} else if (typeof key === "string") {
name += name === "" ? key : "." + key;
}
(result[name] ??= []).push(issue);
}
}
}
return result;
}
function deep_get(object, path) {
let current = object;
for (const key of path) {
if (current == null || typeof current !== "object") {
return current;
}
current = current[key];
}
return current;
}
function create_field_proxy(target, get_input, set_input, get_issues, path = []) {
const get_value = () => {
return deep_get(get_input(), path);
};
return new Proxy(target, {
get(target2, prop) {
if (typeof prop === "symbol") return target2[prop];
if (/^\d+$/.test(prop)) {
return create_field_proxy({}, get_input, set_input, get_issues, [
...path,
parseInt(prop, 10)
]);
}
const key = build_path_string(path);
if (prop === "set") {
const set_func = function(newValue) {
set_input(path, newValue);
return newValue;
};
return create_field_proxy(set_func, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "value") {
return create_field_proxy(get_value, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "issues" || prop === "allIssues") {
const issues_func = () => {
const all_issues = get_issues()[key === "" ? "$" : key];
if (prop === "allIssues") {
return all_issues?.map((issue) => ({
path: issue.path,
message: issue.message
}));
}
return all_issues?.filter((issue) => issue.name === key)?.map((issue) => ({
path: issue.path,
message: issue.message
}));
};
return create_field_proxy(issues_func, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "as") {
const as_func = (type, input_value) => {
const is_array = type === "file multiple" || type === "select multiple" || type === "checkbox" && typeof input_value === "string";
const prefix = type === "number" || type === "range" ? "n:" : type === "checkbox" && !is_array ? "b:" : "";
const base_props = {
name: prefix + key + (is_array ? "[]" : ""),
get "aria-invalid"() {
const issues = get_issues();
return key in issues ? "true" : void 0;
}
};
if (type !== "text" && type !== "select" && type !== "select multiple") {
base_props.type = type === "file multiple" ? "file" : type;
}
if (type === "submit" || type === "hidden") {
return Object.defineProperties(base_props, {
value: { value: input_value, enumerable: true }
});
}
if (type === "select" || type === "select multiple") {
return Object.defineProperties(base_props, {
multiple: { value: is_array, enumerable: true },
value: {
enumerable: true,
get() {
return get_value();
}
}
});
}
if (type === "checkbox" || type === "radio") {
return Object.defineProperties(base_props, {
value: { value: input_value ?? "on", enumerable: true },
checked: {
enumerable: true,
get() {
const value = get_value();
if (type === "radio") {
return value === input_value;
}
if (is_array) {
return (value ?? []).includes(input_value);
}
return value;
}
}
});
}
if (type === "file" || type === "file multiple") {
return Object.defineProperties(base_props, {
multiple: { value: is_array, enumerable: true },
files: {
enumerable: true,
get() {
const value = get_value();
if (value instanceof File) {
if (typeof DataTransfer !== "undefined") {
const fileList = new DataTransfer();
fileList.items.add(value);
return fileList.files;
}
return { 0: value, length: 1 };
}
if (Array.isArray(value) && value.every((f) => f instanceof File)) {
if (typeof DataTransfer !== "undefined") {
const fileList = new DataTransfer();
value.forEach((file) => fileList.items.add(file));
return fileList.files;
}
const fileListLike = { length: value.length };
value.forEach((file, index) => {
fileListLike[index] = file;
});
return fileListLike;
}
return null;
}
}
});
}
return Object.defineProperties(base_props, {
value: {
enumerable: true,
get() {
const value = get_value();
return value != null ? String(value) : "";
}
}
});
};
return create_field_proxy(as_func, get_input, set_input, get_issues, [...path, "as"]);
}
return create_field_proxy({}, get_input, set_input, get_issues, [...path, prop]);
}
});
}
function build_path_string(path) {
let result = "";
for (const segment of path) {
if (typeof segment === "number") {
result += `[${segment}]`;
} else {
result += result === "" ? segment : "." + segment;
}
}
return result;
}
function negotiate(accept, types) {
const parts = [];
accept.split(",").forEach((str, i) => {
const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str);
if (match) {
const [, type, subtype, q = "1"] = match;
parts.push({ type, subtype, q: +q, i });
}
});
parts.sort((a, b) => {
if (a.q !== b.q) {
return b.q - a.q;
}
if (a.subtype === "*" !== (b.subtype === "*")) {
return a.subtype === "*" ? 1 : -1;
}
if (a.type === "*" !== (b.type === "*")) {
return a.type === "*" ? 1 : -1;
}
return a.i - b.i;
});
let accepted;
let min_priority = Infinity;
for (const mimetype of types) {
const [type, subtype] = mimetype.split("/");
const priority = parts.findIndex(
(part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*")
);
if (priority !== -1 && priority < min_priority) {
accepted = mimetype;
min_priority = priority;
}
}
return accepted;
}
function is_content_type(request, ...types) {
const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
return types.includes(type.toLowerCase());
}
function is_form_content_type(request) {
return is_content_type(
request,
"application/x-www-form-urlencoded",
"multipart/form-data",
"text/plain",
BINARY_FORM_CONTENT_TYPE
);
}
function coalesce_to_error(err) {
return err instanceof Error || err && /** @type {any} */
err.name && /** @type {any} */
err.message ? (
/** @type {Error} */
err
) : new Error(JSON.stringify(err));
}
function normalize_error(error) {
return (
/** @type {import('../exports/internal/index.js').Redirect | HttpError | SvelteKitError | Error} */
error
);
}
function get_status(error) {
return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
}
function get_message(error) {
return error instanceof SvelteKitError ? error.text : "Internal Error";
}
const escape_html_attr_dict = {
"&": "&amp;",
'"': "&quot;"
// Svelte also escapes < because the escape function could be called inside a `noscript` there
// https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c
// However, that doesn't apply in SvelteKit
};
const escape_html_dict = {
"&": "&amp;",
"<": "&lt;"
};
const surrogates = (
// high surrogate without paired low surrogate
"[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]"
);
const escape_html_attr_regex = new RegExp(
`[${Object.keys(escape_html_attr_dict).join("")}]|` + surrogates,
"g"
);
const escape_html_regex = new RegExp(
`[${Object.keys(escape_html_dict).join("")}]|` + surrogates,
"g"
);
function escape_html(str, is_attr) {
const dict = is_attr ? escape_html_attr_dict : escape_html_dict;
const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => {
if (match.length === 2) {
return match;
}
return dict[match] ?? `&#${match.charCodeAt(0)};`;
});
return escaped_str;
}
function method_not_allowed(mod, method) {
return text(`${method} method not allowed`, {
status: 405,
headers: {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
// "The server must generate an Allow header field in a 405 status code response"
allow: allowed_methods(mod).join(", ")
}
});
}
function allowed_methods(mod) {
const allowed = ENDPOINT_METHODS.filter((method) => method in mod);
if ("GET" in mod && !("HEAD" in mod)) {
allowed.push("HEAD");
}
return allowed;
}
function get_global_name(options) {
return `__sveltekit_${options.version_hash}`;
}
function static_error_page(options, status, message) {
let page = options.templates.error({ status, message: escape_html(message) });
return text(page, {
headers: { "content-type": "text/html; charset=utf-8" },
status
});
}
async function handle_fatal_error(event, state, options, error) {
error = error instanceof HttpError ? error : coalesce_to_error(error);
const status = get_status(error);
const body = await handle_error_and_jsonify(event, state, options, error);
const type = negotiate(event.request.headers.get("accept") || "text/html", [
"application/json",
"text/html"
]);
if (event.isDataRequest || type === "application/json") {
return json(body, {
status
});
}
return static_error_page(options, status, body.message);
}
async function handle_error_and_jsonify(event, state, options, error) {
if (error instanceof HttpError) {
return { message: "Unknown Error", ...error.body };
}
const status = get_status(error);
const message = get_message(error);
return await with_request_store(
{ event, state },
() => options.hooks.handleError({ error, event, status, message })
) ?? { message };
}
function redirect_response(status, location) {
const response = new Response(void 0, {
status,
headers: { location }
});
return response;
}
function clarify_devalue_error(event, error) {
if (error.path) {
return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path}). If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#Universal-hooks-transport.`;
}
if (error.path === "") {
return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`;
}
return error.message;
}
function serialize_uses(node) {
const uses = {};
if (node.uses && node.uses.dependencies.size > 0) {
uses.dependencies = Array.from(node.uses.dependencies);
}
if (node.uses && node.uses.search_params.size > 0) {
uses.search_params = Array.from(node.uses.search_params);
}
if (node.uses && node.uses.params.size > 0) {
uses.params = Array.from(node.uses.params);
}
if (node.uses?.parent) uses.parent = 1;
if (node.uses?.route) uses.route = 1;
if (node.uses?.url) uses.url = 1;
return uses;
}
function has_prerendered_path(manifest, pathname) {
return manifest._.prerendered_routes.has(pathname) || pathname.at(-1) === "/" && manifest._.prerendered_routes.has(pathname.slice(0, -1));
}
function format_server_error(status, error, event) {
const formatted_text = `
\x1B[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1B[0m`;
if (status === 404) {
return formatted_text;
}
return `${formatted_text}
${error.stack}`;
}
function get_node_type(node_id) {
const parts = node_id?.split("/");
const filename = parts?.at(-1);
if (!filename) return "unknown";
const dot_parts = filename.split(".");
return dot_parts.slice(0, -1).join(".");
}
const INVALIDATED_PARAM = "x-sveltekit-invalidated";
const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
function stringify(data, transport) {
const encoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode]));
return devalue.stringify(data, encoders);
}
function stringify_remote_arg(value, transport) {
if (value === void 0) return "";
const json_string = stringify(value, transport);
const bytes = new TextEncoder().encode(json_string);
return base64_encode(bytes).replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_");
}
function parse_remote_arg(string, transport) {
if (!string) return void 0;
const json_string = text_decoder.decode(
// no need to add back `=` characters, atob can handle it
base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))
);
const decoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode]));
return devalue.parse(json_string, decoders);
}
function create_remote_key(id, payload) {
return id + "/" + payload;
}
export {
ENDPOINT_METHODS as E,
INVALIDATED_PARAM as I,
PAGE_METHODS as P,
SVELTE_KIT_ASSETS as S,
TRAILING_SLASH_PARAM as T,
normalize_error as a,
get_global_name as b,
clarify_devalue_error as c,
get_node_type as d,
escape_html as e,
create_remote_key as f,
get_status as g,
handle_error_and_jsonify as h,
is_form_content_type as i,
static_error_page as j,
stringify as k,
deserialize_binary_form as l,
method_not_allowed as m,
negotiate as n,
has_prerendered_path as o,
parse_remote_arg as p,
handle_fatal_error as q,
redirect_response as r,
serialize_uses as s,
format_server_error as t,
stringify_remote_arg as u,
flatten_issues as v,
create_field_proxy as w,
normalize_issue as x,
set_nested_value as y,
deep_set as z
};
@@ -0,0 +1,18 @@
import "clsx";
import { n as noop } from "./index2.js";
import "./exports.js";
import "@sveltejs/kit/internal/server";
import "./root.js";
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
if (is_legacy) {
({
data: {},
form: null,
error: null,
params: {},
route: { id: null },
state: {},
status: -1,
url: new URL("https://example.com")
});
}
+43
View File
@@ -0,0 +1,43 @@
const text_encoder = new TextEncoder();
const text_decoder = new TextDecoder();
function get_relative_path(from, to) {
const from_parts = from.split(/[/\\]/);
const to_parts = to.split(/[/\\]/);
from_parts.pop();
while (from_parts[0] === to_parts[0]) {
from_parts.shift();
to_parts.shift();
}
let i = from_parts.length;
while (i--) from_parts[i] = "..";
return from_parts.concat(to_parts).join("/");
}
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);
}
function base64_decode(encoded) {
if (globalThis.Buffer) {
const buffer = globalThis.Buffer.from(encoded, "base64");
return new Uint8Array(buffer);
}
const binary = atob(encoded);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
}
export {
text_encoder as a,
base64_encode as b,
base64_decode as c,
get_relative_path as g,
text_decoder as t
};
@@ -0,0 +1,8 @@
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
return twMerge(clsx(inputs));
}
export {
cn as c
};
@@ -0,0 +1,23 @@
import { json } from "@sveltejs/kit";
const POST = async ({ request, locals }) => {
if (!locals.user) {
return json({ error: "Unauthorized" }, { status: 401 });
}
let body;
try {
body = await request.json();
} catch {
return json({ error: "Invalid JSON" }, { status: 400 });
}
const darkmode = !!body.darkmode;
try {
await locals.pb.collection("users").update(locals.user.id, { darkmode });
await locals.pb.collection("users").authRefresh();
} catch (e) {
return json({ error: "Update failed" }, { status: 500 });
}
return json({ darkmode });
};
export {
POST
};
@@ -0,0 +1,45 @@
import { g as getContext, f as escape_html } from "../../chunks/index2.js";
import "clsx";
import "../../chunks/state.svelte.js";
import "@sveltejs/kit/internal";
import "../../chunks/exports.js";
import "../../chunks/utils.js";
import { w as writable } from "../../chunks/index.js";
import "@sveltejs/kit/internal/server";
import "../../chunks/root.js";
function create_updated_store() {
const { set, subscribe } = writable(false);
{
return {
subscribe,
// eslint-disable-next-line @typescript-eslint/require-await
check: async () => false
};
}
}
const stores = {
updated: /* @__PURE__ */ create_updated_store()
};
({
check: stores.updated.check
});
function context() {
return getContext("__request__");
}
const page$1 = {
get error() {
return context().page.error;
},
get status() {
return context().page.status;
}
};
const page = page$1;
function Error$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
$$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
});
}
export {
Error$1 as default
};
@@ -0,0 +1,41 @@
import { redirect } from "@sveltejs/kit";
import PocketBase from "pocketbase";
const POCKETBASE_URL = process.env.VITE_POCKETBASE_URL ?? "https://pocketbase.ccllc.pro";
const LOGIN_PATH = "/login";
const LOGOUT_PATH = "/logout";
function isPublicRoute(pathname) {
return pathname === LOGIN_PATH || pathname.startsWith(LOGIN_PATH + "/") || pathname === LOGOUT_PATH;
}
const handle = async ({ event, resolve }) => {
event.locals.pb = new PocketBase(POCKETBASE_URL);
event.locals.pb.authStore.loadFromCookie(event.request.headers.get("cookie") ?? "");
try {
if (event.locals.pb.authStore.isValid) {
await event.locals.pb.collection("users").authRefresh();
}
} catch {
event.locals.pb.authStore.clear();
}
const record = event.locals.pb.authStore.record;
event.locals.user = record ? {
id: record.id,
email: record.email,
name: record.name,
avatar: record.avatar,
darkmode: !!record.darkmode
} : null;
if (!event.locals.user && !isPublicRoute(event.url.pathname)) {
const redirectTo = event.url.pathname + event.url.search;
const loginUrl = redirectTo && redirectTo !== "/" ? `${LOGIN_PATH}?redirectTo=${encodeURIComponent(redirectTo)}` : LOGIN_PATH;
throw redirect(303, loginUrl);
}
const response = await resolve(event);
response.headers.append(
"set-cookie",
event.locals.pb.authStore.exportToCookie({ httpOnly: false, sameSite: "Lax" })
);
return response;
};
export {
handle
};
@@ -0,0 +1,8 @@
const load = async ({ locals }) => {
return {
user: locals.user
};
};
export {
load
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,48 @@
import "clsx";
import { B as Button } from "../../chunks/button.js";
function _page($$renderer, $$props) {
let { data } = $$props;
{
$$renderer.push("<!--[!-->");
$$renderer.push(`<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6"><h1 class="text-2xl font-semibold">Base</h1> <div class="flex w-full max-w-xs flex-col gap-3"><a href="https://prism.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 w-full min-h-12",
children: ($$renderer2) => {
$$renderer2.push(`<!---->Prism`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://tasgrid.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->TasGrid`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://stackq.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->Stackq`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a> <a href="https://hrm.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer">`);
Button($$renderer, {
class: "h-12 min-h-12 w-full",
variant: "outline",
children: ($$renderer2) => {
$$renderer2.push(`<!---->HRM`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></a></div></main>`);
}
$$renderer.push(`<!--]-->`);
}
export {
_page as default
};
@@ -0,0 +1,38 @@
import { redirect } from "@sveltejs/kit";
const load = async ({ url, locals }) => {
if (locals.user) {
throw redirect(303, url.searchParams.get("redirectTo") ?? "/");
}
return {
redirectTo: url.searchParams.get("redirectTo") ?? "",
error: null
};
};
const actions = {
default: async ({ request, locals, url }) => {
const formData = await request.formData();
const email = String(formData.get("email") ?? "").trim();
const password = String(formData.get("password") ?? "");
const redirectTo = String(formData.get("redirectTo") ?? "").trim() || "/";
if (!email || !password) {
return {
redirectTo,
error: "Email and password are required."
};
}
try {
await locals.pb.collection("users").authWithPassword(email, password);
} catch (err) {
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "Invalid email or password.";
return {
redirectTo,
error: message
};
}
throw redirect(303, redirectTo);
}
};
export {
actions,
load
};
@@ -0,0 +1,256 @@
import { b as attributes, j as clsx, c as bind_props, i as attr, f as escape_html } from "../../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../../chunks/exports.js";
import "../../../chunks/utils.js";
import "@sveltejs/kit/internal/server";
import "../../../chunks/root.js";
import "../../../chunks/state.svelte.js";
import { B as Button } from "../../../chunks/button.js";
import { c as cn } from "../../../chunks/utils2.js";
import { L as Label } from "../../../chunks/label.js";
import "clsx";
function Input($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
value = void 0,
type,
files = void 0,
class: className,
"data-slot": dataSlot = "input",
$$slots,
$$events,
...restProps
} = $$props;
if (type === "file") {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<input${attributes(
{
"data-slot": dataSlot,
class: clsx(cn("selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className)),
type: "file",
...restProps
},
void 0,
void 0,
void 0,
4
)}/>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<input${attributes(
{
"data-slot": dataSlot,
class: clsx(cn("border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className)),
type,
value,
...restProps
},
void 0,
void 0,
void 0,
4
)}/>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref, value, files });
});
}
function Card($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card",
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_content($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-content",
class: clsx(cn("px-6", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_description($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<p${attributes({
"data-slot": "card-description",
class: clsx(cn("text-muted-foreground text-sm", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></p>`);
bind_props($$props, { ref });
});
}
function Card_header($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-header",
class: clsx(cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function Card_title($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
children,
$$slots,
$$events,
...restProps
} = $$props;
$$renderer2.push(`<div${attributes({
"data-slot": "card-title",
class: clsx(cn("leading-none font-semibold", className)),
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></div>`);
bind_props($$props, { ref });
});
}
function _page($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let { data, formAction } = $$props;
const redirectTo = data.form?.redirectTo ?? data.redirectTo ?? "";
const error = data.form?.error;
$$renderer2.push(`<div class="app-shell max-w-sm mx-auto w-full">`);
$$renderer2.push("<!---->");
Card?.($$renderer2, {
children: ($$renderer3) => {
$$renderer3.push("<!---->");
Card_header?.($$renderer3, {
children: ($$renderer4) => {
$$renderer4.push("<!---->");
Card_title?.($$renderer4, {
children: ($$renderer5) => {
$$renderer5.push(`<!---->Sign in`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----> `);
$$renderer4.push("<!---->");
Card_description?.($$renderer4, {
children: ($$renderer5) => {
$$renderer5.push(`<!---->Enter your email and password.`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!---->`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!----> `);
$$renderer3.push("<!---->");
Card_content?.($$renderer3, {
children: ($$renderer4) => {
$$renderer4.push(`<form method="POST"${attr("action", formAction)} class="flex flex-col gap-4"><input type="hidden" name="redirectTo"${attr("value", redirectTo)}/> <div class="grid gap-2">`);
Label($$renderer4, {
for: "email",
children: ($$renderer5) => {
$$renderer5.push(`<!---->Email`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----> `);
Input($$renderer4, {
id: "email",
name: "email",
type: "email",
placeholder: "you@example.com",
required: true,
autocomplete: "email"
});
$$renderer4.push(`<!----></div> <div class="grid gap-2">`);
Label($$renderer4, {
for: "password",
children: ($$renderer5) => {
$$renderer5.push(`<!---->Password`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----> `);
Input($$renderer4, {
id: "password",
name: "password",
type: "password",
required: true,
autocomplete: "current-password"
});
$$renderer4.push(`<!----></div> `);
if (error) {
$$renderer4.push("<!--[-->");
$$renderer4.push(`<p class="text-sm text-destructive">${escape_html(error)}</p>`);
} else {
$$renderer4.push("<!--[!-->");
}
$$renderer4.push(`<!--]--> `);
Button($$renderer4, {
type: "submit",
class: "w-full",
children: ($$renderer5) => {
$$renderer5.push(`<!---->Sign in`);
},
$$slots: { default: true }
});
$$renderer4.push(`<!----></form>`);
},
$$slots: { default: true }
});
$$renderer3.push(`<!---->`);
},
$$slots: { default: true }
});
$$renderer2.push(`<!----></div>`);
});
}
export {
_page as default
};
@@ -0,0 +1,10 @@
import { redirect } from "@sveltejs/kit";
const actions = {
default: async ({ locals }) => {
locals.pb.authStore.clear();
throw redirect(303, "/login");
}
};
export {
actions
};
@@ -0,0 +1,23 @@
import { i as attr } from "../../../chunks/index2.js";
import "@sveltejs/kit/internal";
import "../../../chunks/exports.js";
import "../../../chunks/utils.js";
import "@sveltejs/kit/internal/server";
import "../../../chunks/root.js";
import "../../../chunks/state.svelte.js";
import { B as Button } from "../../../chunks/button.js";
function _page($$renderer, $$props) {
let { formAction } = $$props;
$$renderer.push(`<div class="app-shell flex items-center justify-center min-h-[200px]"><form method="POST"${attr("action", formAction)}>`);
Button($$renderer, {
type: "submit",
children: ($$renderer2) => {
$$renderer2.push(`<!---->Log out`);
},
$$slots: { default: true }
});
$$renderer.push(`<!----></form></div>`);
}
export {
_page as default
};
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
import "./chunks/root.js";
import { s, e, f } from "./chunks/environment.js";
import { g, o, c, s as s2, a, b } from "./chunks/internal.js";
export {
g as get_hooks,
o as options,
s as set_assets,
e as set_building,
c as set_manifest,
f as set_prerendering,
s2 as set_private_env,
a as set_public_env,
b as set_read_implementation
};
+62
View File
@@ -0,0 +1,62 @@
export const manifest = (() => {
function __memo(fn) {
let value;
return () => value ??= (value = fn());
}
return {
appDir: "_app",
appPath: "_app",
assets: new Set([]),
mimeTypes: {},
_: {
client: {start:"_app/immutable/entry/start.DoE5rVjp.js",app:"_app/immutable/entry/app.D90yBOXx.js",imports:["_app/immutable/entry/start.DoE5rVjp.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/entry/app.D90yBOXx.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/DTd9pe6t.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
nodes: [
__memo(() => import('./nodes/0.js')),
__memo(() => import('./nodes/1.js')),
__memo(() => import('./nodes/2.js')),
__memo(() => import('./nodes/3.js')),
__memo(() => import('./nodes/4.js'))
],
remotes: {
},
routes: [
{
id: "/",
pattern: /^\/$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 2 },
endpoint: null
},
{
id: "/api/darkmode",
pattern: /^\/api\/darkmode\/?$/,
params: [],
page: null,
endpoint: __memo(() => import('./entries/endpoints/api/darkmode/_server.ts.js'))
},
{
id: "/login",
pattern: /^\/login\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 4 },
endpoint: null
},
{
id: "/logout",
pattern: /^\/logout\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 3 },
endpoint: null
}
],
prerendered_routes: new Set([]),
matchers: async () => {
return { };
},
server_assets: {}
}
}
})();
+66
View File
@@ -0,0 +1,66 @@
export const manifest = (() => {
function __memo(fn) {
let value;
return () => value ??= (value = fn());
}
return {
appDir: "_app",
appPath: "_app",
assets: new Set([]),
mimeTypes: {},
_: {
client: {start:"_app/immutable/entry/start.DoE5rVjp.js",app:"_app/immutable/entry/app.D90yBOXx.js",imports:["_app/immutable/entry/start.DoE5rVjp.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/entry/app.D90yBOXx.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/DTd9pe6t.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
nodes: [
__memo(() => import('./nodes/0.js')),
__memo(() => import('./nodes/1.js')),
__memo(() => import('./nodes/2.js')),
__memo(() => import('./nodes/3.js')),
__memo(() => import('./nodes/4.js'))
],
remotes: {
},
routes: [
{
id: "/",
pattern: /^\/$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 2 },
endpoint: null
},
{
id: "/api/darkmode",
pattern: /^\/api\/darkmode\/?$/,
params: [],
page: null,
endpoint: __memo(() => import('./entries/endpoints/api/darkmode/_server.ts.js'))
},
{
id: "/login",
pattern: /^\/login\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 4 },
endpoint: null
},
{
id: "/logout",
pattern: /^\/logout\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 3 },
endpoint: null
}
],
prerendered_routes: new Set([]),
matchers: async () => {
return { };
},
server_assets: {}
}
}
})();
export const prerendered = new Set([]);
export const base = "";
+10
View File
@@ -0,0 +1,10 @@
import * as server from '../entries/pages/_layout.server.ts.js';
export const index = 0;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;
export { server };
export const server_id = "src/routes/+layout.server.ts";
export const imports = ["_app/immutable/nodes/0.DsCqkoz9.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CvA4ASMA.js","_app/immutable/chunks/ggIfGDPQ.js"];
export const stylesheets = ["_app/immutable/assets/0.Ci1WSy1v.css"];
export const fonts = [];
+8
View File
@@ -0,0 +1,8 @@
export const index = 1;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
export const imports = ["_app/immutable/nodes/1.CwhQAky3.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/ggIfGDPQ.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/BX9MO-1l.js"];
export const stylesheets = [];
export const fonts = [];
+8
View File
@@ -0,0 +1,8 @@
export const index = 2;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;
export const imports = ["_app/immutable/nodes/2.B4w5AQ-r.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/DTd9pe6t.js"];
export const stylesheets = [];
export const fonts = [];
+10
View File
@@ -0,0 +1,10 @@
import * as server from '../entries/pages/logout/_page.server.ts.js';
export const index = 3;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/pages/logout/_page.svelte.js')).default;
export { server };
export const server_id = "src/routes/logout/+page.server.ts";
export const imports = ["_app/immutable/nodes/3.sctq0uPd.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/DTd9pe6t.js"];
export const stylesheets = [];
export const fonts = [];
+10
View File
@@ -0,0 +1,10 @@
import * as server from '../entries/pages/login/_page.server.ts.js';
export const index = 4;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;
export { server };
export const server_id = "src/routes/login/+page.server.ts";
export const imports = ["_app/immutable/nodes/4.BG9kRLiv.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/uf3Is7Es.js","_app/immutable/chunks/DTd9pe6t.js","_app/immutable/chunks/CvA4ASMA.js"];
export const stylesheets = [];
export const fonts = [];
+557
View File
@@ -0,0 +1,557 @@
import { get_request_store, with_request_store } from "@sveltejs/kit/internal/server";
import { parse } from "devalue";
import { error, json } from "@sveltejs/kit";
import { u as stringify_remote_arg, v as flatten_issues, w as create_field_proxy, x as normalize_issue, y as set_nested_value, z as deep_set, k as stringify, f as create_remote_key, h as handle_error_and_jsonify } from "./chunks/shared.js";
import { ValidationError, HttpError, SvelteKitError } from "@sveltejs/kit/internal";
import { b as browser } from "./chunks/false.js";
import { b as base, c as app_dir, p as prerendering } from "./chunks/environment.js";
function create_validator(validate_or_fn, maybe_fn) {
if (!maybe_fn) {
return (arg) => {
if (arg !== void 0) {
error(400, "Bad Request");
}
};
}
if (validate_or_fn === "unchecked") {
return (arg) => arg;
}
if ("~standard" in validate_or_fn) {
return async (arg) => {
const { event, state } = get_request_store();
const result = await validate_or_fn["~standard"].validate(arg);
if (result.issues) {
error(
400,
await state.handleValidationError({
issues: result.issues,
event
})
);
}
return result.value;
};
}
throw new Error(
'Invalid validator passed to remote function. Expected "unchecked" or a Standard Schema (https://standardschema.dev)'
);
}
async function get_response(info, arg, state, get_result) {
await 0;
const cache = get_cache(info, state);
return cache[stringify_remote_arg(arg, state.transport)] ??= get_result();
}
function parse_remote_response(data, transport) {
const revivers = {};
for (const key in transport) {
revivers[key] = transport[key].decode;
}
return parse(data, revivers);
}
async function run_remote_function(event, state, allow_cookies, get_input, fn) {
const store = {
event: {
...event,
setHeaders: () => {
throw new Error("setHeaders is not allowed in remote functions");
},
cookies: {
...event.cookies,
set: (name, value, opts) => {
if (!allow_cookies) {
throw new Error("Cannot set cookies in `query` or `prerender` functions");
}
if (opts.path && !opts.path.startsWith("/")) {
throw new Error("Cookies set in remote functions must have an absolute path");
}
return event.cookies.set(name, value, opts);
},
delete: (name, opts) => {
if (!allow_cookies) {
throw new Error("Cannot delete cookies in `query` or `prerender` functions");
}
if (opts.path && !opts.path.startsWith("/")) {
throw new Error("Cookies deleted in remote functions must have an absolute path");
}
return event.cookies.delete(name, opts);
}
}
},
state: {
...state,
is_in_remote_function: true
}
};
const input = await with_request_store(store, get_input);
return with_request_store(store, () => fn(input));
}
function get_cache(info, state = get_request_store().state) {
let cache = state.remote_data?.get(info);
if (cache === void 0) {
cache = {};
(state.remote_data ??= /* @__PURE__ */ new Map()).set(info, cache);
}
return cache;
}
// @__NO_SIDE_EFFECTS__
function command(validate_or_fn, maybe_fn) {
const fn = maybe_fn ?? validate_or_fn;
const validate = create_validator(validate_or_fn, maybe_fn);
const __ = { type: "command", id: "", name: "" };
const wrapper = (arg) => {
const { event, state } = get_request_store();
if (state.is_endpoint_request) {
if (!["POST", "PUT", "PATCH", "DELETE"].includes(event.request.method)) {
throw new Error(
`Cannot call a command (\`${__.name}(${maybe_fn ? "..." : ""})\`) from a ${event.request.method} handler`
);
}
} else if (!event.isRemoteRequest) {
throw new Error(
`Cannot call a command (\`${__.name}(${maybe_fn ? "..." : ""})\`) during server-side rendering`
);
}
state.refreshes ??= {};
const promise = Promise.resolve(
run_remote_function(event, state, true, () => validate(arg), fn)
);
promise.updates = () => {
throw new Error(`Cannot call '${__.name}(...).updates(...)' on the server`);
};
return (
/** @type {ReturnType<RemoteCommand<Input, Output>>} */
promise
);
};
Object.defineProperty(wrapper, "__", { value: __ });
Object.defineProperty(wrapper, "pending", {
get: () => 0
});
return wrapper;
}
// @__NO_SIDE_EFFECTS__
function form(validate_or_fn, maybe_fn) {
const fn = maybe_fn ?? validate_or_fn;
const schema = !maybe_fn || validate_or_fn === "unchecked" ? null : (
/** @type {any} */
validate_or_fn
);
function create_instance(key) {
const instance = {};
instance.method = "POST";
Object.defineProperty(instance, "enhance", {
value: () => {
return { action: instance.action, method: instance.method };
}
});
const __ = {
type: "form",
name: "",
id: "",
fn: async (data, meta, form_data) => {
const output = {};
output.submission = true;
const { event, state } = get_request_store();
const validated = await schema?.["~standard"].validate(data);
if (meta.validate_only) {
return validated?.issues?.map((issue) => normalize_issue(issue, true)) ?? [];
}
if (validated?.issues !== void 0) {
handle_issues(output, validated.issues, form_data);
} else {
if (validated !== void 0) {
data = validated.value;
}
state.refreshes ??= {};
const issue = create_issues();
try {
output.result = await run_remote_function(
event,
state,
true,
() => data,
(data2) => !maybe_fn ? fn() : fn(data2, issue)
);
} catch (e) {
if (e instanceof ValidationError) {
handle_issues(output, e.issues, form_data);
} else {
throw e;
}
}
}
if (!event.isRemoteRequest) {
get_cache(__, state)[""] ??= output;
}
return output;
}
};
Object.defineProperty(instance, "__", { value: __ });
Object.defineProperty(instance, "action", {
get: () => `?/remote=${__.id}`,
enumerable: true
});
Object.defineProperty(instance, "fields", {
get() {
const data = get_cache(__)?.[""];
const issues = flatten_issues(data?.issues ?? []);
return create_field_proxy(
{},
() => data?.input ?? {},
(path, value) => {
if (data?.submission) {
return;
}
const input = path.length === 0 ? value : deep_set(data?.input ?? {}, path.map(String), value);
(get_cache(__)[""] ??= {}).input = input;
},
() => issues
);
}
});
Object.defineProperty(instance, "result", {
get() {
try {
return get_cache(__)?.[""]?.result;
} catch {
return void 0;
}
}
});
Object.defineProperty(instance, "pending", {
get: () => 0
});
Object.defineProperty(instance, "preflight", {
// preflight is a noop on the server
value: () => instance
});
Object.defineProperty(instance, "validate", {
value: () => {
throw new Error("Cannot call validate() on the server");
}
});
if (key == void 0) {
Object.defineProperty(instance, "for", {
/** @type {RemoteForm<any, any>['for']} */
value: (key2) => {
const { state } = get_request_store();
const cache_key = __.id + "|" + JSON.stringify(key2);
let instance2 = (state.form_instances ??= /* @__PURE__ */ new Map()).get(cache_key);
if (!instance2) {
instance2 = create_instance(key2);
instance2.__.id = `${__.id}/${encodeURIComponent(JSON.stringify(key2))}`;
instance2.__.name = __.name;
state.form_instances.set(cache_key, instance2);
}
return instance2;
}
});
}
return instance;
}
return create_instance();
}
function handle_issues(output, issues, form_data) {
output.issues = issues.map((issue) => normalize_issue(issue, true));
if (form_data) {
output.input = {};
for (let key of form_data.keys()) {
if (/^[.\]]?_/.test(key)) continue;
const is_array = key.endsWith("[]");
const values = form_data.getAll(key).filter((value) => typeof value === "string");
if (is_array) key = key.slice(0, -2);
set_nested_value(
/** @type {Record<string, any>} */
output.input,
key,
is_array ? values : values[0]
);
}
}
}
function create_issues() {
return (
/** @type {InvalidField<any>} */
new Proxy(
/** @param {string} message */
(message) => {
if (typeof message !== "string") {
throw new Error(
"`invalid` should now be imported from `@sveltejs/kit` to throw validation issues. The second parameter provided to the form function (renamed to `issue`) is still used to construct issues, e.g. `invalid(issue.field('message'))`. For more info see https://github.com/sveltejs/kit/pulls/14768"
);
}
return create_issue(message);
},
{
get(target, prop) {
if (typeof prop === "symbol") return (
/** @type {any} */
target[prop]
);
return create_issue_proxy(prop, []);
}
}
)
);
function create_issue(message, path = []) {
return {
message,
path
};
}
function create_issue_proxy(key, path) {
const new_path = [...path, key];
const issue_func = (message) => create_issue(message, new_path);
return new Proxy(issue_func, {
get(target, prop) {
if (typeof prop === "symbol") return (
/** @type {any} */
target[prop]
);
if (/^\d+$/.test(prop)) {
return create_issue_proxy(parseInt(prop, 10), new_path);
}
return create_issue_proxy(prop, new_path);
}
});
}
}
// @__NO_SIDE_EFFECTS__
function prerender(validate_or_fn, fn_or_options, maybe_options) {
const maybe_fn = typeof fn_or_options === "function" ? fn_or_options : void 0;
const options = maybe_options ?? (maybe_fn ? void 0 : fn_or_options);
const fn = maybe_fn ?? validate_or_fn;
const validate = create_validator(validate_or_fn, maybe_fn);
const __ = {
type: "prerender",
id: "",
name: "",
has_arg: !!maybe_fn,
inputs: options?.inputs,
dynamic: options?.dynamic
};
const wrapper = (arg) => {
const promise = (async () => {
const { event, state } = get_request_store();
const payload = stringify_remote_arg(arg, state.transport);
const id = __.id;
const url = `${base}/${app_dir}/remote/${id}${payload ? `/${payload}` : ""}`;
if (!state.prerendering && !browser && !event.isRemoteRequest) {
try {
return await get_response(__, arg, state, async () => {
const key = stringify_remote_arg(arg, state.transport);
const cache = get_cache(__, state);
const promise3 = cache[key] ??= fetch(new URL(url, event.url.origin).href).then(
async (response) => {
if (!response.ok) {
throw new Error("Prerendered response not found");
}
const prerendered = await response.json();
if (prerendered.type === "error") {
error(prerendered.status, prerendered.error);
}
return prerendered.result;
}
);
return parse_remote_response(await promise3, state.transport);
});
} catch {
}
}
if (state.prerendering?.remote_responses.has(url)) {
return (
/** @type {Promise<any>} */
state.prerendering.remote_responses.get(url)
);
}
const promise2 = get_response(
__,
arg,
state,
() => run_remote_function(event, state, false, () => validate(arg), fn)
);
if (state.prerendering) {
state.prerendering.remote_responses.set(url, promise2);
}
const result = await promise2;
if (state.prerendering) {
const body = { type: "result", result: stringify(result, state.transport) };
state.prerendering.dependencies.set(url, {
body: JSON.stringify(body),
response: json(body)
});
}
return result;
})();
promise.catch(() => {
});
return (
/** @type {RemoteResource<Output>} */
promise
);
};
Object.defineProperty(wrapper, "__", { value: __ });
return wrapper;
}
// @__NO_SIDE_EFFECTS__
function query(validate_or_fn, maybe_fn) {
const fn = maybe_fn ?? validate_or_fn;
const validate = create_validator(validate_or_fn, maybe_fn);
const __ = { type: "query", id: "", name: "" };
const wrapper = (arg) => {
if (prerendering) {
throw new Error(
`Cannot call query '${__.name}' while prerendering, as prerendered pages need static data. Use 'prerender' from $app/server instead`
);
}
const { event, state } = get_request_store();
const get_remote_function_result = () => run_remote_function(event, state, false, () => validate(arg), fn);
const promise = get_response(__, arg, state, get_remote_function_result);
promise.catch(() => {
});
promise.set = (value) => update_refresh_value(get_refresh_context(__, "set", arg), value);
promise.refresh = () => {
const refresh_context = get_refresh_context(__, "refresh", arg);
const is_immediate_refresh = !refresh_context.cache[refresh_context.cache_key];
const value = is_immediate_refresh ? promise : get_remote_function_result();
return update_refresh_value(refresh_context, value, is_immediate_refresh);
};
promise.withOverride = () => {
throw new Error(`Cannot call '${__.name}.withOverride()' on the server`);
};
return (
/** @type {RemoteQuery<Output>} */
promise
);
};
Object.defineProperty(wrapper, "__", { value: __ });
return wrapper;
}
// @__NO_SIDE_EFFECTS__
function batch(validate_or_fn, maybe_fn) {
const fn = maybe_fn ?? validate_or_fn;
const validate = create_validator(validate_or_fn, maybe_fn);
const __ = {
type: "query_batch",
id: "",
name: "",
run: async (args, options) => {
const { event, state } = get_request_store();
return run_remote_function(
event,
state,
false,
async () => Promise.all(args.map(validate)),
async (input) => {
const get_result = await fn(input);
return Promise.all(
input.map(async (arg, i) => {
try {
return { type: "result", data: get_result(arg, i) };
} catch (error2) {
return {
type: "error",
error: await handle_error_and_jsonify(event, state, options, error2),
status: error2 instanceof HttpError || error2 instanceof SvelteKitError ? error2.status : 500
};
}
})
);
}
);
}
};
let batching = { args: [], resolvers: [] };
const wrapper = (arg) => {
if (prerendering) {
throw new Error(
`Cannot call query.batch '${__.name}' while prerendering, as prerendered pages need static data. Use 'prerender' from $app/server instead`
);
}
const { event, state } = get_request_store();
const get_remote_function_result = () => {
return new Promise((resolve, reject) => {
batching.args.push(arg);
batching.resolvers.push({ resolve, reject });
if (batching.args.length > 1) return;
setTimeout(async () => {
const batched = batching;
batching = { args: [], resolvers: [] };
try {
return await run_remote_function(
event,
state,
false,
async () => Promise.all(batched.args.map(validate)),
async (input) => {
const get_result = await fn(input);
for (let i = 0; i < batched.resolvers.length; i++) {
try {
batched.resolvers[i].resolve(get_result(input[i], i));
} catch (error2) {
batched.resolvers[i].reject(error2);
}
}
}
);
} catch (error2) {
for (const resolver of batched.resolvers) {
resolver.reject(error2);
}
}
}, 0);
});
};
const promise = get_response(__, arg, state, get_remote_function_result);
promise.catch(() => {
});
promise.set = (value) => update_refresh_value(get_refresh_context(__, "set", arg), value);
promise.refresh = () => {
const refresh_context = get_refresh_context(__, "refresh", arg);
const is_immediate_refresh = !refresh_context.cache[refresh_context.cache_key];
const value = is_immediate_refresh ? promise : get_remote_function_result();
return update_refresh_value(refresh_context, value, is_immediate_refresh);
};
promise.withOverride = () => {
throw new Error(`Cannot call '${__.name}.withOverride()' on the server`);
};
return (
/** @type {RemoteQuery<Output>} */
promise
);
};
Object.defineProperty(wrapper, "__", { value: __ });
return wrapper;
}
Object.defineProperty(query, "batch", { value: batch, enumerable: true });
function get_refresh_context(__, action, arg) {
const { state } = get_request_store();
const { refreshes } = state;
if (!refreshes) {
const name = __.type === "query_batch" ? `query.batch '${__.name}'` : `query '${__.name}'`;
throw new Error(
`Cannot call ${action} on ${name} because it is not executed in the context of a command/form remote function`
);
}
const cache = get_cache(__, state);
const cache_key = stringify_remote_arg(arg, state.transport);
const refreshes_key = create_remote_key(__.id, cache_key);
return { __, state, refreshes, refreshes_key, cache, cache_key };
}
function update_refresh_value({ __, refreshes, refreshes_key, cache, cache_key }, value, is_immediate_refresh = false) {
const promise = Promise.resolve(value);
if (!is_immediate_refresh) {
cache[cache_key] = promise;
}
if (__.id) {
refreshes[refreshes_key] = promise;
}
return promise.then(() => {
});
}
export {
command,
form,
prerender,
query
};
+175
View File
@@ -0,0 +1,175 @@
// this file is generated — do not edit it
/// <reference types="@sveltejs/kit" />
/**
* Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), 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).
*
* _Unlike_ [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
*
* ```ts
* import { API_KEY } from '$env/static/private';
* ```
*
* Note that all 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:
*
* ```
* MY_FEATURE_FLAG=""
* ```
*
* You can override `.env` values from the command line like so:
*
* ```sh
* MY_FEATURE_FLAG="enabled" npm run dev
* ```
*/
declare module '$env/static/private' {
export const VSCODE_GIT_IPC_AUTH_TOKEN: string;
export const TERM_PROGRAM: string;
export const NODE: string;
export const TERM: string;
export const SHELL: string;
export const HOMEBREW_REPOSITORY: string;
export const TMPDIR: string;
export const TERM_PROGRAM_VERSION: string;
export const ZDOTDIR: string;
export const CURSOR_TRACE_ID: string;
export const MallocNanoZone: string;
export const npm_config_local_prefix: string;
export const USER: string;
export const COMMAND_MODE: string;
export const SSH_AUTH_SOCK: string;
export const VSCODE_PROFILE_INITIALIZED: string;
export const __CF_USER_TEXT_ENCODING: string;
export const npm_execpath: string;
export const PATH: string;
export const npm_package_json: string;
export const _: string;
export const USER_ZDOTDIR: string;
export const __CFBundleIdentifier: string;
export const npm_command: string;
export const PWD: string;
export const npm_lifecycle_event: string;
export const npm_package_name: string;
export const LANG: string;
export const VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
export const XPC_FLAGS: string;
export const npm_package_version: string;
export const XPC_SERVICE_NAME: string;
export const VSCODE_INJECTION: string;
export const SHLVL: string;
export const HOME: string;
export const VSCODE_GIT_ASKPASS_MAIN: string;
export const HOMEBREW_PREFIX: string;
export const LOGNAME: string;
export const npm_lifecycle_script: string;
export const VSCODE_GIT_IPC_HANDLE: string;
export const npm_config_user_agent: string;
export const VSCODE_GIT_ASKPASS_NODE: string;
export const GIT_ASKPASS: string;
export const INFOPATH: string;
export const HOMEBREW_CELLAR: string;
export const OSLogRateLimit: string;
export const npm_node_execpath: string;
export const COLORTERM: string;
export const NODE_ENV: string;
}
/**
* Similar to [`$env/static/private`](https://svelte.dev/docs/kit/$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Values are replaced statically at build time.
*
* ```ts
* import { PUBLIC_BASE_URL } from '$env/static/public';
* ```
*/
declare module '$env/static/public' {
}
/**
* This module provides access to runtime environment variables, as 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`. 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).
*
* This module cannot be imported into client-side code.
*
* ```ts
* import { env } from '$env/dynamic/private';
* console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*
* > [!NOTE] In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
*/
declare module '$env/dynamic/private' {
export const env: {
VSCODE_GIT_IPC_AUTH_TOKEN: string;
TERM_PROGRAM: string;
NODE: string;
TERM: string;
SHELL: string;
HOMEBREW_REPOSITORY: string;
TMPDIR: string;
TERM_PROGRAM_VERSION: string;
ZDOTDIR: string;
CURSOR_TRACE_ID: string;
MallocNanoZone: string;
npm_config_local_prefix: string;
USER: string;
COMMAND_MODE: string;
SSH_AUTH_SOCK: string;
VSCODE_PROFILE_INITIALIZED: string;
__CF_USER_TEXT_ENCODING: string;
npm_execpath: string;
PATH: string;
npm_package_json: string;
_: string;
USER_ZDOTDIR: string;
__CFBundleIdentifier: string;
npm_command: string;
PWD: string;
npm_lifecycle_event: string;
npm_package_name: string;
LANG: string;
VSCODE_GIT_ASKPASS_EXTRA_ARGS: string;
XPC_FLAGS: string;
npm_package_version: string;
XPC_SERVICE_NAME: string;
VSCODE_INJECTION: string;
SHLVL: string;
HOME: string;
VSCODE_GIT_ASKPASS_MAIN: string;
HOMEBREW_PREFIX: string;
LOGNAME: string;
npm_lifecycle_script: string;
VSCODE_GIT_IPC_HANDLE: string;
npm_config_user_agent: string;
VSCODE_GIT_ASKPASS_NODE: string;
GIT_ASKPASS: string;
INFOPATH: string;
HOMEBREW_CELLAR: string;
OSLogRateLimit: string;
npm_node_execpath: string;
COLORTERM: string;
NODE_ENV: string;
[key: `PUBLIC_${string}`]: undefined;
[key: `${string}`]: string | undefined;
}
}
/**
* Similar to [`$env/dynamic/private`](https://svelte.dev/docs/kit/$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://svelte.dev/docs/kit/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests when possible, use `$env/static/public` instead.
*
* ```ts
* import { env } from '$env/dynamic/public';
* console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*/
declare module '$env/dynamic/public' {
export const env: {
[key: `PUBLIC_${string}`]: string | undefined;
}
}
@@ -0,0 +1,33 @@
export { matchers } from './matchers.js';
export const nodes = [
() => import('./nodes/0'),
() => import('./nodes/1'),
() => import('./nodes/2'),
() => import('./nodes/3'),
() => import('./nodes/4')
];
export const server_loads = [0];
export const dictionary = {
"/": [2],
"/login": [~4],
"/logout": [3]
};
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';
@@ -0,0 +1 @@
export const matchers = {};
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+layout.svelte";
@@ -0,0 +1 @@
export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+page.svelte";
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/logout/+page.svelte";
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/login/+page.svelte";
+33
View File
@@ -0,0 +1,33 @@
export { matchers } from './matchers.js';
export const nodes = [
() => import('./nodes/0'),
() => import('./nodes/1'),
() => import('./nodes/2'),
() => import('./nodes/3'),
() => import('./nodes/4')
];
export const server_loads = [0];
export const dictionary = {
"/": [2],
"/login": [~4],
"/logout": [~3]
};
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';
+1
View File
@@ -0,0 +1 @@
export const matchers = {};
+1
View File
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+layout.svelte";
+1
View File
@@ -0,0 +1 @@
export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
+1
View File
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/+page.svelte";
+1
View File
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/logout/+page.svelte";
+1
View File
@@ -0,0 +1 @@
export { default as component } from "../../../../src/routes/login/+page.svelte";
+3
View File
@@ -0,0 +1,3 @@
import { asClassComponent } from 'svelte/legacy';
import Root from './root.svelte';
export default asClassComponent(Root);
+68
View File
@@ -0,0 +1,68 @@
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
<svelte:options runes={true} />
<script>
import { setContext, onMount, tick } from 'svelte';
import { browser } from '$app/environment';
// stores
let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $props();
if (!browser) {
// svelte-ignore state_referenced_locally
setContext('__svelte__', stores);
}
if (browser) {
$effect.pre(() => stores.page.set(page));
} else {
// svelte-ignore state_referenced_locally
stores.page.set(page);
}
$effect(() => {
stores;page;constructors;components;form;data_0;data_1;
stores.page.notify();
});
let mounted = $state(false);
let navigated = $state(false);
let title = $state(null);
onMount(() => {
const unsubscribe = stores.page.subscribe(() => {
if (mounted) {
navigated = true;
tick().then(() => {
title = document.title || 'untitled page';
});
}
});
mounted = true;
return unsubscribe;
});
const Pyramid_1=$derived(constructors[1])
</script>
{#if constructors[1]}
{@const Pyramid_0 = constructors[0]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params}>
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params} />
</Pyramid_0>
{:else}
{@const Pyramid_0 = constructors[0]}
<!-- svelte-ignore binding_property_non_reactive -->
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params} />
{/if}
{#if mounted}
<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px">
{#if navigated}
{title}
{/if}
</div>
{/if}
+53
View File
@@ -0,0 +1,53 @@
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,
templates: {
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=5, viewport-fit=cover\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
},
version_hash: "k1vc61"
};
export async function get_hooks() {
let handle;
let handleFetch;
let handleError;
let handleValidationError;
let init;
({ handle, handleFetch, handleError, handleValidationError, init } = await import("../../../src/hooks.server.ts"));
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 };
+45
View File
@@ -0,0 +1,45 @@
// this file is generated — do not edit it
declare module "svelte/elements" {
export interface HTMLAttributes<T> {
'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" {
export interface AppTypes {
RouteId(): "/" | "/api" | "/api/darkmode" | "/login" | "/logout";
RouteParams(): {
};
LayoutParams(): {
"/": Record<string, never>;
"/api": Record<string, never>;
"/api/darkmode": Record<string, never>;
"/login": Record<string, never>;
"/logout": Record<string, never>
};
Pathname(): "/" | "/api/darkmode" | "/login" | "/logout";
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
Asset(): string & {};
}
}
@@ -0,0 +1,225 @@
{
".svelte-kit/generated/client-optimized/app.js": {
"file": "_app/immutable/entry/app.D90yBOXx.js",
"name": "entry/app",
"src": ".svelte-kit/generated/client-optimized/app.js",
"isEntry": true,
"imports": [
"_D4nn9Y_6.js",
"_nEbfNkJh.js",
"_CPmvlhtF.js",
"_Bzak7iHL.js",
"_zcqfpVBB.js",
"_BpNSSBPP.js",
"_DTd9pe6t.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/3.js",
".svelte-kit/generated/client-optimized/nodes/4.js"
]
},
".svelte-kit/generated/client-optimized/nodes/0.js": {
"file": "_app/immutable/nodes/0.DsCqkoz9.js",
"name": "nodes/0",
"src": ".svelte-kit/generated/client-optimized/nodes/0.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_Bzak7iHL.js",
"_CPmvlhtF.js",
"_nEbfNkJh.js",
"_zcqfpVBB.js",
"_Xjya7ye4.js",
"_BpNSSBPP.js",
"_CoAkxMBS.js",
"_BX9MO-1l.js",
"_CvA4ASMA.js",
"_ggIfGDPQ.js"
],
"css": [
"_app/immutable/assets/0.Ci1WSy1v.css"
]
},
".svelte-kit/generated/client-optimized/nodes/1.js": {
"file": "_app/immutable/nodes/1.CwhQAky3.js",
"name": "nodes/1",
"src": ".svelte-kit/generated/client-optimized/nodes/1.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_Bzak7iHL.js",
"_ggIfGDPQ.js",
"_nEbfNkJh.js",
"_CPmvlhtF.js",
"_BX9MO-1l.js"
]
},
".svelte-kit/generated/client-optimized/nodes/2.js": {
"file": "_app/immutable/nodes/2.B4w5AQ-r.js",
"name": "nodes/2",
"src": ".svelte-kit/generated/client-optimized/nodes/2.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_D4nn9Y_6.js",
"_Bzak7iHL.js",
"_nEbfNkJh.js",
"_zcqfpVBB.js",
"_BpNSSBPP.js",
"_uf3Is7Es.js"
],
"dynamicImports": [
"src/routes/HomeWithDialog.svelte"
]
},
".svelte-kit/generated/client-optimized/nodes/3.js": {
"file": "_app/immutable/nodes/3.sctq0uPd.js",
"name": "nodes/3",
"src": ".svelte-kit/generated/client-optimized/nodes/3.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_Bzak7iHL.js",
"_nEbfNkJh.js",
"_CoAkxMBS.js",
"_Xjya7ye4.js",
"_uf3Is7Es.js"
]
},
".svelte-kit/generated/client-optimized/nodes/4.js": {
"file": "_app/immutable/nodes/4.BG9kRLiv.js",
"name": "nodes/4",
"src": ".svelte-kit/generated/client-optimized/nodes/4.js",
"isEntry": true,
"isDynamicEntry": true,
"imports": [
"_Bzak7iHL.js",
"_nEbfNkJh.js",
"_CPmvlhtF.js",
"_zcqfpVBB.js",
"_BpNSSBPP.js",
"_CoAkxMBS.js",
"_Xjya7ye4.js",
"_uf3Is7Es.js",
"_CvA4ASMA.js",
"_DTd9pe6t.js"
]
},
"_BX9MO-1l.js": {
"file": "_app/immutable/chunks/BX9MO-1l.js",
"name": "entry",
"imports": [
"_CPmvlhtF.js",
"_nEbfNkJh.js"
]
},
"_BpNSSBPP.js": {
"file": "_app/immutable/chunks/BpNSSBPP.js",
"name": "svelte-component",
"imports": [
"_nEbfNkJh.js",
"_zcqfpVBB.js"
]
},
"_Bzak7iHL.js": {
"file": "_app/immutable/chunks/Bzak7iHL.js",
"name": "disclose-version"
},
"_CPmvlhtF.js": {
"file": "_app/immutable/chunks/CPmvlhtF.js",
"name": "index-client",
"imports": [
"_nEbfNkJh.js"
]
},
"_CoAkxMBS.js": {
"file": "_app/immutable/chunks/CoAkxMBS.js",
"name": "forms",
"imports": [
"_nEbfNkJh.js",
"_BX9MO-1l.js"
]
},
"_CvA4ASMA.js": {
"file": "_app/immutable/chunks/CvA4ASMA.js",
"name": "label",
"imports": [
"_nEbfNkJh.js",
"_Bzak7iHL.js",
"_BpNSSBPP.js",
"_zcqfpVBB.js",
"_Xjya7ye4.js"
]
},
"_D4nn9Y_6.js": {
"file": "_app/immutable/chunks/D4nn9Y_6.js",
"name": "preload-helper"
},
"_DTd9pe6t.js": {
"file": "_app/immutable/chunks/DTd9pe6t.js",
"name": "this",
"imports": [
"_nEbfNkJh.js"
]
},
"_Xjya7ye4.js": {
"file": "_app/immutable/chunks/Xjya7ye4.js",
"name": "utils",
"imports": [
"_nEbfNkJh.js",
"_zcqfpVBB.js"
]
},
"_ggIfGDPQ.js": {
"file": "_app/immutable/chunks/ggIfGDPQ.js",
"name": "legacy",
"imports": [
"_nEbfNkJh.js"
]
},
"_nEbfNkJh.js": {
"file": "_app/immutable/chunks/nEbfNkJh.js",
"name": "template"
},
"_uf3Is7Es.js": {
"file": "_app/immutable/chunks/uf3Is7Es.js",
"name": "button",
"imports": [
"_Bzak7iHL.js",
"_Xjya7ye4.js",
"_nEbfNkJh.js",
"_zcqfpVBB.js",
"_DTd9pe6t.js"
]
},
"_zcqfpVBB.js": {
"file": "_app/immutable/chunks/zcqfpVBB.js",
"name": "props",
"imports": [
"_nEbfNkJh.js"
]
},
"node_modules/@sveltejs/kit/src/runtime/client/entry.js": {
"file": "_app/immutable/entry/start.DoE5rVjp.js",
"name": "entry/start",
"src": "node_modules/@sveltejs/kit/src/runtime/client/entry.js",
"isEntry": true,
"imports": [
"_BX9MO-1l.js"
]
},
"src/routes/HomeWithDialog.svelte": {
"file": "_app/immutable/chunks/D8bjufgL.js",
"name": "HomeWithDialog",
"src": "src/routes/HomeWithDialog.svelte",
"isDynamicEntry": true,
"imports": [
"_Bzak7iHL.js",
"_nEbfNkJh.js",
"_uf3Is7Es.js"
]
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{d as s,h as c,e as m,E as h}from"./nEbfNkJh.js";import{B as i}from"./zcqfpVBB.js";function E(n,r,e){c&&m();var o=new i(n);s(()=>{var a=r()??null;o.ensure(a,a&&(t=>e(t,a)))},h)}export{E as c};
@@ -0,0 +1 @@
var e;typeof window<"u"&&((e=window.__svelte??(window.__svelte={})).v??(e.v=new Set)).add("5");
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{g as E,u as L}from"./nEbfNkJh.js";import{i as x,a as T,p as k,b as H}from"./BX9MO-1l.js";function C(t,r,i){E(()=>{var o=L(()=>r(t,i==null?void 0:i())||{});if(o!=null&&o.destroy)return()=>o.destroy()})}function M(t){const r=JSON.parse(t);return r.data&&(r.data=k(r.data,H.decoders)),r}function d(t){return HTMLElement.prototype.cloneNode.call(t)}function N(t,r=()=>{}){const i=async({action:e,result:l,reset:n=!0,invalidateAll:c=!0})=>{l.type==="success"&&(n&&HTMLFormElement.prototype.reset.call(t),c&&await x()),(location.origin+location.pathname===e.origin+e.pathname||l.type==="redirect"||l.type==="error")&&await T(l)};async function o(e){var f,b,y;if(((f=e.submitter)!=null&&f.hasAttribute("formmethod")?e.submitter.formMethod:d(t).method)!=="post")return;e.preventDefault();const n=new URL((b=e.submitter)!=null&&b.hasAttribute("formaction")?e.submitter.formAction:d(t).action),c=(y=e.submitter)!=null&&y.hasAttribute("formenctype")?e.submitter.formEnctype:d(t).enctype,m=new FormData(t,e.submitter),u=new AbortController;let p=!1;const w=await r({action:n,cancel:()=>p=!0,controller:u,formData:m,formElement:t,submitter:e.submitter})??i;if(p)return;let s;try{const a=new Headers({accept:"application/json","x-sveltekit-action":"true"});c!=="multipart/form-data"&&a.set("Content-Type",/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(c)?c:"application/x-www-form-urlencoded");const A=c==="multipart/form-data"?m:new URLSearchParams(m),h=await fetch(n,{method:"POST",headers:a,cache:"no-store",body:A,signal:u.signal});s=M(await h.text()),s.type==="error"&&(s.status=h.status)}catch(a){if((a==null?void 0:a.name)==="AbortError")return;s={type:"error",error:a}}await w({action:n,formData:m,formElement:t,update:a=>i({action:n,result:s,reset:a==null?void 0:a.reset,invalidateAll:a==null?void 0:a.invalidateAll}),result:s})}return HTMLFormElement.prototype.addEventListener.call(t,"submit",o),{destroy(){HTMLFormElement.prototype.removeEventListener.call(t,"submit",o)}}}export{C as a,N as e};
@@ -0,0 +1,5 @@
var ae=Object.defineProperty;var X=e=>{throw TypeError(e)};var ce=(e,t,n)=>t in e?ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>ce(e,typeof t!="symbol"?t+"":t,n),Y=(e,t,n)=>t.has(e)||X("Cannot "+n);var y=(e,t,n)=>(Y(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?X("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),j=(e,t,n,r)=>(Y(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{b6 as ue,bi as q,h as Q,i as J,aG as _,az as le,u as W,bj as fe,p as E,P as I,aZ as de,aN as pe,aO as ee,bk as me,Q as te,N as M,O as V,a as O,R as ne,c as he,aF as be,r as ve,f as ye}from"./nEbfNkJh.js";import"./Bzak7iHL.js";import{c as ge}from"./BpNSSBPP.js";import{p as B,i as Ee,r as re,s as _e}from"./zcqfpVBB.js";import{f as P,b as D,a as Se,c as we}from"./Xjya7ye4.js";function Ae(){return Symbol(ue)}function vt(e,t,n=t){var r=new WeakSet;q(e,"input",async o=>{var s=o?e.defaultValue:e.value;if(s=L(e)?N(s):s,n(s),_!==null&&r.add(_),await le(),s!==(s=t())){var a=e.selectionStart,u=e.selectionEnd,f=e.value.length;if(e.value=s??"",u!==null){var l=e.value.length;a===u&&u===f&&l>f?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=a,e.selectionEnd=Math.min(u,l))}}}),(Q&&e.defaultValue!==e.value||W(t)==null&&e.value)&&(n(L(e)?N(e.value):e.value),_!==null&&r.add(_)),J(()=>{var o=t();if(e===document.activeElement){var s=fe??_;if(r.has(s))return}L(e)&&o===N(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function L(e){var t=e.type;return t==="number"||t==="range"}function N(e){return e===""?null:+e}function yt(e,t,n=t){q(e,"change",()=>{n(e.files)}),Q&&e.files&&n(e.files),J(()=>{e.files=t()})}function Te(e){return typeof e=="function"}function xe(e){return e!==null&&typeof e=="object"}const ke=["string","number","bigint","boolean"];function C(e){return e==null||ke.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>C(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const S=Symbol("box"),U=Symbol("is-writable");function F(e,t){const n=I(e);return t?{[S]:!0,[U]:!0,get current(){return E(n)},set current(r){t(r)}}:{[S]:!0,get current(){return e()}}}function R(e){return xe(e)&&S in e}function oe(e){return R(e)&&U in e}function gt(e){return R(e)?e:Te(e)?F(e):Oe(e)}function Et(e){return Object.entries(e).reduce((t,[n,r])=>R(r)?(oe(r)?Object.defineProperty(t,n,{get(){return r.current},set(o){r.current=o}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function _t(e){return oe(e)?{[S]:!0,get current(){return e.current}}:e}function Oe(e){let t=de(pe(e));return{[S]:!0,[U]:!0,get current(){return E(t)},set current(n){ee(t,n,!0)}}}function Ie(...e){return function(t){var n;for(const r of e)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):(n=r.current)==null||n.call(this,t)}}}var z=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Re=/\n/g,je=/^\s*/,Pe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Le=/^:\s*/,Ne=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,We=/^[;\s]*/,Me=/^\s+|\s+$/g,Ve=`
`,K="/",$="*",v="",Be="comment",Ce="declaration";function Fe(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(c){var i=c.match(Re);i&&(n+=i.length);var h=c.lastIndexOf(Ve);r=~h?c.length-h:r+c.length}function s(){var c={line:n,column:r};return function(i){return i.position=new a(c),l(),i}}function a(c){this.start=c,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(c){var i=new Error(t.source+":"+n+":"+r+": "+c);if(i.reason=c,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function f(c){var i=c.exec(e);if(i){var h=i[0];return o(h),e=e.slice(h.length),i}}function l(){f(je)}function m(c){var i;for(c=c||[];i=b();)i!==!1&&c.push(i);return c}function b(){var c=s();if(!(K!=e.charAt(0)||$!=e.charAt(1))){for(var i=2;v!=e.charAt(i)&&($!=e.charAt(i)||K!=e.charAt(i+1));)++i;if(i+=2,v===e.charAt(i-1))return u("End of comment missing");var h=e.slice(2,i-2);return r+=2,o(h),e=e.slice(i),r+=2,c({type:Be,comment:h})}}function p(){var c=s(),i=f(Pe);if(i){if(b(),!f(Le))return u("property missing ':'");var h=f(Ne),ie=c({type:Ce,property:Z(i[0].replace(z,v)),value:h?Z(h[0].replace(z,v)):v});return f(We),ie}}function d(){var c=[];m(c);for(var i;i=p();)i!==!1&&(c.push(i),m(c));return c}return l(),d()}function Z(e){return e?e.replace(Me,v):v}function Ge(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Fe(e),o=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;o?t(a,u,s):u&&(n=n||{},n[a]=u)}),n}const Ue=/\d/,He=["-","_","/","."];function Xe(e=""){if(!Ue.test(e))return e!==e.toLowerCase()}function Ye(e){const t=[];let n="",r,o;for(const s of e){const a=He.includes(s);if(a===!0){t.push(n),n="",r=void 0;continue}const u=Xe(s);if(o===!1){if(r===!1&&u===!0){t.push(n),n=s,r=u;continue}if(r===!0&&u===!1&&n.length>1){const f=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=f+s,r=u;continue}}n+=s,r=u,o=a}return t.push(n),t}function se(e){return e?Ye(e).map(t=>ze(t)).join(""):""}function De(e){return Ke(se(e||""))}function ze(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ke(e){return e?e[0].toLowerCase()+e.slice(1):""}function k(e){if(!e)return{};const t={};function n(r,o){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[se(r)]=o;return}if(r.startsWith("--")){t[r]=o;return}t[De(r)]=o}return Ge(e,n),t}function $e(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function Ze(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const qe=Ze(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Qe(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${qe(t)}: ${e[t]};`).join(`
`)}function Je(e={}){return Qe(e).replace(`
`," ")}const et=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],tt=new Set(et);function nt(e){return tt.has(e)}function rt(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const o of Object.keys(r)){const s=t[o],a=r[o],u=typeof s=="function",f=typeof a=="function";if(u&&nt(o)){const l=s,m=a;t[o]=Ie(l,m)}else if(u&&f)t[o]=$e(s,a);else if(o==="class"){const l=C(s),m=C(a);l&&m?t[o]=P(s,a):l?t[o]=P(s):m&&(t[o]=P(a))}else if(o==="style"){const l=typeof s=="object",m=typeof a=="object",b=typeof s=="string",p=typeof a=="string";if(l&&m)t[o]={...s,...a};else if(l&&p){const d=k(a);t[o]={...s,...d}}else if(b&&m){const d=k(s);t[o]={...d,...a}}else if(b&&p){const d=k(s),c=k(a);t[o]={...d,...c}}else l?t[o]=s:m?t[o]=a:b?t[o]=s:p&&(t[o]=a)}else t[o]=a!==void 0?a:s}for(const o of Object.getOwnPropertySymbols(r)){const s=t[o],a=r[o];t[o]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=Je(t.style).replaceAll(`
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}function ot(e,t){return{[Ae()]:n=>R(e)?(e.current=n,W(()=>t==null?void 0:t(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t==null||t(null))}):(e(n),W(()=>t==null?void 0:t(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t==null||t(null))})}}function St(e){return e?"true":"false"}function wt(e){return e?"":void 0}function At(e){return e?!0:void 0}function Tt(e){return e?"open":"closed"}function xt(e){return e?"checked":"unchecked"}function kt(e,t){return e?"true":"false"}var g,w;class st{constructor(t){x(this,g);x(this,w);T(this,"attrs");j(this,g,t.getVariant?t.getVariant():null),j(this,w,y(this,g)?`data-${y(this,g)}-`:`data-${t.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${y(this,w)}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}g=new WeakMap,w=new WeakMap;function it(e){const t=new st(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}function at(e,t){return`bits-${e}`}const ct=it({component:"label",parts:["root"]});var A;const H=class H{constructor(t){T(this,"opts");T(this,"attachment");x(this,A,I(()=>({id:this.opts.id.current,[ct.root]:"",onmousedown:this.onmousedown,...this.attachment})));this.opts=t,this.attachment=ot(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}static create(t){return new H(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return E(y(this,A))}set props(t){ee(y(this,A),t)}};A=new WeakMap;let G=H;var ut=ye("<label><!></label>");function lt(e,t){const n=me();te(t,!0);let r=B(t,"id",19,()=>at(n)),o=B(t,"ref",15,null),s=re(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=G.create({id:F(()=>r()),ref:F(()=>o(),p=>o(p))}),u=I(()=>rt(s,a.props,{for:t.for}));var f=M(),l=V(f);{var m=p=>{var d=M(),c=V(d);D(c,()=>t.child,()=>({props:E(u)})),O(p,d)},b=p=>{var d=ut();Se(d,()=>({...E(u),for:t.for}));var c=he(d);D(c,()=>t.children??be),ve(d),O(p,d)};Ee(l,p=>{t.child?p(m):p(b,!1)})}O(e,f),ne()}function Ot(e,t){te(t,!0);let n=B(t,"ref",15,null),r=re(t,["$$slots","$$events","$$legacy","ref","class"]);var o=M(),s=V(o);{let a=I(()=>we("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t.class));ge(s,()=>lt,(u,f)=>{f(u,_e({"data-slot":"label",get class(){return E(a)}},()=>r,{get ref(){return n()},set ref(l){n(l)}}))})}O(e,o),ne()}export{S as B,Ot as L,vt as a,yt as b,gt as c,F as d,Et as e,R as f,oe as g,xe as h,U as i,$e as j,ot as k,Tt as l,wt as m,St as n,it as o,Oe as p,Ie as q,at as r,Je as s,_t as t,rt as u,k as v,xt as w,kt as x,At as y};
@@ -0,0 +1 @@
const y="modulepreload",P=function(f,a){return new URL(f,a).href},E={},g=function(a,u,d){let h=Promise.resolve();if(u&&u.length>0){let o=function(e){return Promise.all(e.map(r=>Promise.resolve(r).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};const t=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),v=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));h=o(u.map(e=>{if(e=P(e,d),e in E)return;E[e]=!0;const r=e.endsWith(".css"),l=r?'[rel="stylesheet"]':"";if(d)for(let i=t.length-1;i>=0;i--){const c=t[i];if(c.href===e&&(!r||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${l}`))return;const n=document.createElement("link");if(n.rel=r?"stylesheet":y,r||(n.as="script"),n.crossOrigin="",n.href=e,v&&n.setAttribute("nonce",v),document.head.appendChild(n),r)return new Promise((i,c)=>{n.addEventListener("load",i),n.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${e}`)))})}))}function m(o){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=o,window.dispatchEvent(t),!t.defaultPrevented)throw o}return h.then(o=>{for(const t of o||[])t.status==="rejected"&&m(t.reason);return a().catch(m)})};export{g as _};
@@ -0,0 +1 @@
import"./Bzak7iHL.js";import{s,c as e,n as o,b as n,a as t,r as l,f as k}from"./nEbfNkJh.js";import{B as c}from"./uf3Is7Es.js";var g=k('<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6"><h1 class="text-2xl font-semibold">Base</h1> <div class="flex w-full max-w-xs flex-col gap-3"><a href="https://prism.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer"><!></a> <a href="https://tasgrid.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer"><!></a> <a href="https://stackq.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer"><!></a> <a href="https://hrm.ccllc.pro" class="block" target="_blank" rel="noopener noreferrer"><!></a></div></main>');function H(u,w){var i=g(),d=s(e(i),2),f=e(d),$=e(f);c($,{class:"h-12 w-full min-h-12",children:(r,m)=>{o();var a=n("Prism");t(r,a)},$$slots:{default:!0}}),l(f);var p=s(f,2),x=e(p);c(x,{class:"h-12 min-h-12 w-full",variant:"outline",children:(r,m)=>{o();var a=n("TasGrid");t(r,a)},$$slots:{default:!0}}),l(p);var h=s(p,2),_=e(h);c(_,{class:"h-12 min-h-12 w-full",variant:"outline",children:(r,m)=>{o();var a=n("Stackq");t(r,a)},$$slots:{default:!0}}),l(h);var v=s(h,2),b=e(v);c(b,{class:"h-12 min-h-12 w-full",variant:"outline",children:(r,m)=>{o();var a=n("HRM");t(r,a)},$$slots:{default:!0}}),l(v),l(d),l(i),t(u,i)}export{H as default};
@@ -0,0 +1 @@
import{g as S,i as h,u as k,q,S as T}from"./nEbfNkJh.js";function t(r,i){return r===i||(r==null?void 0:r[T])===i}function A(r={},i,a,c){return S(()=>{var f,s;return h(()=>{f=s,s=[],k(()=>{r!==a(...s)&&(i(r,...s),f&&t(a(...f),r)&&i(null,...f))})}),()=>{q(()=>{s&&t(a(...s),r)&&i(null,...s)})}}),r}export{A as b};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{j as d,k as g,l as c,u as m,m as i,o as b,p,v,w as k,x as h}from"./nEbfNkJh.js";function y(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let o=0,t={};const _=k(()=>{let l=!1;const r=s.s;for(const a in r)r[a]!==t[a]&&(t[a]=r[a],l=!0);return l&&o++,o});f=()=>p(_)}e.b.length&&g(()=>{u(s,f),i(e.b)}),c(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}h();export{y as i};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
var q=Object.defineProperty;var B=t=>{throw TypeError(t)};var z=(t,e,s)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var Y=(t,e,s)=>z(t,typeof e!="symbol"?e+"":e,s),j=(t,e,s)=>e.has(t)||B("Cannot "+s);var n=(t,e,s)=>(j(t,e,"read from private field"),s?s.call(t):e.get(t)),v=(t,e,s)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),C=(t,e,s,r)=>(j(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);import{aG as F,aH as J,ab as I,$ as Q,_ as H,Z as K,h as x,W as V,a0 as k,aI as ee,d as te,e as se,E as re,aJ as ne,aj as ie,H as ae,B as fe,A as oe,C as U,aK as y,aL as ue,aM as ce,p as D,aN as le,aO as de,X as he,aP as _e,aQ as pe,u as ve,ay as be,aR as ge,aS as Se,w as me,aT as Pe,aU as we,aV as Ae,S as $,aW as G,aX as P}from"./nEbfNkJh.js";var d,h,l,b,w,A,O;class Re{constructor(e,s=!0){Y(this,"anchor");v(this,d,new Map);v(this,h,new Map);v(this,l,new Map);v(this,b,new Set);v(this,w,!0);v(this,A,()=>{var e=F;if(n(this,d).has(e)){var s=n(this,d).get(e),r=n(this,h).get(s);if(r)J(r),n(this,b).delete(s);else{var i=n(this,l).get(s);i&&(n(this,h).set(s,i.effect),n(this,l).delete(s),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,o]of n(this,d)){if(n(this,d).delete(a),a===e)break;const f=n(this,l).get(o);f&&(I(f.effect),n(this,l).delete(o))}for(const[a,o]of n(this,h)){if(a===s||n(this,b).has(a))continue;const f=()=>{if(Array.from(n(this,d).values()).includes(a)){var _=document.createDocumentFragment();k(o,_),_.append(H()),n(this,l).set(a,{effect:o,fragment:_})}else I(o);n(this,b).delete(a),n(this,h).delete(a)};n(this,w)||!r?(n(this,b).add(a),Q(o,f,!1)):f()}}});v(this,O,e=>{n(this,d).delete(e);const s=Array.from(n(this,d).values());for(const[r,i]of n(this,l))s.includes(r)||(I(i.effect),n(this,l).delete(r))});this.anchor=e,C(this,w,s)}ensure(e,s){var r=F,i=ee();if(s&&!n(this,h).has(e)&&!n(this,l).has(e))if(i){var a=document.createDocumentFragment(),o=H();a.append(o),n(this,l).set(e,{effect:K(()=>s(o)),fragment:a})}else n(this,h).set(e,K(()=>s(this.anchor)));if(n(this,d).set(r,e),i){for(const[f,u]of n(this,h))f===e?r.unskip_effect(u):r.skip_effect(u);for(const[f,u]of n(this,l))f===e?r.unskip_effect(u.effect):r.skip_effect(u.effect);r.oncommit(n(this,A)),r.ondiscard(n(this,O))}else x&&(this.anchor=V),n(this,A).call(this)}}d=new WeakMap,h=new WeakMap,l=new WeakMap,b=new WeakMap,w=new WeakMap,A=new WeakMap,O=new WeakMap;function xe(t,e,s=!1){x&&se();var r=new Re(t),i=s?re:0;function a(o,f){if(x){const p=ne(t);var u;if(p===ie?u=0:p===ae?u=!1:u=parseInt(p.substring(1)),o!==u){var _=fe();oe(_),r.anchor=_,U(!1),r.ensure(o,f),U(!0);return}}r.ensure(o,f)}te(()=>{var o=!1;e((f,u=0)=>{o=!0,a(u,f)}),o||a(!1,null)},i)}let T=!1;function Te(t){var e=T;try{return T=!1,[t(),T]}finally{T=e}}const Oe={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function ye(t,e,s){return new Proxy({props:t,exclude:e},Oe)}const Ee={get(t,e){let s=t.props.length;for(;s--;){let r=t.props[s];if(P(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r)return r[e]}},set(t,e,s){let r=t.props.length;for(;r--;){let i=t.props[r];P(i)&&(i=i());const a=y(i,e);if(a&&a.set)return a.set(s),!0}return!1},getOwnPropertyDescriptor(t,e){let s=t.props.length;for(;s--;){let r=t.props[s];if(P(r)&&(r=r()),typeof r=="object"&&r!==null&&e in r){const i=y(r,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(t,e){if(e===$||e===G)return!1;for(let s of t.props)if(P(s)&&(s=s()),s!=null&&e in s)return!0;return!1},ownKeys(t){const e=[];for(let s of t.props)if(P(s)&&(s=s()),!!s){for(const r in s)e.includes(r)||e.push(r);for(const r of Object.getOwnPropertySymbols(s))e.includes(r)||e.push(r)}return e}};function Le(...t){return new Proxy({props:t},Ee)}function Me(t,e,s,r){var M;var i=!be||(s&ge)!==0,a=(s&pe)!==0,o=(s&we)!==0,f=r,u=!0,_=()=>(u&&(u=!1,f=o?ve(r):r),f),p;if(a){var W=$ in t||G in t;p=((M=y(t,e))==null?void 0:M.set)??(W&&e in t?c=>t[e]=c:void 0)}var S,L=!1;a?[S,L]=Te(()=>t[e]):S=t[e],S===void 0&&r!==void 0&&(S=_(),p&&(i&&ue(),p(S)));var g;if(i?g=()=>{var c=t[e];return c===void 0?_():(u=!0,c)}:g=()=>{var c=t[e];return c!==void 0&&(f=void 0),c===void 0?f:c},i&&(s&ce)===0)return g;if(p){var X=t.$$legacy;return(function(c,R){return arguments.length>0?((!i||!R||X||L)&&p(R?g():c),c):g()})}var E=!1,m=((s&Se)!==0?me:Pe)(()=>(E=!1,g()));a&&D(m);var Z=he;return(function(c,R){if(arguments.length>0){const N=R?D(m):i&&a?le(c):c;return de(m,N),E=!0,f!==void 0&&(f=N),c}return Ae&&E||(Z.f&_e)!==0?m.v:D(m)})}export{Re as B,xe as i,Me as p,ye as r,Le as s};
@@ -0,0 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DsCqkoz9.js","../chunks/Bzak7iHL.js","../chunks/CPmvlhtF.js","../chunks/nEbfNkJh.js","../chunks/zcqfpVBB.js","../chunks/Xjya7ye4.js","../chunks/BpNSSBPP.js","../chunks/CoAkxMBS.js","../chunks/BX9MO-1l.js","../chunks/CvA4ASMA.js","../chunks/ggIfGDPQ.js","../assets/0.Ci1WSy1v.css","../nodes/1.CwhQAky3.js","../nodes/2.B4w5AQ-r.js","../chunks/D4nn9Y_6.js","../chunks/uf3Is7Es.js","../chunks/DTd9pe6t.js","../nodes/3.sctq0uPd.js","../nodes/4.BG9kRLiv.js"])))=>i.map(i=>d[i]);
var M=e=>{throw TypeError(e)};var Y=(e,t,r)=>t.has(e)||M("Cannot "+r);var o=(e,t,r)=>(Y(e,t,"read from private field"),r?r.call(e):t.get(e)),L=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),j=(e,t,r,n)=>(Y(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{_ as O}from"../chunks/D4nn9Y_6.js";import{aO as x,aW as F,p as l,J as H,aY as K,L as U,Q as X,k as $,l as tt,az as et,O as R,s as rt,a as y,R as at,aZ as k,N as w,c as st,r as ot,f as z,P as A,b as nt,t as ct}from"../chunks/nEbfNkJh.js";import{h as it,m as ut,u as mt,o as lt,s as dt}from"../chunks/CPmvlhtF.js";import"../chunks/Bzak7iHL.js";import{p,i as D}from"../chunks/zcqfpVBB.js";import{c as I}from"../chunks/BpNSSBPP.js";import{b as T}from"../chunks/DTd9pe6t.js";function ft(e){return class extends _t{constructor(t){super({component:e,...t})}}}var d,i;class _t{constructor(t){L(this,d);L(this,i);var v;var r=new Map,n=(a,s)=>{var f=U(s,!1,!1);return r.set(a,f),f};const m=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===F?!0:(l(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,f){return x(r.get(s)??n(s,f),f),Reflect.set(a,s,f)}});j(this,i,(t.hydrate?it:ut)(t.component,{target:t.target,anchor:t.anchor,props:m,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((v=t==null?void 0:t.props)!=null&&v.$$host)||t.sync===!1)&&H(),j(this,d,m.$$events);for(const a of Object.keys(o(this,i)))a==="$set"||a==="$destroy"||a==="$on"||K(this,a,{get(){return o(this,i)[a]},set(s){o(this,i)[a]=s},enumerable:!0});o(this,i).$set=a=>{Object.assign(m,a)},o(this,i).$destroy=()=>{mt(o(this,i))}}$set(t){o(this,i).$set(t)}$on(t,r){o(this,d)[t]=o(this,d)[t]||[];const n=(...m)=>r.call(this,...m);return o(this,d)[t].push(n),()=>{o(this,d)[t]=o(this,d)[t].filter(m=>m!==n)}}$destroy(){o(this,i).$destroy()}}d=new WeakMap,i=new WeakMap;const wt={};var ht=z('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),gt=z("<!> <!>",1);function vt(e,t){X(t,!0);let r=p(t,"components",23,()=>[]),n=p(t,"data_0",3,null),m=p(t,"data_1",3,null);$(()=>t.stores.page.set(t.page)),tt(()=>{t.stores,t.page,t.constructors,r(),t.form,n(),m(),t.stores.page.notify()});let v=k(!1),a=k(!1),s=k(null);lt(()=>{const c=t.stores.page.subscribe(()=>{l(v)&&(x(a,!0),et().then(()=>{x(s,document.title||"untitled page",!0)}))});return x(v,!0),c});const f=A(()=>t.constructors[1]);var V=gt(),C=R(V);{var J=c=>{const _=A(()=>t.constructors[0]);var h=w(),E=R(h);I(E,()=>l(_),(g,b)=>{T(b(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(u,yt)=>{var S=w(),Z=R(S);I(Z,()=>l(f),(q,B)=>{T(B(q,{get data(){return m()},get form(){return t.form},get params(){return t.page.params}}),P=>r()[1]=P,()=>{var P;return(P=r())==null?void 0:P[1]})}),y(u,S)},$$slots:{default:!0}}),u=>r()[0]=u,()=>{var u;return(u=r())==null?void 0:u[0]})}),y(c,h)},N=c=>{const _=A(()=>t.constructors[0]);var h=w(),E=R(h);I(E,()=>l(_),(g,b)=>{T(b(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>{var u;return(u=r())==null?void 0:u[0]})}),y(c,h)};D(C,c=>{t.constructors[1]?c(J):c(N,!1)})}var Q=rt(C,2);{var W=c=>{var _=ht(),h=st(_);{var E=g=>{var b=nt();ct(()=>dt(b,l(s))),y(g,b)};D(h,g=>{l(a)&&g(E)})}ot(_),y(c,_)};D(Q,c=>{l(v)&&c(W)})}y(e,V),at()}const At=ft(vt),pt=[()=>O(()=>import("../nodes/0.DsCqkoz9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),()=>O(()=>import("../nodes/1.CwhQAky3.js"),__vite__mapDeps([12,1,10,3,2,8]),import.meta.url),()=>O(()=>import("../nodes/2.B4w5AQ-r.js"),__vite__mapDeps([13,14,1,3,4,6,15,5,16]),import.meta.url),()=>O(()=>import("../nodes/3.sctq0uPd.js"),__vite__mapDeps([17,1,3,7,8,2,5,4,15,16]),import.meta.url),()=>O(()=>import("../nodes/4.BG9kRLiv.js"),__vite__mapDeps([18,1,3,2,4,6,7,8,5,15,16,9]),import.meta.url)],Dt=[0],It={"/":[2],"/login":[-5],"/logout":[3]},G={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},bt=Object.fromEntries(Object.entries(G.transport).map(([e,t])=>[e,t.decode])),Tt=Object.fromEntries(Object.entries(G.transport).map(([e,t])=>[e,t.encode])),Vt=!1,Ct=(e,t)=>bt[e](t);export{Ct as decode,bt as decoders,It as dictionary,Tt as encoders,Vt as hash,G as hooks,wt as matchers,pt as nodes,At as root,Dt as server_loads};
@@ -0,0 +1 @@
import{l as o,e as r}from"../chunks/BX9MO-1l.js";export{o as load_css,r as start};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import"../chunks/Bzak7iHL.js";import{i as h}from"../chunks/ggIfGDPQ.js";import{Q as g,O as l,t as v,a as d,R as _,f as x,c as e,r as o,s as $}from"../chunks/nEbfNkJh.js";import{s as p}from"../chunks/CPmvlhtF.js";import{s as k,c as m}from"../chunks/BX9MO-1l.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const i=b;var E=x("<h1> </h1> <p> </p>",1);function w(c,f){g(f,!1),h();var t=E(),r=l(t),n=e(r,!0);o(r);var s=$(r,2),u=e(s,!0);o(s),v(()=>{var a;p(n,i.status),p(u,(a=i.error)==null?void 0:a.message)}),d(c,t),_()}export{w as component};
@@ -0,0 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/D8bjufgL.js","../chunks/Bzak7iHL.js","../chunks/nEbfNkJh.js","../chunks/uf3Is7Es.js","../chunks/Xjya7ye4.js","../chunks/zcqfpVBB.js","../chunks/DTd9pe6t.js"])))=>i.map(i=>d[i]);
import{_ as B}from"../chunks/D4nn9Y_6.js";import"../chunks/Bzak7iHL.js";import{h as d,e as P,y as w,d as O,z as T,H as R,A as S,B as W,C as D,q,D as I,F as G,G as M,I as U,J as $,K as b,U as j,L as k,M as z,N as x,O as E,a as p,p as N,P as A,f as C}from"../chunks/nEbfNkJh.js";import{B as F,i as J}from"../chunks/zcqfpVBB.js";import{c as K}from"../chunks/BpNSSBPP.js";import"../chunks/uf3Is7Es.js";const L=0,H=1;function V(v,g,m,t,u){d&&P();var i=w(),e=j,o=i?b(e):k(e,!1,!1),r=i?b(e):k(e,!1,!1),a=new F(v);O(()=>{var n=g(),c=!1;let f=d&&T(n)===(v.data===R);if(f&&(S(W()),D(!1)),T(n)){var h=z(),l=!1;const s=_=>{if(!c){l=!0,h(!1),G.ensure(),d&&D(!1);try{_()}finally{M(),U||$()}}};n.then(_=>{s(()=>{I(o,_),a.ensure(H,t&&(y=>t(y,o)))})},_=>{s(()=>{if(I(r,_),a.ensure(H,u&&(y=>u(y,r))),!u)throw r.v})}),d?a.ensure(L,m):q(()=>{l||s(()=>{a.ensure(L,m)})})}else I(o,n),a.ensure(H,t&&(s=>t(s,o)));return f&&D(!0),()=>{c=!0}})}var Y=C('<main class="flex min-h-0 flex-1 flex-col items-center justify-center gap-6 p-6"><p class="text-muted-foreground">Loading…</p></main>');function sa(v,g){var m=x(),t=E(m);{var u=i=>{var e=x(),o=E(e);V(o,()=>B(()=>import("../chunks/D8bjufgL.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),r=>{var a=Y();p(r,a)},(r,a)=>{var n=A(()=>{var{default:l}=N(a);return{HomeWithDialog:l}}),c=A(()=>N(n).HomeWithDialog),f=x(),h=E(f);K(h,()=>N(c),(l,s)=>{s(l,{get data(){return g.data}})}),p(r,f)}),p(i,e)};J(t,i=>{i(u)})}p(v,m)}export{sa as component};
@@ -0,0 +1 @@
import"../chunks/Bzak7iHL.js";import{t as c,a as r,f as l,c as s,n as d,b as u,r as m}from"../chunks/nEbfNkJh.js";import{a as v,e as h}from"../chunks/CoAkxMBS.js";import{s as x}from"../chunks/Xjya7ye4.js";import{B as $}from"../chunks/uf3Is7Es.js";var _=l('<div class="app-shell flex items-center justify-center min-h-[200px]"><form method="POST"><!></form></div>');function j(i,n){var e=_(),t=s(e),f=s(t);$(f,{type:"submit",children:(o,a)=>{d();var p=u("Log out");r(o,p)},$$slots:{default:!0}}),m(t),v(t,o=>{var a;return(a=h)==null?void 0:a(o)}),m(e),c(()=>x(t,"action",n.formAction)),r(i,e)}export{j as component};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":"1771448604064"}
File diff suppressed because one or more lines are too long
+62
View File
@@ -0,0 +1,62 @@
export const manifest = (() => {
function __memo(fn) {
let value;
return () => value ??= (value = fn());
}
return {
appDir: "_app",
appPath: "_app",
assets: new Set([]),
mimeTypes: {},
_: {
client: {start:"_app/immutable/entry/start.DoE5rVjp.js",app:"_app/immutable/entry/app.D90yBOXx.js",imports:["_app/immutable/entry/start.DoE5rVjp.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/entry/app.D90yBOXx.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/DTd9pe6t.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
nodes: [
__memo(() => import('./nodes/0.js')),
__memo(() => import('./nodes/1.js')),
__memo(() => import('./nodes/2.js')),
__memo(() => import('./nodes/3.js')),
__memo(() => import('./nodes/4.js'))
],
remotes: {
},
routes: [
{
id: "/",
pattern: /^\/$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 2 },
endpoint: null
},
{
id: "/api/darkmode",
pattern: /^\/api\/darkmode\/?$/,
params: [],
page: null,
endpoint: __memo(() => import('./entries/endpoints/api/darkmode/_server.ts.js'))
},
{
id: "/login",
pattern: /^\/login\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 4 },
endpoint: null
},
{
id: "/logout",
pattern: /^\/logout\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 3 },
endpoint: null
}
],
prerendered_routes: new Set([]),
matchers: async () => {
return { };
},
server_assets: {}
}
}
})();
@@ -0,0 +1,224 @@
{
".svelte-kit/generated/server/internal.js": {
"file": "internal.js",
"name": "internal",
"src": ".svelte-kit/generated/server/internal.js",
"isEntry": true,
"imports": [
"_root.js",
"_environment.js",
"_internal.js"
]
},
"_button.js": {
"file": "chunks/button.js",
"name": "button",
"imports": [
"_index2.js",
"_utils2.js"
]
},
"_environment.js": {
"file": "chunks/environment.js",
"name": "environment"
},
"_exports.js": {
"file": "chunks/exports.js",
"name": "exports"
},
"_false.js": {
"file": "chunks/false.js",
"name": "false"
},
"_index.js": {
"file": "chunks/index.js",
"name": "index",
"imports": [
"_index2.js",
"_root.js"
]
},
"_index2.js": {
"file": "chunks/index2.js",
"name": "index"
},
"_internal.js": {
"file": "chunks/internal.js",
"name": "internal",
"imports": [
"_root.js",
"_environment.js"
],
"dynamicImports": [
"src/hooks.server.ts"
]
},
"_label.js": {
"file": "chunks/label.js",
"name": "label",
"imports": [
"_index2.js",
"_utils2.js"
]
},
"_root.js": {
"file": "chunks/root.js",
"name": "root",
"imports": [
"_index2.js",
"_false.js"
]
},
"_shared.js": {
"file": "chunks/shared.js",
"name": "shared",
"imports": [
"_utils.js"
]
},
"_state.svelte.js": {
"file": "chunks/state.svelte.js",
"name": "state.svelte",
"imports": [
"_index2.js",
"_exports.js",
"_root.js"
]
},
"_utils.js": {
"file": "chunks/utils.js",
"name": "utils"
},
"_utils2.js": {
"file": "chunks/utils2.js",
"name": "utils"
},
"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": [
"_shared.js",
"_false.js",
"_environment.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": [
"_index2.js",
"_state.svelte.js",
"_exports.js",
"_utils.js",
"_index.js",
"_root.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": [
"_false.js",
"_environment.js",
"_shared.js",
"_exports.js",
"_utils.js",
"_index.js",
"_internal.js"
]
},
"src/hooks.server.ts": {
"file": "entries/hooks.server.js",
"name": "entries/hooks.server",
"src": "src/hooks.server.ts",
"isEntry": true,
"isDynamicEntry": true
},
"src/routes/+layout.server.ts": {
"file": "entries/pages/_layout.server.ts.js",
"name": "entries/pages/_layout.server.ts",
"src": "src/routes/+layout.server.ts",
"isEntry": true
},
"src/routes/+layout.svelte": {
"file": "entries/pages/_layout.svelte.js",
"name": "entries/pages/_layout.svelte",
"src": "src/routes/+layout.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_utils2.js",
"_label.js"
],
"css": [
"_app/immutable/assets/_layout.Dc5DVfXz.css"
]
},
"src/routes/+page.svelte": {
"file": "entries/pages/_page.svelte.js",
"name": "entries/pages/_page.svelte",
"src": "src/routes/+page.svelte",
"isEntry": true,
"imports": [
"_button.js"
]
},
"src/routes/api/darkmode/+server.ts": {
"file": "entries/endpoints/api/darkmode/_server.ts.js",
"name": "entries/endpoints/api/darkmode/_server.ts",
"src": "src/routes/api/darkmode/+server.ts",
"isEntry": true
},
"src/routes/login/+page.server.ts": {
"file": "entries/pages/login/_page.server.ts.js",
"name": "entries/pages/login/_page.server.ts",
"src": "src/routes/login/+page.server.ts",
"isEntry": true
},
"src/routes/login/+page.svelte": {
"file": "entries/pages/login/_page.svelte.js",
"name": "entries/pages/login/_page.svelte",
"src": "src/routes/login/+page.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_button.js",
"_utils2.js",
"_label.js"
]
},
"src/routes/logout/+page.server.ts": {
"file": "entries/pages/logout/_page.server.ts.js",
"name": "entries/pages/logout/_page.server.ts",
"src": "src/routes/logout/+page.server.ts",
"isEntry": true
},
"src/routes/logout/+page.svelte": {
"file": "entries/pages/logout/_page.svelte.js",
"name": "entries/pages/logout/_page.svelte",
"src": "src/routes/logout/+page.svelte",
"isEntry": true,
"imports": [
"_index2.js",
"_exports.js",
"_utils.js",
"_root.js",
"_state.svelte.js",
"_button.js"
]
}
}
@@ -0,0 +1,72 @@
import { b as attributes, j as clsx, c as bind_props } from "./index2.js";
import { c as cn } from "./utils2.js";
import { tv } from "tailwind-variants";
const buttonVariants = tv({
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline"
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
"icon-sm": "size-8",
"icon-lg": "size-10"
}
},
defaultVariants: { variant: "default", size: "default" }
});
function Button($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
class: className,
variant = "default",
size = "default",
ref = null,
href = void 0,
type = "button",
disabled,
children,
$$slots,
$$events,
...restProps
} = $$props;
if (href) {
$$renderer2.push("<!--[-->");
$$renderer2.push(`<a${attributes({
"data-slot": "button",
class: clsx(cn(buttonVariants({ variant, size }), className)),
href: disabled ? void 0 : href,
"aria-disabled": disabled,
role: disabled ? "link" : void 0,
tabindex: disabled ? -1 : void 0,
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></a>`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<button${attributes({
"data-slot": "button",
class: clsx(cn(buttonVariants({ variant, size }), className)),
type,
disabled,
...restProps
})}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></button>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
export {
Button as B
};
@@ -0,0 +1,34 @@
let base = "";
let assets = base;
const app_dir = "_app";
const relative = true;
const initial = { base, assets };
function override(paths) {
base = paths.base;
assets = paths.assets;
}
function reset() {
base = initial.base;
assets = initial.assets;
}
function set_assets(path) {
assets = initial.assets = path;
}
let prerendering = false;
function set_building() {
}
function set_prerendering() {
prerendering = true;
}
export {
assets as a,
base as b,
app_dir as c,
reset as d,
set_building as e,
set_prerendering as f,
override as o,
prerendering as p,
relative as r,
set_assets as s
};
+174
View File
@@ -0,0 +1,174 @@
const SCHEME = /^[a-z][a-z\d+\-.]+:/i;
const internal = new URL("sveltekit-internal://");
function resolve(base, path) {
if (path[0] === "/" && path[1] === "/") return path;
let url = new URL(base, internal);
url = new URL(path, url);
return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
}
function normalize_path(path, trailing_slash) {
if (path === "/" || trailing_slash === "ignore") return path;
if (trailing_slash === "never") {
return path.endsWith("/") ? path.slice(0, -1) : path;
} else if (trailing_slash === "always" && !path.endsWith("/")) {
return path + "/";
}
return path;
}
function decode_pathname(pathname) {
return pathname.split("%25").map(decodeURI).join("%25");
}
function decode_params(params) {
for (const key in params) {
params[key] = decodeURIComponent(params[key]);
}
return params;
}
function make_trackable(url, callback, search_params_callback, allow_hash = false) {
const tracked = new URL(url);
Object.defineProperty(tracked, "searchParams", {
value: new Proxy(tracked.searchParams, {
get(obj, key) {
if (key === "get" || key === "getAll" || key === "has") {
return (param, ...rest) => {
search_params_callback(param);
return obj[key](param, ...rest);
};
}
callback();
const value = Reflect.get(obj, key);
return typeof value === "function" ? value.bind(obj) : value;
}
}),
enumerable: true,
configurable: true
});
const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"];
if (allow_hash) tracked_url_properties.push("hash");
for (const property of tracked_url_properties) {
Object.defineProperty(tracked, property, {
get() {
callback();
return url[property];
},
enumerable: true,
configurable: true
});
}
{
tracked[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url, opts);
};
tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(url.searchParams, opts);
};
}
if (!allow_hash) {
disable_hash(tracked);
}
return tracked;
}
function disable_hash(url) {
allow_nodejs_console_log(url);
Object.defineProperty(url, "hash", {
get() {
throw new Error(
"Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead"
);
}
});
}
function disable_search(url) {
allow_nodejs_console_log(url);
for (const property of ["search", "searchParams"]) {
Object.defineProperty(url, property, {
get() {
throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
}
});
}
}
function allow_nodejs_console_log(url) {
{
url[Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
return inspect(new URL(url), opts);
};
}
}
function validator(expected) {
function validate(module, file) {
if (!module) return;
for (const key in module) {
if (key[0] === "_" || expected.has(key)) continue;
const values = [...expected.values()];
const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
}
}
return validate;
}
function hint_for_supported_files(key, ext = ".js") {
const supported_files = [];
if (valid_layout_exports.has(key)) {
supported_files.push(`+layout${ext}`);
}
if (valid_page_exports.has(key)) {
supported_files.push(`+page${ext}`);
}
if (valid_layout_server_exports.has(key)) {
supported_files.push(`+layout.server${ext}`);
}
if (valid_page_server_exports.has(key)) {
supported_files.push(`+page.server${ext}`);
}
if (valid_server_exports.has(key)) {
supported_files.push(`+server${ext}`);
}
if (supported_files.length > 0) {
return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
}
}
const valid_layout_exports = /* @__PURE__ */ new Set([
"load",
"prerender",
"csr",
"ssr",
"trailingSlash",
"config"
]);
const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
const valid_server_exports = /* @__PURE__ */ new Set([
"GET",
"POST",
"PATCH",
"PUT",
"DELETE",
"OPTIONS",
"HEAD",
"fallback",
"prerender",
"trailingSlash",
"config",
"entries"
]);
const validate_layout_exports = validator(valid_layout_exports);
const validate_page_exports = validator(valid_page_exports);
const validate_layout_server_exports = validator(valid_layout_server_exports);
const validate_page_server_exports = validator(valid_page_server_exports);
const validate_server_exports = validator(valid_server_exports);
export {
SCHEME as S,
decode_params as a,
validate_layout_exports as b,
validate_page_server_exports as c,
disable_search as d,
validate_page_exports as e,
decode_pathname as f,
validate_server_exports as g,
make_trackable as m,
normalize_path as n,
resolve as r,
validate_layout_server_exports as v
};
@@ -0,0 +1,4 @@
const browser = false;
export {
browser as b
};
+60
View File
@@ -0,0 +1,60 @@
import { n as noop } from "./index2.js";
import { s as safe_not_equal } from "./root.js";
import "clsx";
const subscriber_queue = [];
function readable(value, start) {
return {
subscribe: writable(value, start).subscribe
};
}
function writable(value, start = noop) {
let stop = null;
const subscribers = /* @__PURE__ */ new Set();
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;
}
}
}
}
function update(fn) {
set(fn(
/** @type {T} */
value
));
}
function subscribe(run, invalidate = noop) {
const subscriber = [run, invalidate];
subscribers.add(subscriber);
if (subscribers.size === 1) {
stop = start(set, update) || noop;
}
run(
/** @type {T} */
value
);
return () => {
subscribers.delete(subscriber);
if (subscribers.size === 0 && stop) {
stop();
stop = null;
}
};
}
return { set, update, subscribe };
}
export {
readable as r,
writable as w
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,134 @@
import { r as root } from "./root.js";
import "./environment.js";
let public_env = {};
function set_private_env(environment) {
}
function set_public_env(environment) {
public_env = environment;
}
let read_implementation = null;
function set_read_implementation(fn) {
read_implementation = fn;
}
function set_manifest(_) {
}
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: void 0,
templates: {
app: ({ head, body, assets, nonce, env }) => '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <link rel="icon" href="' + assets + '/favicon.png" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n ' + head + '\n </head>\n <body data-sveltekit-preload-data="hover">\n <div style="display: contents">' + body + "</div>\n </body>\n</html>\n",
error: ({ status, message }) => '<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <title>' + message + `</title>
<style>
body {
--bg: white;
--fg: #222;
--divider: #ccc;
background: var(--bg);
color: var(--fg);
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
}
.error {
display: flex;
align-items: center;
max-width: 32rem;
margin: 0 1rem;
}
.status {
font-weight: 200;
font-size: 3rem;
line-height: 1;
position: relative;
top: -0.05rem;
}
.message {
border-left: 1px solid var(--divider);
padding: 0 0 0 1rem;
margin: 0 0 0 1rem;
min-height: 2.5rem;
display: flex;
align-items: center;
}
.message h1 {
font-weight: 400;
font-size: 1em;
margin: 0;
}
@media (prefers-color-scheme: dark) {
body {
--bg: #222;
--fg: #ddd;
--divider: #666;
}
}
</style>
</head>
<body>
<div class="error">
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
},
version_hash: "tyxfvh"
};
async function get_hooks() {
let handle;
let handleFetch;
let handleError;
let handleValidationError;
let init;
({ handle, handleFetch, handleError, handleValidationError, init } = await import("../entries/hooks.server.js"));
let reroute;
let transport;
return {
handle,
handleFetch,
handleError,
handleValidationError,
init,
reroute,
transport
};
}
export {
set_public_env as a,
set_read_implementation as b,
set_manifest as c,
get_hooks as g,
options as o,
public_env as p,
read_implementation as r,
set_private_env as s
};
+617
View File
@@ -0,0 +1,617 @@
import { A as ATTACHMENT_KEY, r as run, d as derived, p as props_id, b as attributes, c as bind_props, e as spread_props } from "./index2.js";
import { c as cn } from "./utils2.js";
import { clsx } from "clsx";
import parse from "style-to-object";
function createAttachmentKey() {
return Symbol(ATTACHMENT_KEY);
}
function isFunction(value) {
return typeof value === "function";
}
function isObject(value) {
return value !== null && typeof value === "object";
}
const CLASS_VALUE_PRIMITIVE_TYPES = ["string", "number", "bigint", "boolean"];
function isClassValue(value) {
if (value === null || value === void 0)
return true;
if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value))
return true;
if (Array.isArray(value))
return value.every((item) => isClassValue(item));
if (typeof value === "object") {
if (Object.getPrototypeOf(value) !== Object.prototype)
return false;
return true;
}
return false;
}
const BoxSymbol = Symbol("box");
const isWritableSymbol = Symbol("is-writable");
function boxWith(getter, setter) {
const derived2 = getter();
if (setter) {
return {
[BoxSymbol]: true,
[isWritableSymbol]: true,
get current() {
return derived2;
},
set current(v) {
setter(v);
}
};
}
return {
[BoxSymbol]: true,
get current() {
return getter();
}
};
}
function isBox(value) {
return isObject(value) && BoxSymbol in value;
}
function isWritableBox(value) {
return isBox(value) && isWritableSymbol in value;
}
function boxFrom(value) {
if (isBox(value)) return value;
if (isFunction(value)) return boxWith(value);
return simpleBox(value);
}
function boxFlatten(boxes) {
return Object.entries(boxes).reduce(
(acc, [key, b]) => {
if (!isBox(b)) {
return Object.assign(acc, { [key]: b });
}
if (isWritableBox(b)) {
Object.defineProperty(acc, key, {
get() {
return b.current;
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
set(v) {
b.current = v;
}
});
} else {
Object.defineProperty(acc, key, {
get() {
return b.current;
}
});
}
return acc;
},
{}
);
}
function toReadonlyBox(b) {
if (!isWritableBox(b)) return b;
return {
[BoxSymbol]: true,
get current() {
return b.current;
}
};
}
function simpleBox(initialValue) {
let current = initialValue;
return {
[BoxSymbol]: true,
[isWritableSymbol]: true,
get current() {
return current;
},
set current(v) {
current = v;
}
};
}
function composeHandlers(...handlers) {
return function(e) {
for (const handler of handlers) {
if (!handler)
continue;
if (e.defaultPrevented)
return;
if (typeof handler === "function") {
handler.call(this, e);
} else {
handler.current?.call(this, e);
}
}
};
}
const NUMBER_CHAR_RE = /\d/;
const STR_SPLITTERS = ["-", "_", "/", "."];
function isUppercase(char = "") {
if (NUMBER_CHAR_RE.test(char))
return void 0;
return char !== char.toLowerCase();
}
function splitByCase(str) {
const parts = [];
let buff = "";
let previousUpper;
let previousSplitter;
for (const char of str) {
const isSplitter = STR_SPLITTERS.includes(char);
if (isSplitter === true) {
parts.push(buff);
buff = "";
previousUpper = void 0;
continue;
}
const isUpper = isUppercase(char);
if (previousSplitter === false) {
if (previousUpper === false && isUpper === true) {
parts.push(buff);
buff = char;
previousUpper = isUpper;
continue;
}
if (previousUpper === true && isUpper === false && buff.length > 1) {
const lastChar = buff.at(-1);
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
buff = lastChar + char;
previousUpper = isUpper;
continue;
}
}
buff += char;
previousUpper = isUpper;
previousSplitter = isSplitter;
}
parts.push(buff);
return parts;
}
function pascalCase(str) {
if (!str)
return "";
return splitByCase(str).map((p) => upperFirst(p)).join("");
}
function camelCase(str) {
return lowerFirst(pascalCase(str || ""));
}
function upperFirst(str) {
return str ? str[0].toUpperCase() + str.slice(1) : "";
}
function lowerFirst(str) {
return str ? str[0].toLowerCase() + str.slice(1) : "";
}
function cssToStyleObj(css) {
if (!css)
return {};
const styleObj = {};
function iterator(name, value) {
if (name.startsWith("-moz-") || name.startsWith("-webkit-") || name.startsWith("-ms-") || name.startsWith("-o-")) {
styleObj[pascalCase(name)] = value;
return;
}
if (name.startsWith("--")) {
styleObj[name] = value;
return;
}
styleObj[camelCase(name)] = value;
}
parse(css, iterator);
return styleObj;
}
function executeCallbacks(...callbacks) {
return (...args) => {
for (const callback of callbacks) {
if (typeof callback === "function") {
callback(...args);
}
}
};
}
function createParser(matcher, replacer) {
const regex = RegExp(matcher, "g");
return (str) => {
if (typeof str !== "string") {
throw new TypeError(`expected an argument of type string, but got ${typeof str}`);
}
if (!str.match(regex))
return str;
return str.replace(regex, replacer);
};
}
const camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`);
function styleToCSS(styleObj) {
if (!styleObj || typeof styleObj !== "object" || Array.isArray(styleObj)) {
throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);
}
return Object.keys(styleObj).map((property) => `${camelToKebab(property)}: ${styleObj[property]};`).join("\n");
}
function styleToString(style = {}) {
return styleToCSS(style).replace("\n", " ");
}
const EVENT_LIST = [
"onabort",
"onanimationcancel",
"onanimationend",
"onanimationiteration",
"onanimationstart",
"onauxclick",
"onbeforeinput",
"onbeforetoggle",
"onblur",
"oncancel",
"oncanplay",
"oncanplaythrough",
"onchange",
"onclick",
"onclose",
"oncompositionend",
"oncompositionstart",
"oncompositionupdate",
"oncontextlost",
"oncontextmenu",
"oncontextrestored",
"oncopy",
"oncuechange",
"oncut",
"ondblclick",
"ondrag",
"ondragend",
"ondragenter",
"ondragleave",
"ondragover",
"ondragstart",
"ondrop",
"ondurationchange",
"onemptied",
"onended",
"onerror",
"onfocus",
"onfocusin",
"onfocusout",
"onformdata",
"ongotpointercapture",
"oninput",
"oninvalid",
"onkeydown",
"onkeypress",
"onkeyup",
"onload",
"onloadeddata",
"onloadedmetadata",
"onloadstart",
"onlostpointercapture",
"onmousedown",
"onmouseenter",
"onmouseleave",
"onmousemove",
"onmouseout",
"onmouseover",
"onmouseup",
"onpaste",
"onpause",
"onplay",
"onplaying",
"onpointercancel",
"onpointerdown",
"onpointerenter",
"onpointerleave",
"onpointermove",
"onpointerout",
"onpointerover",
"onpointerup",
"onprogress",
"onratechange",
"onreset",
"onresize",
"onscroll",
"onscrollend",
"onsecuritypolicyviolation",
"onseeked",
"onseeking",
"onselect",
"onselectionchange",
"onselectstart",
"onslotchange",
"onstalled",
"onsubmit",
"onsuspend",
"ontimeupdate",
"ontoggle",
"ontouchcancel",
"ontouchend",
"ontouchmove",
"ontouchstart",
"ontransitioncancel",
"ontransitionend",
"ontransitionrun",
"ontransitionstart",
"onvolumechange",
"onwaiting",
"onwebkitanimationend",
"onwebkitanimationiteration",
"onwebkitanimationstart",
"onwebkittransitionend",
"onwheel"
];
const EVENT_LIST_SET = new Set(EVENT_LIST);
function isEventHandler(key) {
return EVENT_LIST_SET.has(key);
}
function mergeProps(...args) {
const result = { ...args[0] };
for (let i = 1; i < args.length; i++) {
const props = args[i];
if (!props)
continue;
for (const key of Object.keys(props)) {
const a = result[key];
const b = props[key];
const aIsFunction = typeof a === "function";
const bIsFunction = typeof b === "function";
if (aIsFunction && typeof bIsFunction && isEventHandler(key)) {
const aHandler = a;
const bHandler = b;
result[key] = composeHandlers(aHandler, bHandler);
} else if (aIsFunction && bIsFunction) {
result[key] = executeCallbacks(a, b);
} else if (key === "class") {
const aIsClassValue = isClassValue(a);
const bIsClassValue = isClassValue(b);
if (aIsClassValue && bIsClassValue) {
result[key] = clsx(a, b);
} else if (aIsClassValue) {
result[key] = clsx(a);
} else if (bIsClassValue) {
result[key] = clsx(b);
}
} else if (key === "style") {
const aIsObject = typeof a === "object";
const bIsObject = typeof b === "object";
const aIsString = typeof a === "string";
const bIsString = typeof b === "string";
if (aIsObject && bIsObject) {
result[key] = { ...a, ...b };
} else if (aIsObject && bIsString) {
const parsedStyle = cssToStyleObj(b);
result[key] = { ...a, ...parsedStyle };
} else if (aIsString && bIsObject) {
const parsedStyle = cssToStyleObj(a);
result[key] = { ...parsedStyle, ...b };
} else if (aIsString && bIsString) {
const parsedStyleA = cssToStyleObj(a);
const parsedStyleB = cssToStyleObj(b);
result[key] = { ...parsedStyleA, ...parsedStyleB };
} else if (aIsObject) {
result[key] = a;
} else if (bIsObject) {
result[key] = b;
} else if (aIsString) {
result[key] = a;
} else if (bIsString) {
result[key] = b;
}
} else {
result[key] = b !== void 0 ? b : a;
}
}
for (const key of Object.getOwnPropertySymbols(props)) {
const a = result[key];
const b = props[key];
result[key] = b !== void 0 ? b : a;
}
}
if (typeof result.style === "object") {
result.style = styleToString(result.style).replaceAll("\n", " ");
}
if (result.hidden === false) {
result.hidden = void 0;
delete result.hidden;
}
if (result.disabled === false) {
result.disabled = void 0;
delete result.disabled;
}
return result;
}
function attachRef(ref, onChange) {
return {
[createAttachmentKey()]: (node) => {
if (isBox(ref)) {
ref.current = node;
run(() => onChange?.(node));
return () => {
if ("isConnected" in node && node.isConnected)
return;
ref.current = null;
onChange?.(null);
};
}
ref(node);
run(() => onChange?.(node));
return () => {
if ("isConnected" in node && node.isConnected)
return;
ref(null);
onChange?.(null);
};
}
};
}
function boolToStr(condition) {
return condition ? "true" : "false";
}
function boolToEmptyStrOrUndef(condition) {
return condition ? "" : void 0;
}
function boolToTrueOrUndef(condition) {
return condition ? true : void 0;
}
function getDataOpenClosed(condition) {
return condition ? "open" : "closed";
}
function getDataChecked(condition) {
return condition ? "checked" : "unchecked";
}
function getAriaChecked(checked, indeterminate) {
return checked ? "true" : "false";
}
class BitsAttrs {
#variant;
#prefix;
attrs;
constructor(config) {
this.#variant = config.getVariant ? config.getVariant() : null;
this.#prefix = this.#variant ? `data-${this.#variant}-` : `data-${config.component}-`;
this.getAttr = this.getAttr.bind(this);
this.selector = this.selector.bind(this);
this.attrs = Object.fromEntries(config.parts.map((part) => [part, this.getAttr(part)]));
}
getAttr(part, variantOverride) {
if (variantOverride)
return `data-${variantOverride}-${part}`;
return `${this.#prefix}${part}`;
}
selector(part, variantOverride) {
return `[${this.getAttr(part, variantOverride)}]`;
}
}
function createBitsAttrs(config) {
const bitsAttrs = new BitsAttrs(config);
return {
...bitsAttrs.attrs,
selector: bitsAttrs.selector,
getAttr: bitsAttrs.getAttr
};
}
function createId(prefixOrUid, uid) {
return `bits-${prefixOrUid}`;
}
const labelAttrs = createBitsAttrs({ component: "label", parts: ["root"] });
class LabelRootState {
static create(opts) {
return new LabelRootState(opts);
}
opts;
attachment;
constructor(opts) {
this.opts = opts;
this.attachment = attachRef(this.opts.ref);
this.onmousedown = this.onmousedown.bind(this);
}
onmousedown(e) {
if (e.detail > 1) e.preventDefault();
}
#props = derived(() => ({
id: this.opts.id.current,
[labelAttrs.root]: "",
onmousedown: this.onmousedown,
...this.attachment
}));
get props() {
return this.#props();
}
set props($$value) {
return this.#props($$value);
}
}
function Label$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
const uid = props_id($$renderer2);
let {
children,
child,
id = createId(uid),
ref = null,
for: forProp,
$$slots,
$$events,
...restProps
} = $$props;
const rootState = LabelRootState.create({
id: boxWith(() => id),
ref: boxWith(() => ref, (v) => ref = v)
});
const mergedProps = mergeProps(restProps, rootState.props, { for: forProp });
if (child) {
$$renderer2.push("<!--[-->");
child($$renderer2, { props: mergedProps });
$$renderer2.push(`<!---->`);
} else {
$$renderer2.push("<!--[!-->");
$$renderer2.push(`<label${attributes({ ...mergedProps, for: forProp })}>`);
children?.($$renderer2);
$$renderer2.push(`<!----></label>`);
}
$$renderer2.push(`<!--]-->`);
bind_props($$props, { ref });
});
}
function Label($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
let {
ref = null,
class: className,
$$slots,
$$events,
...restProps
} = $$props;
let $$settled = true;
let $$inner_renderer;
function $$render_inner($$renderer3) {
$$renderer3.push("<!---->");
Label$1?.($$renderer3, spread_props([
{
"data-slot": "label",
class: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className)
},
restProps,
{
get ref() {
return ref;
},
set ref($$value) {
ref = $$value;
$$settled = false;
}
}
]));
$$renderer3.push(`<!---->`);
}
do {
$$settled = true;
$$inner_renderer = $$renderer2.copy();
$$render_inner($$inner_renderer);
} while (!$$settled);
$$renderer2.subsume($$inner_renderer);
bind_props($$props, { ref });
});
}
export {
BoxSymbol as B,
Label as L,
boxWith as a,
boxFrom as b,
boxFlatten as c,
isBox as d,
isWritableBox as e,
isObject as f,
executeCallbacks as g,
attachRef as h,
isWritableSymbol as i,
createBitsAttrs as j,
getDataOpenClosed as k,
boolToEmptyStrOrUndef as l,
boolToStr as m,
simpleBox as n,
composeHandlers as o,
createId as p,
mergeProps as q,
cssToStyleObj as r,
styleToString as s,
toReadonlyBox as t,
getDataChecked as u,
getAriaChecked as v,
boolToTrueOrUndef as w
};
File diff suppressed because it is too large Load Diff
+777
View File
@@ -0,0 +1,777 @@
import { json, text } from "@sveltejs/kit";
import { SvelteKitError, HttpError } from "@sveltejs/kit/internal";
import { with_request_store } from "@sveltejs/kit/internal/server";
import * as devalue from "devalue";
import { t as text_decoder, b as base64_encode, c as base64_decode } from "./utils.js";
const SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
const ENDPOINT_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"];
const PAGE_METHODS = ["GET", "POST", "HEAD"];
function set_nested_value(object, path_string, value) {
if (path_string.startsWith("n:")) {
path_string = path_string.slice(2);
value = value === "" ? void 0 : parseFloat(value);
} else if (path_string.startsWith("b:")) {
path_string = path_string.slice(2);
value = value === "on";
}
deep_set(object, split_path(path_string), value);
}
function convert_formdata(data) {
const result = {};
for (let key of data.keys()) {
const is_array = key.endsWith("[]");
let values = data.getAll(key);
if (is_array) key = key.slice(0, -2);
if (values.length > 1 && !is_array) {
throw new Error(`Form cannot contain duplicated keys — "${key}" has ${values.length} values`);
}
values = values.filter(
(entry) => typeof entry === "string" || entry.name !== "" || entry.size > 0
);
if (key.startsWith("n:")) {
key = key.slice(2);
values = values.map((v) => v === "" ? void 0 : parseFloat(
/** @type {string} */
v
));
} else if (key.startsWith("b:")) {
key = key.slice(2);
values = values.map((v) => v === "on");
}
set_nested_value(result, key, is_array ? values : values[0]);
}
return result;
}
const BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata";
const BINARY_FORM_VERSION = 0;
const HEADER_BYTES = 1 + 4 + 2;
async function deserialize_binary_form(request) {
if (request.headers.get("content-type") !== BINARY_FORM_CONTENT_TYPE) {
const form_data = await request.formData();
return { data: convert_formdata(form_data), meta: {}, form_data };
}
if (!request.body) {
throw deserialize_error("no body");
}
const content_length = parseInt(request.headers.get("content-length") ?? "");
if (Number.isNaN(content_length)) {
throw deserialize_error("invalid Content-Length header");
}
const reader = request.body.getReader();
const chunks = [];
function get_chunk(index) {
if (index in chunks) return chunks[index];
let i = chunks.length;
while (i <= index) {
chunks[i] = reader.read().then((chunk) => chunk.value);
i++;
}
return chunks[index];
}
async function get_buffer(offset, length) {
let start_chunk;
let chunk_start = 0;
let chunk_index;
for (chunk_index = 0; ; chunk_index++) {
const chunk = await get_chunk(chunk_index);
if (!chunk) return null;
const chunk_end = chunk_start + chunk.byteLength;
if (offset >= chunk_start && offset < chunk_end) {
start_chunk = chunk;
break;
}
chunk_start = chunk_end;
}
if (offset + length <= chunk_start + start_chunk.byteLength) {
return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start);
}
const chunks2 = [start_chunk.subarray(offset - chunk_start)];
let cursor = start_chunk.byteLength - offset + chunk_start;
while (cursor < length) {
chunk_index++;
let chunk = await get_chunk(chunk_index);
if (!chunk) return null;
if (chunk.byteLength > length - cursor) {
chunk = chunk.subarray(0, length - cursor);
}
chunks2.push(chunk);
cursor += chunk.byteLength;
}
const buffer = new Uint8Array(length);
cursor = 0;
for (const chunk of chunks2) {
buffer.set(chunk, cursor);
cursor += chunk.byteLength;
}
return buffer;
}
const header = await get_buffer(0, HEADER_BYTES);
if (!header) throw deserialize_error("too short");
if (header[0] !== BINARY_FORM_VERSION) {
throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);
}
const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
const data_length = header_view.getUint32(1, true);
if (HEADER_BYTES + data_length > content_length) {
throw deserialize_error("data overflow");
}
const file_offsets_length = header_view.getUint16(5, true);
if (HEADER_BYTES + data_length + file_offsets_length > content_length) {
throw deserialize_error("file offset table overflow");
}
const data_buffer = await get_buffer(HEADER_BYTES, data_length);
if (!data_buffer) throw deserialize_error("data too short");
let file_offsets;
let files_start_offset;
if (file_offsets_length > 0) {
const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
if (!file_offsets_buffer) throw deserialize_error("file offset table too short");
const parsed_offsets = JSON.parse(text_decoder.decode(file_offsets_buffer));
if (!Array.isArray(parsed_offsets) || parsed_offsets.some((n) => typeof n !== "number" || !Number.isInteger(n) || n < 0)) {
throw deserialize_error("invalid file offset table");
}
file_offsets = /** @type {Array<number>} */
parsed_offsets;
files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
}
const [data, meta] = devalue.parse(text_decoder.decode(data_buffer), {
File: ([name, type, size, last_modified, index]) => {
if (typeof name !== "string" || typeof type !== "string" || typeof size !== "number" || typeof last_modified !== "number" || typeof index !== "number") {
throw deserialize_error("invalid file metadata");
}
if (files_start_offset + file_offsets[index] + size > content_length) {
throw deserialize_error("file data overflow");
}
return new Proxy(
new LazyFile(
name,
type,
size,
last_modified,
get_chunk,
files_start_offset + file_offsets[index]
),
{
getPrototypeOf() {
return File.prototype;
}
}
);
}
});
void (async () => {
let has_more = true;
while (has_more) {
const chunk = await get_chunk(chunks.length);
has_more = !!chunk;
}
})();
return { data, meta, form_data: null };
}
function deserialize_error(message) {
return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`);
}
class LazyFile {
/** @type {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} */
#get_chunk;
/** @type {number} */
#offset;
/**
* @param {string} name
* @param {string} type
* @param {number} size
* @param {number} last_modified
* @param {(index: number) => Promise<Uint8Array<ArrayBuffer> | undefined>} get_chunk
* @param {number} offset
*/
constructor(name, type, size, last_modified, get_chunk, offset) {
this.name = name;
this.type = type;
this.size = size;
this.lastModified = last_modified;
this.webkitRelativePath = "";
this.#get_chunk = get_chunk;
this.#offset = offset;
this.arrayBuffer = this.arrayBuffer.bind(this);
this.bytes = this.bytes.bind(this);
this.slice = this.slice.bind(this);
this.stream = this.stream.bind(this);
this.text = this.text.bind(this);
}
/** @type {ArrayBuffer | undefined} */
#buffer;
async arrayBuffer() {
this.#buffer ??= await new Response(this.stream()).arrayBuffer();
return this.#buffer;
}
async bytes() {
return new Uint8Array(await this.arrayBuffer());
}
/**
* @param {number=} start
* @param {number=} end
* @param {string=} contentType
*/
slice(start = 0, end = this.size, contentType = this.type) {
if (start < 0) {
start = Math.max(this.size + start, 0);
} else {
start = Math.min(start, this.size);
}
if (end < 0) {
end = Math.max(this.size + end, 0);
} else {
end = Math.min(end, this.size);
}
const size = Math.max(end - start, 0);
const file = new LazyFile(
this.name,
contentType,
size,
this.lastModified,
this.#get_chunk,
this.#offset + start
);
return file;
}
stream() {
let cursor = 0;
let chunk_index = 0;
return new ReadableStream({
start: async (controller) => {
let chunk_start = 0;
let start_chunk = null;
for (chunk_index = 0; ; chunk_index++) {
const chunk = await this.#get_chunk(chunk_index);
if (!chunk) return null;
const chunk_end = chunk_start + chunk.byteLength;
if (this.#offset >= chunk_start && this.#offset < chunk_end) {
start_chunk = chunk;
break;
}
chunk_start = chunk_end;
}
if (this.#offset + this.size <= chunk_start + start_chunk.byteLength) {
controller.enqueue(
start_chunk.subarray(this.#offset - chunk_start, this.#offset + this.size - chunk_start)
);
controller.close();
} else {
controller.enqueue(start_chunk.subarray(this.#offset - chunk_start));
cursor = start_chunk.byteLength - this.#offset + chunk_start;
}
},
pull: async (controller) => {
chunk_index++;
let chunk = await this.#get_chunk(chunk_index);
if (!chunk) {
controller.error("incomplete file data");
controller.close();
return;
}
if (chunk.byteLength > this.size - cursor) {
chunk = chunk.subarray(0, this.size - cursor);
}
controller.enqueue(chunk);
cursor += chunk.byteLength;
if (cursor >= this.size) {
controller.close();
}
}
});
}
async text() {
return text_decoder.decode(await this.arrayBuffer());
}
}
const path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/;
function split_path(path) {
if (!path_regex.test(path)) {
throw new Error(`Invalid path ${path}`);
}
return path.split(/\.|\[|\]/).filter(Boolean);
}
function check_prototype_pollution(key) {
if (key === "__proto__" || key === "constructor" || key === "prototype") {
throw new Error(
`Invalid key "${key}"`
);
}
}
function deep_set(object, keys, value) {
let current = object;
for (let i = 0; i < keys.length - 1; i += 1) {
const key = keys[i];
check_prototype_pollution(key);
const is_array = /^\d+$/.test(keys[i + 1]);
const exists = Object.hasOwn(current, key);
const inner = current[key];
if (exists && is_array !== Array.isArray(inner)) {
throw new Error(`Invalid array key ${keys[i + 1]}`);
}
if (!exists) {
current[key] = is_array ? [] : {};
}
current = current[key];
}
const final_key = keys[keys.length - 1];
check_prototype_pollution(final_key);
current[final_key] = value;
}
function normalize_issue(issue, server = false) {
const normalized = { name: "", path: [], message: issue.message, server };
if (issue.path !== void 0) {
let name = "";
for (const segment of issue.path) {
const key = (
/** @type {string | number} */
typeof segment === "object" ? segment.key : segment
);
normalized.path.push(key);
if (typeof key === "number") {
name += `[${key}]`;
} else if (typeof key === "string") {
name += name === "" ? key : "." + key;
}
}
normalized.name = name;
}
return normalized;
}
function flatten_issues(issues) {
const result = {};
for (const issue of issues) {
(result.$ ??= []).push(issue);
let name = "";
if (issue.path !== void 0) {
for (const key of issue.path) {
if (typeof key === "number") {
name += `[${key}]`;
} else if (typeof key === "string") {
name += name === "" ? key : "." + key;
}
(result[name] ??= []).push(issue);
}
}
}
return result;
}
function deep_get(object, path) {
let current = object;
for (const key of path) {
if (current == null || typeof current !== "object") {
return current;
}
current = current[key];
}
return current;
}
function create_field_proxy(target, get_input, set_input, get_issues, path = []) {
const get_value = () => {
return deep_get(get_input(), path);
};
return new Proxy(target, {
get(target2, prop) {
if (typeof prop === "symbol") return target2[prop];
if (/^\d+$/.test(prop)) {
return create_field_proxy({}, get_input, set_input, get_issues, [
...path,
parseInt(prop, 10)
]);
}
const key = build_path_string(path);
if (prop === "set") {
const set_func = function(newValue) {
set_input(path, newValue);
return newValue;
};
return create_field_proxy(set_func, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "value") {
return create_field_proxy(get_value, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "issues" || prop === "allIssues") {
const issues_func = () => {
const all_issues = get_issues()[key === "" ? "$" : key];
if (prop === "allIssues") {
return all_issues?.map((issue) => ({
path: issue.path,
message: issue.message
}));
}
return all_issues?.filter((issue) => issue.name === key)?.map((issue) => ({
path: issue.path,
message: issue.message
}));
};
return create_field_proxy(issues_func, get_input, set_input, get_issues, [...path, prop]);
}
if (prop === "as") {
const as_func = (type, input_value) => {
const is_array = type === "file multiple" || type === "select multiple" || type === "checkbox" && typeof input_value === "string";
const prefix = type === "number" || type === "range" ? "n:" : type === "checkbox" && !is_array ? "b:" : "";
const base_props = {
name: prefix + key + (is_array ? "[]" : ""),
get "aria-invalid"() {
const issues = get_issues();
return key in issues ? "true" : void 0;
}
};
if (type !== "text" && type !== "select" && type !== "select multiple") {
base_props.type = type === "file multiple" ? "file" : type;
}
if (type === "submit" || type === "hidden") {
return Object.defineProperties(base_props, {
value: { value: input_value, enumerable: true }
});
}
if (type === "select" || type === "select multiple") {
return Object.defineProperties(base_props, {
multiple: { value: is_array, enumerable: true },
value: {
enumerable: true,
get() {
return get_value();
}
}
});
}
if (type === "checkbox" || type === "radio") {
return Object.defineProperties(base_props, {
value: { value: input_value ?? "on", enumerable: true },
checked: {
enumerable: true,
get() {
const value = get_value();
if (type === "radio") {
return value === input_value;
}
if (is_array) {
return (value ?? []).includes(input_value);
}
return value;
}
}
});
}
if (type === "file" || type === "file multiple") {
return Object.defineProperties(base_props, {
multiple: { value: is_array, enumerable: true },
files: {
enumerable: true,
get() {
const value = get_value();
if (value instanceof File) {
if (typeof DataTransfer !== "undefined") {
const fileList = new DataTransfer();
fileList.items.add(value);
return fileList.files;
}
return { 0: value, length: 1 };
}
if (Array.isArray(value) && value.every((f) => f instanceof File)) {
if (typeof DataTransfer !== "undefined") {
const fileList = new DataTransfer();
value.forEach((file) => fileList.items.add(file));
return fileList.files;
}
const fileListLike = { length: value.length };
value.forEach((file, index) => {
fileListLike[index] = file;
});
return fileListLike;
}
return null;
}
}
});
}
return Object.defineProperties(base_props, {
value: {
enumerable: true,
get() {
const value = get_value();
return value != null ? String(value) : "";
}
}
});
};
return create_field_proxy(as_func, get_input, set_input, get_issues, [...path, "as"]);
}
return create_field_proxy({}, get_input, set_input, get_issues, [...path, prop]);
}
});
}
function build_path_string(path) {
let result = "";
for (const segment of path) {
if (typeof segment === "number") {
result += `[${segment}]`;
} else {
result += result === "" ? segment : "." + segment;
}
}
return result;
}
function negotiate(accept, types) {
const parts = [];
accept.split(",").forEach((str, i) => {
const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str);
if (match) {
const [, type, subtype, q = "1"] = match;
parts.push({ type, subtype, q: +q, i });
}
});
parts.sort((a, b) => {
if (a.q !== b.q) {
return b.q - a.q;
}
if (a.subtype === "*" !== (b.subtype === "*")) {
return a.subtype === "*" ? 1 : -1;
}
if (a.type === "*" !== (b.type === "*")) {
return a.type === "*" ? 1 : -1;
}
return a.i - b.i;
});
let accepted;
let min_priority = Infinity;
for (const mimetype of types) {
const [type, subtype] = mimetype.split("/");
const priority = parts.findIndex(
(part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*")
);
if (priority !== -1 && priority < min_priority) {
accepted = mimetype;
min_priority = priority;
}
}
return accepted;
}
function is_content_type(request, ...types) {
const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
return types.includes(type.toLowerCase());
}
function is_form_content_type(request) {
return is_content_type(
request,
"application/x-www-form-urlencoded",
"multipart/form-data",
"text/plain",
BINARY_FORM_CONTENT_TYPE
);
}
function coalesce_to_error(err) {
return err instanceof Error || err && /** @type {any} */
err.name && /** @type {any} */
err.message ? (
/** @type {Error} */
err
) : new Error(JSON.stringify(err));
}
function normalize_error(error) {
return (
/** @type {import('../exports/internal/index.js').Redirect | HttpError | SvelteKitError | Error} */
error
);
}
function get_status(error) {
return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
}
function get_message(error) {
return error instanceof SvelteKitError ? error.text : "Internal Error";
}
const escape_html_attr_dict = {
"&": "&amp;",
'"': "&quot;"
// Svelte also escapes < because the escape function could be called inside a `noscript` there
// https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c
// However, that doesn't apply in SvelteKit
};
const escape_html_dict = {
"&": "&amp;",
"<": "&lt;"
};
const surrogates = (
// high surrogate without paired low surrogate
"[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]"
);
const escape_html_attr_regex = new RegExp(
`[${Object.keys(escape_html_attr_dict).join("")}]|` + surrogates,
"g"
);
const escape_html_regex = new RegExp(
`[${Object.keys(escape_html_dict).join("")}]|` + surrogates,
"g"
);
function escape_html(str, is_attr) {
const dict = is_attr ? escape_html_attr_dict : escape_html_dict;
const escaped_str = str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => {
if (match.length === 2) {
return match;
}
return dict[match] ?? `&#${match.charCodeAt(0)};`;
});
return escaped_str;
}
function method_not_allowed(mod, method) {
return text(`${method} method not allowed`, {
status: 405,
headers: {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405
// "The server must generate an Allow header field in a 405 status code response"
allow: allowed_methods(mod).join(", ")
}
});
}
function allowed_methods(mod) {
const allowed = ENDPOINT_METHODS.filter((method) => method in mod);
if ("GET" in mod && !("HEAD" in mod)) {
allowed.push("HEAD");
}
return allowed;
}
function get_global_name(options) {
return `__sveltekit_${options.version_hash}`;
}
function static_error_page(options, status, message) {
let page = options.templates.error({ status, message: escape_html(message) });
return text(page, {
headers: { "content-type": "text/html; charset=utf-8" },
status
});
}
async function handle_fatal_error(event, state, options, error) {
error = error instanceof HttpError ? error : coalesce_to_error(error);
const status = get_status(error);
const body = await handle_error_and_jsonify(event, state, options, error);
const type = negotiate(event.request.headers.get("accept") || "text/html", [
"application/json",
"text/html"
]);
if (event.isDataRequest || type === "application/json") {
return json(body, {
status
});
}
return static_error_page(options, status, body.message);
}
async function handle_error_and_jsonify(event, state, options, error) {
if (error instanceof HttpError) {
return { message: "Unknown Error", ...error.body };
}
const status = get_status(error);
const message = get_message(error);
return await with_request_store(
{ event, state },
() => options.hooks.handleError({ error, event, status, message })
) ?? { message };
}
function redirect_response(status, location) {
const response = new Response(void 0, {
status,
headers: { location }
});
return response;
}
function clarify_devalue_error(event, error) {
if (error.path) {
return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path}). If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#Universal-hooks-transport.`;
}
if (error.path === "") {
return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`;
}
return error.message;
}
function serialize_uses(node) {
const uses = {};
if (node.uses && node.uses.dependencies.size > 0) {
uses.dependencies = Array.from(node.uses.dependencies);
}
if (node.uses && node.uses.search_params.size > 0) {
uses.search_params = Array.from(node.uses.search_params);
}
if (node.uses && node.uses.params.size > 0) {
uses.params = Array.from(node.uses.params);
}
if (node.uses?.parent) uses.parent = 1;
if (node.uses?.route) uses.route = 1;
if (node.uses?.url) uses.url = 1;
return uses;
}
function has_prerendered_path(manifest, pathname) {
return manifest._.prerendered_routes.has(pathname) || pathname.at(-1) === "/" && manifest._.prerendered_routes.has(pathname.slice(0, -1));
}
function format_server_error(status, error, event) {
const formatted_text = `
\x1B[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1B[0m`;
if (status === 404) {
return formatted_text;
}
return `${formatted_text}
${error.stack}`;
}
function get_node_type(node_id) {
const parts = node_id?.split("/");
const filename = parts?.at(-1);
if (!filename) return "unknown";
const dot_parts = filename.split(".");
return dot_parts.slice(0, -1).join(".");
}
const INVALIDATED_PARAM = "x-sveltekit-invalidated";
const TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
function stringify(data, transport) {
const encoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode]));
return devalue.stringify(data, encoders);
}
function stringify_remote_arg(value, transport) {
if (value === void 0) return "";
const json_string = stringify(value, transport);
const bytes = new TextEncoder().encode(json_string);
return base64_encode(bytes).replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_");
}
function parse_remote_arg(string, transport) {
if (!string) return void 0;
const json_string = text_decoder.decode(
// no need to add back `=` characters, atob can handle it
base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))
);
const decoders = Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode]));
return devalue.parse(json_string, decoders);
}
function create_remote_key(id, payload) {
return id + "/" + payload;
}
export {
ENDPOINT_METHODS as E,
INVALIDATED_PARAM as I,
PAGE_METHODS as P,
SVELTE_KIT_ASSETS as S,
TRAILING_SLASH_PARAM as T,
normalize_error as a,
get_global_name as b,
clarify_devalue_error as c,
get_node_type as d,
escape_html as e,
create_remote_key as f,
get_status as g,
handle_error_and_jsonify as h,
is_form_content_type as i,
static_error_page as j,
stringify as k,
deserialize_binary_form as l,
method_not_allowed as m,
negotiate as n,
has_prerendered_path as o,
parse_remote_arg as p,
handle_fatal_error as q,
redirect_response as r,
serialize_uses as s,
format_server_error as t,
stringify_remote_arg as u,
flatten_issues as v,
create_field_proxy as w,
normalize_issue as x,
set_nested_value as y,
deep_set as z
};
@@ -0,0 +1,18 @@
import "clsx";
import { n as noop } from "./index2.js";
import "./exports.js";
import "@sveltejs/kit/internal/server";
import "./root.js";
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
if (is_legacy) {
({
data: {},
form: null,
error: null,
params: {},
route: { id: null },
state: {},
status: -1,
url: new URL("https://example.com")
});
}
+43
View File
@@ -0,0 +1,43 @@
const text_encoder = new TextEncoder();
const text_decoder = new TextDecoder();
function get_relative_path(from, to) {
const from_parts = from.split(/[/\\]/);
const to_parts = to.split(/[/\\]/);
from_parts.pop();
while (from_parts[0] === to_parts[0]) {
from_parts.shift();
to_parts.shift();
}
let i = from_parts.length;
while (i--) from_parts[i] = "..";
return from_parts.concat(to_parts).join("/");
}
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);
}
function base64_decode(encoded) {
if (globalThis.Buffer) {
const buffer = globalThis.Buffer.from(encoded, "base64");
return new Uint8Array(buffer);
}
const binary = atob(encoded);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
}
export {
text_encoder as a,
base64_encode as b,
base64_decode as c,
get_relative_path as g,
text_decoder as t
};
@@ -0,0 +1,8 @@
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
return twMerge(clsx(inputs));
}
export {
cn as c
};
@@ -0,0 +1,45 @@
import { g as getContext, f as escape_html } from "../../chunks/index2.js";
import "clsx";
import "../../chunks/state.svelte.js";
import "@sveltejs/kit/internal";
import "../../chunks/exports.js";
import "../../chunks/utils.js";
import { w as writable } from "../../chunks/index.js";
import "@sveltejs/kit/internal/server";
import "../../chunks/root.js";
function create_updated_store() {
const { set, subscribe } = writable(false);
{
return {
subscribe,
// eslint-disable-next-line @typescript-eslint/require-await
check: async () => false
};
}
}
const stores = {
updated: /* @__PURE__ */ create_updated_store()
};
({
check: stores.updated.check
});
function context() {
return getContext("__request__");
}
const page$1 = {
get error() {
return context().page.error;
},
get status() {
return context().page.status;
}
};
const page = page$1;
function Error$1($$renderer, $$props) {
$$renderer.component(($$renderer2) => {
$$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
});
}
export {
Error$1 as default
};
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
import "./chunks/root.js";
import { s, e, f } from "./chunks/environment.js";
import { g, o, c, s as s2, a, b } from "./chunks/internal.js";
export {
g as get_hooks,
o as options,
s as set_assets,
e as set_building,
c as set_manifest,
f as set_prerendering,
s2 as set_private_env,
a as set_public_env,
b as set_read_implementation
};
@@ -0,0 +1,62 @@
export const manifest = (() => {
function __memo(fn) {
let value;
return () => value ??= (value = fn());
}
return {
appDir: "_app",
appPath: "_app",
assets: new Set([]),
mimeTypes: {},
_: {
client: {start:"_app/immutable/entry/start.DoE5rVjp.js",app:"_app/immutable/entry/app.D90yBOXx.js",imports:["_app/immutable/entry/start.DoE5rVjp.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/entry/app.D90yBOXx.js","_app/immutable/chunks/D4nn9Y_6.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/DTd9pe6t.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
nodes: [
__memo(() => import('./nodes/0.js')),
__memo(() => import('./nodes/1.js')),
__memo(() => import('./nodes/2.js')),
__memo(() => import('./nodes/3.js')),
__memo(() => import('./nodes/4.js'))
],
remotes: {
},
routes: [
{
id: "/",
pattern: /^\/$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 2 },
endpoint: null
},
{
id: "/api/darkmode",
pattern: /^\/api\/darkmode\/?$/,
params: [],
page: null,
endpoint: __memo(() => import('./entries/endpoints/api/darkmode/_server.ts.js'))
},
{
id: "/login",
pattern: /^\/login\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 4 },
endpoint: null
},
{
id: "/logout",
pattern: /^\/logout\/?$/,
params: [],
page: { layouts: [0,], errors: [1,], leaf: 3 },
endpoint: null
}
],
prerendered_routes: new Set([]),
matchers: async () => {
return { };
},
server_assets: {}
}
}
})();
+10
View File
@@ -0,0 +1,10 @@
import * as server from '../entries/pages/_layout.server.ts.js';
export const index = 0;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;
export { server };
export const server_id = "src/routes/+layout.server.ts";
export const imports = ["_app/immutable/nodes/0.DsCqkoz9.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/zcqfpVBB.js","_app/immutable/chunks/Xjya7ye4.js","_app/immutable/chunks/BpNSSBPP.js","_app/immutable/chunks/CoAkxMBS.js","_app/immutable/chunks/BX9MO-1l.js","_app/immutable/chunks/CvA4ASMA.js","_app/immutable/chunks/ggIfGDPQ.js"];
export const stylesheets = ["_app/immutable/assets/0.Ci1WSy1v.css"];
export const fonts = [];
+8
View File
@@ -0,0 +1,8 @@
export const index = 1;
let component_cache;
export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
export const imports = ["_app/immutable/nodes/1.CwhQAky3.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/ggIfGDPQ.js","_app/immutable/chunks/nEbfNkJh.js","_app/immutable/chunks/CPmvlhtF.js","_app/immutable/chunks/BX9MO-1l.js"];
export const stylesheets = [];
export const fonts = [];

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