diff --git a/.netlify/functions-internal/sveltekit-render.json b/.netlify/functions-internal/sveltekit-render.json deleted file mode 100644 index 98d3d2e..0000000 --- a/.netlify/functions-internal/sveltekit-render.json +++ /dev/null @@ -1 +0,0 @@ -{"config":{"nodeModuleFormat":"esm"},"version":1} \ No newline at end of file diff --git a/.netlify/functions-internal/sveltekit-render.mjs b/.netlify/functions-internal/sveltekit-render.mjs deleted file mode 100644 index 0430e4e..0000000 --- a/.netlify/functions-internal/sveltekit-render.mjs +++ /dev/null @@ -1,76 +0,0 @@ -import { init } from '../serverless.js'; - -export const handler = init((() => { -function __memo(fn) { - let value; - return () => value ??= (value = fn()); -} - -return { - appDir: "_app", - appPath: "_app", - assets: new Set([".DS_Store","cursor.png","cursor.svg","favicon.png","pointer.png","pointer.svg","work/.DS_Store","work/adidas/adidas_hero.jpg","work/formo/formo-rec.mp4","work/formo/formo-rec.webm","work/formo/formo_hero.png","work/jpl/jpl_hero.jpg"]), - mimeTypes: {".png":"image/png",".svg":"image/svg+xml",".jpg":"image/jpeg",".mp4":"video/mp4",".webm":"video/webm"}, - _: { - client: {"start":"_app/immutable/entry/start.0e966e92.js","app":"_app/immutable/entry/app.fea8eb32.js","imports":["_app/immutable/entry/start.0e966e92.js","_app/immutable/chunks/scheduler.8b80e243.js","_app/immutable/chunks/singletons.a1418874.js","_app/immutable/entry/app.fea8eb32.js","_app/immutable/chunks/scheduler.8b80e243.js","_app/immutable/chunks/index.b20febff.js"],"stylesheets":[],"fonts":[]}, - nodes: [ - __memo(() => import('../server/nodes/0.js')), - __memo(() => import('../server/nodes/1.js')), - __memo(() => import('../server/nodes/2.js')), - __memo(() => import('../server/nodes/3.js')), - __memo(() => import('../server/nodes/4.js')), - __memo(() => import('../server/nodes/5.js')), - __memo(() => import('../server/nodes/6.js')), - __memo(() => import('../server/nodes/7.js')) - ], - routes: [ - { - id: "/", - pattern: /^\/$/, - params: [], - page: { layouts: [0,], errors: [1,], leaf: 2 }, - endpoint: null - }, - { - id: "/blog", - pattern: /^\/blog\/?$/, - params: [], - page: { layouts: [0,], errors: [1,], leaf: 3 }, - endpoint: null - }, - { - id: "/blog/[slug]", - pattern: /^\/blog\/([^/]+?)\/?$/, - params: [{"name":"slug","optional":false,"rest":false,"chained":false}], - page: { layouts: [0,], errors: [1,], leaf: 4 }, - endpoint: null - }, - { - id: "/test", - pattern: /^\/test\/?$/, - params: [], - page: { layouts: [0,], errors: [1,], leaf: 5 }, - endpoint: null - }, - { - id: "/work", - pattern: /^\/work\/?$/, - params: [], - page: { layouts: [0,], errors: [1,], leaf: 6 }, - endpoint: null - }, - { - id: "/work/[slug]", - pattern: /^\/work\/([^/]+?)\/?$/, - params: [{"name":"slug","optional":false,"rest":false,"chained":false}], - page: { layouts: [0,], errors: [1,], leaf: 7 }, - endpoint: null - } - ], - matchers: async () => { - - return { }; - } - } -} -})()); diff --git a/.netlify/server/_app/immutable/assets/formo_hero.07fbd4ee.png b/.netlify/server/_app/immutable/assets/formo_hero.07fbd4ee.png deleted file mode 100644 index ac6c8f3..0000000 Binary files a/.netlify/server/_app/immutable/assets/formo_hero.07fbd4ee.png and /dev/null differ diff --git a/.netlify/server/_app/immutable/assets/formo_hero.3c06dcdd.webp b/.netlify/server/_app/immutable/assets/formo_hero.3c06dcdd.webp deleted file mode 100644 index c542d91..0000000 Binary files a/.netlify/server/_app/immutable/assets/formo_hero.3c06dcdd.webp and /dev/null differ diff --git a/.netlify/server/_app/immutable/assets/formo_hero.76612d9f.webp b/.netlify/server/_app/immutable/assets/formo_hero.76612d9f.webp deleted file mode 100644 index 5c7ac28..0000000 Binary files a/.netlify/server/_app/immutable/assets/formo_hero.76612d9f.webp and /dev/null differ diff --git a/.netlify/server/_app/immutable/assets/formo_hero.bdd89961.webp b/.netlify/server/_app/immutable/assets/formo_hero.bdd89961.webp deleted file mode 100644 index be050a4..0000000 Binary files a/.netlify/server/_app/immutable/assets/formo_hero.bdd89961.webp and /dev/null differ diff --git a/.netlify/server/chunks/adidas.js b/.netlify/server/chunks/adidas.js deleted file mode 100644 index 977a69e..0000000 --- a/.netlify/server/chunks/adidas.js +++ /dev/null @@ -1,15 +0,0 @@ -import { c as create_ssr_component } from "./ssr.js"; -const metadata = { - "title": "Adidas", - "header_bg_image": "adidas_hero_ceurd8", - "order": 12, - "description": "Adidas, as you might have heard, is an international sports and lifestyle clothing brand. I worked on several digital campaigns as a graphic designer and illustrator.", - "svg": '' -}; -const Adidas = create_ssr_component(($$result, $$props, $$bindings, slots) => { - return `

Adidas, as you might have heard, is an international sports and lifestyle clothing brand. I worked on several digital campaigns as a graphic designer and illustrator.

`; -}); -export { - Adidas as default, - metadata -}; diff --git a/.netlify/server/chunks/formo.js b/.netlify/server/chunks/formo.js deleted file mode 100644 index 01f1861..0000000 --- a/.netlify/server/chunks/formo.js +++ /dev/null @@ -1,16 +0,0 @@ -import { c as create_ssr_component } from "./ssr.js"; -const metadata = { - "title": "Formo.bio", - "header_bg_image": "formo_hero_xgb6xo", - "video": "/work/formo/formo-rec.webm", - "order": 12, - "description": "Formo, as you might have heard, is an international sports and lifestyle clothing brand. I worked on several digital campaigns as a graphic designer and illustrator.", - "svg": '' -}; -const Formo = create_ssr_component(($$result, $$props, $$bindings, slots) => { - return `

A website for the future of dairy.

Formo is using precision fermentation instead of cows to make dairy products and save the world.

Formo’s previous website was lacking an easy way for the team to create new, visually engaging content without technical knowledge. After consulting with the team, we decided to use the latest version of WordPress which offers full support for the powerful Gutenberg editor.

We built custom content blocks for the team to use and combine when creating new pages and articles.

`; -}); -export { - Formo as default, - metadata -}; diff --git a/.netlify/server/chunks/index.js b/.netlify/server/chunks/index.js deleted file mode 100644 index 172cc5b..0000000 --- a/.netlify/server/chunks/index.js +++ /dev/null @@ -1,83 +0,0 @@ -class HttpError { - /** - * @param {number} status - * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body - */ - constructor(status, body) { - this.status = status; - if (typeof body === "string") { - this.body = { message: body }; - } else if (body) { - this.body = body; - } else { - this.body = { message: `Error: ${status}` }; - } - } - toString() { - return JSON.stringify(this.body); - } -} -class Redirect { - /** - * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status - * @param {string} location - */ - constructor(status, location) { - this.status = status; - this.location = location; - } -} -class ActionFailure { - /** - * @param {number} status - * @param {T} [data] - */ - constructor(status, data) { - this.status = status; - this.data = data; - } -} -function error(status, body) { - if (isNaN(status) || status < 400 || status > 599) { - throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`); - } - return new HttpError(status, body); -} -function json(data, init) { - const body = JSON.stringify(data); - const headers = new Headers(init?.headers); - if (!headers.has("content-length")) { - headers.set("content-length", encoder.encode(body).byteLength.toString()); - } - if (!headers.has("content-type")) { - headers.set("content-type", "application/json"); - } - return new Response(body, { - ...init, - headers - }); -} -const encoder = new TextEncoder(); -function text(body, init) { - const headers = new Headers(init?.headers); - if (!headers.has("content-length")) { - const encoded = encoder.encode(body); - headers.set("content-length", encoded.byteLength.toString()); - return new Response(encoded, { - ...init, - headers - }); - } - return new Response(body, { - ...init, - headers - }); -} -export { - ActionFailure as A, - HttpError as H, - Redirect as R, - error as e, - json as j, - text as t -}; diff --git a/.netlify/server/chunks/index2.js b/.netlify/server/chunks/index2.js deleted file mode 100644 index 2ebd2fc..0000000 --- a/.netlify/server/chunks/index2.js +++ /dev/null @@ -1,52 +0,0 @@ -import { n as noop, a as safe_not_equal } from "./utils.js"; -const subscriber_queue = []; -function readable(value, start) { - return { - subscribe: writable(value, start).subscribe - }; -} -function writable(value, start = noop) { - let stop; - const subscribers = /* @__PURE__ */ new Set(); - function set(new_value) { - if (safe_not_equal(value, new_value)) { - value = new_value; - if (stop) { - const run_queue = !subscriber_queue.length; - for (const subscriber of subscribers) { - subscriber[1](); - subscriber_queue.push(subscriber, value); - } - if (run_queue) { - for (let i = 0; i < subscriber_queue.length; i += 2) { - subscriber_queue[i][0](subscriber_queue[i + 1]); - } - subscriber_queue.length = 0; - } - } - } - } - function update(fn) { - set(fn(value)); - } - function subscribe(run, invalidate = noop) { - const subscriber = [run, invalidate]; - subscribers.add(subscriber); - if (subscribers.size === 1) { - stop = start(set, update) || noop; - } - run(value); - return () => { - subscribers.delete(subscriber); - if (subscribers.size === 0 && stop) { - stop(); - stop = null; - } - }; - } - return { set, update, subscribe }; -} -export { - readable as r, - writable as w -}; diff --git a/.netlify/server/chunks/internal.js b/.netlify/server/chunks/internal.js deleted file mode 100644 index e5e70a0..0000000 --- a/.netlify/server/chunks/internal.js +++ /dev/null @@ -1,185 +0,0 @@ -import { c as create_ssr_component, s as setContext, v as validate_component, m as missing_component } from "./ssr.js"; -let base = ""; -let assets = base; -const initial = { base, assets }; -function reset() { - base = initial.base; - assets = initial.assets; -} -function set_assets(path) { - assets = initial.assets = path; -} -let public_env = {}; -function set_private_env(environment) { -} -function set_public_env(environment) { - public_env = environment; -} -function afterUpdate() { -} -function set_building() { -} -const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { stores } = $$props; - let { page } = $$props; - let { constructors } = $$props; - let { components = [] } = $$props; - let { form } = $$props; - let { data_0 = null } = $$props; - let { data_1 = null } = $$props; - { - setContext("__svelte__", stores); - } - afterUpdate(stores.page.notify); - if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0) - $$bindings.stores(stores); - if ($$props.page === void 0 && $$bindings.page && page !== void 0) - $$bindings.page(page); - if ($$props.constructors === void 0 && $$bindings.constructors && constructors !== void 0) - $$bindings.constructors(constructors); - if ($$props.components === void 0 && $$bindings.components && components !== void 0) - $$bindings.components(components); - if ($$props.form === void 0 && $$bindings.form && form !== void 0) - $$bindings.form(form); - if ($$props.data_0 === void 0 && $$bindings.data_0 && data_0 !== void 0) - $$bindings.data_0(data_0); - if ($$props.data_1 === void 0 && $$bindings.data_1 && data_1 !== void 0) - $$bindings.data_1(data_1); - let $$settled; - let $$rendered; - do { - $$settled = true; - { - stores.page.set(page); - } - $$rendered = ` ${constructors[1] ? `${validate_component(constructors[0] || missing_component, "svelte:component").$$render( - $$result, - { data: data_0, this: components[0] }, - { - this: ($$value) => { - components[0] = $$value; - $$settled = false; - } - }, - { - default: () => { - return `${validate_component(constructors[1] || missing_component, "svelte:component").$$render( - $$result, - { data: data_1, form, this: components[1] }, - { - this: ($$value) => { - components[1] = $$value; - $$settled = false; - } - }, - {} - )}`; - } - } - )}` : `${validate_component(constructors[0] || missing_component, "svelte:component").$$render( - $$result, - { data: data_0, form, this: components[0] }, - { - this: ($$value) => { - components[0] = $$value; - $$settled = false; - } - }, - {} - )}`} ${``}`; - } while (!$$settled); - return $$rendered; -}); -const options = { - app_template_contains_nonce: false, - csp: { "mode": "auto", "directives": { "upgrade-insecure-requests": false, "block-all-mixed-content": false }, "reportOnly": { "upgrade-insecure-requests": false, "block-all-mixed-content": false } }, - csrf_check_origin: true, - track_server_fetches: false, - embedded: false, - env_public_prefix: "PUBLIC_", - env_private_prefix: "", - hooks: null, - // added lazily, via `get_hooks` - preload_strategy: "modulepreload", - root: Root, - service_worker: false, - templates: { - app: ({ head, body, assets: assets2, nonce, env }) => '\n\n \n \n \n \n \n ' + head + '\n \n \n
' + body + "
\n \n\n", - error: ({ status, message }) => '\n\n \n \n ' + message + ` - - - - -
- ` + status + '\n
\n

' + message + "

\n
\n
\n \n\n" - }, - version_hash: "fe2g2k" -}; -function get_hooks() { - return {}; -} -export { - assets as a, - base as b, - set_public_env as c, - set_assets as d, - set_building as e, - get_hooks as g, - options as o, - public_env as p, - reset as r, - set_private_env as s -}; diff --git a/.netlify/server/chunks/jpl.js b/.netlify/server/chunks/jpl.js deleted file mode 100644 index 56fa762..0000000 --- a/.netlify/server/chunks/jpl.js +++ /dev/null @@ -1,15 +0,0 @@ -import { c as create_ssr_component } from "./ssr.js"; -const metadata = { - "title": "JustPeace Labs", - "header_bg_image": "jpl_hero_eukxaw", - "description": "JustPeace Labs is a non-profit organization that works with local communities to build peace and prevent violence.", - "order": 11, - "svg": '' -}; -const Jpl = create_ssr_component(($$result, $$props, $$bindings, slots) => { - return `

JPL’s Mission

The startup has declared their mission “to empower local communities to be active participants in creating lasting just peace through the use of technology”. I created a logo and housestyle for them that conveyes their goals and products.

The “broken peace” logo

Since 1958, the Symbol for the British nuclear disarmament movement by Gerald Holtom is used as an international symbol for peace.

Clients of JustPeace Labs are peace builders. The logo is a ‘broken’ peace sign with only the frame intact. It stands for the technological and ethical frameworks that JPL aims to provide that can be used to achieve long lasting, just peace.

`; -}); -export { - Jpl as default, - metadata -}; diff --git a/.netlify/server/chunks/ssr.js b/.netlify/server/chunks/ssr.js deleted file mode 100644 index 521a723..0000000 --- a/.netlify/server/chunks/ssr.js +++ /dev/null @@ -1,221 +0,0 @@ -import { r as run_all, b as blank_object } from "./utils.js"; -let current_component; -function set_current_component(component) { - current_component = component; -} -function get_current_component() { - if (!current_component) - throw new Error("Function called outside component initialization"); - return current_component; -} -function onDestroy(fn) { - get_current_component().$$.on_destroy.push(fn); -} -function setContext(key, context) { - get_current_component().$$.context.set(key, context); - return context; -} -function getContext(key) { - return get_current_component().$$.context.get(key); -} -function ensure_array_like(array_like_or_iterator) { - return array_like_or_iterator?.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator); -} -const _boolean_attributes = ( - /** @type {const} */ - [ - "allowfullscreen", - "allowpaymentrequest", - "async", - "autofocus", - "autoplay", - "checked", - "controls", - "default", - "defer", - "disabled", - "formnovalidate", - "hidden", - "inert", - "ismap", - "loop", - "multiple", - "muted", - "nomodule", - "novalidate", - "open", - "playsinline", - "readonly", - "required", - "reversed", - "selected" - ] -); -const boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); -const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; -function spread(args, attrs_to_add) { - const attributes = Object.assign({}, ...args); - if (attrs_to_add) { - const classes_to_add = attrs_to_add.classes; - const styles_to_add = attrs_to_add.styles; - if (classes_to_add) { - if (attributes.class == null) { - attributes.class = classes_to_add; - } else { - attributes.class += " " + classes_to_add; - } - } - if (styles_to_add) { - if (attributes.style == null) { - attributes.style = style_object_to_string(styles_to_add); - } else { - attributes.style = style_object_to_string( - merge_ssr_styles(attributes.style, styles_to_add) - ); - } - } - } - let str = ""; - Object.keys(attributes).forEach((name) => { - if (invalid_attribute_name_character.test(name)) - return; - const value = attributes[name]; - if (value === true) - str += " " + name; - else if (boolean_attributes.has(name.toLowerCase())) { - if (value) - str += " " + name; - } else if (value != null) { - str += ` ${name}="${value}"`; - } - }); - return str; -} -function merge_ssr_styles(style_attribute, style_directive) { - const style_object = {}; - for (const individual_style of style_attribute.split(";")) { - const colon_index = individual_style.indexOf(":"); - const name = individual_style.slice(0, colon_index).trim(); - const value = individual_style.slice(colon_index + 1).trim(); - if (!name) - continue; - style_object[name] = value; - } - for (const name in style_directive) { - const value = style_directive[name]; - if (value) { - style_object[name] = value; - } else { - delete style_object[name]; - } - } - return style_object; -} -const ATTR_REGEX = /[&"]/g; -const CONTENT_REGEX = /[&<]/g; -function escape(value, is_attr = false) { - const str = String(value); - const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX; - pattern.lastIndex = 0; - let escaped = ""; - let last = 0; - while (pattern.test(str)) { - const i = pattern.lastIndex - 1; - const ch = str[i]; - escaped += str.substring(last, i) + (ch === "&" ? "&" : ch === '"' ? """ : "<"); - last = i + 1; - } - return escaped + str.substring(last); -} -function escape_attribute_value(value) { - const should_escape = typeof value === "string" || value && typeof value === "object"; - return should_escape ? escape(value, true) : value; -} -function escape_object(obj) { - const result = {}; - for (const key in obj) { - result[key] = escape_attribute_value(obj[key]); - } - return result; -} -function each(items, fn) { - items = ensure_array_like(items); - let str = ""; - for (let i = 0; i < items.length; i += 1) { - str += fn(items[i], i); - } - return str; -} -const missing_component = { - $$render: () => "" -}; -function validate_component(component, name) { - if (!component || !component.$$render) { - if (name === "svelte:component") - name += " this={...}"; - throw new Error( - `<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.` - ); - } - return component; -} -let on_destroy; -function create_ssr_component(fn) { - function $$render(result, props, bindings, slots, context) { - const parent_component = current_component; - const $$ = { - on_destroy, - context: new Map(context || (parent_component ? parent_component.$$.context : [])), - // these will be immediately discarded - on_mount: [], - before_update: [], - after_update: [], - callbacks: blank_object() - }; - set_current_component({ $$ }); - const html = fn(result, props, bindings, slots); - set_current_component(parent_component); - return html; - } - return { - render: (props = {}, { $$slots = {}, context = /* @__PURE__ */ new Map() } = {}) => { - on_destroy = []; - const result = { title: "", head: "", css: /* @__PURE__ */ new Set() }; - const html = $$render(result, props, {}, $$slots, context); - run_all(on_destroy); - return { - html, - css: { - code: Array.from(result.css).map((css) => css.code).join("\n"), - map: null - // TODO - }, - head: result.title + result.head - }; - }, - $$render - }; -} -function add_attribute(name, value, boolean) { - if (value == null || boolean && !value) - return ""; - const assignment = boolean && value === true ? "" : `="${escape(value, true)}"`; - return ` ${name}${assignment}`; -} -function style_object_to_string(style_object) { - return Object.keys(style_object).filter((key) => style_object[key]).map((key) => `${key}: ${escape_attribute_value(style_object[key])};`).join(" "); -} -export { - add_attribute as a, - each as b, - create_ssr_component as c, - spread as d, - escape as e, - escape_attribute_value as f, - getContext as g, - escape_object as h, - missing_component as m, - onDestroy as o, - setContext as s, - validate_component as v -}; diff --git a/.netlify/server/entries/fallbacks/error.svelte.js b/.netlify/server/entries/fallbacks/error.svelte.js deleted file mode 100644 index 47cf990..0000000 --- a/.netlify/server/entries/fallbacks/error.svelte.js +++ /dev/null @@ -1,12 +0,0 @@ -import { s as subscribe } from "../../chunks/utils.js"; -import { c as create_ssr_component, e as escape } from "../../chunks/ssr.js"; -import { p as page } from "../../chunks/stores.js"; -const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let $page, $$unsubscribe_page; - $$unsubscribe_page = subscribe(page, (value) => $page = value); - $$unsubscribe_page(); - return `

${escape($page.status)}

${escape($page.error?.message)}

`; -}); -export { - Error as default -}; diff --git a/.netlify/server/entries/pages/_layout.svelte.js b/.netlify/server/entries/pages/_layout.svelte.js deleted file mode 100644 index 1304f41..0000000 --- a/.netlify/server/entries/pages/_layout.svelte.js +++ /dev/null @@ -1,49 +0,0 @@ -import { s as subscribe } from "../../chunks/utils.js"; -import { c as create_ssr_component, v as validate_component, e as escape } from "../../chunks/ssr.js"; -import { n as navigating } from "../../chunks/stores.js"; -const global = ""; -const Logo_svelte_svelte_type_style_lang = ""; -const css$3 = { - code: "#floter-logo.svelte-vqchku{fill:currentColor;height:100%;width:auto;display:block}", - map: null -}; -const Logo = create_ssr_component(($$result, $$props, $$bindings, slots) => { - $$result.css.add(css$3); - return ``; -}); -const MainNav_svelte_svelte_type_style_lang = ""; -const css$2 = { - code: 'header.svelte-16m5twg.svelte-16m5twg{position:fixed;bottom:0;right:0;z-index:3;padding:var(--spacing-nav);display:flex;gap:0.75em;justify-content:flex-end;align-items:flex-end;box-sizing:border-box}label.svelte-16m5twg.svelte-16m5twg{height:36px}.open.svelte-16m5twg.svelte-16m5twg,.close.svelte-16m5twg.svelte-16m5twg{font-size:4em;line-height:0.3;position:relative;z-index:2;cursor:url("/pointer.svg"), auto}.close.svelte-16m5twg.svelte-16m5twg{top:0.033em;color:#FFF}#menustate.svelte-16m5twg.svelte-16m5twg,#nav.svelte-16m5twg.svelte-16m5twg,.close.svelte-16m5twg.svelte-16m5twg{display:none}#menustate.svelte-16m5twg:checked~#nav.svelte-16m5twg,#menustate:checked~label.svelte-16m5twg .close.svelte-16m5twg{display:block}#menustate:checked~label.svelte-16m5twg .open.svelte-16m5twg{display:none}#nav.svelte-16m5twg.svelte-16m5twg{background-color:var(--color-bg);position:fixed;top:0;left:0;width:100%;height:100%;padding:var(--spacing-outer)}#nav.svelte-16m5twg a.svelte-16m5twg{display:block;line-height:1.3;font-size:3em;font-weight:800;font-style:italic;text-transform:lowercase;text-decoration:none;color:var(--color-text)}@media screen and (min-width: 768px){#nav.svelte-16m5twg a.svelte-16m5twg{font-size:5.5em}}#nav.svelte-16m5twg a.svelte-16m5twg:first-child{margin-top:1em}', - map: null -}; -const MainNav = create_ssr_component(($$result, $$props, $$bindings, slots) => { - $$result.css.add(css$2); - return `
`; -}); -const Header_svelte_svelte_type_style_lang = ""; -const css$1 = { - code: '.logo.svelte-qrzgwy{height:36px;width:auto;position:fixed;bottom:0;z-index:4;display:block;margin:var(--spacing-nav);cursor:url("/pointer.svg"), auto}@media screen and (max-width: 767px){.header-nav.svelte-qrzgwy{background-color:var(--color-bg);width:100%;height:calc(36px + 2 * var(--spacing-nav));position:fixed;bottom:0;left:0;z-index:3;border-top:1px solid var(--color-text)}}', - map: null -}; -const Header = create_ssr_component(($$result, $$props, $$bindings, slots) => { - $$result.css.add(css$1); - return `
${validate_component(MainNav, "MainNav").$$render($$result, {}, {}, {})}
`; -}); -const _layout_svelte_svelte_type_style_lang = ""; -const css = { - code: ".loader.svelte-l3hxup{position:fixed;top:calc(50% - 0.5em);left:0;width:100%;height:1em;background:var(--color-bg);display:flex;justify-content:center;align-items:center;font-size:2rem;z-index:1000}", - map: null -}; -const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let $navigating, $$unsubscribe_navigating; - $$unsubscribe_navigating = subscribe(navigating, (value) => $navigating = value); - let { data } = $$props; - if ($$props.data === void 0 && $$bindings.data && data !== void 0) - $$bindings.data(data); - $$result.css.add(css); - $$unsubscribe_navigating(); - return `${validate_component(Header, "Header").$$render($$result, {}, {}, {})}
${$navigating ? `
Loading ${escape(JSON.stringify($navigating.to?.route.id))}
` : ``} ${slots.default ? slots.default({}) : ``}
`; -}); -export { - Layout as default -}; diff --git a/.netlify/server/entries/pages/_layout.ts.js b/.netlify/server/entries/pages/_layout.ts.js deleted file mode 100644 index 559a879..0000000 --- a/.netlify/server/entries/pages/_layout.ts.js +++ /dev/null @@ -1,12 +0,0 @@ -import { l as loading } from "../../chunks/stores2.js"; -loading.set(true); -const load = async ({ url }) => { - const { pathname } = url; - loading.set(false); - return { - pathname - }; -}; -export { - load -}; diff --git a/.netlify/server/entries/pages/_page.svelte.js b/.netlify/server/entries/pages/_page.svelte.js deleted file mode 100644 index b03ff19..0000000 --- a/.netlify/server/entries/pages/_page.svelte.js +++ /dev/null @@ -1,34 +0,0 @@ -import { c as create_ssr_component, o as onDestroy, a as add_attribute, v as validate_component } from "../../chunks/ssr.js"; -import "pixi.js"; -import "pixi-filters"; -const HomeCanvas_svelte_svelte_type_style_lang = ""; -const css$1 = { - code: "canvas.svelte-1819g2x{position:fixed;top:0;left:0;z-index:-1}", - map: null -}; -const HomeCanvas = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { textsToCanvas = [] } = $$props; - let { imgsToCanvas = [] } = $$props; - let canvas; - onDestroy(() => { - }); - if ($$props.textsToCanvas === void 0 && $$bindings.textsToCanvas && textsToCanvas !== void 0) - $$bindings.textsToCanvas(textsToCanvas); - if ($$props.imgsToCanvas === void 0 && $$bindings.imgsToCanvas && imgsToCanvas !== void 0) - $$bindings.imgsToCanvas(imgsToCanvas); - $$result.css.add(css$1); - return ``; -}); -const _page_svelte_svelte_type_style_lang = ""; -const css = { - code: ".loader.svelte-vkb8yx.svelte-vkb8yx{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);text-align:center}.loader.svelte-vkb8yx p.svelte-vkb8yx{font-size:1.25em}.lds-circle.svelte-vkb8yx.svelte-vkb8yx{display:inline-block;transform:translateZ(1px)}.lds-circle.svelte-vkb8yx>div.svelte-vkb8yx{display:inline-block;width:64px;height:64px;margin:8px;border-radius:50%;background:var(--color-text);animation:svelte-vkb8yx-lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite}@keyframes svelte-vkb8yx-lds-circle{0%,100%{animation-timing-function:cubic-bezier(0.5, 0, 1, 0.5)}0%{transform:rotateY(0deg)}50%{transform:rotateY(1800deg);animation-timing-function:cubic-bezier(0, 0.5, 0.5, 1)}100%{transform:rotateY(3600deg)}}.scroller.svelte-vkb8yx.svelte-vkb8yx{font-size:clamp(32px, 4.5vw, 4.5vw)}section.svelte-vkb8yx.svelte-vkb8yx{scroll-snap-align:start;box-sizing:border-box;padding:var(--spacing-outer);overflow:hidden}@media screen and (min-width: 768px){section.svelte-vkb8yx.svelte-vkb8yx{padding:var(--spacing-outer) calc(var(--spacing-outer) * 2.5)}}section.svelte-vkb8yx.svelte-vkb8yx:last-child{padding-bottom:50svh}.splash.svelte-vkb8yx.svelte-vkb8yx{display:flex;flex-direction:column;justify-content:start;min-height:100svh;justify-content:center;padding:var(--spacing-outer);margin-bottom:-1em}h1.svelte-vkb8yx.svelte-vkb8yx,h2.svelte-vkb8yx.svelte-vkb8yx{line-height:1.1;letter-spacing:-0.025em;font-weight:400;font-style:normal;visibility:hidden;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}h1.svelte-vkb8yx.svelte-vkb8yx{letter-spacing:-0.05em;line-height:0.9;font-size:17vw;margin-top:-0.5em}@media screen and (min-width: 768px){h1.svelte-vkb8yx.svelte-vkb8yx{font-size:12vw}}h2.svelte-vkb8yx.svelte-vkb8yx{font-size:1.25em;font-weight:800;font-style:italic;margin-bottom:0.5em}p.svelte-vkb8yx.svelte-vkb8yx{font-size:0.7em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}a.svelte-vkb8yx.svelte-vkb8yx{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}", - map: null -}; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let canvasElems; - $$result.css.add(css); - return `${`

Loading...

`}

Simon Flöter creates products that stand out.

As a Creative Web Developer ...

I specialise in delivering beautifully crafted bespoke websites.

As a UX & Graphic Designer...

I have designed Websites, Housestyles, Typefaces, Advertising campaigns and Print publications for them.

I create products that help great companies reach their audiences. Need help?

${validate_component(HomeCanvas, "HomeCanvas").$$render($$result, { textsToCanvas: canvasElems }, {}, {})}`; -}); -export { - Page as default -}; diff --git a/.netlify/server/entries/pages/blog/_page.server.ts.js b/.netlify/server/entries/pages/blog/_page.server.ts.js deleted file mode 100644 index 345925b..0000000 --- a/.netlify/server/entries/pages/blog/_page.server.ts.js +++ /dev/null @@ -1,14 +0,0 @@ -import { e as error } from "../../../chunks/index.js"; -function load({ params }) { - const posts = fetch("https://uncommonbio.co/wp-json/wp/v2/pages/").then((r) => r.json().catch((err) => { - console.log(err, params); - })); - if (!posts) - throw error(404); - return { - posts - }; -} -export { - load -}; diff --git a/.netlify/server/entries/pages/blog/_page.svelte.js b/.netlify/server/entries/pages/blog/_page.svelte.js deleted file mode 100644 index 8a49501..0000000 --- a/.netlify/server/entries/pages/blog/_page.svelte.js +++ /dev/null @@ -1,13 +0,0 @@ -import { c as create_ssr_component, b as each, e as escape } from "../../../chunks/ssr.js"; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { data } = $$props; - let posts = data.posts; - if ($$props.data === void 0 && $$bindings.data && data !== void 0) - $$bindings.data(data); - return `

Blog roll!

${each(posts, (post) => { - return `

${escape(post.title.rendered)}

`; - })}`; -}); -export { - Page as default -}; diff --git a/.netlify/server/entries/pages/blog/_slug_/_page.server.ts.js b/.netlify/server/entries/pages/blog/_slug_/_page.server.ts.js deleted file mode 100644 index ab89a11..0000000 --- a/.netlify/server/entries/pages/blog/_slug_/_page.server.ts.js +++ /dev/null @@ -1,14 +0,0 @@ -import { e as error } from "../../../../chunks/index.js"; -function load({ params }) { - const posts = fetch("https://uncommonbio.co/wp-json/wp/v2/posts/").then((r) => r.json().catch((err) => { - console.log(err, params); - })); - if (!posts) - throw error(404); - return { - posts - }; -} -export { - load -}; diff --git a/.netlify/server/entries/pages/blog/_slug_/_page.svelte.js b/.netlify/server/entries/pages/blog/_slug_/_page.svelte.js deleted file mode 100644 index 9460402..0000000 --- a/.netlify/server/entries/pages/blog/_slug_/_page.svelte.js +++ /dev/null @@ -1,12 +0,0 @@ -import { c as create_ssr_component } from "../../../../chunks/ssr.js"; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { data } = $$props; - JSON.stringify(data); - let dataone = data.posts[1].content.rendered; - if ($$props.data === void 0 && $$bindings.data && data !== void 0) - $$bindings.data(data); - return `

Blog post

${dataone}

`; -}); -export { - Page as default -}; diff --git a/.netlify/server/entries/pages/test/_page.svelte.js b/.netlify/server/entries/pages/test/_page.svelte.js deleted file mode 100644 index 6bd0f85..0000000 --- a/.netlify/server/entries/pages/test/_page.svelte.js +++ /dev/null @@ -1,13 +0,0 @@ -import { c as create_ssr_component, a as add_attribute } from "../../../chunks/ssr.js"; -const myImgSrcSetWebp = "/_app/immutable/assets/formo_hero.76612d9f.webp 1344w, /_app/immutable/assets/formo_hero.3c06dcdd.webp 672w, /_app/immutable/assets/formo_hero.bdd89961.webp 336w"; -const myImg = [ - "/_app/immutable/assets/formo_hero.10e20058.avif", - "/_app/immutable/assets/formo_hero.eb33d576.webp", - "/_app/immutable/assets/formo_hero.07fbd4ee.png" -]; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - return `

hakc

`; -}); -export { - Page as default -}; diff --git a/.netlify/server/entries/pages/work/_page.server.ts.js b/.netlify/server/entries/pages/work/_page.server.ts.js deleted file mode 100644 index 5c835b6..0000000 --- a/.netlify/server/entries/pages/work/_page.server.ts.js +++ /dev/null @@ -1,29 +0,0 @@ -const fetchMarkdownPosts = async () => { - const allPostFiles = /* @__PURE__ */ Object.assign({ "/src/routes/work/md/adidas.md": () => import("../../../chunks/adidas.js"), "/src/routes/work/md/formo.md": () => import("../../../chunks/formo.js"), "/src/routes/work/md/jpl.md": () => import("../../../chunks/jpl.js") }); - const iterablePostFiles = Object.entries(allPostFiles); - const allPosts = await Promise.all( - iterablePostFiles.map(async ([path, resolver]) => { - const postPath = path.slice(11, -3).replace("work/md/", "work/"); - const data = await resolver(); - const postData = data; - const content = postData.default.render(); - return { - meta: postData.metadata, - path: postPath, - Content: content.html - }; - }) - ); - return allPosts; -}; -async function load() { - const posts = await fetchMarkdownPosts(); - if (!posts) - console.error("No posts found"); - return { - posts - }; -} -export { - load -}; diff --git a/.netlify/server/entries/pages/work/_page.svelte.js b/.netlify/server/entries/pages/work/_page.svelte.js deleted file mode 100644 index 4155acc..0000000 --- a/.netlify/server/entries/pages/work/_page.svelte.js +++ /dev/null @@ -1,73 +0,0 @@ -import { c as create_ssr_component, o as onDestroy, a as add_attribute, b as each, v as validate_component, e as escape } from "../../../chunks/ssr.js"; -import "pixi.js"; -import "pixi-filters"; -import { w as workbulge } from "../../../chunks/stores2.js"; -import { C as CldImage } from "../../../chunks/CldImage.js"; -const WorkCanvas_svelte_svelte_type_style_lang = ""; -const css$1 = { - code: "canvas.svelte-1819g2x{position:fixed;top:0;left:0;z-index:-1}", - map: null -}; -const WorkCanvas = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { textsToCanvas = [] } = $$props; - let { imgsToCanvas = [] } = $$props; - let { bulgeFactor = 0.15 } = $$props; - let canvas; - onDestroy(() => { - }); - if ($$props.textsToCanvas === void 0 && $$bindings.textsToCanvas && textsToCanvas !== void 0) - $$bindings.textsToCanvas(textsToCanvas); - if ($$props.imgsToCanvas === void 0 && $$bindings.imgsToCanvas && imgsToCanvas !== void 0) - $$bindings.imgsToCanvas(imgsToCanvas); - if ($$props.bulgeFactor === void 0 && $$bindings.bulgeFactor && bulgeFactor !== void 0) - $$bindings.bulgeFactor(bulgeFactor); - $$result.css.add(css$1); - return ``; -}); -workbulge.subscribe((value) => { -}); -const _page_svelte_svelte_type_style_lang = ""; -const css = { - code: "h1.svelte-1wmqw8p.svelte-1wmqw8p{font-size:16vw;font-style:italic;margin:0 0 0.5em 0;letter-spacing:-0.04em;text-align:center;position:fixed;top:0;width:100%;visibility:hidden;transition:all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)}@media screen and (min-width: 768px){h1.svelte-1wmqw8p.svelte-1wmqw8p{font-size:7vw}}h1.svelte-1wmqw8p span.svelte-1wmqw8p{display:inline-block;padding:0 0.25em}h2.svelte-1wmqw8p.svelte-1wmqw8p{line-height:1.1;letter-spacing:-0.025em;font-size:2.5vw;opacity:0;position:absolute;left:0.5em;bottom:0.5em;transform:scale(0.8) translateY(100%);margin:0;padding:0.1em 0.4em 0.2em 0.4em;text-align:center;transform-origin:center center;width:auto;margin:0;background-color:var(--color-bg);color:var(--color-text);transition:all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)}.works.svelte-1wmqw8p .work:not(.active):hover h2.svelte-1wmqw8p{opacity:1;transform:scale(1) translateY(0)}.works.svelte-1wmqw8p.svelte-1wmqw8p{padding:15vw 0.5em 0.5em 0.5em;display:flex;gap:0.25em;flex-wrap:wrap}@media screen and (min-width: 768px){.works.svelte-1wmqw8p.svelte-1wmqw8p{gap:0.25em;padding:8.5vw 0.5em 0.5em 0.5em;width:100%;max-width:1200px;margin:0 auto;padding-bottom:20svh}}.work.svelte-1wmqw8p.svelte-1wmqw8p{flex:0 0 calc(50% - 0.125em);display:block;position:relative;padding:0;transition:all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);text-decoration:none;overflow:hidden}@media screen and (min-width: 768px){.work.svelte-1wmqw8p.svelte-1wmqw8p{flex:0 0 calc(33% - 0.125em)}}.work img{width:100%;height:auto;aspect-ratio:var(--aspect-ratio-heroes);object-fit:fill;visibility:hidden;display:block}", - map: null -}; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { data } = $$props; - let canvasTextElems; - let canvasImgElems; - let bulge = { factor: 0 }; - workbulge.subscribe((val) => { - bulge.factor = val; - }); - if ($$props.data === void 0 && $$bindings.data && data !== void 0) - $$bindings.data(data); - $$result.css.add(css); - return `

Casestudies

${each(data.posts, (work, i) => { - return `${validate_component(CldImage, "CldImage").$$render( - $$result, - { - src: work.meta.header_bg_image, - sizes: "(min-width: 768px) 20vw, 50vw", - alt: work.meta.title, - width: "2100", - height: "1400", - objectFit: "fill", - loading: i < 10 ? "eager" : "lazy" - }, - {}, - {} - )}

${escape(work.meta.title)}

`; - })}
${validate_component(WorkCanvas, "WorkCanvas").$$render( - $$result, - { - textsToCanvas: canvasTextElems, - imgsToCanvas: canvasImgElems, - bulgeFactor: bulge.factor - }, - {}, - {} - )}`; -}); -export { - Page as default -}; diff --git a/.netlify/server/entries/pages/work/_slug_/_page.server.ts.js b/.netlify/server/entries/pages/work/_slug_/_page.server.ts.js deleted file mode 100644 index f80d46d..0000000 --- a/.netlify/server/entries/pages/work/_slug_/_page.server.ts.js +++ /dev/null @@ -1,29 +0,0 @@ -const __variableDynamicImportRuntimeHelper = (glob, path) => { - const v = glob[path]; - if (v) { - return typeof v === "function" ? v() : Promise.resolve(v); - } - return new Promise((_, reject) => { - (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path))); - }); -}; -async function load({ params }) { - try { - const post = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../md/adidas.md": () => import("../../../../chunks/adidas.js"), "../md/formo.md": () => import("../../../../chunks/formo.js"), "../md/jpl.md": () => import("../../../../chunks/jpl.js") }), `../md/${params.slug}.md`); - const { title, date, header_bg_image, svg, video } = post.metadata; - const Content = post.default.render(); - return { - title, - date, - header_bg_image, - svg, - video, - Content - }; - } catch (error) { - console.error(error); - } -} -export { - load -}; diff --git a/.netlify/server/entries/pages/work/_slug_/_page.svelte.js b/.netlify/server/entries/pages/work/_slug_/_page.svelte.js deleted file mode 100644 index 92e79b6..0000000 --- a/.netlify/server/entries/pages/work/_slug_/_page.svelte.js +++ /dev/null @@ -1,34 +0,0 @@ -import { c as create_ssr_component, v as validate_component } from "../../../../chunks/ssr.js"; -import { gsap } from "gsap"; -import { ScrollTrigger } from "gsap/dist/ScrollTrigger.js"; -import { C as CldImage } from "../../../../chunks/CldImage.js"; -const _page_svelte_svelte_type_style_lang = ""; -const css = { - code: ".work.svelte-lxhlir.svelte-lxhlir{width:100vw;min-height:100svh;overflow:hidden;box-sizing:border-box;transform:translateY(100%)}@media screen and (min-width: 768px){.work.svelte-lxhlir.svelte-lxhlir{transform:translateX(100%)}}.subnav.svelte-lxhlir.svelte-lxhlir{position:fixed;top:0;right:0;z-index:4;padding:var(--spacing-outer)}.heromask.svelte-lxhlir.svelte-lxhlir{position:fixed;top:0;left:0;aspect-ratio:var(--aspect-ratio-heroes);width:100%;height:auto;z-index:2;clip-path:polygon(0 0, 100% 0, 100% 100%, 0% 100%)}.heromask img{z-index:0;display:block;position:relative;width:100%;height:100%;aspect-ratio:var(--aspect-ratio-heroes);margin:0;object-fit:fill}.work-content.svelte-lxhlir.svelte-lxhlir{padding:0 var(--spacing-outer);padding-top:calc(66.6vw + 1em);position:relative;z-index:1;color:var(--color-text)}.work-content.svelte-lxhlir .svelte-lxhlir:last-child{margin-bottom:100px}@media screen and (min-width: 768px){.work-content.svelte-lxhlir.svelte-lxhlir{margin-left:40vw;max-width:60vw;padding-top:calc(3 * var(--spacing-outer));padding-left:calc(var(--spacing-outer) * 1.5);padding-right:calc(var(--spacing-outer) * 2.5)}}@media screen and (min-width: 768px){.work-content-text.svelte-lxhlir.svelte-lxhlir{border-top:1px solid var(--color-text)}}h1.svelte-lxhlir.svelte-lxhlir{position:relative;z-index:1;margin:0}@media screen and (min-width: 768px){h1.svelte-lxhlir.svelte-lxhlir{padding:0 0 1em 0}}h1.svelte-lxhlir .name.svelte-lxhlir{display:none}h1.svelte-lxhlir .svg-logo.svelte-lxhlir svg{width:auto;height:auto;max-width:250px;max-height:80px;margin-bottom:1em}@media screen and (min-width: 768px){h1.svelte-lxhlir .svg-logo.svelte-lxhlir svg{max-width:400px;max-height:200px}}.header-nav{transition:all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1)}.work .header-nav{transform:translateY(100%)}", - map: null -}; -const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { - let { data } = $$props; - gsap.registerPlugin(ScrollTrigger); - if ($$props.data === void 0 && $$bindings.data && data !== void 0) - $$bindings.data(data); - $$result.css.add(css); - return `
${validate_component(CldImage, "CldImage").$$render( - $$result, - { - src: data.header_bg_image, - alt: data.title, - sizes: "100vw", - width: 2100, - height: 1400, - placeholder: "blur", - loading: "eager", - objectFit: "fill" - }, - {}, - {} - )}
${``}
`; -}); -export { - Page as default -}; diff --git a/.netlify/server/index.js b/.netlify/server/index.js deleted file mode 100644 index 9d6c00b..0000000 --- a/.netlify/server/index.js +++ /dev/null @@ -1,2795 +0,0 @@ -import { b as base, a as assets, r as reset, p as public_env, o as options, s as set_private_env, c as set_public_env, g as get_hooks } from "./chunks/internal.js"; -import { t as text, H as HttpError, j as json, R as Redirect, e as error, A as ActionFailure } from "./chunks/index.js"; -import * as devalue from "devalue"; -import { w as writable, r as readable } from "./chunks/index2.js"; -import { parse, serialize } from "cookie"; -import * as set_cookie_parser from "set-cookie-parser"; -const DEV = false; -const SVELTE_KIT_ASSETS = "/_svelte_kit_assets"; -const ENDPOINT_METHODS = /* @__PURE__ */ new Set([ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD" -]); -const PAGE_METHODS = /* @__PURE__ */ new Set(["GET", "POST", "HEAD"]); -function negotiate(accept, types) { - const parts = []; - accept.split(",").forEach((str, i) => { - const match = /([^/]+)\/([^;]+)(?:;q=([0-9.]+))?/.exec(str); - if (match) { - const [, type, subtype, q = "1"] = match; - parts.push({ type, subtype, q: +q, i }); - } - }); - parts.sort((a, b) => { - if (a.q !== b.q) { - return b.q - a.q; - } - if (a.subtype === "*" !== (b.subtype === "*")) { - return a.subtype === "*" ? 1 : -1; - } - if (a.type === "*" !== (b.type === "*")) { - return a.type === "*" ? 1 : -1; - } - return a.i - b.i; - }); - let accepted; - let min_priority = Infinity; - for (const mimetype of types) { - const [type, subtype] = mimetype.split("/"); - const priority = parts.findIndex( - (part) => (part.type === type || part.type === "*") && (part.subtype === subtype || part.subtype === "*") - ); - if (priority !== -1 && priority < min_priority) { - accepted = mimetype; - min_priority = priority; - } - } - return accepted; -} -function is_content_type(request, ...types) { - const type = request.headers.get("content-type")?.split(";", 1)[0].trim() ?? ""; - return types.includes(type.toLowerCase()); -} -function is_form_content_type(request) { - return is_content_type( - request, - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain" - ); -} -function exec(match, params, matchers) { - const result = {}; - const values = match.slice(1); - 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((s2) => s2).join("/"); - buffered = 0; - } - if (value === void 0) { - if (param.rest) - result[param.name] = ""; - 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; - } - continue; - } - if (param.optional && param.chained) { - buffered++; - continue; - } - return; - } - if (buffered) - return; - return result; -} -function coalesce_to_error(err) { - return err instanceof Error || err && /** @type {any} */ - err.name && /** @type {any} */ - err.message ? ( - /** @type {Error} */ - err - ) : new Error(JSON.stringify(err)); -} -function normalize_error(error2) { - return ( - /** @type {import('../runtime/control.js').Redirect | import('../runtime/control.js').HttpError | Error} */ - error2 - ); -} -function method_not_allowed(mod, method) { - return text(`${method} method not allowed`, { - status: 405, - headers: { - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: allowed_methods(mod).join(", ") - } - }); -} -function allowed_methods(mod) { - const allowed = Array.from(ENDPOINT_METHODS).filter((method) => method in mod); - if ("GET" in mod || "HEAD" in mod) - allowed.push("HEAD"); - return allowed; -} -function static_error_page(options2, status, message) { - let page = options2.templates.error({ status, message }); - return text(page, { - headers: { "content-type": "text/html; charset=utf-8" }, - status - }); -} -async function handle_fatal_error(event, options2, error2) { - error2 = error2 instanceof HttpError ? error2 : coalesce_to_error(error2); - const status = error2 instanceof HttpError ? error2.status : 500; - const body = await handle_error_and_jsonify(event, options2, error2); - 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(options2, status, body.message); -} -async function handle_error_and_jsonify(event, options2, error2) { - if (error2 instanceof HttpError) { - return error2.body; - } else { - return await options2.hooks.handleError({ error: error2, event }) ?? { - message: event.route.id != null ? "Internal Error" : "Not Found" - }; - } -} -function redirect_response(status, location) { - const response = new Response(void 0, { - status, - headers: { location } - }); - return response; -} -function clarify_devalue_error(event, error2) { - if (error2.path) { - return `Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error2.message} (data${error2.path})`; - } - if (error2.path === "") { - return `Data returned from \`load\` while rendering ${event.route.id} is not a plain object`; - } - return error2.message; -} -function stringify_uses(node) { - const uses = []; - if (node.uses && node.uses.dependencies.size > 0) { - uses.push(`"dependencies":${JSON.stringify(Array.from(node.uses.dependencies))}`); - } - if (node.uses && node.uses.params.size > 0) { - uses.push(`"params":${JSON.stringify(Array.from(node.uses.params))}`); - } - if (node.uses?.parent) - uses.push('"parent":1'); - if (node.uses?.route) - uses.push('"route":1'); - if (node.uses?.url) - uses.push('"url":1'); - return `"uses":{${uses.join(",")}}`; -} -async function render_endpoint(event, mod, state) { - const method = ( - /** @type {import('types').HttpMethod} */ - event.request.method - ); - let handler = mod[method]; - if (!handler && method === "HEAD") { - handler = mod.GET; - } - if (!handler) { - return method_not_allowed(mod, method); - } - const prerender = mod.prerender ?? state.prerender_default; - if (prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { - throw new Error("Cannot prerender endpoints that have mutative methods"); - } - if (state.prerendering && !prerender) { - if (state.depth > 0) { - throw new Error(`${event.route.id} is not prerenderable`); - } else { - return new Response(void 0, { status: 204 }); - } - } - try { - let response = await handler( - /** @type {import('@sveltejs/kit').RequestEvent>} */ - event - ); - if (!(response instanceof Response)) { - throw new Error( - `Invalid response from route ${event.url.pathname}: handler should return a Response object` - ); - } - if (state.prerendering) { - response = new Response(response.body, { - status: response.status, - statusText: response.statusText, - headers: new Headers(response.headers) - }); - response.headers.set("x-sveltekit-prerender", String(prerender)); - } - return response; - } catch (e) { - if (e instanceof Redirect) { - return new Response(void 0, { - status: e.status, - headers: { location: e.location } - }); - } - throw e; - } -} -function is_endpoint_request(event) { - const { method, headers } = event.request; - if (ENDPOINT_METHODS.has(method) && !PAGE_METHODS.has(method)) { - return true; - } - if (method === "POST" && headers.get("x-sveltekit-action") === "true") - return false; - const accept = event.request.headers.get("accept") ?? "*/*"; - return negotiate(accept, ["*", "text/html"]) !== "text/html"; -} -function compact(arr) { - return arr.filter( - /** @returns {val is NonNullable} */ - (val) => val != null - ); -} -function normalize_path(path, trailing_slash) { - if (path === "/" || trailing_slash === "ignore") - return path; - if (trailing_slash === "never") { - return path.endsWith("/") ? path.slice(0, -1) : path; - } else if (trailing_slash === "always" && !path.endsWith("/")) { - return path + "/"; - } - return path; -} -function decode_pathname(pathname) { - return pathname.split("%25").map(decodeURI).join("%25"); -} -function decode_params(params) { - for (const key2 in params) { - params[key2] = decodeURIComponent(params[key2]); - } - return params; -} -const tracked_url_properties = ( - /** @type {const} */ - [ - "href", - "pathname", - "search", - "searchParams", - "toString", - "toJSON" - ] -); -function make_trackable(url, callback) { - const tracked = new URL(url); - 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); - }; - } - disable_hash(tracked); - return tracked; -} -function disable_hash(url) { - Object.defineProperty(url, "hash", { - get() { - throw new Error( - "Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead" - ); - } - }); -} -function disable_search(url) { - for (const property of ["search", "searchParams"]) { - Object.defineProperty(url, property, { - get() { - throw new Error(`Cannot access url.${property} on a page with prerendering enabled`); - } - }); - } -} -const DATA_SUFFIX = "/__data.json"; -function has_data_suffix(pathname) { - return pathname.endsWith(DATA_SUFFIX); -} -function add_data_suffix(pathname) { - return pathname.replace(/\/$/, "") + DATA_SUFFIX; -} -function strip_data_suffix(pathname) { - return pathname.slice(0, -DATA_SUFFIX.length); -} -function is_action_json_request(event) { - const accept = negotiate(event.request.headers.get("accept") ?? "*/*", [ - "application/json", - "text/html" - ]); - return accept === "application/json" && event.request.method === "POST"; -} -async function handle_action_json_request(event, options2, server) { - const actions = server?.actions; - if (!actions) { - const no_actions_error = error(405, "POST method not allowed. No actions exist for this page"); - return action_json( - { - type: "error", - error: await handle_error_and_jsonify(event, options2, no_actions_error) - }, - { - status: no_actions_error.status, - headers: { - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: "GET" - } - } - ); - } - check_named_default_separate(actions); - try { - const data = await call_action(event, actions); - if (false) - ; - if (data instanceof ActionFailure) { - return action_json({ - type: "failure", - status: data.status, - // @ts-expect-error we assign a string to what is supposed to be an object. That's ok - // because we don't use the object outside, and this way we have better code navigation - // through knowing where the related interface is used. - data: stringify_action_response( - data.data, - /** @type {string} */ - event.route.id - ) - }); - } else { - return action_json({ - type: "success", - status: data ? 200 : 204, - // @ts-expect-error see comment above - data: stringify_action_response( - data, - /** @type {string} */ - event.route.id - ) - }); - } - } catch (e) { - const err = normalize_error(e); - if (err instanceof Redirect) { - return action_json_redirect(err); - } - return action_json( - { - type: "error", - error: await handle_error_and_jsonify(event, options2, check_incorrect_fail_use(err)) - }, - { - status: err instanceof HttpError ? err.status : 500 - } - ); - } -} -function check_incorrect_fail_use(error2) { - return error2 instanceof ActionFailure ? new Error('Cannot "throw fail()". Use "return fail()"') : error2; -} -function action_json_redirect(redirect) { - return action_json({ - type: "redirect", - status: redirect.status, - location: redirect.location - }); -} -function action_json(data, init2) { - return json(data, init2); -} -function is_action_request(event) { - return event.request.method === "POST"; -} -async function handle_action_request(event, server) { - const actions = server?.actions; - if (!actions) { - event.setHeaders({ - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 - // "The server must generate an Allow header field in a 405 status code response" - allow: "GET" - }); - return { - type: "error", - error: error(405, "POST method not allowed. No actions exist for this page") - }; - } - check_named_default_separate(actions); - try { - const data = await call_action(event, actions); - if (false) - ; - if (data instanceof ActionFailure) { - return { - type: "failure", - status: data.status, - data: data.data - }; - } else { - return { - type: "success", - status: 200, - // @ts-expect-error this will be removed upon serialization, so `undefined` is the same as omission - data - }; - } - } catch (e) { - const err = normalize_error(e); - if (err instanceof Redirect) { - return { - type: "redirect", - status: err.status, - location: err.location - }; - } - return { - type: "error", - error: check_incorrect_fail_use(err) - }; - } -} -function check_named_default_separate(actions) { - if (actions.default && Object.keys(actions).length > 1) { - throw new Error( - "When using named actions, the default action cannot be used. See the docs for more info: https://kit.svelte.dev/docs/form-actions#named-actions" - ); - } -} -async function call_action(event, actions) { - const url = new URL(event.request.url); - let name = "default"; - for (const param of url.searchParams) { - if (param[0].startsWith("/")) { - name = param[0].slice(1); - if (name === "default") { - throw new Error('Cannot use reserved action name "default"'); - } - break; - } - } - const action = actions[name]; - if (!action) { - throw new Error(`No action with name '${name}' found`); - } - if (!is_form_content_type(event.request)) { - throw new Error( - `Actions expect form-encoded data (received ${event.request.headers.get("content-type")})` - ); - } - return action(event); -} -function validate_action_return(data) { - if (data instanceof Redirect) { - throw new Error("Cannot `return redirect(...)` — use `throw redirect(...)` instead"); - } - if (data instanceof HttpError) { - throw new Error( - "Cannot `return error(...)` — use `throw error(...)` or `return fail(...)` instead" - ); - } -} -function uneval_action_response(data, route_id) { - return try_deserialize(data, devalue.uneval, route_id); -} -function stringify_action_response(data, route_id) { - return try_deserialize(data, devalue.stringify, route_id); -} -function try_deserialize(data, fn, route_id) { - try { - return fn(data); - } catch (e) { - const error2 = ( - /** @type {any} */ - e - ); - if ("path" in error2) { - let message = `Data returned from action inside ${route_id} is not serializable: ${error2.message}`; - if (error2.path !== "") - message += ` (data.${error2.path})`; - throw new Error(message); - } - throw error2; - } -} -async function unwrap_promises(object) { - for (const key2 in object) { - if (typeof object[key2]?.then === "function") { - return Object.fromEntries( - await Promise.all(Object.entries(object).map(async ([key3, value]) => [key3, await value])) - ); - } - } - return object; -} -const INVALIDATED_PARAM = "x-sveltekit-invalidated"; -async function load_server_data({ - event, - state, - node, - parent, - // TODO 2.0: Remove this - track_server_fetches -}) { - if (!node?.server) - return null; - const uses = { - dependencies: /* @__PURE__ */ new Set(), - params: /* @__PURE__ */ new Set(), - parent: false, - route: false, - url: false - }; - const url = make_trackable(event.url, () => { - uses.url = true; - }); - if (state.prerendering) { - disable_search(url); - } - const result = await node.server.load?.call(null, { - ...event, - fetch: (info, init2) => { - const url2 = new URL(info instanceof Request ? info.url : info, event.url); - if (track_server_fetches) { - uses.dependencies.add(url2.href); - } - return event.fetch(info, init2); - }, - /** @param {string[]} deps */ - depends: (...deps) => { - for (const dep of deps) { - const { href } = new URL(dep, event.url); - uses.dependencies.add(href); - } - }, - params: new Proxy(event.params, { - get: (target, key2) => { - uses.params.add(key2); - return target[ - /** @type {string} */ - key2 - ]; - } - }), - parent: async () => { - uses.parent = true; - return parent(); - }, - route: new Proxy(event.route, { - get: (target, key2) => { - uses.route = true; - return target[ - /** @type {'id'} */ - key2 - ]; - } - }), - url - }); - const data = result ? await unwrap_promises(result) : null; - return { - type: "data", - data, - uses, - slash: node.server.trailingSlash - }; -} -async function load_data({ - event, - fetched, - node, - parent, - server_data_promise, - state, - resolve_opts, - csr -}) { - const server_data_node = await server_data_promise; - if (!node?.universal?.load) { - return server_data_node?.data ?? null; - } - const result = await node.universal.load.call(null, { - url: event.url, - params: event.params, - data: server_data_node?.data ?? null, - route: event.route, - fetch: create_universal_fetch(event, state, fetched, csr, resolve_opts), - setHeaders: event.setHeaders, - depends: () => { - }, - parent - }); - const data = result ? await unwrap_promises(result) : null; - return data; -} -function create_universal_fetch(event, state, fetched, csr, resolve_opts) { - return async (input, init2) => { - const cloned_body = input instanceof Request && input.body ? input.clone().body : null; - const cloned_headers = input instanceof Request && [...input.headers].length ? new Headers(input.headers) : init2?.headers; - let response = await event.fetch(input, init2); - const url = new URL(input instanceof Request ? input.url : input, event.url); - const same_origin = url.origin === event.url.origin; - let dependency; - if (same_origin) { - if (state.prerendering) { - dependency = { response, body: null }; - state.prerendering.dependencies.set(url.pathname, dependency); - } - } else { - const mode = input instanceof Request ? input.mode : init2?.mode ?? "cors"; - if (mode === "no-cors") { - response = new Response("", { - status: response.status, - statusText: response.statusText, - headers: response.headers - }); - } else { - const acao = response.headers.get("access-control-allow-origin"); - if (!acao || acao !== event.url.origin && acao !== "*") { - throw new Error( - `CORS error: ${acao ? "Incorrect" : "No"} 'Access-Control-Allow-Origin' header is present on the requested resource` - ); - } - } - } - const proxy = new Proxy(response, { - get(response2, key2, _receiver) { - async function text2() { - const body = await response2.text(); - if (!body || typeof body === "string") { - const status_number = Number(response2.status); - if (isNaN(status_number)) { - throw new Error( - `response.status is not a number. value: "${response2.status}" type: ${typeof response2.status}` - ); - } - fetched.push({ - url: same_origin ? url.href.slice(event.url.origin.length) : url.href, - method: event.request.method, - request_body: ( - /** @type {string | ArrayBufferView | undefined} */ - input instanceof Request && cloned_body ? await stream_to_string(cloned_body) : init2?.body - ), - request_headers: cloned_headers, - response_body: body, - response: response2 - }); - } - if (dependency) { - dependency.body = body; - } - return body; - } - if (key2 === "arrayBuffer") { - return async () => { - const buffer = await response2.arrayBuffer(); - if (dependency) { - dependency.body = new Uint8Array(buffer); - } - return buffer; - }; - } - if (key2 === "text") { - return text2; - } - if (key2 === "json") { - return async () => { - return JSON.parse(await text2()); - }; - } - return Reflect.get(response2, key2, response2); - } - }); - if (csr) { - const get = response.headers.get; - response.headers.get = (key2) => { - const lower = key2.toLowerCase(); - const value = get.call(response.headers, lower); - if (value && !lower.startsWith("x-sveltekit-")) { - const included = resolve_opts.filterSerializedResponseHeaders(lower, value); - if (!included) { - throw new Error( - `Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://kit.svelte.dev/docs/hooks#server-hooks-handle (at ${event.route.id})` - ); - } - } - return value; - }; - } - return proxy; - }; -} -async function stream_to_string(stream) { - let result = ""; - const reader = stream.getReader(); - const decoder = new TextDecoder(); - while (true) { - const { done, value } = await reader.read(); - if (done) { - break; - } - result += decoder.decode(value); - } - return result; -} -function hash(...values) { - let hash2 = 5381; - for (const value of values) { - if (typeof value === "string") { - let i = value.length; - while (i) - hash2 = hash2 * 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) - hash2 = hash2 * 33 ^ buffer[--i]; - } else { - throw new TypeError("value must be a string or TypedArray"); - } - } - return (hash2 >>> 0).toString(36); -} -const escape_html_attr_dict = { - "&": "&", - '"': """ -}; -const escape_html_attr_regex = new RegExp( - // special characters - `[${Object.keys(escape_html_attr_dict).join("")}]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\udc00-\\udfff]`, - "g" -); -function escape_html_attr(str) { - const escaped_str = str.replace(escape_html_attr_regex, (match) => { - if (match.length === 2) { - return match; - } - return escape_html_attr_dict[match] ?? `&#${match.charCodeAt(0)};`; - }); - return `"${escaped_str}"`; -} -const replacements = { - "<": "\\u003C", - "\u2028": "\\u2028", - "\u2029": "\\u2029" -}; -const pattern = new RegExp(`[${Object.keys(replacements).join("")}]`, "g"); -function serialize_data(fetched, filter, prerendering = false) { - const headers = {}; - let cache_control = null; - let age = null; - let varyAny = false; - for (const [key2, value] of fetched.response.headers) { - if (filter(key2, value)) { - headers[key2] = value; - } - if (key2 === "cache-control") - cache_control = value; - else if (key2 === "age") - age = value; - else if (key2 === "vary" && value.trim() === "*") - varyAny = true; - } - const payload = { - status: fetched.response.status, - statusText: fetched.response.statusText, - headers, - body: fetched.response_body - }; - const safe_payload = JSON.stringify(payload).replace(pattern, (match) => replacements[match]); - const attrs = [ - 'type="application/json"', - "data-sveltekit-fetched", - `data-url=${escape_html_attr(fetched.url)}` - ]; - if (fetched.request_headers || fetched.request_body) { - const values = []; - if (fetched.request_headers) { - values.push([...new Headers(fetched.request_headers)].join(",")); - } - if (fetched.request_body) { - values.push(fetched.request_body); - } - attrs.push(`data-hash="${hash(...values)}"`); - } - if (!prerendering && fetched.method === "GET" && cache_control && !varyAny) { - const match = /s-maxage=(\d+)/g.exec(cache_control) ?? /max-age=(\d+)/g.exec(cache_control); - if (match) { - const ttl = +match[1] - +(age ?? "0"); - attrs.push(`data-ttl="${ttl}"`); - } - } - return `