barebones docker | pocketbase | hono | svelte
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js": {
|
||||
"file": "remote-entry.js",
|
||||
"name": "remote-entry",
|
||||
"src": "../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/server/remote/index.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_utils.js",
|
||||
"_internal2.js",
|
||||
"_shared.js"
|
||||
]
|
||||
},
|
||||
"../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/components/error.svelte": {
|
||||
"file": "entries/fallbacks/error.svelte.js",
|
||||
"name": "entries/fallbacks/error.svelte",
|
||||
"src": "../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/components/error.svelte",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_internal.js",
|
||||
"_internal2.js",
|
||||
"_exports.js",
|
||||
"_shared.js",
|
||||
"_async.js"
|
||||
]
|
||||
},
|
||||
"../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/server/index.js": {
|
||||
"file": "index.js",
|
||||
"name": "index",
|
||||
"src": "../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/server/index.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_internal.js",
|
||||
"_utils.js",
|
||||
"_internal2.js",
|
||||
"_exports.js",
|
||||
"_shared.js",
|
||||
"_async.js",
|
||||
"_uneval.js"
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/server/internal.js": {
|
||||
"file": "internal.js",
|
||||
"name": "internal",
|
||||
"src": ".svelte-kit/generated/server/internal.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_internal.js",
|
||||
"_internal2.js"
|
||||
]
|
||||
},
|
||||
"_async.js": {
|
||||
"file": "chunks/async.js",
|
||||
"name": "async",
|
||||
"imports": [
|
||||
"_uneval.js"
|
||||
]
|
||||
},
|
||||
"_exports.js": {
|
||||
"file": "chunks/exports.js",
|
||||
"name": "exports",
|
||||
"imports": [
|
||||
"_async.js"
|
||||
]
|
||||
},
|
||||
"_internal.js": {
|
||||
"file": "chunks/internal.js",
|
||||
"name": "internal",
|
||||
"imports": [
|
||||
"_internal2.js",
|
||||
"_async.js",
|
||||
"_uneval.js"
|
||||
]
|
||||
},
|
||||
"_internal2.js": {
|
||||
"file": "chunks/internal2.js",
|
||||
"name": "internal"
|
||||
},
|
||||
"_shared.js": {
|
||||
"file": "chunks/shared.js",
|
||||
"name": "shared",
|
||||
"imports": [
|
||||
"_uneval.js"
|
||||
]
|
||||
},
|
||||
"_uneval.js": {
|
||||
"file": "chunks/uneval.js",
|
||||
"name": "uneval"
|
||||
},
|
||||
"_utils.js": {
|
||||
"file": "chunks/utils.js",
|
||||
"name": "utils",
|
||||
"imports": [
|
||||
"_shared.js",
|
||||
"_uneval.js"
|
||||
]
|
||||
},
|
||||
"src/routes/+layout.svelte": {
|
||||
"file": "entries/pages/_layout.svelte.js",
|
||||
"name": "entries/pages/_layout.svelte",
|
||||
"src": "src/routes/+layout.svelte",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_async.js"
|
||||
],
|
||||
"css": [
|
||||
"_app/immutable/assets/_layout.DZVyIXY0.css"
|
||||
]
|
||||
},
|
||||
"src/routes/+page.svelte": {
|
||||
"file": "entries/pages/_page.svelte.js",
|
||||
"name": "entries/pages/_page.svelte",
|
||||
"src": "src/routes/+page.svelte",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_async.js"
|
||||
]
|
||||
},
|
||||
"src/routes/app/debug/increment-svelte/+server.ts": {
|
||||
"file": "entries/endpoints/app/debug/increment-svelte/_server.ts.js",
|
||||
"name": "entries/endpoints/app/debug/increment-svelte/_server.ts",
|
||||
"src": "src/routes/app/debug/increment-svelte/+server.ts",
|
||||
"isEntry": true
|
||||
},
|
||||
"src/routes/debug/+page.server.ts": {
|
||||
"file": "entries/pages/debug/_page.server.ts.js",
|
||||
"name": "entries/pages/debug/_page.server.ts",
|
||||
"src": "src/routes/debug/+page.server.ts",
|
||||
"isEntry": true
|
||||
},
|
||||
"src/routes/debug/+page.svelte": {
|
||||
"file": "entries/pages/debug/_page.svelte.js",
|
||||
"name": "entries/pages/debug/_page.svelte",
|
||||
"src": "src/routes/debug/+page.svelte",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_async.js"
|
||||
],
|
||||
"css": [
|
||||
"_app/immutable/assets/_page.mtd_lTPT.css"
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
h1.svelte-1cmtigg{text-align:center;margin:2rem 0}.counters.svelte-1cmtigg{justify-content:center;gap:2rem;display:flex}.card.svelte-1cmtigg{text-align:center;border:1px solid #ccc;border-radius:8px;min-width:200px;padding:2rem}.value.svelte-1cmtigg{margin:1rem 0;font-size:3rem;font-weight:700}button.svelte-1cmtigg{cursor:pointer;padding:.5rem 1.5rem;font-size:1rem}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,370 @@
|
||||
import "./async.js";
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/array.js
|
||||
/**
|
||||
* Removes nullish values from an array.
|
||||
*
|
||||
* @template T
|
||||
* @param {Array<T>} arr
|
||||
*/
|
||||
function compact(arr) {
|
||||
return arr.filter(
|
||||
/** @returns {val is NonNullable<T>} */
|
||||
(val) => val != null
|
||||
);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/pathname.js
|
||||
var DATA_SUFFIX = "/__data.json";
|
||||
var HTML_DATA_SUFFIX = ".html__data.json";
|
||||
/** @param {string} pathname */
|
||||
function has_data_suffix(pathname) {
|
||||
return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);
|
||||
}
|
||||
/** @param {string} pathname */
|
||||
function add_data_suffix(pathname) {
|
||||
if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX);
|
||||
return pathname.replace(/\/$/, "") + DATA_SUFFIX;
|
||||
}
|
||||
/** @param {string} pathname */
|
||||
function strip_data_suffix(pathname) {
|
||||
if (pathname.endsWith(HTML_DATA_SUFFIX)) return pathname.slice(0, -16) + ".html";
|
||||
return pathname.slice(0, -12);
|
||||
}
|
||||
var ROUTE_SUFFIX = "/__route.js";
|
||||
/**
|
||||
* @param {string} pathname
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function has_resolution_suffix(pathname) {
|
||||
return pathname.endsWith(ROUTE_SUFFIX);
|
||||
}
|
||||
/**
|
||||
* Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint
|
||||
* @param {string} pathname
|
||||
* @returns {string}
|
||||
*/
|
||||
function add_resolution_suffix(pathname) {
|
||||
return pathname.replace(/\/$/, "") + ROUTE_SUFFIX;
|
||||
}
|
||||
/**
|
||||
* @param {string} pathname
|
||||
* @returns {string}
|
||||
*/
|
||||
function strip_resolution_suffix(pathname) {
|
||||
return pathname.slice(0, -11);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/telemetry/noop.js
|
||||
/**
|
||||
* @type {Span}
|
||||
*/
|
||||
var noop_span = {
|
||||
spanContext() {
|
||||
return noop_span_context;
|
||||
},
|
||||
setAttribute() {
|
||||
return this;
|
||||
},
|
||||
setAttributes() {
|
||||
return this;
|
||||
},
|
||||
addEvent() {
|
||||
return this;
|
||||
},
|
||||
setStatus() {
|
||||
return this;
|
||||
},
|
||||
updateName() {
|
||||
return this;
|
||||
},
|
||||
end() {
|
||||
return this;
|
||||
},
|
||||
isRecording() {
|
||||
return false;
|
||||
},
|
||||
recordException() {
|
||||
return this;
|
||||
},
|
||||
addLink() {
|
||||
return this;
|
||||
},
|
||||
addLinks() {
|
||||
return this;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @type {SpanContext}
|
||||
*/
|
||||
var noop_span_context = {
|
||||
traceId: "",
|
||||
spanId: "",
|
||||
traceFlags: 0
|
||||
};
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/url.js
|
||||
/**
|
||||
* Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1
|
||||
* @type {RegExp}
|
||||
*/
|
||||
var SCHEME = /^[a-z][a-z\d+\-.]+:/i;
|
||||
var internal = new URL("a://");
|
||||
/**
|
||||
* @param {string} base
|
||||
* @param {string} path
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* @param {string} path
|
||||
* @param {import('types').TrailingSlash} trailing_slash
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Decode pathname excluding %25 to prevent further double decoding of params
|
||||
* @param {string} pathname
|
||||
*/
|
||||
function decode_pathname(pathname) {
|
||||
return pathname.split("%25").map(decodeURI).join("%25");
|
||||
}
|
||||
/** @param {Record<string, string>} params */
|
||||
function decode_params(params) {
|
||||
for (const key in params) params[key] = decodeURIComponent(params[key]);
|
||||
return params;
|
||||
}
|
||||
/**
|
||||
* @param {URL} url
|
||||
* @param {() => void} callback
|
||||
* @param {(search_param: string) => void} search_params_callback
|
||||
* @param {boolean} [allow_hash]
|
||||
*/
|
||||
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
|
||||
});
|
||||
/**
|
||||
* URL properties that could change during the lifetime of the page,
|
||||
* which excludes things like `origin`
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Disallow access to `url.hash` on the server and in `load`
|
||||
* @param {URL} url
|
||||
*/
|
||||
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");
|
||||
} });
|
||||
}
|
||||
/**
|
||||
* Disallow access to `url.search` and `url.searchParams` during prerendering
|
||||
* @param {URL} url
|
||||
*/
|
||||
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`);
|
||||
} });
|
||||
}
|
||||
/**
|
||||
* Allow URL to be console logged, bypassing disabled properties.
|
||||
* @param {URL} url
|
||||
*/
|
||||
function allow_nodejs_console_log(url) {
|
||||
url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
|
||||
return inspect(new URL(url), opts);
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/hash.js
|
||||
/**
|
||||
* Hash using djb2
|
||||
* @param {import('types').StrictBody[]} values
|
||||
*/
|
||||
function hash(...values) {
|
||||
let hash = 5381;
|
||||
for (const value of values) if (typeof value === "string") {
|
||||
let i = value.length;
|
||||
while (i) hash = hash * 33 ^ value.charCodeAt(--i);
|
||||
} else if (ArrayBuffer.isView(value)) {
|
||||
const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
||||
let i = buffer.length;
|
||||
while (i) hash = hash * 33 ^ buffer[--i];
|
||||
} else throw new TypeError("value must be a string or TypedArray");
|
||||
return (hash >>> 0).toString(36);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/routing.js
|
||||
/**
|
||||
* @param {RegExpMatchArray} match
|
||||
* @param {import('types').RouteParam[]} params
|
||||
* @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
|
||||
*/
|
||||
function exec(match, params, matchers) {
|
||||
/** @type {Record<string, string>} */
|
||||
const result = {};
|
||||
const values = match.slice(1);
|
||||
const values_needing_match = values.filter((value) => value !== void 0);
|
||||
let buffered = 0;
|
||||
for (let i = 0; i < params.length; i += 1) {
|
||||
const param = params[i];
|
||||
let value = values[i - buffered];
|
||||
if (param.chained && param.rest && buffered) {
|
||||
value = values.slice(i - buffered, i + 1).filter((s) => s).join("/");
|
||||
buffered = 0;
|
||||
}
|
||||
if (value === void 0) if (param.rest) value = "";
|
||||
else continue;
|
||||
if (!param.matcher || matchers[param.matcher](value)) {
|
||||
result[param.name] = value;
|
||||
const next_param = params[i + 1];
|
||||
const next_value = values[i + 1];
|
||||
if (next_param && !next_param.rest && next_param.optional && next_value && param.chained) buffered = 0;
|
||||
if (!next_param && !next_value && Object.keys(result).length === values_needing_match.length) buffered = 0;
|
||||
continue;
|
||||
}
|
||||
if (param.optional && param.chained) {
|
||||
buffered++;
|
||||
continue;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (buffered) return;
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Find the first route that matches the given path
|
||||
* @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
|
||||
* @param {string} path - The decoded pathname to match
|
||||
* @param {Route[]} routes
|
||||
* @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
|
||||
* @returns {{ route: Route, params: Record<string, string> } | null}
|
||||
*/
|
||||
function find_route(path, routes, matchers) {
|
||||
for (const route of routes) {
|
||||
const match = route.pattern.exec(path);
|
||||
if (!match) continue;
|
||||
const matched = exec(match, route.params, matchers);
|
||||
if (matched) return {
|
||||
route,
|
||||
params: decode_params(matched)
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/exports.js
|
||||
/**
|
||||
* @param {Set<string>} expected
|
||||
*/
|
||||
function validator(expected) {
|
||||
/**
|
||||
* @param {any} module
|
||||
* @param {string} [file]
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* @param {string} key
|
||||
* @param {string} ext
|
||||
* @returns {string | void}
|
||||
*/
|
||||
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)}`;
|
||||
}
|
||||
var valid_layout_exports = new Set([
|
||||
"load",
|
||||
"prerender",
|
||||
"csr",
|
||||
"ssr",
|
||||
"trailingSlash",
|
||||
"config"
|
||||
]);
|
||||
var valid_page_exports = new Set([...valid_layout_exports, "entries"]);
|
||||
var valid_layout_server_exports = new Set([...valid_layout_exports]);
|
||||
var valid_page_server_exports = new Set([
|
||||
...valid_layout_server_exports,
|
||||
"actions",
|
||||
"entries"
|
||||
]);
|
||||
var valid_server_exports = new Set([
|
||||
"GET",
|
||||
"POST",
|
||||
"PATCH",
|
||||
"PUT",
|
||||
"DELETE",
|
||||
"OPTIONS",
|
||||
"HEAD",
|
||||
"fallback",
|
||||
"prerender",
|
||||
"trailingSlash",
|
||||
"config",
|
||||
"entries"
|
||||
]);
|
||||
var validate_layout_exports = validator(valid_layout_exports);
|
||||
var validate_page_exports = validator(valid_page_exports);
|
||||
var validate_layout_server_exports = validator(valid_layout_server_exports);
|
||||
var validate_page_server_exports = validator(valid_page_server_exports);
|
||||
var validate_server_exports = validator(valid_server_exports);
|
||||
//#endregion
|
||||
export { has_data_suffix as _, validate_server_exports as a, strip_resolution_suffix as b, SCHEME as c, make_trackable as d, normalize_path as f, add_resolution_suffix as g, add_data_suffix as h, validate_page_server_exports as i, decode_pathname as l, noop_span as m, validate_layout_server_exports as n, find_route as o, resolve as p, validate_page_exports as r, hash as s, validate_layout_exports as t, disable_search as u, has_resolution_suffix as v, compact as x, strip_data_suffix as y };
|
||||
@@ -0,0 +1,749 @@
|
||||
import "./internal2.js";
|
||||
import { t as uneval } from "./uneval.js";
|
||||
import { $ as define_property, A as get_next_sibling, B as hydrate_node, C as get, D as clear_text_content, E as component_root, F as boundary, H as set_hydrate_node, I as component_context, J as hydration_failed, L as pop, M as mutable_source, N as set, O as create_text, P as flushSync, Q as array_from, R as push, S as active_reaction, T as set_active_reaction, U as set_hydrating, V as hydrating, W as hydration_mismatch, X as LEGACY_PROPS, Y as experimental_async_required, a as get_render_context, c as getContext, d as ssr_context, et as noop, h as getAbortSignal, j as init_operations, k as get_first_child, l as hasContext, m as lifecycle_function_unavailable, o as createContext, p as hydratable_serialization_failed, q as HYDRATION_ERROR, r as render, s as getAllContexts, t as derived, tt as run, u as setContext, v as is_passive_event, w as set_active_effect, x as active_effect, z as async_mode_flag } from "./async.js";
|
||||
//#region \0rolldown/runtime.js
|
||||
var __defProp = Object.defineProperty;
|
||||
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
||||
var __exportAll = (all, no_symbols) => {
|
||||
let target = {};
|
||||
for (var name in all) __defProp(target, name, {
|
||||
get: all[name],
|
||||
enumerable: true
|
||||
});
|
||||
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
||||
return target;
|
||||
};
|
||||
//#endregion
|
||||
//#region \0virtual:__sveltekit/env
|
||||
var explicit_public_env = {};
|
||||
var rendered_env = {};
|
||||
function set_env(env) {}
|
||||
//#endregion
|
||||
//#region \0virtual:__sveltekit/server
|
||||
var read_implementation = null;
|
||||
function set_read_implementation(fn) {
|
||||
read_implementation = fn;
|
||||
}
|
||||
function set_manifest(_) {}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/internal/client/dom/elements/events.js
|
||||
/**
|
||||
* Used on elements, as a map of event type -> event handler,
|
||||
* and on events themselves to track which element handled an event
|
||||
*/
|
||||
var event_symbol = Symbol("events");
|
||||
/** @type {Set<string>} */
|
||||
var all_registered_events = /* @__PURE__ */ new Set();
|
||||
/** @type {Set<(events: Array<string>) => void>} */
|
||||
var root_event_handles = /* @__PURE__ */ new Set();
|
||||
var last_propagated_event = null;
|
||||
/**
|
||||
* @this {EventTarget}
|
||||
* @param {Event} event
|
||||
* @returns {void}
|
||||
*/
|
||||
function handle_event_propagation(event) {
|
||||
var handler_element = this;
|
||||
var owner_document = handler_element.ownerDocument;
|
||||
var event_name = event.type;
|
||||
var path = event.composedPath?.() || [];
|
||||
var current_target = path[0] || event.target;
|
||||
last_propagated_event = event;
|
||||
var path_idx = 0;
|
||||
var handled_at = last_propagated_event === event && event[event_symbol];
|
||||
if (handled_at) {
|
||||
var at_idx = path.indexOf(handled_at);
|
||||
if (at_idx !== -1 && (handler_element === document || handler_element === window)) {
|
||||
event[event_symbol] = handler_element;
|
||||
return;
|
||||
}
|
||||
var handler_idx = path.indexOf(handler_element);
|
||||
if (handler_idx === -1) return;
|
||||
if (at_idx <= handler_idx) path_idx = at_idx;
|
||||
}
|
||||
current_target = path[path_idx] || event.target;
|
||||
if (current_target === handler_element) return;
|
||||
define_property(event, "currentTarget", {
|
||||
configurable: true,
|
||||
get() {
|
||||
return current_target || owner_document;
|
||||
}
|
||||
});
|
||||
var previous_reaction = active_reaction;
|
||||
var previous_effect = active_effect;
|
||||
set_active_reaction(null);
|
||||
set_active_effect(null);
|
||||
try {
|
||||
/**
|
||||
* @type {unknown}
|
||||
*/
|
||||
var throw_error;
|
||||
/**
|
||||
* @type {unknown[]}
|
||||
*/
|
||||
var other_errors = [];
|
||||
while (current_target !== null) {
|
||||
if (current_target === handler_element) break;
|
||||
try {
|
||||
var delegated = current_target[event_symbol]?.[event_name];
|
||||
if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
|
||||
} catch (error) {
|
||||
if (throw_error) other_errors.push(error);
|
||||
else throw_error = error;
|
||||
}
|
||||
if (event.cancelBubble) break;
|
||||
path_idx++;
|
||||
current_target = path_idx < path.length ? path[path_idx] : null;
|
||||
}
|
||||
if (throw_error) {
|
||||
for (let error of other_errors) queueMicrotask(() => {
|
||||
throw error;
|
||||
});
|
||||
throw throw_error;
|
||||
}
|
||||
} finally {
|
||||
event[event_symbol] = handler_element;
|
||||
delete event.currentTarget;
|
||||
set_active_reaction(previous_reaction);
|
||||
set_active_effect(previous_effect);
|
||||
}
|
||||
}
|
||||
globalThis?.window?.trustedTypes;
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/internal/client/dom/template.js
|
||||
/**
|
||||
* @param {TemplateNode} start
|
||||
* @param {TemplateNode | null} end
|
||||
*/
|
||||
function assign_nodes(start, end) {
|
||||
var effect = active_effect;
|
||||
if (effect.nodes === null) effect.nodes = {
|
||||
start,
|
||||
end,
|
||||
a: null,
|
||||
t: null
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
|
||||
* Transitions will play during the initial render unless the `intro` option is set to `false`.
|
||||
*
|
||||
* @template {Record<string, any>} Props
|
||||
* @template {Record<string, any>} Exports
|
||||
* @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
|
||||
* @param {MountOptions<Props>} options
|
||||
* @returns {Exports}
|
||||
*/
|
||||
function mount$1(component, options) {
|
||||
return _mount(component, options);
|
||||
}
|
||||
/**
|
||||
* Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
|
||||
*
|
||||
* @template {Record<string, any>} Props
|
||||
* @template {Record<string, any>} Exports
|
||||
* @param {ComponentType<SvelteComponent<Props>> | Component<Props, Exports, any>} component
|
||||
* @param {{} extends Props ? {
|
||||
* target: Document | Element | ShadowRoot;
|
||||
* props?: Props;
|
||||
* events?: Record<string, (e: any) => any>;
|
||||
* context?: Map<any, any>;
|
||||
* intro?: boolean;
|
||||
* recover?: boolean;
|
||||
* transformError?: (error: unknown) => unknown;
|
||||
* } : {
|
||||
* target: Document | Element | ShadowRoot;
|
||||
* props: Props;
|
||||
* events?: Record<string, (e: any) => any>;
|
||||
* context?: Map<any, any>;
|
||||
* intro?: boolean;
|
||||
* recover?: boolean;
|
||||
* transformError?: (error: unknown) => unknown;
|
||||
* }} options
|
||||
* @returns {Exports}
|
||||
*/
|
||||
function hydrate$1(component, options) {
|
||||
init_operations();
|
||||
options.intro = options.intro ?? false;
|
||||
const target = options.target;
|
||||
const was_hydrating = hydrating;
|
||||
const previous_hydrate_node = hydrate_node;
|
||||
try {
|
||||
var anchor = /* @__PURE__ */ get_first_child(target);
|
||||
while (anchor && (anchor.nodeType !== 8 || anchor.data !== "[")) anchor = /* @__PURE__ */ get_next_sibling(anchor);
|
||||
if (!anchor) throw HYDRATION_ERROR;
|
||||
set_hydrating(true);
|
||||
set_hydrate_node(anchor);
|
||||
const instance = _mount(component, {
|
||||
...options,
|
||||
anchor
|
||||
});
|
||||
set_hydrating(false);
|
||||
return instance;
|
||||
} catch (error) {
|
||||
if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) throw error;
|
||||
if (error !== HYDRATION_ERROR) console.warn("Failed to hydrate: ", error);
|
||||
if (options.recover === false) hydration_failed();
|
||||
init_operations();
|
||||
clear_text_content(target);
|
||||
set_hydrating(false);
|
||||
return mount$1(component, options);
|
||||
} finally {
|
||||
set_hydrating(was_hydrating);
|
||||
set_hydrate_node(previous_hydrate_node);
|
||||
}
|
||||
}
|
||||
/** @type {Map<EventTarget, Map<string, number>>} */
|
||||
var listeners = /* @__PURE__ */ new Map();
|
||||
/**
|
||||
* @template {Record<string, any>} Exports
|
||||
* @param {ComponentType<SvelteComponent<any>> | Component<any>} Component
|
||||
* @param {MountOptions} options
|
||||
* @returns {Exports}
|
||||
*/
|
||||
function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
|
||||
init_operations();
|
||||
/** @type {Exports} */
|
||||
var component = void 0;
|
||||
var unmount = component_root(() => {
|
||||
var anchor_node = anchor ?? target.appendChild(create_text());
|
||||
boundary(anchor_node, { pending: () => {} }, (anchor_node) => {
|
||||
push({});
|
||||
var ctx = component_context;
|
||||
if (context) ctx.c = context;
|
||||
if (events)
|
||||
/** @type {any} */ props.$$events = events;
|
||||
if (hydrating) assign_nodes(anchor_node, null);
|
||||
component = Component(anchor_node, props) || {};
|
||||
if (hydrating) {
|
||||
/** @type {Effect & { nodes: EffectNodes }} */ active_effect.nodes.end = hydrate_node;
|
||||
if (hydrate_node === null || hydrate_node.nodeType !== 8 || hydrate_node.data !== "]") {
|
||||
hydration_mismatch();
|
||||
throw HYDRATION_ERROR;
|
||||
}
|
||||
}
|
||||
pop();
|
||||
}, transformError);
|
||||
/** @type {Set<string>} */
|
||||
var registered_events = /* @__PURE__ */ new Set();
|
||||
/** @param {Array<string>} events */
|
||||
var event_handle = (events) => {
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
var event_name = events[i];
|
||||
if (registered_events.has(event_name)) continue;
|
||||
registered_events.add(event_name);
|
||||
var passive = is_passive_event(event_name);
|
||||
for (const node of [target, document]) {
|
||||
var counts = listeners.get(node);
|
||||
if (counts === void 0) {
|
||||
counts = /* @__PURE__ */ new Map();
|
||||
listeners.set(node, counts);
|
||||
}
|
||||
var count = counts.get(event_name);
|
||||
if (count === void 0) {
|
||||
node.addEventListener(event_name, handle_event_propagation, { passive });
|
||||
counts.set(event_name, 1);
|
||||
} else counts.set(event_name, count + 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
event_handle(array_from(all_registered_events));
|
||||
root_event_handles.add(event_handle);
|
||||
return () => {
|
||||
for (var event_name of registered_events) for (const node of [target, document]) {
|
||||
var counts = listeners.get(node);
|
||||
var count = counts.get(event_name);
|
||||
if (--count == 0) {
|
||||
node.removeEventListener(event_name, handle_event_propagation);
|
||||
counts.delete(event_name);
|
||||
if (counts.size === 0) listeners.delete(node);
|
||||
} else counts.set(event_name, count);
|
||||
}
|
||||
root_event_handles.delete(event_handle);
|
||||
if (anchor_node !== anchor) anchor_node.parentNode?.removeChild(anchor_node);
|
||||
};
|
||||
});
|
||||
mounted_components.set(component, unmount);
|
||||
return component;
|
||||
}
|
||||
/**
|
||||
* References of the components that were mounted or hydrated.
|
||||
* Uses a `WeakMap` to avoid memory leaks.
|
||||
*/
|
||||
var mounted_components = /* @__PURE__ */ new WeakMap();
|
||||
/**
|
||||
* Unmounts a component that was previously mounted using `mount` or `hydrate`.
|
||||
*
|
||||
* Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM.
|
||||
*
|
||||
* Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`).
|
||||
*
|
||||
* ```js
|
||||
* import { mount, unmount } from 'svelte';
|
||||
* import App from './App.svelte';
|
||||
*
|
||||
* const app = mount(App, { target: document.body });
|
||||
*
|
||||
* // later...
|
||||
* unmount(app, { outro: true });
|
||||
* ```
|
||||
* @param {Record<string, any>} component
|
||||
* @param {{ outro?: boolean }} [options]
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
function unmount$1(component, options) {
|
||||
const fn = mounted_components.get(component);
|
||||
if (fn) {
|
||||
mounted_components.delete(component);
|
||||
return fn(options);
|
||||
}
|
||||
return Promise.resolve();
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/legacy/legacy-client.js
|
||||
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
||||
/**
|
||||
* Takes the component function and returns a Svelte 4 compatible component constructor.
|
||||
*
|
||||
* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
|
||||
*
|
||||
* @template {Record<string, any>} Props
|
||||
* @template {Record<string, any>} Exports
|
||||
* @template {Record<string, any>} Events
|
||||
* @template {Record<string, any>} Slots
|
||||
*
|
||||
* @param {SvelteComponent<Props, Events, Slots> | Component<Props>} component
|
||||
* @returns {ComponentType<SvelteComponent<Props, Events, Slots> & Exports>}
|
||||
*/
|
||||
function asClassComponent$1(component) {
|
||||
return class extends Svelte4Component {
|
||||
/** @param {any} options */
|
||||
constructor(options) {
|
||||
super({
|
||||
component,
|
||||
...options
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Support using the component as both a class and function during the transition period
|
||||
* @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters<Component<Record<string, any>>>): ReturnType<Component<Record<string, any>, Record<string, any>>>;}} LegacyComponentType
|
||||
*/
|
||||
var Svelte4Component = class {
|
||||
/** @type {any} */
|
||||
#events;
|
||||
/** @type {Record<string, any>} */
|
||||
#instance;
|
||||
/**
|
||||
* @param {ComponentConstructorOptions & {
|
||||
* component: any;
|
||||
* }} options
|
||||
*/
|
||||
constructor(options) {
|
||||
var sources = /* @__PURE__ */ new Map();
|
||||
/**
|
||||
* @param {string | symbol} key
|
||||
* @param {unknown} value
|
||||
*/
|
||||
var add_source = (key, value) => {
|
||||
var s = /* @__PURE__ */ mutable_source(value, false, false);
|
||||
sources.set(key, s);
|
||||
return s;
|
||||
};
|
||||
const props = new Proxy({
|
||||
...options.props || {},
|
||||
$$events: {}
|
||||
}, {
|
||||
get(target, prop) {
|
||||
return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
|
||||
},
|
||||
has(target, prop) {
|
||||
if (prop === LEGACY_PROPS) return true;
|
||||
get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
|
||||
return Reflect.has(target, prop);
|
||||
},
|
||||
set(target, prop, value) {
|
||||
set(sources.get(prop) ?? add_source(prop, value), value);
|
||||
return Reflect.set(target, prop, value);
|
||||
}
|
||||
});
|
||||
this.#instance = (options.hydrate ? hydrate$1 : mount$1)(options.component, {
|
||||
target: options.target,
|
||||
anchor: options.anchor,
|
||||
props,
|
||||
context: options.context,
|
||||
intro: options.intro ?? false,
|
||||
recover: options.recover,
|
||||
transformError: options.transformError
|
||||
});
|
||||
if (!async_mode_flag && (!options?.props?.$$host || options.sync === false)) flushSync();
|
||||
this.#events = props.$$events;
|
||||
for (const key of Object.keys(this.#instance)) {
|
||||
if (key === "$set" || key === "$destroy" || key === "$on") continue;
|
||||
define_property(this, key, {
|
||||
get() {
|
||||
return this.#instance[key];
|
||||
},
|
||||
/** @param {any} value */
|
||||
set(value) {
|
||||
this.#instance[key] = value;
|
||||
},
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
this.#instance.$set = (next) => {
|
||||
Object.assign(props, next);
|
||||
};
|
||||
this.#instance.$destroy = () => {
|
||||
unmount$1(this.#instance);
|
||||
};
|
||||
}
|
||||
/** @param {Record<string, any>} props */
|
||||
$set(props) {
|
||||
this.#instance.$set(props);
|
||||
}
|
||||
/**
|
||||
* @param {string} event
|
||||
* @param {(...args: any[]) => any} callback
|
||||
* @returns {any}
|
||||
*/
|
||||
$on(event, callback) {
|
||||
this.#events[event] = this.#events[event] || [];
|
||||
/** @param {any[]} args */
|
||||
const cb = (...args) => callback.call(this, ...args);
|
||||
this.#events[event].push(cb);
|
||||
return () => {
|
||||
this.#events[event] = this.#events[event].filter(
|
||||
/** @param {any} fn */
|
||||
(fn) => fn !== cb
|
||||
);
|
||||
};
|
||||
}
|
||||
$destroy() {
|
||||
this.#instance.$destroy();
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/legacy/legacy-server.js
|
||||
/** @import { SvelteComponent } from '../index.js' */
|
||||
/** @import { Csp } from '#server' */
|
||||
/** @typedef {{ head: string, html: string, css: { code: string, map: null }; hashes?: { script: `sha256-${string}`[] } }} LegacyRenderResult */
|
||||
/**
|
||||
* Takes a Svelte 5 component and returns a Svelte 4 compatible component constructor.
|
||||
*
|
||||
* @deprecated Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
|
||||
*
|
||||
* @template {Record<string, any>} Props
|
||||
* @template {Record<string, any>} Exports
|
||||
* @template {Record<string, any>} Events
|
||||
* @template {Record<string, any>} Slots
|
||||
*
|
||||
* @param {SvelteComponent<Props, Events, Slots>} component
|
||||
* @returns {typeof SvelteComponent<Props, Events, Slots> & Exports}
|
||||
*/
|
||||
function asClassComponent(component) {
|
||||
const component_constructor = asClassComponent$1(component);
|
||||
/** @type {(props?: {}, opts?: { $$slots?: {}; context?: Map<any, any>; csp?: Csp; transformError?: (error: unknown) => unknown }) => LegacyRenderResult & PromiseLike<LegacyRenderResult> } */
|
||||
const _render = (props, { context, csp, transformError } = {}) => {
|
||||
const result = render(component, {
|
||||
props,
|
||||
context,
|
||||
csp,
|
||||
transformError
|
||||
});
|
||||
const munged = Object.defineProperties({}, {
|
||||
css: { value: {
|
||||
code: "",
|
||||
map: null
|
||||
} },
|
||||
head: { get: () => result.head },
|
||||
html: { get: () => result.body },
|
||||
then: {
|
||||
/**
|
||||
* this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
|
||||
*
|
||||
* @template TResult1
|
||||
* @template [TResult2=never]
|
||||
* @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
|
||||
* @param { (reason: unknown) => TResult2 } onrejected
|
||||
*/
|
||||
value: (onfulfilled, onrejected) => {
|
||||
if (!async_mode_flag) {
|
||||
const user_result = onfulfilled({
|
||||
css: munged.css,
|
||||
head: munged.head,
|
||||
html: munged.html
|
||||
});
|
||||
return Promise.resolve(user_result);
|
||||
}
|
||||
return result.then((result) => {
|
||||
return onfulfilled({
|
||||
css: munged.css,
|
||||
head: result.head,
|
||||
html: result.body,
|
||||
hashes: result.hashes
|
||||
});
|
||||
}, onrejected);
|
||||
} }
|
||||
});
|
||||
return munged;
|
||||
};
|
||||
component_constructor.render = _render;
|
||||
return component_constructor;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/internal/server/hydratable.js
|
||||
/** @import { HydratableLookupEntry } from '#server' */
|
||||
/**
|
||||
* @template T
|
||||
* @param {string} key
|
||||
* @param {() => T} fn
|
||||
* @returns {T}
|
||||
*/
|
||||
function hydratable(key, fn) {
|
||||
if (!async_mode_flag) experimental_async_required("hydratable");
|
||||
const { hydratable } = get_render_context();
|
||||
let entry = hydratable.lookup.get(key);
|
||||
if (entry !== void 0) return entry.value;
|
||||
const value = fn();
|
||||
entry = encode(key, value, hydratable.unresolved_promises);
|
||||
hydratable.lookup.set(key, entry);
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* @param {string} key
|
||||
* @param {any} value
|
||||
* @param {Map<Promise<any>, string>} [unresolved]
|
||||
*/
|
||||
function encode(key, value, unresolved) {
|
||||
/** @type {HydratableLookupEntry} */
|
||||
const entry = {
|
||||
value,
|
||||
serialized: ""
|
||||
};
|
||||
let uid = 1;
|
||||
entry.serialized = uneval(entry.value, (value, uneval) => {
|
||||
if (is_promise(value)) {
|
||||
const placeholder = `"${uid++}"`;
|
||||
const p = value.then((v) => {
|
||||
entry.serialized = entry.serialized.replace(placeholder, () => `r(${uneval(v)})`);
|
||||
}).catch((devalue_error) => hydratable_serialization_failed(key, serialization_stack(entry.stack, devalue_error?.stack)));
|
||||
unresolved?.set(p, key);
|
||||
p.catch(() => {}).finally(() => unresolved?.delete(p));
|
||||
(entry.promises ??= []).push(p);
|
||||
return placeholder;
|
||||
}
|
||||
});
|
||||
return entry;
|
||||
}
|
||||
/**
|
||||
* @param {any} value
|
||||
* @returns {value is Promise<any>}
|
||||
*/
|
||||
function is_promise(value) {
|
||||
return Object.prototype.toString.call(value) === "[object Promise]";
|
||||
}
|
||||
/**
|
||||
* @param {string | undefined} root_stack
|
||||
* @param {string | undefined} uneval_stack
|
||||
*/
|
||||
function serialization_stack(root_stack, uneval_stack) {
|
||||
let out = "";
|
||||
if (root_stack) out += root_stack + "\n";
|
||||
if (uneval_stack) out += "Caused by:\n" + uneval_stack + "\n";
|
||||
return out || "<missing stack trace>";
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/internal/server/blocks/snippet.js
|
||||
/** @import { Snippet } from 'svelte' */
|
||||
/** @import { Renderer } from '../renderer' */
|
||||
/** @import { Getters } from '#shared' */
|
||||
/**
|
||||
* Create a snippet programmatically
|
||||
* @template {unknown[]} Params
|
||||
* @param {(...params: Getters<Params>) => {
|
||||
* render: () => string
|
||||
* setup?: (element: Element) => void | (() => void)
|
||||
* }} fn
|
||||
* @returns {Snippet<Params>}
|
||||
*/
|
||||
function createRawSnippet(fn) {
|
||||
return (renderer, ...args) => {
|
||||
var getters = args.map((value) => () => value);
|
||||
renderer.push(fn(...getters).render().trim());
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/svelte@5.56.3/node_modules/svelte/src/index-server.js
|
||||
/** @import { SSRContext } from '#server' */
|
||||
/** @import { Renderer } from './internal/server/renderer.js' */
|
||||
var index_server_exports = /* @__PURE__ */ __exportAll({
|
||||
afterUpdate: () => noop,
|
||||
beforeUpdate: () => noop,
|
||||
createContext: () => createContext,
|
||||
createEventDispatcher: () => createEventDispatcher,
|
||||
createRawSnippet: () => createRawSnippet,
|
||||
flushSync: () => noop,
|
||||
fork: () => fork,
|
||||
getAbortSignal: () => getAbortSignal,
|
||||
getAllContexts: () => getAllContexts,
|
||||
getContext: () => getContext,
|
||||
hasContext: () => hasContext,
|
||||
hydratable: () => hydratable,
|
||||
hydrate: () => hydrate,
|
||||
mount: () => mount,
|
||||
onDestroy: () => onDestroy,
|
||||
onMount: () => noop,
|
||||
setContext: () => setContext,
|
||||
settled: () => settled,
|
||||
tick: () => tick,
|
||||
unmount: () => unmount,
|
||||
untrack: () => run
|
||||
});
|
||||
/** @param {() => void} fn */
|
||||
function onDestroy(fn) {
|
||||
/** @type {Renderer} */ ssr_context.r.on_destroy(fn);
|
||||
}
|
||||
function createEventDispatcher() {
|
||||
return noop;
|
||||
}
|
||||
function mount() {
|
||||
lifecycle_function_unavailable("mount");
|
||||
}
|
||||
function hydrate() {
|
||||
lifecycle_function_unavailable("hydrate");
|
||||
}
|
||||
function unmount() {
|
||||
lifecycle_function_unavailable("unmount");
|
||||
}
|
||||
function fork() {
|
||||
lifecycle_function_unavailable("fork");
|
||||
}
|
||||
async function tick() {}
|
||||
async function settled() {}
|
||||
//#endregion
|
||||
//#region .svelte-kit/generated/root.svelte
|
||||
function Root($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer) => {
|
||||
let { stores, page, constructors, components = [], form, errors = [], error, data_0 = null, data_1 = null } = $$props;
|
||||
let data = derived(() => ({
|
||||
"0": data_0,
|
||||
"1": data_1
|
||||
}));
|
||||
setContext("__svelte__", stores);
|
||||
stores.page.set(page);
|
||||
derived(() => constructors[1]);
|
||||
function pyramid($$renderer, depth) {
|
||||
const Pyramid = constructors[depth];
|
||||
function failed($$renderer, error) {
|
||||
const ErrorPage = errors[depth];
|
||||
if (ErrorPage) {
|
||||
$$renderer.push("<!--[-->");
|
||||
ErrorPage($$renderer, { error });
|
||||
$$renderer.push("<!--]-->");
|
||||
} else {
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push("<!--]-->");
|
||||
}
|
||||
}
|
||||
$$renderer.boundary({ failed: errors[depth] ? failed : void 0 }, ($$renderer) => {
|
||||
$$renderer.push(`<!--[-->`);
|
||||
if (constructors[depth + 1]) {
|
||||
$$renderer.push("<!--[0-->");
|
||||
const d = data()[depth];
|
||||
if (Pyramid) {
|
||||
$$renderer.push("<!--[-->");
|
||||
Pyramid($$renderer, {
|
||||
data: d,
|
||||
form,
|
||||
params: page.params,
|
||||
children: ($$renderer) => {
|
||||
pyramid($$renderer, depth + 1);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push("<!--]-->");
|
||||
} else {
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push("<!--]-->");
|
||||
}
|
||||
} else {
|
||||
$$renderer.push("<!--[-1-->");
|
||||
const d = data()[depth];
|
||||
if (Pyramid) {
|
||||
$$renderer.push("<!--[-->");
|
||||
Pyramid($$renderer, {
|
||||
data: d,
|
||||
form,
|
||||
params: page.params,
|
||||
error
|
||||
});
|
||||
$$renderer.push("<!--]-->");
|
||||
} else {
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push("<!--]-->");
|
||||
}
|
||||
}
|
||||
$$renderer.push(`<!--]-->`);
|
||||
$$renderer.push(`<!--]-->`);
|
||||
});
|
||||
}
|
||||
pyramid($$renderer, 0);
|
||||
$$renderer.push(`<!----> `);
|
||||
$$renderer.push("<!--[-1-->");
|
||||
$$renderer.push(`<!--]-->`);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
//#region .svelte-kit/generated/server/internal.js
|
||||
var options = {
|
||||
app_template_contains_nonce: false,
|
||||
async: true,
|
||||
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,
|
||||
hash_routing: false,
|
||||
hooks: null,
|
||||
link_header_preload: false,
|
||||
root: asClassComponent(Root),
|
||||
service_worker: false,
|
||||
service_worker_options: void 0,
|
||||
server_error_boundaries: true,
|
||||
templates: {
|
||||
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <meta name=\"text-scale\" content=\"scale\" />\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>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
||||
},
|
||||
version_hash: "1d1q9qt"
|
||||
};
|
||||
async function get_hooks() {
|
||||
let handle;
|
||||
let handleFetch;
|
||||
let handleError;
|
||||
let handleValidationError;
|
||||
let init;
|
||||
let reroute;
|
||||
let transport;
|
||||
return {
|
||||
handle,
|
||||
handleFetch,
|
||||
handleError,
|
||||
handleValidationError,
|
||||
init,
|
||||
reroute,
|
||||
transport
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { set_manifest as a, rendered_env as c, read_implementation as i, set_env as l, options as n, set_read_implementation as o, index_server_exports as r, explicit_public_env as s, get_hooks as t, __commonJSMin as u };
|
||||
@@ -0,0 +1,34 @@
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/paths/internal/server.js
|
||||
var base = "";
|
||||
var assets = base;
|
||||
var app_dir = "_app";
|
||||
var initial = {
|
||||
base,
|
||||
assets
|
||||
};
|
||||
initial.base;
|
||||
/**
|
||||
* @param {{ base: string, assets: string }} paths
|
||||
*/
|
||||
function override(paths) {
|
||||
base = paths.base;
|
||||
assets = paths.assets;
|
||||
}
|
||||
function reset() {
|
||||
base = initial.base;
|
||||
assets = initial.assets;
|
||||
}
|
||||
/** @param {string} path */
|
||||
function set_assets(path) {
|
||||
assets = initial.assets = path;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/env/internal.js
|
||||
var version = "1782220703091";
|
||||
var prerendering = false;
|
||||
function set_building() {}
|
||||
function set_prerendering() {
|
||||
prerendering = true;
|
||||
}
|
||||
//#endregion
|
||||
export { app_dir as a, override as c, version as i, reset as l, set_building as n, assets as o, set_prerendering as r, base as s, prerendering as t, set_assets as u };
|
||||
@@ -0,0 +1,714 @@
|
||||
import { a as is_plain_object$1, c as is_valid_array_len, d as valid_array_indices, f as MAX_ARRAY_INDEX, i as get_type, l as stringify_key, n as DevalueError, o as is_primitive, r as enumerable_symbols, s as is_valid_array_index, u as stringify_string } from "./uneval.js";
|
||||
import { HttpError, SvelteKitError } from "@sveltejs/kit/internal";
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/functions.js
|
||||
function noop() {}
|
||||
/**
|
||||
* @template T
|
||||
* @param {() => T} fn
|
||||
*/
|
||||
function once(fn) {
|
||||
let done = false;
|
||||
/** @type T */
|
||||
let result;
|
||||
return () => {
|
||||
if (done) return result;
|
||||
done = true;
|
||||
return result = fn();
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/base64.js
|
||||
/** @type {(array_buffer: ArrayBuffer) => string} */
|
||||
function encode_native(array_buffer) {
|
||||
return new Uint8Array(array_buffer).toBase64();
|
||||
}
|
||||
/** @type {(base64: string) => ArrayBuffer} */
|
||||
function decode_native(base64) {
|
||||
return Uint8Array.fromBase64(base64).buffer;
|
||||
}
|
||||
/** @type {(array_buffer: ArrayBuffer) => string} */
|
||||
function encode_buffer(array_buffer) {
|
||||
return Buffer.from(array_buffer).toString("base64");
|
||||
}
|
||||
/** @type {(base64: string) => ArrayBuffer} */
|
||||
function decode_buffer(base64) {
|
||||
return Uint8Array.from(Buffer.from(base64, "base64")).buffer;
|
||||
}
|
||||
/** @type {(array_buffer: ArrayBuffer) => string} */
|
||||
function encode_legacy(array_buffer) {
|
||||
const array = new Uint8Array(array_buffer);
|
||||
let binary = "";
|
||||
const chunk_size = 32768;
|
||||
for (let i = 0; i < array.length; i += chunk_size) {
|
||||
const chunk = array.subarray(i, i + chunk_size);
|
||||
binary += String.fromCharCode.apply(null, chunk);
|
||||
}
|
||||
return btoa(binary);
|
||||
}
|
||||
/** @type {(base64: string) => ArrayBuffer} */
|
||||
function decode_legacy(base64) {
|
||||
const binary_string = atob(base64);
|
||||
const len = binary_string.length;
|
||||
const array = new Uint8Array(len);
|
||||
for (let i = 0; i < len; i++) array[i] = binary_string.charCodeAt(i);
|
||||
return array.buffer;
|
||||
}
|
||||
var native = typeof Uint8Array.fromBase64 === "function";
|
||||
var buffer = typeof process === "object" && process.versions?.node !== void 0;
|
||||
var encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
|
||||
var decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/parse.js
|
||||
/**
|
||||
* Revive a value serialized with `devalue.stringify`
|
||||
* @param {string} serialized
|
||||
* @param {Record<string, (value: any) => any>} [revivers]
|
||||
*/
|
||||
function parse(serialized, revivers) {
|
||||
return unflatten(JSON.parse(serialized), revivers);
|
||||
}
|
||||
/**
|
||||
* Revive a value flattened with `devalue.stringify`
|
||||
* @param {number | any[]} parsed
|
||||
* @param {Record<string, (value: any) => any>} [revivers]
|
||||
*/
|
||||
function unflatten(parsed, revivers) {
|
||||
if (typeof parsed === "number") return hydrate(parsed, true);
|
||||
if (!Array.isArray(parsed) || parsed.length === 0) throw new Error("Invalid input");
|
||||
const values = parsed;
|
||||
const hydrated = Array(values.length);
|
||||
/**
|
||||
* A set of values currently being hydrated with custom revivers,
|
||||
* used to detect invalid cyclical dependencies
|
||||
* @type {Set<number> | null}
|
||||
*/
|
||||
let hydrating = null;
|
||||
/**
|
||||
* @param {number} index
|
||||
* @returns {any}
|
||||
*/
|
||||
function hydrate(index, standalone = false) {
|
||||
if (index === -1) return void 0;
|
||||
if (index === -3) return NaN;
|
||||
if (index === -4) return Infinity;
|
||||
if (index === -5) return -Infinity;
|
||||
if (index === -6) return -0;
|
||||
if (standalone || typeof index !== "number") throw new Error(`Invalid input`);
|
||||
if (index in hydrated) return hydrated[index];
|
||||
const value = values[index];
|
||||
if (!value || typeof value !== "object") hydrated[index] = value;
|
||||
else if (Array.isArray(value)) if (typeof value[0] === "string") {
|
||||
const type = value[0];
|
||||
const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : void 0;
|
||||
if (reviver) {
|
||||
let i = value[1];
|
||||
if (typeof i !== "number") i = values.push(value[1]) - 1;
|
||||
hydrating ??= /* @__PURE__ */ new Set();
|
||||
if (hydrating.has(i)) throw new Error("Invalid circular reference");
|
||||
hydrating.add(i);
|
||||
hydrated[index] = reviver(hydrate(i));
|
||||
hydrating.delete(i);
|
||||
return hydrated[index];
|
||||
}
|
||||
switch (type) {
|
||||
case "Date":
|
||||
hydrated[index] = new Date(value[1]);
|
||||
break;
|
||||
case "Set":
|
||||
const set = /* @__PURE__ */ new Set();
|
||||
hydrated[index] = set;
|
||||
for (let i = 1; i < value.length; i += 1) set.add(hydrate(value[i]));
|
||||
break;
|
||||
case "Map":
|
||||
const map = /* @__PURE__ */ new Map();
|
||||
hydrated[index] = map;
|
||||
for (let i = 1; i < value.length; i += 2) map.set(hydrate(value[i]), hydrate(value[i + 1]));
|
||||
break;
|
||||
case "RegExp":
|
||||
hydrated[index] = new RegExp(value[1], value[2]);
|
||||
break;
|
||||
case "Object": {
|
||||
const wrapped_index = value[1];
|
||||
if (typeof values[wrapped_index] === "object" && values[wrapped_index][0] !== "BigInt") throw new Error("Invalid input");
|
||||
hydrated[index] = Object(hydrate(wrapped_index));
|
||||
break;
|
||||
}
|
||||
case "BigInt":
|
||||
hydrated[index] = BigInt(value[1]);
|
||||
break;
|
||||
case "null":
|
||||
const obj = Object.create(null);
|
||||
hydrated[index] = obj;
|
||||
for (let i = 1; i < value.length; i += 2) {
|
||||
if (value[i] === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
|
||||
obj[value[i]] = hydrate(value[i + 1]);
|
||||
}
|
||||
break;
|
||||
case "Int8Array":
|
||||
case "Uint8Array":
|
||||
case "Uint8ClampedArray":
|
||||
case "Int16Array":
|
||||
case "Uint16Array":
|
||||
case "Float16Array":
|
||||
case "Int32Array":
|
||||
case "Uint32Array":
|
||||
case "Float32Array":
|
||||
case "Float64Array":
|
||||
case "BigInt64Array":
|
||||
case "BigUint64Array":
|
||||
case "DataView": {
|
||||
if (values[value[1]][0] !== "ArrayBuffer") throw new Error("Invalid data");
|
||||
const TypedArrayConstructor = globalThis[type];
|
||||
const buffer = hydrate(value[1]);
|
||||
hydrated[index] = value[2] !== void 0 ? new TypedArrayConstructor(buffer, value[2], value[3]) : new TypedArrayConstructor(buffer);
|
||||
break;
|
||||
}
|
||||
case "ArrayBuffer": {
|
||||
const base64 = value[1];
|
||||
if (typeof base64 !== "string") throw new Error("Invalid ArrayBuffer encoding");
|
||||
hydrated[index] = decode64(base64);
|
||||
break;
|
||||
}
|
||||
case "Temporal.Duration":
|
||||
case "Temporal.Instant":
|
||||
case "Temporal.PlainDate":
|
||||
case "Temporal.PlainTime":
|
||||
case "Temporal.PlainDateTime":
|
||||
case "Temporal.PlainMonthDay":
|
||||
case "Temporal.PlainYearMonth":
|
||||
case "Temporal.ZonedDateTime": {
|
||||
const temporalName = type.slice(9);
|
||||
hydrated[index] = Temporal[temporalName].from(value[1]);
|
||||
break;
|
||||
}
|
||||
case "URL":
|
||||
hydrated[index] = new URL(value[1]);
|
||||
break;
|
||||
case "URLSearchParams":
|
||||
hydrated[index] = new URLSearchParams(value[1]);
|
||||
break;
|
||||
default: throw new Error(`Unknown type ${type}`);
|
||||
}
|
||||
} else if (value[0] === -7) {
|
||||
const len = value[1];
|
||||
if (!is_valid_array_len(len)) throw new Error("Invalid input");
|
||||
/** @type {any[]} */
|
||||
const array = [];
|
||||
hydrated[index] = array;
|
||||
array[MAX_ARRAY_INDEX] = void 0;
|
||||
delete array[MAX_ARRAY_INDEX];
|
||||
for (let i = 2; i < value.length; i += 2) {
|
||||
const idx = value[i];
|
||||
if (!is_valid_array_index(idx) || idx >= len) throw new Error("Invalid input");
|
||||
array[idx] = hydrate(value[i + 1]);
|
||||
}
|
||||
array.length = len;
|
||||
} else {
|
||||
const array = new Array(value.length);
|
||||
hydrated[index] = array;
|
||||
for (let i = 0; i < value.length; i += 1) {
|
||||
const n = value[i];
|
||||
if (n === -2) continue;
|
||||
array[i] = hydrate(n);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/** @type {Record<string, any>} */
|
||||
const object = {};
|
||||
hydrated[index] = object;
|
||||
for (const key of Object.keys(value)) {
|
||||
if (key === "__proto__") throw new Error("Cannot parse an object with a `__proto__` property");
|
||||
const n = value[key];
|
||||
object[key] = hydrate(n);
|
||||
}
|
||||
}
|
||||
return hydrated[index];
|
||||
}
|
||||
return hydrate(0);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/stringify.js
|
||||
/**
|
||||
* Turn a value into a JSON string that can be parsed with `devalue.parse`
|
||||
* @param {any} value
|
||||
* @param {Record<string, (value: any) => any>} [reducers]
|
||||
*/
|
||||
function stringify$1(value, reducers) {
|
||||
const stringified = run(false, value, reducers);
|
||||
return typeof stringified === "string" ? stringified : `[${stringified.join(",")}]`;
|
||||
}
|
||||
/**
|
||||
* @param {boolean} async
|
||||
* @param {any} value
|
||||
* @param {Record<string, (value: any) => any>} [reducers]
|
||||
*/
|
||||
function run(async, value, reducers) {
|
||||
/** @type {any[]} */
|
||||
const stringified = [];
|
||||
/** @type {Map<any, number>} */
|
||||
const indexes = /* @__PURE__ */ new Map();
|
||||
/** @type {Array<{ key: string, fn: (value: any) => any }>} */
|
||||
const custom = [];
|
||||
if (reducers) for (const key of Object.getOwnPropertyNames(reducers)) custom.push({
|
||||
key,
|
||||
fn: reducers[key]
|
||||
});
|
||||
/** @type {string[]} */
|
||||
const keys = [];
|
||||
let p = 0;
|
||||
/**
|
||||
* @param {any} thing
|
||||
* @param {number} [index]
|
||||
*/
|
||||
function flatten(thing, index) {
|
||||
if (thing === void 0) return -1;
|
||||
if (Number.isNaN(thing)) return -3;
|
||||
if (thing === Infinity) return -4;
|
||||
if (thing === -Infinity) return -5;
|
||||
if (thing === 0 && 1 / thing < 0) return -6;
|
||||
if (indexes.has(thing)) return indexes.get(thing);
|
||||
index ??= p++;
|
||||
indexes.set(thing, index);
|
||||
for (const { key, fn } of custom) {
|
||||
const value = fn(thing);
|
||||
if (value) {
|
||||
stringified[index] = `["${key}",${flatten(value)}]`;
|
||||
return index;
|
||||
}
|
||||
}
|
||||
if (typeof thing === "function") throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
||||
else if (typeof thing === "symbol") throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
||||
/** @type {string | Promise<any>} */
|
||||
let str = "";
|
||||
if (is_primitive(thing)) str = stringify_primitive(thing);
|
||||
else if (typeof thing.then === "function") {
|
||||
if (!async) throw new DevalueError(`Cannot stringify a Promise or thenable — use stringifyAsync instead`, keys, thing, value);
|
||||
str = Promise.resolve(thing).then((value) => {
|
||||
const i = flatten(value, index);
|
||||
if (i < 0) stringified[index] = i;
|
||||
});
|
||||
} else {
|
||||
const type = get_type(thing);
|
||||
switch (type) {
|
||||
case "Number":
|
||||
case "String":
|
||||
case "Boolean":
|
||||
case "BigInt":
|
||||
str = `["Object",${flatten(thing.valueOf())}]`;
|
||||
break;
|
||||
case "Date":
|
||||
str = `["Date","${!isNaN(thing.getDate()) ? thing.toISOString() : ""}"]`;
|
||||
break;
|
||||
case "URL":
|
||||
str = `["URL",${stringify_string(thing.toString())}]`;
|
||||
break;
|
||||
case "URLSearchParams":
|
||||
str = `["URLSearchParams",${stringify_string(thing.toString())}]`;
|
||||
break;
|
||||
case "RegExp":
|
||||
const { source, flags } = thing;
|
||||
str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`;
|
||||
break;
|
||||
case "Array": {
|
||||
let mostly_dense = false;
|
||||
str = "[";
|
||||
for (let i = 0; i < thing.length; i += 1) {
|
||||
if (i > 0) str += ",";
|
||||
if (Object.hasOwn(thing, i)) {
|
||||
keys.push(`[${i}]`);
|
||||
str += flatten(thing[i]);
|
||||
keys.pop();
|
||||
} else if (mostly_dense) str += -2;
|
||||
else {
|
||||
const populated_keys = valid_array_indices(thing);
|
||||
const population = populated_keys.length;
|
||||
const d = String(thing.length).length;
|
||||
if ((thing.length - population) * 3 > 4 + d + population * (d + 1)) {
|
||||
str = "[-7," + thing.length;
|
||||
for (let j = 0; j < populated_keys.length; j++) {
|
||||
const key = populated_keys[j];
|
||||
keys.push(`[${key}]`);
|
||||
str += "," + key + "," + flatten(thing[key]);
|
||||
keys.pop();
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
mostly_dense = true;
|
||||
str += -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
str += "]";
|
||||
break;
|
||||
}
|
||||
case "Set":
|
||||
str = "[\"Set\"";
|
||||
for (const value of thing) str += `,${flatten(value)}`;
|
||||
str += "]";
|
||||
break;
|
||||
case "Map":
|
||||
str = "[\"Map\"";
|
||||
for (const [key, value] of thing) {
|
||||
keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
|
||||
str += `,${flatten(key)},${flatten(value)}`;
|
||||
keys.pop();
|
||||
}
|
||||
str += "]";
|
||||
break;
|
||||
case "Int8Array":
|
||||
case "Uint8Array":
|
||||
case "Uint8ClampedArray":
|
||||
case "Int16Array":
|
||||
case "Uint16Array":
|
||||
case "Float16Array":
|
||||
case "Int32Array":
|
||||
case "Uint32Array":
|
||||
case "Float32Array":
|
||||
case "Float64Array":
|
||||
case "BigInt64Array":
|
||||
case "BigUint64Array":
|
||||
case "DataView": {
|
||||
/** @type {import("./types.js").TypedArray} */
|
||||
const typedArray = thing;
|
||||
str = "[\"" + type + "\"," + flatten(typedArray.buffer);
|
||||
if (typedArray.byteLength !== typedArray.buffer.byteLength) str += `,${typedArray.byteOffset},${typedArray.length}`;
|
||||
str += "]";
|
||||
break;
|
||||
}
|
||||
case "ArrayBuffer":
|
||||
str = `["ArrayBuffer","${encode64(thing)}"]`;
|
||||
break;
|
||||
case "Temporal.Duration":
|
||||
case "Temporal.Instant":
|
||||
case "Temporal.PlainDate":
|
||||
case "Temporal.PlainTime":
|
||||
case "Temporal.PlainDateTime":
|
||||
case "Temporal.PlainMonthDay":
|
||||
case "Temporal.PlainYearMonth":
|
||||
case "Temporal.ZonedDateTime":
|
||||
str = `["${type}",${stringify_string(thing.toString())}]`;
|
||||
break;
|
||||
default:
|
||||
if (!is_plain_object$1(thing)) throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
||||
if (enumerable_symbols(thing).length > 0) throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
||||
if (Object.getPrototypeOf(thing) === null) {
|
||||
str = "[\"null\"";
|
||||
for (const key of Object.keys(thing)) {
|
||||
if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
|
||||
keys.push(stringify_key(key));
|
||||
str += `,${stringify_string(key)},${flatten(thing[key])}`;
|
||||
keys.pop();
|
||||
}
|
||||
str += "]";
|
||||
} else {
|
||||
str = "{";
|
||||
let started = false;
|
||||
for (const key of Object.keys(thing)) {
|
||||
if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
|
||||
if (started) str += ",";
|
||||
started = true;
|
||||
keys.push(stringify_key(key));
|
||||
str += `${stringify_string(key)}:${flatten(thing[key])}`;
|
||||
keys.pop();
|
||||
}
|
||||
str += "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
stringified[index] = str;
|
||||
return index;
|
||||
}
|
||||
const index = flatten(value);
|
||||
if (index < 0) return `${index}`;
|
||||
return stringified;
|
||||
}
|
||||
/**
|
||||
* @param {any} thing
|
||||
* @returns {string}
|
||||
*/
|
||||
function stringify_primitive(thing) {
|
||||
const type = typeof thing;
|
||||
if (type === "string") return stringify_string(thing);
|
||||
if (thing === void 0) return (-1).toString();
|
||||
if (thing === 0 && 1 / thing < 0) return (-6).toString();
|
||||
if (type === "bigint") return `["BigInt","${thing}"]`;
|
||||
return String(thing);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/utils.js
|
||||
var text_encoder = new TextEncoder();
|
||||
/**
|
||||
* Like node's path.relative, but without using node
|
||||
* @param {string} from
|
||||
* @param {string} to
|
||||
*/
|
||||
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("/");
|
||||
}
|
||||
/**
|
||||
* @param {Uint8Array} bytes
|
||||
* @returns {string}
|
||||
*/
|
||||
function base64_encode(bytes) {
|
||||
if (globalThis.Buffer) return globalThis.Buffer.from(bytes).toString("base64");
|
||||
let binary = "";
|
||||
for (let i = 0; i < bytes.length; i++) binary += String.fromCharCode(bytes[i]);
|
||||
return btoa(binary);
|
||||
}
|
||||
/**
|
||||
* @param {string} encoded
|
||||
* @returns {Uint8Array}
|
||||
*/
|
||||
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;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/error.js
|
||||
/**
|
||||
* @param {unknown} err
|
||||
* @return {Error}
|
||||
*/
|
||||
function coalesce_to_error(err) {
|
||||
return err instanceof Error || err && err.name && err.message ? err : new Error(JSON.stringify(err));
|
||||
}
|
||||
/**
|
||||
* This is an identity function that exists to make TypeScript less
|
||||
* paranoid about people throwing things that aren't errors, which
|
||||
* frankly is not something we should care about
|
||||
* @param {unknown} error
|
||||
*/
|
||||
function normalize_error(error) {
|
||||
return error;
|
||||
}
|
||||
/**
|
||||
* @param {unknown} error
|
||||
*/
|
||||
function get_status(error) {
|
||||
return error instanceof HttpError || error instanceof SvelteKitError ? error.status : 500;
|
||||
}
|
||||
/**
|
||||
* @param {unknown} error
|
||||
*/
|
||||
function get_message(error) {
|
||||
return error instanceof SvelteKitError ? error.text : "Internal Error";
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/shared.js
|
||||
/** @import { Transport } from '@sveltejs/kit' */
|
||||
/**
|
||||
* @param {string} route_id
|
||||
* @param {string} dep
|
||||
*/
|
||||
function validate_depends(route_id, dep) {
|
||||
const match = /^(moz-icon|view-source|jar):/.exec(dep);
|
||||
if (match) console.warn(`${route_id}: Calling \`depends('${dep}')\` will throw an error in Firefox because \`${match[1]}\` is a special URI scheme`);
|
||||
}
|
||||
var INVALIDATED_PARAM = "x-sveltekit-invalidated";
|
||||
var TRAILING_SLASH_PARAM = "x-sveltekit-trailing-slash";
|
||||
/**
|
||||
* @param {any} data
|
||||
* @param {string} [location_description]
|
||||
*/
|
||||
function validate_load_response(data, location_description) {
|
||||
if (data != null && Object.getPrototypeOf(data) !== Object.prototype) throw new Error(`a load function ${location_description} returned ${typeof data !== "object" ? `a ${typeof data}` : data instanceof Response ? "a Response object" : Array.isArray(data) ? "an array" : "a non-plain object"}, but must return a plain object at the top level (i.e. \`return {...}\`)`);
|
||||
}
|
||||
/**
|
||||
* Try to `devalue.stringify` the data object using the provided transport encoders.
|
||||
* @param {any} data
|
||||
* @param {Transport} transport
|
||||
*/
|
||||
function stringify(data, transport) {
|
||||
return stringify$1(data, Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode])));
|
||||
}
|
||||
var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
||||
/**
|
||||
* @param {unknown} thing
|
||||
* @returns {thing is Record<PropertyKey, unknown>}
|
||||
*/
|
||||
function is_plain_object(thing) {
|
||||
if (typeof thing !== "object" || thing === null) return false;
|
||||
const proto = Object.getPrototypeOf(thing);
|
||||
return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
|
||||
}
|
||||
/**
|
||||
* @param {Record<string, any>} value
|
||||
* @param {Map<object, any>} clones
|
||||
*/
|
||||
function to_sorted(value, clones) {
|
||||
const clone = Object.getPrototypeOf(value) === null ? Object.create(null) : {};
|
||||
clones.set(value, clone);
|
||||
Object.defineProperty(clone, remote_arg_marker, { value: true });
|
||||
for (const key of Object.keys(value).sort()) {
|
||||
const property = value[key];
|
||||
Object.defineProperty(clone, key, {
|
||||
value: clones.get(property) ?? property,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
var remote_object = "__skrao";
|
||||
var remote_map = "__skram";
|
||||
var remote_set = "__skras";
|
||||
var remote_file = "__skraf";
|
||||
var remote_regex_guard = "__skrag";
|
||||
var remote_arg_marker = Symbol(remote_object);
|
||||
/**
|
||||
* @param {Transport} transport
|
||||
* @param {boolean} sort
|
||||
* @param {Map<any, any>} remote_arg_clones
|
||||
*/
|
||||
function create_remote_arg_reducers(transport, sort, remote_arg_clones) {
|
||||
/** @type {Record<string, (value: unknown) => unknown>} */
|
||||
const remote_fns_reducers = {
|
||||
/** @param {unknown} value */
|
||||
[remote_regex_guard]: (value) => {
|
||||
if (value instanceof RegExp) throw new Error("Regular expressions are not valid remote function arguments");
|
||||
} };
|
||||
if (sort) {
|
||||
/** @type {(value: unknown) => Array<[unknown, unknown]> | undefined} */
|
||||
remote_fns_reducers[remote_map] = (value) => {
|
||||
if (!(value instanceof Map)) return;
|
||||
/** @type {Array<[string, string]>} */
|
||||
const entries = [];
|
||||
for (const [key, val] of value) entries.push([stringify(key), stringify(val)]);
|
||||
return entries.sort(([a1, a2], [b1, b2]) => {
|
||||
if (a1 < b1) return -1;
|
||||
if (a1 > b1) return 1;
|
||||
if (a2 < b2) return -1;
|
||||
if (a2 > b2) return 1;
|
||||
return 0;
|
||||
});
|
||||
};
|
||||
/** @type {(value: unknown) => unknown[] | undefined} */
|
||||
remote_fns_reducers[remote_set] = (value) => {
|
||||
if (!(value instanceof Set)) return;
|
||||
/** @type {string[]} */
|
||||
const items = [];
|
||||
for (const item of value) items.push(stringify(item));
|
||||
items.sort();
|
||||
return items;
|
||||
};
|
||||
/** @type {(value: unknown) => Record<PropertyKey, unknown> | undefined} */
|
||||
remote_fns_reducers[remote_object] = (value) => {
|
||||
if (!is_plain_object(value)) return;
|
||||
if (Object.hasOwn(value, remote_arg_marker)) return;
|
||||
if (remote_arg_clones.has(value)) return remote_arg_clones.get(value);
|
||||
return to_sorted(value, remote_arg_clones);
|
||||
};
|
||||
}
|
||||
const all_reducers = {
|
||||
...Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.encode])),
|
||||
...remote_fns_reducers
|
||||
};
|
||||
/** @type {(value: unknown) => string} */
|
||||
const stringify = (value) => stringify$1(value, all_reducers);
|
||||
return all_reducers;
|
||||
}
|
||||
/** @param {Transport} transport */
|
||||
function create_remote_arg_revivers(transport) {
|
||||
const remote_fns_revivers = {
|
||||
/** @type {(value: unknown) => unknown} */
|
||||
[remote_object]: (value) => value,
|
||||
/** @type {(value: unknown) => Map<unknown, unknown>} */
|
||||
[remote_map]: (value) => {
|
||||
if (!Array.isArray(value)) throw new Error("Invalid data for Map reviver");
|
||||
const map = /* @__PURE__ */ new Map();
|
||||
for (const item of value) {
|
||||
if (!Array.isArray(item) || item.length !== 2 || typeof item[0] !== "string" || typeof item[1] !== "string") throw new Error("Invalid data for Map reviver");
|
||||
const [key, val] = item;
|
||||
map.set(parse$1(key), parse$1(val));
|
||||
}
|
||||
return map;
|
||||
},
|
||||
/** @type {(value: unknown) => Set<unknown>} */
|
||||
[remote_set]: (value) => {
|
||||
if (!Array.isArray(value)) throw new Error("Invalid data for Set reviver");
|
||||
const set = /* @__PURE__ */ new Set();
|
||||
for (const item of value) {
|
||||
if (typeof item !== "string") throw new Error("Invalid data for Set reviver");
|
||||
set.add(parse$1(item));
|
||||
}
|
||||
return set;
|
||||
},
|
||||
/** @type {(value: any) => File} */
|
||||
[remote_file]: (value) => {
|
||||
if (!value || typeof value !== "object" || typeof value.name !== "string" || typeof value.type !== "string" || typeof value.size !== "number" || typeof value.lastModified !== "number" || !(value.data instanceof ArrayBuffer)) throw new Error("Invalid data for File reviver");
|
||||
const { data, name, ...meta } = value;
|
||||
return new File([data], name, meta);
|
||||
}
|
||||
};
|
||||
const all_revivers = {
|
||||
...Object.fromEntries(Object.entries(transport).map(([k, v]) => [k, v.decode])),
|
||||
...remote_fns_revivers
|
||||
};
|
||||
/** @type {(data: string) => unknown} */
|
||||
const parse$1 = (data) => parse(data, all_revivers);
|
||||
return all_revivers;
|
||||
}
|
||||
/**
|
||||
* Stringifies the argument (if any) for a remote function in such a way that
|
||||
* it is both a valid URL and a valid file name (necessary for prerendering).
|
||||
* @param {any} value
|
||||
* @param {Transport} transport
|
||||
*/
|
||||
function stringify_remote_arg(value, transport) {
|
||||
if (value === void 0) return "";
|
||||
return url_friendly_base64_encode(stringify$1(value, create_remote_arg_reducers(transport, true, /* @__PURE__ */ new Map())));
|
||||
}
|
||||
/**
|
||||
* Base64-encodes `string` in such a way that the result is safe to use
|
||||
* as both a URI component and a filename
|
||||
* @param {string} string
|
||||
*/
|
||||
function url_friendly_base64_encode(string) {
|
||||
return base64_encode(text_encoder.encode(string)).replaceAll("=", "").replaceAll("+", "-").replaceAll("/", "_");
|
||||
}
|
||||
/**
|
||||
* Parses the argument (if any) for a remote function
|
||||
* @param {string} string
|
||||
* @param {Transport} transport
|
||||
*/
|
||||
function parse_remote_arg(string, transport) {
|
||||
if (!string) return void 0;
|
||||
return parse(new TextDecoder().decode(base64_decode(string.replaceAll("-", "+").replaceAll("_", "/"))), create_remote_arg_revivers(transport));
|
||||
}
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} payload
|
||||
*/
|
||||
function create_remote_key(id, payload) {
|
||||
return id + "/" + payload;
|
||||
}
|
||||
/**
|
||||
* @param {string} key
|
||||
* @returns {{ id: string; payload: string }}
|
||||
*/
|
||||
function split_remote_key(key) {
|
||||
const i = key.lastIndexOf("/");
|
||||
if (i === -1) throw new Error(`Invalid remote key: ${key}`);
|
||||
return {
|
||||
id: key.slice(0, i),
|
||||
payload: key.slice(i + 1)
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { stringify$1 as _, split_remote_key as a, once as b, validate_depends as c, get_message as d, get_status as f, text_encoder as g, get_relative_path as h, parse_remote_arg as i, validate_load_response as l, base64_encode as m, TRAILING_SLASH_PARAM as n, stringify as o, normalize_error as p, create_remote_key as r, stringify_remote_arg as s, INVALIDATED_PARAM as t, coalesce_to_error as u, parse as v, noop as y };
|
||||
@@ -0,0 +1,450 @@
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/constants.js
|
||||
var MAX_ARRAY_LEN = 2 ** 32 - 1;
|
||||
var MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/utils.js
|
||||
/** @type {Record<string, string>} */
|
||||
var escaped = {
|
||||
"<": "\\u003C",
|
||||
"\\": "\\\\",
|
||||
"\b": "\\b",
|
||||
"\f": "\\f",
|
||||
"\n": "\\n",
|
||||
"\r": "\\r",
|
||||
" ": "\\t",
|
||||
"\u2028": "\\u2028",
|
||||
"\u2029": "\\u2029"
|
||||
};
|
||||
var DevalueError = class extends Error {
|
||||
/**
|
||||
* @param {string} message
|
||||
* @param {string[]} keys
|
||||
* @param {any} [value] - The value that failed to be serialized
|
||||
* @param {any} [root] - The root value being serialized
|
||||
*/
|
||||
constructor(message, keys, value, root) {
|
||||
super(message);
|
||||
this.name = "DevalueError";
|
||||
this.path = keys.join("");
|
||||
this.value = value;
|
||||
this.root = root;
|
||||
}
|
||||
};
|
||||
/** @param {any} thing */
|
||||
function is_primitive(thing) {
|
||||
return thing === null || typeof thing !== "object" && typeof thing !== "function";
|
||||
}
|
||||
var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
||||
/** @param {any} thing */
|
||||
function is_plain_object(thing) {
|
||||
const proto = Object.getPrototypeOf(thing);
|
||||
return proto === Object.prototype || proto === null || Object.getPrototypeOf(proto) === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names;
|
||||
}
|
||||
/** @param {any} thing */
|
||||
function get_type(thing) {
|
||||
return Object.prototype.toString.call(thing).slice(8, -1);
|
||||
}
|
||||
/** @param {string} char */
|
||||
function get_escaped_char(char) {
|
||||
switch (char) {
|
||||
case "\"": return "\\\"";
|
||||
case "<": return "\\u003C";
|
||||
case "\\": return "\\\\";
|
||||
case "\n": return "\\n";
|
||||
case "\r": return "\\r";
|
||||
case " ": return "\\t";
|
||||
case "\b": return "\\b";
|
||||
case "\f": return "\\f";
|
||||
case "\u2028": return "\\u2028";
|
||||
case "\u2029": return "\\u2029";
|
||||
default: return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
|
||||
}
|
||||
}
|
||||
/** @param {string} str */
|
||||
function stringify_string(str) {
|
||||
let result = "";
|
||||
let last_pos = 0;
|
||||
const len = str.length;
|
||||
for (let i = 0; i < len; i += 1) {
|
||||
const char = str[i];
|
||||
const replacement = get_escaped_char(char);
|
||||
if (replacement) {
|
||||
result += str.slice(last_pos, i) + replacement;
|
||||
last_pos = i + 1;
|
||||
}
|
||||
}
|
||||
return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`;
|
||||
}
|
||||
/** @param {Record<string | symbol, any>} object */
|
||||
function enumerable_symbols(object) {
|
||||
return Object.getOwnPropertySymbols(object).filter((symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable);
|
||||
}
|
||||
var is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
||||
/** @param {string} key */
|
||||
function stringify_key(key) {
|
||||
return is_identifier.test(key) ? "." + key : "[" + JSON.stringify(key) + "]";
|
||||
}
|
||||
/** @param {number} n */
|
||||
function is_valid_array_index(n) {
|
||||
if (!Number.isInteger(n)) return false;
|
||||
if (n < 0) return false;
|
||||
if (n > MAX_ARRAY_INDEX) return false;
|
||||
return true;
|
||||
}
|
||||
/** @param {number} n */
|
||||
function is_valid_array_len(n) {
|
||||
if (!Number.isInteger(n)) return false;
|
||||
if (n < 0) return false;
|
||||
if (n > MAX_ARRAY_LEN) return false;
|
||||
return true;
|
||||
}
|
||||
/** @param {string} s */
|
||||
function is_valid_array_index_string(s) {
|
||||
if (s.length === 0) return false;
|
||||
if (s.length > 1 && s.charCodeAt(0) === 48) return false;
|
||||
for (let i = 0; i < s.length; i++) {
|
||||
const c = s.charCodeAt(i);
|
||||
if (c < 48 || c > 57) return false;
|
||||
}
|
||||
return is_valid_array_index(+s);
|
||||
}
|
||||
/**
|
||||
* Finds the populated indices of an array.
|
||||
* @param {unknown[]} array
|
||||
*/
|
||||
function valid_array_indices(array) {
|
||||
const keys = Object.keys(array);
|
||||
for (var i = keys.length - 1; i >= 0; i--) if (is_valid_array_index_string(keys[i])) break;
|
||||
keys.length = i + 1;
|
||||
return keys;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/devalue@5.8.1/node_modules/devalue/src/uneval.js
|
||||
var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";
|
||||
var unsafe_chars = /[<\b\f\n\r\t\0\u2028\u2029]/g;
|
||||
var reserved = /^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/;
|
||||
/**
|
||||
* Turn a value into the JavaScript that creates an equivalent value
|
||||
* @param {any} value
|
||||
* @param {(value: any, uneval: (value: any) => string) => string | void} [replacer]
|
||||
*/
|
||||
function uneval(value, replacer) {
|
||||
const counts = /* @__PURE__ */ new Map();
|
||||
/** @type {string[]} */
|
||||
const keys = [];
|
||||
const custom = /* @__PURE__ */ new Map();
|
||||
/** @param {any} thing */
|
||||
function walk(thing) {
|
||||
if (!is_primitive(thing)) {
|
||||
if (counts.has(thing)) {
|
||||
counts.set(thing, counts.get(thing) + 1);
|
||||
return;
|
||||
}
|
||||
counts.set(thing, 1);
|
||||
if (replacer) {
|
||||
const str = replacer(thing, (value) => uneval(value, replacer));
|
||||
if (typeof str === "string") {
|
||||
custom.set(thing, str);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (typeof thing === "function") throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
||||
switch (get_type(thing)) {
|
||||
case "Number":
|
||||
case "BigInt":
|
||||
case "String":
|
||||
case "Boolean":
|
||||
case "Date":
|
||||
case "RegExp":
|
||||
case "URL":
|
||||
case "URLSearchParams": return;
|
||||
case "Array":
|
||||
/** @type {any[]} */ thing.forEach((value, i) => {
|
||||
keys.push(`[${i}]`);
|
||||
walk(value);
|
||||
keys.pop();
|
||||
});
|
||||
break;
|
||||
case "Set":
|
||||
Array.from(thing).forEach(walk);
|
||||
break;
|
||||
case "Map":
|
||||
for (const [key, value] of thing) {
|
||||
keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : "..."})`);
|
||||
walk(value);
|
||||
keys.pop();
|
||||
}
|
||||
break;
|
||||
case "Int8Array":
|
||||
case "Uint8Array":
|
||||
case "Uint8ClampedArray":
|
||||
case "Int16Array":
|
||||
case "Uint16Array":
|
||||
case "Float16Array":
|
||||
case "Int32Array":
|
||||
case "Uint32Array":
|
||||
case "Float32Array":
|
||||
case "Float64Array":
|
||||
case "BigInt64Array":
|
||||
case "BigUint64Array":
|
||||
case "DataView":
|
||||
walk(thing.buffer);
|
||||
return;
|
||||
case "ArrayBuffer": return;
|
||||
case "Temporal.Duration":
|
||||
case "Temporal.Instant":
|
||||
case "Temporal.PlainDate":
|
||||
case "Temporal.PlainTime":
|
||||
case "Temporal.PlainDateTime":
|
||||
case "Temporal.PlainMonthDay":
|
||||
case "Temporal.PlainYearMonth":
|
||||
case "Temporal.ZonedDateTime": return;
|
||||
default:
|
||||
if (!is_plain_object(thing)) throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
||||
if (enumerable_symbols(thing).length > 0) throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
||||
for (const key of Object.keys(thing)) {
|
||||
if (key === "__proto__") throw new DevalueError(`Cannot stringify objects with __proto__ keys`, keys, thing, value);
|
||||
keys.push(stringify_key(key));
|
||||
walk(thing[key]);
|
||||
keys.pop();
|
||||
}
|
||||
}
|
||||
} else if (typeof thing === "symbol") throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
||||
}
|
||||
walk(value);
|
||||
const names = /* @__PURE__ */ new Map();
|
||||
Array.from(counts).filter((entry) => entry[1] > 1).sort((a, b) => b[1] - a[1]).forEach((entry, i) => {
|
||||
names.set(entry[0], get_name(i));
|
||||
});
|
||||
/**
|
||||
* @param {any} thing
|
||||
* @returns {string}
|
||||
*/
|
||||
function stringify(thing) {
|
||||
if (names.has(thing)) return names.get(thing);
|
||||
if (is_primitive(thing)) return stringify_primitive(thing);
|
||||
if (custom.has(thing)) return custom.get(thing);
|
||||
const type = get_type(thing);
|
||||
switch (type) {
|
||||
case "Number":
|
||||
case "String":
|
||||
case "Boolean":
|
||||
case "BigInt": return `Object(${stringify(thing.valueOf())})`;
|
||||
case "RegExp":
|
||||
const { source, flags } = thing;
|
||||
return flags ? `new RegExp(${stringify_string(source)},"${flags}")` : `new RegExp(${stringify_string(source)})`;
|
||||
case "Date": return `new Date(${thing.getTime()})`;
|
||||
case "URL": return `new URL(${stringify_string(thing.toString())})`;
|
||||
case "URLSearchParams": return `new URLSearchParams(${stringify_string(thing.toString())})`;
|
||||
case "Array": {
|
||||
let has_holes = false;
|
||||
let result = "[";
|
||||
for (let i = 0; i < thing.length; i += 1) {
|
||||
if (i > 0) result += ",";
|
||||
if (Object.hasOwn(thing, i)) result += stringify(thing[i]);
|
||||
else if (!has_holes) {
|
||||
const populated_keys = valid_array_indices(thing);
|
||||
const population = populated_keys.length;
|
||||
const d = String(thing.length).length;
|
||||
if (thing.length + 2 > 25 + d + population * (d + 2)) {
|
||||
const entries = populated_keys.map((k) => `${k}:${stringify(thing[k])}`).join(",");
|
||||
return `Object.assign(Array(${thing.length}),{${entries}})`;
|
||||
}
|
||||
has_holes = true;
|
||||
i -= 1;
|
||||
}
|
||||
}
|
||||
const tail = thing.length === 0 || thing.length - 1 in thing ? "" : ",";
|
||||
return result + tail + "]";
|
||||
}
|
||||
case "Set":
|
||||
case "Map": return `new ${type}([${Array.from(thing).map(stringify).join(",")}])`;
|
||||
case "Int8Array":
|
||||
case "Uint8Array":
|
||||
case "Uint8ClampedArray":
|
||||
case "Int16Array":
|
||||
case "Uint16Array":
|
||||
case "Float16Array":
|
||||
case "Int32Array":
|
||||
case "Uint32Array":
|
||||
case "Float32Array":
|
||||
case "Float64Array":
|
||||
case "BigInt64Array":
|
||||
case "BigUint64Array": {
|
||||
let str = `new ${type}`;
|
||||
if (!names.has(thing.buffer)) {
|
||||
const array = new thing.constructor(thing.buffer);
|
||||
str += `([${array}])`;
|
||||
} else str += `(${stringify(thing.buffer)})`;
|
||||
if (thing.byteLength !== thing.buffer.byteLength) {
|
||||
const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
|
||||
const end = start + thing.length;
|
||||
str += `.subarray(${start},${end})`;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
case "DataView": {
|
||||
let str = `new DataView`;
|
||||
if (!names.has(thing.buffer)) str += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
|
||||
else str += `(${stringify(thing.buffer)}`;
|
||||
if (thing.byteLength !== thing.buffer.byteLength) str += `,${thing.startOffset},${thing.byteLength}`;
|
||||
return str + ")";
|
||||
}
|
||||
case "ArrayBuffer": return `new Uint8Array([${new Uint8Array(thing).toString()}]).buffer`;
|
||||
case "Temporal.Duration":
|
||||
case "Temporal.Instant":
|
||||
case "Temporal.PlainDate":
|
||||
case "Temporal.PlainTime":
|
||||
case "Temporal.PlainDateTime":
|
||||
case "Temporal.PlainMonthDay":
|
||||
case "Temporal.PlainYearMonth":
|
||||
case "Temporal.ZonedDateTime": return `${type}.from(${stringify_string(thing.toString())})`;
|
||||
default:
|
||||
const keys = Object.keys(thing);
|
||||
const obj = keys.map((key) => `${safe_key(key)}:${stringify(thing[key])}`).join(",");
|
||||
if (Object.getPrototypeOf(thing) === null) return keys.length > 0 ? `{${obj},__proto__:null}` : `{__proto__:null}`;
|
||||
return `{${obj}}`;
|
||||
}
|
||||
}
|
||||
const str = stringify(value);
|
||||
if (names.size) {
|
||||
/** @type {string[]} */
|
||||
const params = [];
|
||||
/** @type {string[]} */
|
||||
const statements = [];
|
||||
/** @type {string[]} */
|
||||
const values = [];
|
||||
names.forEach((name, thing) => {
|
||||
params.push(name);
|
||||
if (custom.has(thing)) {
|
||||
values.push(custom.get(thing));
|
||||
return;
|
||||
}
|
||||
if (is_primitive(thing)) {
|
||||
values.push(stringify_primitive(thing));
|
||||
return;
|
||||
}
|
||||
const type = get_type(thing);
|
||||
switch (type) {
|
||||
case "Number":
|
||||
case "String":
|
||||
case "Boolean":
|
||||
case "BigInt":
|
||||
values.push(`Object(${stringify(thing.valueOf())})`);
|
||||
break;
|
||||
case "RegExp":
|
||||
const { source, flags } = thing;
|
||||
const regexp = flags ? `new RegExp(${stringify_string(source)},"${flags}")` : `new RegExp(${stringify_string(source)})`;
|
||||
values.push(regexp);
|
||||
break;
|
||||
case "Date":
|
||||
values.push(`new Date(${thing.getTime()})`);
|
||||
break;
|
||||
case "URL":
|
||||
values.push(`new URL(${stringify_string(thing.toString())})`);
|
||||
break;
|
||||
case "URLSearchParams":
|
||||
values.push(`new URLSearchParams(${stringify_string(thing.toString())})`);
|
||||
break;
|
||||
case "Array":
|
||||
values.push(`Array(${thing.length})`);
|
||||
/** @type {any[]} */ thing.forEach((v, i) => {
|
||||
statements.push(`${name}[${i}]=${stringify(v)}`);
|
||||
});
|
||||
break;
|
||||
case "Set":
|
||||
values.push(`new Set`);
|
||||
statements.push(`${name}.${Array.from(thing).map((v) => `add(${stringify(v)})`).join(".")}`);
|
||||
break;
|
||||
case "Map":
|
||||
values.push(`new Map`);
|
||||
statements.push(`${name}.${Array.from(thing).map(([k, v]) => `set(${stringify(k)}, ${stringify(v)})`).join(".")}`);
|
||||
break;
|
||||
case "Int8Array":
|
||||
case "Uint8Array":
|
||||
case "Uint8ClampedArray":
|
||||
case "Int16Array":
|
||||
case "Uint16Array":
|
||||
case "Float16Array":
|
||||
case "Int32Array":
|
||||
case "Uint32Array":
|
||||
case "Float32Array":
|
||||
case "Float64Array":
|
||||
case "BigInt64Array":
|
||||
case "BigUint64Array": {
|
||||
let str = `new ${type}`;
|
||||
if (!names.has(thing.buffer)) {
|
||||
const array = new thing.constructor(thing.buffer);
|
||||
str += `([${array}])`;
|
||||
} else str += `(${stringify(thing.buffer)})`;
|
||||
if (thing.byteLength !== thing.buffer.byteLength) {
|
||||
const start = thing.byteOffset / thing.BYTES_PER_ELEMENT;
|
||||
const end = start + thing.length;
|
||||
str += `.subarray(${start},${end})`;
|
||||
}
|
||||
values.push(`{}`);
|
||||
statements.push(`${name}=${str}`);
|
||||
break;
|
||||
}
|
||||
case "DataView": {
|
||||
let str = `new DataView`;
|
||||
if (!names.has(thing.buffer)) str += `(new Uint8Array([${new Uint8Array(thing.buffer)}]).buffer`;
|
||||
else str += `(${stringify(thing.buffer)}`;
|
||||
if (thing.byteLength !== thing.buffer.byteLength) str += `,${thing.byteOffset},${thing.byteLength}`;
|
||||
str += ")";
|
||||
values.push(`{}`);
|
||||
statements.push(`${name}=${str}`);
|
||||
break;
|
||||
}
|
||||
case "ArrayBuffer":
|
||||
values.push(`new Uint8Array([${new Uint8Array(thing)}]).buffer`);
|
||||
break;
|
||||
default:
|
||||
values.push(Object.getPrototypeOf(thing) === null ? "Object.create(null)" : "{}");
|
||||
Object.keys(thing).forEach((key) => {
|
||||
statements.push(`${name}${safe_prop(key)}=${stringify(thing[key])}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
statements.push(`return ${str}`);
|
||||
return `(function(${params.join(",")}){${statements.join(";")}}(${values.join(",")}))`;
|
||||
} else return str;
|
||||
}
|
||||
/** @param {number} num */
|
||||
function get_name(num) {
|
||||
let name = "";
|
||||
do {
|
||||
name = chars[num % 54] + name;
|
||||
num = ~~(num / 54) - 1;
|
||||
} while (num >= 0);
|
||||
return reserved.test(name) ? `${name}0` : name;
|
||||
}
|
||||
/** @param {string} c */
|
||||
function escape_unsafe_char(c) {
|
||||
return escaped[c] || c;
|
||||
}
|
||||
/** @param {string} str */
|
||||
function escape_unsafe_chars(str) {
|
||||
return str.replace(unsafe_chars, escape_unsafe_char);
|
||||
}
|
||||
/** @param {string} key */
|
||||
function safe_key(key) {
|
||||
return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? key : escape_unsafe_chars(JSON.stringify(key));
|
||||
}
|
||||
/** @param {string} key */
|
||||
function safe_prop(key) {
|
||||
return /^[_$a-zA-Z][_$a-zA-Z0-9]*$/.test(key) ? `.${key}` : `[${escape_unsafe_chars(JSON.stringify(key))}]`;
|
||||
}
|
||||
/** @param {any} thing */
|
||||
function stringify_primitive(thing) {
|
||||
const type = typeof thing;
|
||||
if (type === "string") return stringify_string(thing);
|
||||
if (thing === void 0) return "void 0";
|
||||
if (thing === 0 && 1 / thing < 0) return "-0";
|
||||
const str = String(thing);
|
||||
if (type === "number") return str.replace(/^(-)?0\./, "$1.");
|
||||
if (type === "bigint") return thing + "n";
|
||||
return str;
|
||||
}
|
||||
//#endregion
|
||||
export { is_plain_object as a, is_valid_array_len as c, valid_array_indices as d, MAX_ARRAY_INDEX as f, get_type as i, stringify_key as l, DevalueError as n, is_primitive as o, enumerable_symbols as r, is_valid_array_index as s, uneval as t, stringify_string as u };
|
||||
@@ -0,0 +1,843 @@
|
||||
import { d as get_message, f as get_status, u as coalesce_to_error, v as parse } from "./shared.js";
|
||||
import { t as uneval } from "./uneval.js";
|
||||
import { json, text } from "@sveltejs/kit";
|
||||
import { HttpError, SvelteKitError } from "@sveltejs/kit/internal";
|
||||
import { with_request_store } from "@sveltejs/kit/internal/server";
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/constants.js
|
||||
/**
|
||||
* A fake asset path used in `vite dev` and `vite preview`, so that we can
|
||||
* serve local assets while verifying that requests are correctly prefixed
|
||||
*/
|
||||
var SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
|
||||
var ENDPOINT_METHODS = [
|
||||
"GET",
|
||||
"POST",
|
||||
"PUT",
|
||||
"PATCH",
|
||||
"DELETE",
|
||||
"OPTIONS",
|
||||
"HEAD"
|
||||
];
|
||||
var MUTATIVE_METHODS = [
|
||||
"POST",
|
||||
"PUT",
|
||||
"PATCH",
|
||||
"DELETE"
|
||||
];
|
||||
var PAGE_METHODS = [
|
||||
"GET",
|
||||
"POST",
|
||||
"HEAD"
|
||||
];
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/form-utils.js
|
||||
/** @import { BinaryFormMeta, InternalRemoteFormIssue } from 'types' */
|
||||
/** @import { StandardSchemaV1 } from '@standard-schema/spec' */
|
||||
var decoder = new TextDecoder();
|
||||
/**
|
||||
* Sets a value in a nested object using a path string, mutating the original object
|
||||
* @param {Record<string, any>} object
|
||||
* @param {string} path_string
|
||||
* @param {any} value
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* Convert `FormData` into a POJO
|
||||
* @param {FormData} data
|
||||
*/
|
||||
function convert_formdata(data) {
|
||||
/** @type {Record<string, any>} */
|
||||
const result = {};
|
||||
for (let key of data.keys()) {
|
||||
const is_array = key.endsWith("[]");
|
||||
/** @type {any[]} */
|
||||
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(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;
|
||||
}
|
||||
var BINARY_FORM_CONTENT_TYPE = "application/x-sveltekit-formdata";
|
||||
var BINARY_FORM_VERSION = 0;
|
||||
var HEADER_BYTES = 7;
|
||||
/**
|
||||
* @param {Request} request
|
||||
* @returns {Promise<{ data: Record<string, any>; meta: BinaryFormMeta; form_data: FormData | null }>}
|
||||
*/
|
||||
async function deserialize_binary_form(request) {
|
||||
if (request.headers.get("content-type") !== "application/x-sveltekit-formdata") {
|
||||
const form_data = await request.formData();
|
||||
return {
|
||||
data: convert_formdata(form_data),
|
||||
meta: {},
|
||||
form_data
|
||||
};
|
||||
}
|
||||
if (!request.body) throw deserialize_error("no body");
|
||||
const reader = request.body.getReader();
|
||||
/** @type {Array<Promise<Uint8Array<ArrayBuffer> | undefined>>} */
|
||||
const chunks = [];
|
||||
/**
|
||||
* @param {number} index
|
||||
* @returns {Promise<Uint8Array<ArrayBuffer> | undefined>}
|
||||
*/
|
||||
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];
|
||||
}
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @param {number} length
|
||||
* @returns {Promise<Uint8Array | null>}
|
||||
*/
|
||||
async function get_buffer(offset, length) {
|
||||
/** @type {Uint8Array} */
|
||||
let start_chunk;
|
||||
let chunk_start = 0;
|
||||
/** @type {number} */
|
||||
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 chunks = [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);
|
||||
chunks.push(chunk);
|
||||
cursor += chunk.byteLength;
|
||||
}
|
||||
const buffer = new Uint8Array(length);
|
||||
cursor = 0;
|
||||
for (const chunk of chunks) {
|
||||
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);
|
||||
const file_offsets_length = header_view.getUint16(5, true);
|
||||
const data_buffer = await get_buffer(HEADER_BYTES, data_length);
|
||||
if (!data_buffer) throw deserialize_error("data too short");
|
||||
/** @type {Array<number | undefined>} */
|
||||
let file_offsets;
|
||||
/** @type {number} */
|
||||
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(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 = parsed_offsets;
|
||||
files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
|
||||
}
|
||||
/** @type {Array<{ offset: number, size: number }>} */
|
||||
const file_spans = [];
|
||||
const [data, meta] = parse(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");
|
||||
let offset = file_offsets[index];
|
||||
if (offset === void 0) throw deserialize_error("duplicate file offset table index");
|
||||
file_offsets[index] = void 0;
|
||||
offset += files_start_offset;
|
||||
file_spans.push({
|
||||
offset,
|
||||
size
|
||||
});
|
||||
return new Proxy(new LazyFile(name, type, size, last_modified, get_chunk, offset), { getPrototypeOf() {
|
||||
return File.prototype;
|
||||
} });
|
||||
} });
|
||||
file_spans.sort((a, b) => a.offset - b.offset || a.size - b.size);
|
||||
for (let i = 1; i < file_spans.length; i++) {
|
||||
const previous = file_spans[i - 1];
|
||||
const current = file_spans[i];
|
||||
const previous_end = previous.offset + previous.size;
|
||||
if (previous_end < current.offset) throw deserialize_error("gaps in file data");
|
||||
if (previous_end > current.offset) throw deserialize_error("overlapping file data");
|
||||
}
|
||||
(async () => {
|
||||
let has_more = true;
|
||||
while (has_more) has_more = !!await get_chunk(chunks.length);
|
||||
})();
|
||||
return {
|
||||
data,
|
||||
meta,
|
||||
form_data: null
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {string} message
|
||||
*/
|
||||
function deserialize_error(message) {
|
||||
return new SvelteKitError(400, "Bad Request", `Could not deserialize binary form: ${message}`);
|
||||
}
|
||||
/** @implements {File} */
|
||||
var LazyFile = 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);
|
||||
return new LazyFile(this.name, contentType, size, this.lastModified, this.#get_chunk, this.#offset + start);
|
||||
}
|
||||
stream() {
|
||||
let cursor = 0;
|
||||
let chunk_index = 0;
|
||||
return new ReadableStream({
|
||||
start: async (controller) => {
|
||||
let chunk_start = 0;
|
||||
/** @type {Uint8Array} */
|
||||
let start_chunk;
|
||||
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 decoder.decode(await this.arrayBuffer());
|
||||
}
|
||||
};
|
||||
var path_regex = /^[a-zA-Z_$]\w*(\.[a-zA-Z_$]\w*|\[\d+\])*$/;
|
||||
/**
|
||||
* @param {string} path
|
||||
*/
|
||||
function split_path(path) {
|
||||
if (!path_regex.test(path)) throw new Error(`Invalid path ${path}`);
|
||||
return path.split(/\.|\[|\]/).filter(Boolean);
|
||||
}
|
||||
/**
|
||||
* Check if a property key is dangerous and could lead to prototype pollution
|
||||
* @param {string} key
|
||||
*/
|
||||
function check_prototype_pollution(key) {
|
||||
if (key === "__proto__" || key === "constructor" || key === "prototype") throw new Error(`Invalid key "${key}"`);
|
||||
}
|
||||
/**
|
||||
* Sets a value in a nested object using an array of keys, mutating the original object.
|
||||
* @param {Record<string, any>} object
|
||||
* @param {string[]} keys
|
||||
* @param {any} value
|
||||
*/
|
||||
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 inner = Object.hasOwn(current, key) ? current[key] : void 0;
|
||||
const exists = inner != null;
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* @param {StandardSchemaV1.Issue} issue
|
||||
* @param {boolean} server Whether this issue came from server validation
|
||||
*/
|
||||
function normalize_issue(issue, server = false) {
|
||||
/** @type {InternalRemoteFormIssue} */
|
||||
const normalized = {
|
||||
name: "",
|
||||
path: [],
|
||||
message: issue.message,
|
||||
server
|
||||
};
|
||||
if (issue.path !== void 0) {
|
||||
let name = "";
|
||||
for (const segment of issue.path) {
|
||||
const key = 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;
|
||||
}
|
||||
/**
|
||||
* @param {InternalRemoteFormIssue[]} issues
|
||||
*/
|
||||
function flatten_issues(issues) {
|
||||
/** @type {Record<string, InternalRemoteFormIssue[]>} */
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Gets a nested value from an object using a path array
|
||||
* @param {Record<string, any>} object
|
||||
* @param {(string | number)[]} path
|
||||
* @returns {any}
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} field_type
|
||||
* @param {boolean} is_array
|
||||
* @param {unknown} input_value
|
||||
*/
|
||||
function get_type_prefix(field_type, is_array, input_value) {
|
||||
if (field_type === "number" || field_type === "range") return "n:";
|
||||
if (field_type === "checkbox" && !is_array) return "b:";
|
||||
if (field_type === "hidden" || field_type === "submit") {
|
||||
const input_type = typeof input_value;
|
||||
if (input_type === "number") return "n:";
|
||||
if (input_type === "boolean") return "b:";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* Creates a proxy-based field accessor for form data
|
||||
* @param {any} target - Function or empty POJO
|
||||
* @param {() => Record<string, any>} get_input - Function to get current input data
|
||||
* @param {(path: (string | number)[], value: any) => void} set_input - Function to set input data
|
||||
* @param {(path?: (string | number)[], all?: boolean) => Record<string, InternalRemoteFormIssue[]>} get_issues - Function to get current issues
|
||||
* @param {(string | number)[]} path - Current access path
|
||||
* @returns {any} Proxy object with name(), value(), and issues() methods
|
||||
*/
|
||||
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(target, prop) {
|
||||
if (typeof prop === "symbol") return target[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(path, prop === "allIssues")[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") {
|
||||
/**
|
||||
* @param {string} type
|
||||
* @param {unknown} [input_value]
|
||||
*/
|
||||
const as_func = (type, input_value) => {
|
||||
const is_array = type === "file multiple" || type === "select multiple" || type === "checkbox" && typeof input_value === "string";
|
||||
/** @type {Record<string, any>} */
|
||||
const base_props = {
|
||||
name: get_type_prefix(type, is_array, input_value) + key + (is_array ? "[]" : ""),
|
||||
get "aria-invalid"() {
|
||||
return key in get_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: typeof input_value === "boolean" ? input_value ? "on" : "off" : 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() ?? input_value;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (type === "checkbox" || type === "radio") {
|
||||
if (type === "checkbox" && !is_array) return Object.defineProperties(base_props, {
|
||||
defaultChecked: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return input_value;
|
||||
}
|
||||
},
|
||||
checked: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return get_value() ?? input_value;
|
||||
}
|
||||
}
|
||||
});
|
||||
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;
|
||||
return (value ?? []).includes(input_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;
|
||||
}
|
||||
/** @type {any} */
|
||||
const fileListLike = { length: value.length };
|
||||
value.forEach((file, index) => {
|
||||
fileListLike[index] = file;
|
||||
});
|
||||
return fileListLike;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
return Object.defineProperties(base_props, {
|
||||
defaultValue: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return input_value;
|
||||
}
|
||||
},
|
||||
value: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
const value = get_value() ?? input_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]);
|
||||
} });
|
||||
}
|
||||
/**
|
||||
* Builds a path string from an array of path segments
|
||||
* @param {(string | number)[]} path
|
||||
* @returns {string}
|
||||
*/
|
||||
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;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/http.js
|
||||
/**
|
||||
* Given an Accept header and a list of possible content types, pick
|
||||
* the most suitable one to respond with
|
||||
* @param {string} accept
|
||||
* @param {string[]} types
|
||||
*/
|
||||
function negotiate(accept, types) {
|
||||
/** @type {Array<{ type: string, subtype: string, q: number, i: number }>} */
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Returns `true` if the request contains a `content-type` header with the given type
|
||||
* @param {Request} request
|
||||
* @param {...string} types
|
||||
*/
|
||||
function is_content_type(request, ...types) {
|
||||
const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? "";
|
||||
return types.includes(type.toLowerCase());
|
||||
}
|
||||
/**
|
||||
* @param {Request} request
|
||||
*/
|
||||
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);
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/misc.js
|
||||
var s = JSON.stringify;
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/utils/escape.js
|
||||
/**
|
||||
* When inside a double-quoted attribute value, only `&` and `"` hold special meaning.
|
||||
* @see https://html.spec.whatwg.org/multipage/parsing.html#attribute-value-(double-quoted)-state
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
var escape_html_attr_dict = {
|
||||
"&": "&",
|
||||
"\"": """
|
||||
};
|
||||
/**
|
||||
* @type {Record<string, string>}
|
||||
*/
|
||||
var escape_html_dict = {
|
||||
"&": "&",
|
||||
"<": "<"
|
||||
};
|
||||
var escape_html_attr_regex = new RegExp(`[${Object.keys(escape_html_attr_dict).join("")}]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]`, "g");
|
||||
var escape_html_regex = new RegExp(`[${Object.keys(escape_html_dict).join("")}]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]`, "g");
|
||||
/**
|
||||
* Escapes unpaired surrogates (which are allowed in js strings but invalid in HTML) and
|
||||
* escapes characters that are special.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {boolean} [is_attr]
|
||||
* @returns {string} escaped string
|
||||
* @example const html = `<tag data-value="${escape_html('value', true)}">...</tag>`;
|
||||
*/
|
||||
function escape_html(str, is_attr) {
|
||||
const dict = is_attr ? escape_html_attr_dict : escape_html_dict;
|
||||
return str.replace(is_attr ? escape_html_attr_regex : escape_html_regex, (match) => {
|
||||
if (match.length === 2) return match;
|
||||
return dict[match] ?? `&#${match.charCodeAt(0)};`;
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/server/utils.js
|
||||
/** @import { ServerHooks } from 'types' */
|
||||
/**
|
||||
* @param {Partial<Record<import('types').HttpMethod, any>>} mod
|
||||
* @param {import('types').HttpMethod} method
|
||||
*/
|
||||
function method_not_allowed(mod, method) {
|
||||
return text(`${method} method not allowed`, {
|
||||
status: 405,
|
||||
headers: { allow: allowed_methods(mod).join(", ") }
|
||||
});
|
||||
}
|
||||
/** @param {Partial<Record<import('types').HttpMethod, any>>} mod */
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* @param {import('types').SSROptions} options
|
||||
*/
|
||||
function get_global_name(options) {
|
||||
return `__sveltekit_${options.version_hash}`;
|
||||
}
|
||||
/**
|
||||
* Return as a response that renders the error.html
|
||||
*
|
||||
* @param {import('types').SSROptions} options
|
||||
* @param {number} status
|
||||
* @param {string} message
|
||||
*/
|
||||
function static_error_page(options, status, message) {
|
||||
return text(options.templates.error({
|
||||
status,
|
||||
message: escape_html(message)
|
||||
}), {
|
||||
headers: { "content-type": "text/html; charset=utf-8" },
|
||||
status
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {import('@sveltejs/kit').RequestEvent} event
|
||||
* @param {import('types').RequestState} state
|
||||
* @param {import('types').SSROptions} options
|
||||
* @param {unknown} error
|
||||
*/
|
||||
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);
|
||||
}
|
||||
/**
|
||||
* @param {import('@sveltejs/kit').RequestEvent} event
|
||||
* @param {import('types').RequestState} state
|
||||
* @param {import('types').SSROptions} options
|
||||
* @param {any} error
|
||||
* @returns {Promise<App.Error>}
|
||||
*/
|
||||
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 };
|
||||
}
|
||||
/**
|
||||
* @param {number} status
|
||||
* @param {string} location
|
||||
*/
|
||||
function redirect_response(status, location) {
|
||||
return new Response(void 0, {
|
||||
status,
|
||||
headers: { location }
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {import('@sveltejs/kit').RequestEvent} event
|
||||
* @param {Error & { path: string }} error
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* @param {import('types').ServerDataNode} node
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Returns `true` if the given path was prerendered
|
||||
* @param {import('@sveltejs/kit').SSRManifest} manifest
|
||||
* @param {string} pathname Should include the base and be decoded
|
||||
*/
|
||||
function has_prerendered_path(manifest, pathname) {
|
||||
return manifest._.prerendered_routes.has(pathname) || pathname.at(-1) === "/" && manifest._.prerendered_routes.has(pathname.slice(0, -1));
|
||||
}
|
||||
/**
|
||||
* Formats the error into a nice message with sanitized stack trace
|
||||
* @param {number} status
|
||||
* @param {Error} error
|
||||
* @param {import('@sveltejs/kit').RequestEvent} event
|
||||
*/
|
||||
function format_server_error(status, error, event) {
|
||||
const formatted_text = `\n\x1b[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1b[0m`;
|
||||
if (status === 404) return formatted_text;
|
||||
return `${formatted_text}\n${error.stack}`;
|
||||
}
|
||||
/**
|
||||
* Returns the filename without the extension. e.g., `+page.server`, `+page`, etc.
|
||||
* @param {string | undefined} node_id
|
||||
* @returns {string}
|
||||
*/
|
||||
function get_node_type(node_id) {
|
||||
const filename = (node_id?.split("/"))?.at(-1);
|
||||
if (!filename) return "unknown";
|
||||
return filename.split(".").slice(0, -1).join(".");
|
||||
}
|
||||
/**
|
||||
* Counts HTML comments that are not SSI directives (which start with `<!--#`).
|
||||
* Used to detect when `transformPageChunk` removes comments that Svelte needs for hydration.
|
||||
* @param {string} str
|
||||
* @returns {number}
|
||||
*/
|
||||
function count_non_ssi_comments(str) {
|
||||
return (str.match(/<!--(?!#)/g) ?? []).length;
|
||||
}
|
||||
/**
|
||||
* Creates a serialiser for non-arbitrary POJOs using the app's transport hook
|
||||
* @param {ServerHooks['transport']} transport
|
||||
* @returns {(thing: unknown) => string | undefined}
|
||||
*/
|
||||
function create_replacer(transport) {
|
||||
/** @param {unknown} thing */
|
||||
const replacer = (thing) => {
|
||||
for (const key in transport) {
|
||||
const encoded = transport[key].encode(thing);
|
||||
if (encoded) return `app.decode('${key}', ${uneval(encoded, replacer)})`;
|
||||
}
|
||||
};
|
||||
return replacer;
|
||||
}
|
||||
//#endregion
|
||||
export { set_nested_value as C, SVELTE_KIT_ASSETS as D, PAGE_METHODS as E, normalize_issue as S, MUTATIVE_METHODS as T, negotiate as _, get_global_name as a, deserialize_binary_form as b, handle_fatal_error as c, redirect_response as d, serialize_uses as f, is_form_content_type as g, s as h, format_server_error as i, has_prerendered_path as l, escape_html as m, count_non_ssi_comments as n, get_node_type as o, static_error_page as p, create_replacer as r, handle_error_and_jsonify as s, clarify_devalue_error as t, method_not_allowed as u, create_field_proxy as v, ENDPOINT_METHODS as w, flatten_issues as x, deep_set as y };
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//#region src/routes/app/debug/increment-svelte/+server.ts
|
||||
var { PB_URL = "http://127.0.0.1:8090", PB_SUPERUSER_EMAIL = "", PB_SUPERUSER_PASSWORD = "", DEBUG_RECORD_ID = "" } = process.env;
|
||||
async function POST() {
|
||||
const { token } = await (await fetch(`${PB_URL}/api/collections/_superusers/auth-with-password`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
identity: PB_SUPERUSER_EMAIL,
|
||||
password: PB_SUPERUSER_PASSWORD
|
||||
})
|
||||
})).json();
|
||||
const current = (await (await fetch(`${PB_URL}/api/collections/debug/records/${DEBUG_RECORD_ID}`, { headers: { Authorization: `Bearer ${token}` } })).json()).svelte_count || 0;
|
||||
await fetch(`${PB_URL}/api/collections/debug/records/${DEBUG_RECORD_ID}`, {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${token}`
|
||||
},
|
||||
body: JSON.stringify({ svelte_count: current + 1 })
|
||||
});
|
||||
return new Response(JSON.stringify({ ok: true }), { headers: { "content-type": "application/json" } });
|
||||
}
|
||||
//#endregion
|
||||
export { POST };
|
||||
@@ -0,0 +1,167 @@
|
||||
import { r as index_server_exports } from "../../chunks/internal.js";
|
||||
import { y as noop } from "../../chunks/shared.js";
|
||||
import "../../chunks/internal2.js";
|
||||
import "../../chunks/exports.js";
|
||||
import { _ as escape_html, b as writable, c as getContext, et as noop$1 } from "../../chunks/async.js";
|
||||
import "@sveltejs/kit/internal";
|
||||
import "@sveltejs/kit/internal/server";
|
||||
var PRELOAD_PRIORITIES = {
|
||||
tap: 1,
|
||||
hover: 2,
|
||||
viewport: 3,
|
||||
eager: 4,
|
||||
false: -1
|
||||
};
|
||||
({ ...PRELOAD_PRIORITIES }), PRELOAD_PRIORITIES.hover;
|
||||
/** @param {any} value */
|
||||
function notifiable_store(value) {
|
||||
const store = writable(value);
|
||||
let ready = true;
|
||||
function notify() {
|
||||
ready = true;
|
||||
store.update((val) => val);
|
||||
}
|
||||
/** @param {any} new_value */
|
||||
function set(new_value) {
|
||||
ready = false;
|
||||
store.set(new_value);
|
||||
}
|
||||
/** @param {(value: any) => void} run */
|
||||
function subscribe(run) {
|
||||
/** @type {any} */
|
||||
let old_value;
|
||||
return store.subscribe((new_value) => {
|
||||
if (old_value === void 0 || ready && new_value !== old_value) run(old_value = new_value);
|
||||
});
|
||||
}
|
||||
return {
|
||||
notify,
|
||||
set,
|
||||
subscribe
|
||||
};
|
||||
}
|
||||
var updated_listener = { v: noop };
|
||||
function create_updated_store() {
|
||||
const { set, subscribe } = writable(false);
|
||||
return {
|
||||
subscribe,
|
||||
check: async () => false
|
||||
};
|
||||
}
|
||||
var updated$1;
|
||||
var is_legacy = noop$1.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop$1.toString());
|
||||
var placeholder_url = "a:";
|
||||
if (is_legacy) {
|
||||
new URL(placeholder_url);
|
||||
updated$1 = { current: false };
|
||||
} else {
|
||||
new class Page {
|
||||
data = {};
|
||||
form = null;
|
||||
error = null;
|
||||
params = {};
|
||||
route = { id: null };
|
||||
state = {};
|
||||
status = -1;
|
||||
url = new URL(placeholder_url);
|
||||
}();
|
||||
new class Navigating {
|
||||
current = null;
|
||||
}();
|
||||
updated$1 = new class Updated {
|
||||
current = false;
|
||||
}();
|
||||
updated_listener.v = () => updated$1.current = true;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/client/client.js
|
||||
/** @import { RemoteFunctionDataNode, ServerNodesResponse, ServerRedirectNode } from 'types' */
|
||||
/** @import { CacheEntry } from './remote-functions/cache.svelte.js' */
|
||||
/** @import { Query } from './remote-functions/query/instance.svelte.js' */
|
||||
/** @import { LiveQuery } from './remote-functions/query-live/instance.svelte.js' */
|
||||
var { onMount, tick } = index_server_exports;
|
||||
({
|
||||
url: /* @__PURE__ */ notifiable_store({}),
|
||||
page: /* @__PURE__ */ notifiable_store({}),
|
||||
navigating: /* @__PURE__ */ writable(null),
|
||||
updated: /* @__PURE__ */ create_updated_store()
|
||||
}).updated.check;
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/state/server.js
|
||||
function context() {
|
||||
return getContext("__request__");
|
||||
}
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/app/state/index.js
|
||||
/**
|
||||
* A read-only reactive object with information about the current page, serving several use cases:
|
||||
* - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load))
|
||||
* - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions))
|
||||
* - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing))
|
||||
* - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error
|
||||
*
|
||||
* ```svelte
|
||||
* <!--- file: +layout.svelte --->
|
||||
* <script>
|
||||
* import { page } from '$app/state';
|
||||
* <\/script>
|
||||
*
|
||||
* <p>Currently at {page.url.pathname}</p>
|
||||
*
|
||||
* {#if page.error}
|
||||
* <span class="red">Problem detected</span>
|
||||
* {:else}
|
||||
* <span class="small">All systems operational</span>
|
||||
* {/if}
|
||||
* ```
|
||||
*
|
||||
* Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes)
|
||||
*
|
||||
* ```svelte
|
||||
* <!--- file: +page.svelte --->
|
||||
* <script>
|
||||
* import { page } from '$app/state';
|
||||
* const id = $derived(page.params.id); // This will correctly update id for usage on this page
|
||||
* $: badId = page.params.id; // Do not use; will never update after initial load
|
||||
* <\/script>
|
||||
* ```
|
||||
*
|
||||
* On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time.
|
||||
*
|
||||
* @type {import('@sveltejs/kit').Page}
|
||||
*/
|
||||
var page = {
|
||||
get data() {
|
||||
return context().page.data;
|
||||
},
|
||||
get error() {
|
||||
return context().page.error;
|
||||
},
|
||||
get form() {
|
||||
return context().page.form;
|
||||
},
|
||||
get params() {
|
||||
return context().page.params;
|
||||
},
|
||||
get route() {
|
||||
return context().page.route;
|
||||
},
|
||||
get state() {
|
||||
return context().page.state;
|
||||
},
|
||||
get status() {
|
||||
return context().page.status;
|
||||
},
|
||||
get url() {
|
||||
return context().page.url;
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
//#region ../node_modules/.pnpm/@sveltejs+kit@3.0.0-next.4_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.3_vite@8.0.16_831df308509456bf75377b19fdb5b8d4/node_modules/@sveltejs/kit/src/runtime/components/error.svelte
|
||||
function Error$1($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer) => {
|
||||
$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
export { Error$1 as default };
|
||||
@@ -0,0 +1,15 @@
|
||||
import { g as attr, n as head } from "../../chunks/async.js";
|
||||
//#region src/lib/assets/favicon.svg
|
||||
var favicon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e";
|
||||
//#endregion
|
||||
//#region src/routes/+layout.svelte
|
||||
function _layout($$renderer, $$props) {
|
||||
let { children } = $$props;
|
||||
head("12qhfyh", $$renderer, ($$renderer) => {
|
||||
$$renderer.push(`<link rel="icon"${attr("href", favicon_default)}/>`);
|
||||
});
|
||||
children($$renderer);
|
||||
$$renderer.push(`<!---->`);
|
||||
}
|
||||
//#endregion
|
||||
export { _layout as default };
|
||||
@@ -0,0 +1,7 @@
|
||||
import "../../chunks/async.js";
|
||||
//#region src/routes/+page.svelte
|
||||
function _page($$renderer) {
|
||||
$$renderer.push(`<h1>Welcome to SvelteKit</h1> <p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>`);
|
||||
}
|
||||
//#endregion
|
||||
export { _page as default };
|
||||
@@ -0,0 +1,25 @@
|
||||
import PocketBase from "pocketbase";
|
||||
//#region src/lib/server/pocketbase.ts
|
||||
var pb = null;
|
||||
async function getPocketBase() {
|
||||
if (pb) return pb;
|
||||
const url = process.env.PB_URL || "http://127.0.0.1:8090";
|
||||
const email = process.env.PB_SUPERUSER_EMAIL || "";
|
||||
const password = process.env.PB_SUPERUSER_PASSWORD || "";
|
||||
pb = new PocketBase(url);
|
||||
await pb.admins.authWithPassword(email, password);
|
||||
return pb;
|
||||
}
|
||||
//#endregion
|
||||
//#region src/routes/debug/+page.server.ts
|
||||
async function load() {
|
||||
const pb = await getPocketBase();
|
||||
const recordId = process.env.DEBUG_RECORD_ID || "";
|
||||
const record = await pb.collection("debug").getOne(recordId);
|
||||
return { initial: {
|
||||
hono_count: record.hono_count,
|
||||
svelte_count: record.svelte_count
|
||||
} };
|
||||
}
|
||||
//#endregion
|
||||
export { load };
|
||||
@@ -0,0 +1,12 @@
|
||||
import { _ as escape_html } from "../../../chunks/async.js";
|
||||
//#region src/routes/debug/+page.svelte
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer) => {
|
||||
let { data } = $$props;
|
||||
let honoCount = data.initial.hono_count;
|
||||
let svelteCount = data.initial.svelte_count;
|
||||
$$renderer.push(`<h1 class="svelte-1cmtigg">Debug Dashboard</h1> <div class="counters svelte-1cmtigg"><div class="card svelte-1cmtigg"><h2>Hono</h2> <p class="value svelte-1cmtigg">${escape_html(honoCount)}</p> <button class="svelte-1cmtigg">+1 Hono</button></div> <div class="card svelte-1cmtigg"><h2>SvelteKit</h2> <p class="value svelte-1cmtigg">${escape_html(svelteCount)}</p> <button class="svelte-1cmtigg">+1 Svelte</button></div></div>`);
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
export { _page as default };
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
import { a as set_manifest, l as set_env, n as options, o as set_read_implementation, t as get_hooks } from "./chunks/internal.js";
|
||||
import { n as set_building, r as set_prerendering, u as set_assets } from "./chunks/internal2.js";
|
||||
export { get_hooks, options, set_assets, set_building, set_env, set_manifest, set_prerendering, set_read_implementation };
|
||||
@@ -0,0 +1,54 @@
|
||||
export const manifest = (() => {
|
||||
function __memo(fn) {
|
||||
let value;
|
||||
return () => value ??= (value = fn());
|
||||
}
|
||||
|
||||
return {
|
||||
appDir: "_app",
|
||||
appPath: "_app",
|
||||
assets: new Set(["robots.txt"]),
|
||||
mimeTypes: {".txt":"text/plain"},
|
||||
_: {
|
||||
client: {start:"_app/immutable/entry/start.BrvD15ct.js",app:"_app/immutable/entry/app.BgJ-mwan.js",imports:["_app/immutable/entry/start.BrvD15ct.js","_app/immutable/chunks/BdwAK-tR.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/entry/app.BgJ-mwan.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/kNaey6uv.js","_app/immutable/chunks/CwC2hPmm.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'))
|
||||
],
|
||||
remotes: {
|
||||
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
id: "/",
|
||||
pattern: /^\/$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/app/debug/increment-svelte",
|
||||
pattern: /^\/app\/debug\/increment-svelte\/?$/,
|
||||
params: [],
|
||||
page: null,
|
||||
endpoint: __memo(() => import('./entries/endpoints/app/debug/increment-svelte/_server.ts.js'))
|
||||
},
|
||||
{
|
||||
id: "/debug",
|
||||
pattern: /^\/debug\/?$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 3 },
|
||||
endpoint: null
|
||||
}
|
||||
],
|
||||
prerendered_routes: new Set([]),
|
||||
matchers: async () => {
|
||||
|
||||
return { };
|
||||
},
|
||||
server_assets: {}
|
||||
}
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,58 @@
|
||||
export const manifest = (() => {
|
||||
function __memo(fn) {
|
||||
let value;
|
||||
return () => value ??= (value = fn());
|
||||
}
|
||||
|
||||
return {
|
||||
appDir: "_app",
|
||||
appPath: "_app",
|
||||
assets: new Set(["robots.txt"]),
|
||||
mimeTypes: {".txt":"text/plain"},
|
||||
_: {
|
||||
client: {start:"_app/immutable/entry/start.BrvD15ct.js",app:"_app/immutable/entry/app.BgJ-mwan.js",imports:["_app/immutable/entry/start.BrvD15ct.js","_app/immutable/chunks/BdwAK-tR.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/entry/app.BgJ-mwan.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/kNaey6uv.js","_app/immutable/chunks/CwC2hPmm.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'))
|
||||
],
|
||||
remotes: {
|
||||
|
||||
},
|
||||
routes: [
|
||||
{
|
||||
id: "/",
|
||||
pattern: /^\/$/,
|
||||
params: [],
|
||||
page: { layouts: [0,], errors: [1,], leaf: 2 },
|
||||
endpoint: null
|
||||
},
|
||||
{
|
||||
id: "/app/debug/increment-svelte",
|
||||
pattern: /^\/app\/debug\/increment-svelte\/?$/,
|
||||
params: [],
|
||||
page: null,
|
||||
endpoint: __memo(() => import('./entries/endpoints/app/debug/increment-svelte/_server.ts.js'))
|
||||
},
|
||||
{
|
||||
id: "/debug",
|
||||
pattern: /^\/debug\/?$/,
|
||||
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 = "";
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
export const index = 0;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/0.DdQneEYP.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/CwC2hPmm.js"];
|
||||
export const stylesheets = ["_app/immutable/assets/0.DZVyIXY0.css"];
|
||||
export const fonts = [];
|
||||
@@ -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.BREYVj7m.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/BdwAK-tR.js","_app/immutable/chunks/CwC2hPmm.js"];
|
||||
export const stylesheets = [];
|
||||
export const fonts = [];
|
||||
@@ -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.B8c0uVM3.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/CwC2hPmm.js"];
|
||||
export const stylesheets = [];
|
||||
export const fonts = [];
|
||||
@@ -0,0 +1,10 @@
|
||||
import * as server from '../entries/pages/debug/_page.server.ts.js';
|
||||
|
||||
export const index = 3;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/debug/_page.svelte.js')).default;
|
||||
export { server };
|
||||
export const server_id = "src/routes/debug/+page.server.ts";
|
||||
export const imports = ["_app/immutable/nodes/3.6Pi2DapA.js","_app/immutable/chunks/CADeoA4U.js","_app/immutable/chunks/CwC2hPmm.js"];
|
||||
export const stylesheets = ["_app/immutable/assets/3.mtd_lTPT.css"];
|
||||
export const fonts = [];
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user