screenreader-speech-capture 0.1.0-feat-playwright-supervisor.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/cli.mjs +3728 -1248
  4. package/dist/ui/adapter-node.js +11 -0
  5. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js +3 -0
  6. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js.br +0 -0
  7. package/dist/ui/client/_app/immutable/chunks/BMrJcSB7.js.gz +0 -0
  8. package/dist/ui/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  9. package/dist/ui/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  10. package/dist/ui/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  11. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js +2 -0
  12. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js.br +0 -0
  13. package/dist/ui/client/_app/immutable/chunks/BueZJg5y.js.gz +0 -0
  14. package/dist/ui/client/_app/immutable/chunks/DclECHGd.js +1 -0
  15. package/dist/ui/client/_app/immutable/chunks/DclECHGd.js.br +0 -0
  16. package/dist/ui/client/_app/immutable/chunks/DclECHGd.js.gz +0 -0
  17. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js +1 -0
  18. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js.br +0 -0
  19. package/dist/ui/client/_app/immutable/chunks/ZzrMKdp0.js.gz +0 -0
  20. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js +2 -0
  21. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js.br +0 -0
  22. package/dist/ui/client/_app/immutable/entry/app.BGREpuCm.js.gz +0 -0
  23. package/dist/ui/client/_app/immutable/entry/payload.DSmR2FwN.js +1 -0
  24. package/dist/ui/client/_app/immutable/entry/payload.DSmR2FwN.js.br +0 -0
  25. package/dist/ui/client/_app/immutable/entry/payload.DSmR2FwN.js.gz +0 -0
  26. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js +2 -0
  27. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js.br +0 -0
  28. package/dist/ui/client/_app/immutable/entry/start.Bj3y6VYi.js.gz +0 -0
  29. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js +1 -0
  30. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js.br +0 -0
  31. package/dist/ui/client/_app/immutable/nodes/0.BdmtdjrF.js.gz +0 -0
  32. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js +1 -0
  33. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js.br +0 -0
  34. package/dist/ui/client/_app/immutable/nodes/1.B76I_t5U.js.gz +0 -0
  35. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js +1 -0
  36. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js.br +0 -0
  37. package/dist/ui/client/_app/immutable/nodes/2.CpNTEXmI.js.gz +0 -0
  38. package/dist/ui/client/_app/version.json +1 -0
  39. package/dist/ui/client/_app/version.json.br +0 -0
  40. package/dist/ui/client/_app/version.json.gz +0 -0
  41. package/dist/ui/client/robots.txt +3 -0
  42. package/dist/ui/client/robots.txt.br +0 -0
  43. package/dist/ui/client/robots.txt.gz +0 -0
  44. package/dist/ui/handler.js +1 -0
  45. package/dist/ui/index.js +1 -0
  46. package/dist/ui/server/.vite/manifest.json +186 -0
  47. package/dist/ui/server/adapter-env.js +1 -0
  48. package/dist/ui/server/adapter-index.js +73 -0
  49. package/dist/ui/server/adapter-index.js.map +1 -0
  50. package/dist/ui/server/adapter-node-env.js +63 -0
  51. package/dist/ui/server/adapter-node-env.js.map +1 -0
  52. package/dist/ui/server/adapter-node-handler.js +616 -0
  53. package/dist/ui/server/adapter-node-handler.js.map +1 -0
  54. package/dist/ui/server/chunks/config.js +9 -0
  55. package/dist/ui/server/chunks/config.js.map +1 -0
  56. package/dist/ui/server/chunks/exports.js +484 -0
  57. package/dist/ui/server/chunks/exports.js.map +1 -0
  58. package/dist/ui/server/chunks/functions.js +29 -0
  59. package/dist/ui/server/chunks/functions.js.map +1 -0
  60. package/dist/ui/server/chunks/instance.js +3568 -0
  61. package/dist/ui/server/chunks/instance.js.map +1 -0
  62. package/dist/ui/server/chunks/internal.js +2900 -0
  63. package/dist/ui/server/chunks/internal.js.map +1 -0
  64. package/dist/ui/server/chunks/server-errors.js +487 -0
  65. package/dist/ui/server/chunks/server-errors.js.map +1 -0
  66. package/dist/ui/server/chunks/server.js +8 -0
  67. package/dist/ui/server/chunks/server.js.map +1 -0
  68. package/dist/ui/server/chunks/server2.js +1368 -0
  69. package/dist/ui/server/chunks/server2.js.map +1 -0
  70. package/dist/ui/server/chunks/shared.js +85 -0
  71. package/dist/ui/server/chunks/shared.js.map +1 -0
  72. package/dist/ui/server/chunks/uneval.js +534 -0
  73. package/dist/ui/server/chunks/uneval.js.map +1 -0
  74. package/dist/ui/server/entries/fallbacks/error.svelte.js +44 -0
  75. package/dist/ui/server/entries/fallbacks/error.svelte.js.map +1 -0
  76. package/dist/ui/server/entries/pages/_layout.server.ts.js +987 -0
  77. package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -0
  78. package/dist/ui/server/entries/pages/_layout.svelte.js +15 -0
  79. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -0
  80. package/dist/ui/server/entries/pages/_page.svelte.js +11 -0
  81. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -0
  82. package/dist/ui/server/env.js +1 -0
  83. package/dist/ui/server/handler.js +1 -0
  84. package/dist/ui/server/index.js +67 -0
  85. package/dist/ui/server/index.js.map +1 -0
  86. package/dist/ui/server/manifest-full.js +37 -0
  87. package/dist/ui/server/manifest.js +37 -0
  88. package/dist/ui/server/nodes/0.js +10 -0
  89. package/dist/ui/server/nodes/1.js +8 -0
  90. package/dist/ui/server/nodes/2.js +8 -0
  91. package/dist/ui/server/remote-entry.js +1565 -0
  92. package/dist/ui/server/remote-entry.js.map +1 -0
  93. package/dist/ui/server/server.js +39 -0
  94. package/package.json +14 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter-node-handler.js","names":[],"sources":["../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/node/index.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.2_@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_sve_f768d943589f92fcf48d61074f12cc67/node_modules/@sveltejs/adapter-node/src/utils.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.2_@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_sve_f768d943589f92fcf48d61074f12cc67/node_modules/@sveltejs/adapter-node/src/static.js","../../../../node_modules/.pnpm/@sveltejs+adapter-node@6.0.2_@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_sve_f768d943589f92fcf48d61074f12cc67/node_modules/@sveltejs/adapter-node/src/handler.js"],"sourcesContent":["import { createReadStream } from 'node:fs';\nimport { Readable } from 'node:stream';\nimport { SvelteKitError } from '../internal/shared.js';\nimport { noop } from '../../utils/functions.js';\n\n/** @type {WeakMap<import('http').IncomingMessage, (chunk: Buffer) => void>} */\nconst body_data_listeners = new WeakMap();\n\n/**\n * @param {import('http').IncomingMessage} req\n * @param {number} [body_size_limit]\n */\nfunction get_raw_body(req, body_size_limit) {\n\tconst h = req.headers;\n\n\tconst content_length = Number(h['content-length']);\n\tconst has_content_length = Number.isFinite(content_length);\n\n\t// check if no request body\n\tif (\n\t\t(req.httpVersionMajor === 1 && !has_content_length && h['transfer-encoding'] == null) ||\n\t\tcontent_length === 0\n\t) {\n\t\treturn null;\n\t}\n\n\tif (req.destroyed) {\n\t\tconst readable = new ReadableStream();\n\t\tvoid readable.cancel();\n\t\treturn readable;\n\t}\n\n\tlet size = 0;\n\tlet cancelled = false;\n\n\treturn new ReadableStream({\n\t\tstart(controller) {\n\t\t\tif (body_size_limit !== undefined && has_content_length && content_length > body_size_limit) {\n\t\t\t\tconst error = new SvelteKitError(\n\t\t\t\t\t413,\n\t\t\t\t\t'Payload Too Large',\n\t\t\t\t\t`Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`\n\t\t\t\t);\n\n\t\t\t\tcontroller.error(error);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/** @param {Error} error */\n\t\t\tconst on_error = (error) => {\n\t\t\t\tcancelled = true;\n\t\t\t\tcontroller.error(error);\n\t\t\t};\n\n\t\t\tconst on_end = () => {\n\t\t\t\tif (cancelled) return;\n\t\t\t\tcontroller.close();\n\t\t\t};\n\n\t\t\t/** @param {Buffer} chunk */\n\t\t\tconst on_data = (chunk) => {\n\t\t\t\tif (cancelled) return;\n\n\t\t\t\tsize += chunk.length;\n\n\t\t\t\tif (body_size_limit !== undefined && size > body_size_limit) {\n\t\t\t\t\tcancelled = true;\n\n\t\t\t\t\tconst message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`;\n\n\t\t\t\t\tconst error = new SvelteKitError(413, 'Payload Too Large', message);\n\t\t\t\t\tcontroller.error(error);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (has_content_length && size > content_length) {\n\t\t\t\t\tcancelled = true;\n\n\t\t\t\t\tconst message = `request body size exceeded content-length of ${content_length}`;\n\n\t\t\t\t\tconst error = new SvelteKitError(413, 'Payload Too Large', message);\n\t\t\t\t\tcontroller.error(error);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontroller.enqueue(chunk);\n\n\t\t\t\tif (controller.desiredSize === null || controller.desiredSize <= 0) {\n\t\t\t\t\treq.pause();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treq.on('error', on_error);\n\t\t\treq.on('end', on_end);\n\t\t\treq.on('data', on_data);\n\t\t\tbody_data_listeners.set(req, on_data);\n\t\t},\n\n\t\tpull() {\n\t\t\treq.resume();\n\t\t},\n\n\t\tcancel(reason) {\n\t\t\tcancelled = true;\n\t\t\treq.destroy(reason);\n\t\t}\n\t});\n}\n\n/**\n * @param {{\n * request: import('http').IncomingMessage;\n * response?: import('http').ServerResponse;\n * base: string;\n * bodySizeLimit?: number;\n * }} options\n * @returns {Request}\n */\nexport function getRequest({ request, response, base, bodySizeLimit }) {\n\tlet headers = /** @type {Record<string, string>} */ (request.headers);\n\tif (request.httpVersionMajor >= 2) {\n\t\t// the Request constructor rejects headers with ':' in the name\n\t\theaders = Object.assign({}, headers);\n\t\t// https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.5\n\t\tif (headers[':authority']) {\n\t\t\theaders.host = headers[':authority'];\n\t\t}\n\t\tdelete headers[':authority'];\n\t\tdelete headers[':method'];\n\t\tdelete headers[':path'];\n\t\tdelete headers[':scheme'];\n\t}\n\n\tconst controller = new AbortController();\n\n\trequest.once('close', () => {\n\t\tif (request.readableAborted) {\n\t\t\tcontroller.abort();\n\t\t}\n\t});\n\n\t// `readableAborted` stays false once the request has been fully read (or drained),\n\t// so a client disconnect must also be detected on the response side. `writableEnded`\n\t// rather than `writableFinished` because HTTP/2 marks cancelled streams as finished\n\tresponse?.once('close', () => {\n\t\tif (!response.writableEnded) {\n\t\t\tcontroller.abort();\n\t\t}\n\t});\n\n\treturn new Request(base + request.url, {\n\t\t// @ts-expect-error\n\t\tduplex: 'half',\n\t\tmethod: request.method,\n\t\theaders: Object.entries(headers),\n\t\tsignal: controller.signal,\n\t\tbody:\n\t\t\trequest.method === 'GET' || request.method === 'HEAD'\n\t\t\t\t? undefined\n\t\t\t\t: get_raw_body(request, bodySizeLimit)\n\t});\n}\n\n/**\n * Drains any unconsumed request body once the response has been sent. When a\n * route doesn't read the request body (for example a page route receiving a\n * POST), the unread bytes remain buffered in the socket. On keep-alive\n * connections Node's HTTP parser then reads those leftover bytes as the next\n * request, fails to parse them, and resets the connection — losing any\n * pipelined request. Resuming the request discards the bytes so the connection\n * stays usable.\n *\n * Because `get_raw_body` attaches a `data` listener, Node marks the request as\n * being consumed (`req._consuming`) and skips its own automatic drain, so we\n * have to do it ourselves. The whole remaining body is read and discarded; this\n * is the intended trade-off (keeping the connection reusable) over destroying it.\n * @see https://github.com/sveltejs/kit/issues/14916\n * @see https://github.com/sveltejs/kit/issues/15526\n * @param {import('http').ServerResponse} res\n */\nfunction drain_request(res) {\n\tconst req = res.req;\n\tif (!req || req.readableEnded || req.destroyed) return;\n\n\t// When the body went unread, get_raw_body's `data` listener is still attached\n\t// and enqueues into a ReadableStream nobody consumes; it pauses the request at\n\t// the high water mark, so one chunk sits in memory and the rest stays buffered\n\t// in the socket. Remove only that `data` listener so the resumed stream drops\n\t// the remaining bytes instead of re-buffering them. The `end` and `error`\n\t// listeners stay attached so the body's ReadableStream is still closed (or\n\t// errored) once draining completes, and a consumer that stopped reading\n\t// mid-body sees a clean end instead of hanging.\n\tconst on_data = body_data_listeners.get(req);\n\tif (on_data) {\n\t\treq.removeListener('data', on_data);\n\t\tbody_data_listeners.delete(req);\n\t}\n\n\treq.resume();\n}\n\n/**\n * @param {import('http').ServerResponse} res\n * @param {Response} response\n * @returns {void}\n */\nexport function setResponse(res, response) {\n\tres.once('finish', () => drain_request(res));\n\tres.once('close', () => drain_request(res));\n\n\tfor (const [key, value] of response.headers) {\n\t\ttry {\n\t\t\tres.setHeader(key, key === 'set-cookie' ? response.headers.getSetCookie() : value);\n\t\t} catch (error) {\n\t\t\tres.getHeaderNames().forEach((name) => res.removeHeader(name));\n\t\t\tres.writeHead(500).end(String(error));\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (!response.body) {\n\t\tres.writeHead(response.status);\n\t\tres.end();\n\t\treturn;\n\t}\n\n\tif (response.body.locked) {\n\t\tres.writeHead(response.status);\n\t\tres.end(\n\t\t\t'Fatal error: Response body is locked. ' +\n\t\t\t\t\"This can happen when the response was already read (for example through 'response.json()' or 'response.text()').\"\n\t\t);\n\t\treturn;\n\t}\n\n\tconst reader = response.body.getReader();\n\n\tif (res.destroyed) {\n\t\tvoid reader.cancel();\n\t\treturn;\n\t}\n\n\tconst cancel = (/** @type {Error|undefined} */ error) => {\n\t\tres.off('close', cancel);\n\t\tres.off('error', cancel);\n\n\t\t// If the reader has already been interrupted with an error earlier,\n\t\t// then it will appear here, it is useless, but it needs to be catch.\n\t\treader.cancel(error).catch(noop);\n\t\tif (error) res.destroy(error);\n\t};\n\n\tres.on('close', cancel);\n\tres.on('error', cancel);\n\n\t/** @type {Uint8Array<ArrayBuffer>[]} */\n\tconst buffered = [];\n\n\t/** @type {ReturnType<typeof reader.read> | null} */\n\tlet pending = null;\n\n\tvoid probe();\n\n\t// a fixed body (a string, buffer or blob, however constructed) settles all its\n\t// reads before the next macrotask, so it can be measured and sent with a\n\t// `content-length`; a genuine stream leaves a read pending and only has its\n\t// headers delayed by a single tick\n\tasync function probe() {\n\t\ttry {\n\t\t\t/** @type {Promise<undefined>} */\n\t\t\tconst deadline = new Promise((fulfil) => setImmediate(() => fulfil(undefined)));\n\n\t\t\twhile (buffered.length < 2) {\n\t\t\t\tpending = reader.read();\n\t\t\t\tconst result = await Promise.race([pending, deadline]);\n\n\t\t\t\tif (!result) break; // deadline hit — treat the body as a stream\n\n\t\t\t\tpending = null;\n\n\t\t\t\tif (result.done) {\n\t\t\t\t\t// a `content-length` next to a `transfer-encoding` would be invalid\n\t\t\t\t\tif (!res.hasHeader('content-length') && !res.hasHeader('transfer-encoding')) {\n\t\t\t\t\t\tres.setHeader(\n\t\t\t\t\t\t\t'content-length',\n\t\t\t\t\t\t\tbuffered.reduce((total, chunk) => total + chunk.byteLength, 0)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbuffered.push(result.value);\n\t\t\t}\n\n\t\t\tif (res.destroyed) return;\n\n\t\t\tres.writeHead(response.status);\n\t\t\tawait next();\n\t\t} catch (error) {\n\t\t\tif (!res.headersSent) res.writeHead(response.status);\n\t\t\tcancel(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n\n\tasync function next() {\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\t/** @type {Awaited<ReturnType<typeof reader.read>>} */\n\t\t\t\tlet result;\n\t\t\t\tif (buffered.length > 0) {\n\t\t\t\t\tresult = {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: /** @type {Uint8Array<ArrayBuffer>} */ (buffered.shift())\n\t\t\t\t\t};\n\t\t\t\t} else if (pending) {\n\t\t\t\t\tresult = await pending;\n\t\t\t\t\tpending = null;\n\t\t\t\t} else {\n\t\t\t\t\tresult = await reader.read();\n\t\t\t\t}\n\n\t\t\t\tconst { done, value } = result;\n\n\t\t\t\tif (done) break;\n\n\t\t\t\tif (!res.write(value)) {\n\t\t\t\t\tres.once('drain', next);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tres.end();\n\t\t} catch (error) {\n\t\t\tcancel(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n}\n\n/**\n * Converts a file on disk to a readable stream\n * @param {string} file\n * @returns {ReadableStream}\n * @since 2.4.0\n */\nexport function createReadableStream(file) {\n\treturn /** @type {ReadableStream} */ (Readable.toWeb(createReadStream(file)));\n}\n","import { format } from 'node:url';\n\n/**\n * Parses the given value into number of bytes.\n *\n * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G).\n * @returns {number}\n */\nexport function parse_as_bytes(value) {\n\tconst multiplier =\n\t\t{\n\t\t\tK: 1024,\n\t\t\tM: 1024 * 1024,\n\t\t\tG: 1024 * 1024 * 1024\n\t\t}[value[value.length - 1]?.toUpperCase()] ?? 1;\n\treturn Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier;\n}\n\n/**\n * Parses and validates an origin URL.\n *\n * @param {string | undefined} value - Origin URL with http:// or https:// protocol\n * @returns {string | undefined} The validated origin, or undefined if value is undefined\n * @throws {Error} If value is provided but invalid\n */\nexport function parse_origin(value) {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\n\tconst trimmed = value.trim();\n\n\tlet url;\n\ttry {\n\t\turl = new URL(trimmed);\n\t} catch (error) {\n\t\tthrow new Error(\n\t\t\t`Invalid ORIGIN: '${trimmed}'. ` +\n\t\t\t\t`ORIGIN must be a valid URL with http:// or https:// protocol. ` +\n\t\t\t\t`For example: 'http://localhost:3000' or 'https://my.site'`,\n\t\t\t{ cause: error }\n\t\t);\n\t}\n\n\tif (url.protocol !== 'http:' && url.protocol !== 'https:') {\n\t\tthrow new Error(\n\t\t\t`Invalid ORIGIN: '${trimmed}'. ` +\n\t\t\t\t`Only http:// and https:// protocols are supported. ` +\n\t\t\t\t`Received protocol: ${url.protocol}`\n\t\t);\n\t}\n\n\treturn url.origin;\n}\n\n/**\n * Formats the address the server is listening on.\n *\n * @param {string | false} path\n * @param {string} host\n * @param {string | false} port\n * @param {import('node:net').AddressInfo | string | null} address\n * @returns {string}\n */\nexport function format_listening_address(path, host, port, address) {\n\tif (path) {\n\t\treturn path;\n\t}\n\n\tif (address && typeof address === 'object') {\n\t\treturn format({\n\t\t\tprotocol: 'http:',\n\t\t\thostname: address.address,\n\t\t\tport: address.port\n\t\t});\n\t}\n\n\treturn format({\n\t\tprotocol: 'http:',\n\t\thostname: host,\n\t\tport: String(port)\n\t});\n}\n","/** @import { IncomingMessage, ServerResponse } from 'node:http' */\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { pipeline } from 'node:stream';\n\n/**\n * @typedef {(req: IncomingMessage, res: ServerResponse, next: () => void | Promise<void>) => void | Promise<void>} Middleware\n * @typedef {AssetEntry & { type?: string, cache_control?: string }} Asset\n * @typedef {Asset | { location: string }} Entry\n */\n\n/**\n * Splits `req.url` into a decoded pathname and the search string.\n * Decoding follows kit's router: reserved characters such as `%2F` stay\n * encoded. An undecodable pathname is returned as-is, so it misses the\n * asset table and falls through to SvelteKit's 400\n * @param {import('node:http').IncomingMessage} req\n */\nfunction split_url(req) {\n\tlet pathname = /** @type {string} */ (req.url);\n\tlet search = '';\n\n\tconst query_index = pathname.indexOf('?');\n\tif (query_index !== -1) {\n\t\tsearch = pathname.slice(query_index);\n\t\tpathname = pathname.slice(0, query_index);\n\t}\n\n\tif (pathname.includes('%')) {\n\t\ttry {\n\t\t\tpathname = pathname.split('%25').map(decodeURI).join('%25');\n\t\t} catch {\n\t\t\t// invalid URI\n\t\t}\n\t}\n\n\treturn { pathname, search };\n}\n\n/**\n * Relative reference from `from` to `to`, which must differ only by a trailing slash.\n * Keep in sync with the copy in `packages/kit/src/utils/url.js`\n * @param {string} from\n * @param {string} to\n * @returns {string}\n */\nfunction relative_pathname(from, to) {\n\tconst segment = to.replace(/\\/$/, '').split('/').at(-1);\n\n\t// The prefix prevents a colon in the segment from being interpreted as a URL scheme.\n\treturn from.endsWith('/') ? `../${segment}` : `./${segment}/`;\n}\n\n/**\n * Parses `Accept-Encoding` and picks the preferred variant that exists\n * @param {string | undefined} header\n * @param {Asset} asset\n * @returns {'br' | 'gz' | undefined}\n */\nfunction negotiate(header, asset) {\n\tif (!header || !(asset.br || asset.gz)) return;\n\n\t/** @type {Map<string, number>} */\n\tconst weights = new Map();\n\n\tfor (const part of header.toLowerCase().split(',')) {\n\t\tconst [coding, ...params] = part.split(';');\n\t\tlet weight = 1;\n\n\t\tfor (const param of params) {\n\t\t\tconst [name, value] = param.split('=');\n\t\t\tif (name.trim() === 'q') weight = parseFloat(value) || 0;\n\t\t}\n\n\t\tweights.set(coding.trim(), weight);\n\t}\n\n\t/** @param {string} coding */\n\tconst weight = (coding) => weights.get(coding) ?? weights.get('*') ?? 0;\n\n\tconst br = asset.br ? weight('br') : 0;\n\tconst gzip = asset.gz ? weight('gzip') : 0;\n\n\tif (gzip > br) return 'gz';\n\tif (br > 0) return 'br';\n}\n\n/**\n * Whether an `If-None-Match` value matches `etag`, using weak comparison\n * @param {string | undefined} header\n * @param {string} etag\n */\nfunction etag_matches(header, etag) {\n\tif (!header) return false;\n\tif (header.trim() === '*') return true;\n\n\treturn header.split(',').some((tag) => tag.trim().replace(/^W\\//, '') === etag);\n}\n\n/**\n * Absolute file paths and content types for one table\n * @param {string} dir\n * @param {AssetTable} table\n * @param {Record<string, string>} mime_types\n * @returns {Map<string, Asset>}\n */\nfunction resolve(dir, table, mime_types) {\n\t/** @type {Map<string, Asset>} */\n\tconst files = new Map();\n\n\tfor (const [key, entry] of table.entries) {\n\t\tlet type = mime_types[entry.file.slice(entry.file.lastIndexOf('.'))];\n\t\tif (type === 'text/html') type += ';charset=utf-8';\n\t\tfiles.set(key, { ...entry, file: path.join(dir, entry.file), type });\n\t}\n\n\tfor (const [alias, key] of table.aliases) {\n\t\tfiles.set(alias, /** @type {Asset} */ (files.get(key)));\n\t}\n\n\treturn files;\n}\n\n/**\n * One lookup for every request, decided at boot: client assets (immutable below\n * `app_path`), prerendered pages, and a 308 from the non-canonical trailing-slash\n * form of a prerendered path to the canonical one. Client assets win a collision\n * @param {{\n * dir: string,\n * base: string,\n * app_path: string,\n * mime_types: Record<string, string>,\n * assets: AssetTable,\n * prerendered_assets: AssetTable\n * }} opts\n * @returns {Map<string, Entry>}\n */\nexport function create_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets }) {\n\t/** @type {Map<string, Entry>} */\n\tconst files = resolve(`${dir}/client${base}`, assets, mime_types);\n\n\tconst immutable = `/${app_path}/immutable/`;\n\tfor (const [key, asset] of files) {\n\t\tif (key.startsWith(immutable)) {\n\t\t\t/** @type {Asset} */ (asset).cache_control = 'public,max-age=31536000,immutable';\n\t\t}\n\t}\n\n\tconst prerendered = resolve(`${dir}/prerendered${base}`, prerendered_assets, mime_types);\n\tfor (const [key, asset] of prerendered) {\n\t\tif (!files.has(key)) files.set(key, asset);\n\t}\n\n\tfor (const key of prerendered.keys()) {\n\t\tconst inverted = key.at(-1) === '/' ? key.slice(0, -1) : key + '/';\n\t\tif (inverted && !files.has(inverted)) {\n\t\t\tfiles.set(inverted, { location: relative_pathname(inverted, key) });\n\t\t}\n\t}\n\n\treturn files;\n}\n\n/**\n * Serves the closed set of files recorded at adapt time. Everything about a\n * response is decided before the first request, so a request is one map\n * lookup, header negotiation and a stream\n * @param {Map<string, Entry>} files\n * @returns {Middleware}\n */\nexport function serve_static(files) {\n\treturn (req, res, next) => {\n\t\tconst { pathname, search } = split_url(req);\n\n\t\tconst asset = files.get(pathname);\n\t\tif (!asset) return next();\n\n\t\tif (req.method !== 'GET' && req.method !== 'HEAD') {\n\t\t\tres.writeHead(405, { allow: 'GET, HEAD' }).end();\n\t\t\treturn;\n\t\t}\n\n\t\tif ('location' in asset) {\n\t\t\tres.writeHead(308, { location: asset.location + search }).end();\n\t\t\treturn;\n\t\t}\n\n\t\tlet file = asset.file;\n\t\tlet size = asset.size;\n\t\tlet etag = `\"${asset.etag}\"`;\n\n\t\tconst variant = negotiate(req.headers['accept-encoding'], asset);\n\t\tif (variant) {\n\t\t\tsize = /** @type {number} */ (asset[variant]);\n\t\t\tfile += `.${variant}`;\n\t\t\tetag = `\"${asset.etag}.${variant}\"`;\n\t\t}\n\n\t\t/** @type {Record<string, string | number>} */\n\t\tconst headers = { etag };\n\n\t\tif (asset.br || asset.gz) headers.vary = 'Accept-Encoding';\n\t\tif (asset.cache_control) headers['cache-control'] = asset.cache_control;\n\n\t\tif (etag_matches(req.headers['if-none-match'], etag)) {\n\t\t\tres.writeHead(304, headers).end();\n\t\t\treturn;\n\t\t}\n\t\theaders['content-length'] = size;\n\t\theaders['accept-ranges'] = 'bytes';\n\t\tif (asset.type) headers['content-type'] = asset.type;\n\t\tif (variant) headers['content-encoding'] = variant === 'gz' ? 'gzip' : 'br';\n\n\t\t/** @type {{ start?: number, end?: number }} */\n\t\tconst range = {};\n\t\tlet status = 200;\n\n\t\t// a stale `If-Range` validator means the client's partial copy is of an older\n\t\t// representation, so it gets the whole current one\n\t\tconst if_range = req.headers['if-range'];\n\t\tif (req.method === 'GET' && req.headers.range && (!if_range || if_range === etag)) {\n\t\t\tconst match = /^bytes=(\\d*)-(\\d*)$/.exec(req.headers.range);\n\n\t\t\tif (match && (match[1] || match[2])) {\n\t\t\t\tlet start = match[1] ? parseInt(match[1], 10) : NaN;\n\t\t\t\tlet end = match[2] ? parseInt(match[2], 10) : size - 1;\n\n\t\t\t\tif (isNaN(start)) {\n\t\t\t\t\t// suffix range: the last `match[2]` bytes\n\t\t\t\t\tstart = Math.max(size - end, 0);\n\t\t\t\t\tend = size - 1;\n\t\t\t\t} else {\n\t\t\t\t\tend = Math.min(end, size - 1);\n\t\t\t\t}\n\n\t\t\t\tif (start >= size || start > end) {\n\t\t\t\t\tres.writeHead(416, { 'content-range': `bytes */${size}` }).end();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstatus = 206;\n\t\t\t\theaders['content-range'] = `bytes ${start}-${end}/${size}`;\n\t\t\t\theaders['content-length'] = end - start + 1;\n\t\t\t\trange.start = start;\n\t\t\t\trange.end = end;\n\t\t\t}\n\t\t}\n\n\t\tres.writeHead(status, headers);\n\n\t\tif (req.method === 'HEAD') {\n\t\t\tres.end();\n\t\t\treturn;\n\t\t}\n\n\t\t// the headers are already sent, so a failed read can only drop the connection.\n\t\t// `pipeline` also closes the file when the client goes away mid-transfer\n\t\tpipeline(fs.createReadStream(file, range), res, () => {});\n\t};\n}\n","/** @import { IncomingHttpHeaders } from 'node:http' */\nimport process from 'node:process';\nimport { getRequest, setResponse, createReadableStream } from '@sveltejs/kit/node';\nimport {\n\tserver,\n\tdir,\n\tenv_prefix,\n\tbase,\n\tapp_path,\n\torigin,\n\tmime_types,\n\tassets,\n\tprerendered_assets\n} from '#@sveltejs/adapter-node';\nimport { env } from './env.js';\nimport { parse_as_bytes, parse_origin } from './utils.js';\nimport { create_file_map, serve_static } from './static.js';\n\n/** @import { Middleware } from './static.js' */\n\nconst env_origin = env('ORIGIN', undefined);\n\nif (origin && env_origin !== undefined) {\n\tconsole.warn(\n\t\t`${env_prefix}ORIGIN is ignored because the SvelteKit configuration \\`paths.origin\\` setting was set to ${origin}`\n\t);\n}\n\nconst public_origin = origin || parse_origin(env_origin);\n\nconst xff_depth = parseInt(env('XFF_DEPTH', '1'));\nconst address_header = env('ADDRESS_HEADER', '').toLowerCase();\nconst protocol_header = env('PROTOCOL_HEADER', '').toLowerCase();\nconst host_header = env('HOST_HEADER', '').toLowerCase();\nconst port_header = env('PORT_HEADER', '').toLowerCase();\n\nconst body_size_limit = parse_as_bytes(env('BODY_SIZE_LIMIT', '512K'));\n\nif (isNaN(body_size_limit)) {\n\tthrow new Error(\n\t\t`Invalid BODY_SIZE_LIMIT: '${env('BODY_SIZE_LIMIT')}'. Please provide a numeric value.`\n\t);\n}\n\nconst asset_dir = `${dir}/client${base}`;\n\nawait server.init({\n\tenv: process.env,\n\tread: (file) => createReadableStream(`${asset_dir}/${file}`)\n});\n\n/** @type {Middleware} */\nconst ssr = async (req, res, next) => {\n\ttry {\n\t\tawait render(req, res, next);\n\t} catch (error) {\n\t\tconsole.error(error);\n\n\t\tif (res.headersSent) {\n\t\t\tres.destroy();\n\t\t\treturn;\n\t\t}\n\n\t\tres.getHeaderNames().forEach((name) => res.removeHeader(name));\n\t\tres.writeHead(500).end('Internal Server Error');\n\t}\n};\n\n/** @type {Middleware} */\nconst render = async (req, res) => {\n\t/** @type {Request} */\n\tlet request;\n\tlet request_origin = public_origin;\n\n\tif (!request_origin) {\n\t\ttry {\n\t\t\trequest_origin = get_origin(req.headers);\n\t\t} catch (error) {\n\t\t\tconsole.error(\n\t\t\t\t`Could not determine request origin: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t);\n\t\t\tres.statusCode = 400;\n\t\t\tres.end('Bad Request');\n\t\t\treturn;\n\t\t}\n\t}\n\n\ttry {\n\t\trequest = getRequest({\n\t\t\tbase: request_origin,\n\t\t\trequest: req,\n\t\t\tresponse: res,\n\t\t\tbodySizeLimit: body_size_limit\n\t\t});\n\t} catch {\n\t\tres.statusCode = 400;\n\t\tres.end('Bad Request');\n\t\treturn;\n\t}\n\n\tconst response = await server.respond(request, {\n\t\tplatform: { req },\n\t\tgetClientAddress: () => {\n\t\t\tif (address_header) {\n\t\t\t\tif (!(address_header in req.headers)) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Address header was specified with ${\n\t\t\t\t\t\t\tenv_prefix + 'ADDRESS_HEADER'\n\t\t\t\t\t\t}=${address_header} but is absent from request`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst value = /** @type {string} */ (req.headers[address_header]) || '';\n\n\t\t\t\tif (address_header === 'x-forwarded-for') {\n\t\t\t\t\tconst addresses = value.split(',');\n\n\t\t\t\t\tif (xff_depth < 1) {\n\t\t\t\t\t\tthrow new Error(`${env_prefix + 'XFF_DEPTH'} must be a positive integer`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (xff_depth > addresses.length) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`${env_prefix + 'XFF_DEPTH'} is ${xff_depth}, but only found ${\n\t\t\t\t\t\t\t\taddresses.length\n\t\t\t\t\t\t\t} addresses`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn addresses[addresses.length - xff_depth].trim();\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\treq.connection?.remoteAddress ||\n\t\t\t\t// @ts-expect-error\n\t\t\t\treq.connection?.socket?.remoteAddress ||\n\t\t\t\treq.socket?.remoteAddress ||\n\t\t\t\t// @ts-expect-error\n\t\t\t\treq.info?.remoteAddress\n\t\t\t);\n\t\t}\n\t});\n\n\t// Reverse proxies such as nginx buffer responses by default (ignoring\n\t// `cache-control`), which breaks streaming responses like server-sent events.\n\t// `X-Accel-Buffering: no` opts out of that buffering and is a no-op on proxies\n\t// that don't recognise it. See https://github.com/sveltejs/kit/issues/15790\n\t// The header is set on the Node response rather than the `Response` object,\n\t// whose headers may be immutable (e.g. when returned from `fetch`)\n\tif (response.headers.get('content-type') === 'text/event-stream') {\n\t\tres.setHeader('x-accel-buffering', 'no');\n\t}\n\n\tsetResponse(res, response);\n};\n\n/**\n * @param {string} name\n * @param {string | string[] | undefined} value\n * @returns {string | undefined}\n */\nfunction normalise_header(name, value) {\n\tif (!name) return undefined;\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 0) return undefined;\n\t\tif (value.length === 1) return value[0];\n\t\tthrow new Error(\n\t\t\t`Multiple values provided for ${name} header where only one expected: ${value}`\n\t\t);\n\t}\n\treturn value;\n}\n\n/**\n * @param {IncomingHttpHeaders} headers\n * @returns {string}\n */\nfunction get_origin(headers) {\n\tconst protocol = decodeURIComponent(\n\t\tnormalise_header(protocol_header, headers[protocol_header]) || 'https'\n\t);\n\n\t// this helps us avoid host injections through the protocol header\n\tif (protocol.includes(':')) {\n\t\tthrow new Error(\n\t\t\t`The ${protocol_header} header specified ${protocol} which is an invalid because it includes \\`:\\`. It should only contain the protocol scheme (e.g. \\`https\\`)`\n\t\t);\n\t}\n\n\tconst host =\n\t\tnormalise_header(host_header, headers[host_header]) ||\n\t\tnormalise_header('host', headers['host']);\n\tif (!host) {\n\t\tconst header_names = host_header ? `${host_header} or host headers` : 'host header';\n\t\tthrow new Error(\n\t\t\t`Could not determine host. The request must have a value provided by the ${header_names}`\n\t\t);\n\t}\n\n\tconst port = normalise_header(port_header, headers[port_header]);\n\tif (port && isNaN(+port)) {\n\t\tthrow new Error(\n\t\t\t`The ${port_header} header specified ${port} which is an invalid port because it is not a number. The value should only contain the port number (e.g. 443)`\n\t\t);\n\t}\n\n\treturn port ? `${protocol}://${host}:${port}` : `${protocol}://${host}`;\n}\n\nconst serve = serve_static(\n\tcreate_file_map({ dir, base, app_path, mime_types, assets, prerendered_assets })\n);\n\n/** @type {Middleware} */\nexport const handler =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AI,KAAK,KAAK,IAAI,CAAC"}
@@ -0,0 +1,9 @@
1
+ // .svelte-kit/generated/build/env/config.js
2
+ var variables = {};
3
+ var dynamic_private_env = {};
4
+ var explicit_public_env = {};
5
+ var rendered_env = {};
6
+ function set_env(env) {}
7
+ export { variables as a, set_env as i, explicit_public_env as n, rendered_env as r, dynamic_private_env as t };
8
+
9
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","names":[],"sources":["../../../.svelte-kit/generated/build/env/config.js"],"sourcesContent":["const variables = {};\nconst handle_issues = () => {};\n\nconst issues = {};\n\nexport { variables }\n\nexport const dynamic_private_env = {};\n\nexport const explicit_public_env = {};\n\nexport const rendered_env = {};\n\nhandle_issues(issues);\n\nexport function set_env(env) {\n\tconst issues = {};\n\t\n\thandle_issues(issues);\n}"],"mappings":";AAAA,IAAM,YAAY,CAAC;AAOnB,IAAa,sBAAsB,CAAC;AAEpC,IAAa,sBAAsB,CAAC;AAEpC,IAAa,eAAe,CAAC;AAI7B,SAAgB,QAAQ,KAAK,CAI7B"}
@@ -0,0 +1,484 @@
1
+ import { i as Redirect, r as HttpError } from "./shared.js";
2
+ import { W as request_store_after_await, X as url_search_unavailable_prerender } from "./server-errors.js";
3
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/internal/shared.js
4
+ /**
5
+ * Whether shared errors include their full text on the server even though `DEV` is false. This is
6
+ * enabled while the app is being built (analysed or prerendered)
7
+ */
8
+ var verbose = false;
9
+ function enable_verbose_errors() {
10
+ verbose = true;
11
+ }
12
+ /**
13
+ * @typedef {{ element?: Element }} ClientWarningOptions
14
+ * - `element`: logged after the warning, so that it can be inspected in the browser's devtools
15
+ */
16
+ /** `console.warn` styles for the code and text of shared runtime warnings, as in Svelte */
17
+ var bold = "font-weight: bold";
18
+ var normal = "font-weight: normal";
19
+ /**
20
+ * Throws the full diagnostic. Generated helpers throw their URL-only production error inline, so
21
+ * bundlers can remove both this call and the message text from production browser builds
22
+ * @param {string} code
23
+ * @param {string} message
24
+ * @param {Function} caller The generated helper, which is omitted from the stack along with this function
25
+ * @returns {never}
26
+ */
27
+ function throw_error(code, message, caller) {
28
+ const error = /* @__PURE__ */ new Error(`${code}\n${message}\nhttps://svelte.dev/e/kit/${code}`);
29
+ error.name = "SvelteKit error";
30
+ Error.captureStackTrace?.(error, caller);
31
+ throw error;
32
+ }
33
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/constants.js
34
+ /**
35
+ * A fake asset path used in `vite dev` and `vite preview`, so that we can
36
+ * serve local assets while verifying that requests are correctly prefixed
37
+ */
38
+ var SVELTE_KIT_ASSETS = "/_svelte_kit_assets";
39
+ var ENDPOINT_METHODS = [
40
+ "GET",
41
+ "POST",
42
+ "PUT",
43
+ "PATCH",
44
+ "DELETE",
45
+ "OPTIONS",
46
+ "HEAD",
47
+ "QUERY"
48
+ ];
49
+ var MUTATIVE_METHODS = [
50
+ "POST",
51
+ "PUT",
52
+ "PATCH",
53
+ "DELETE"
54
+ ];
55
+ /** methods whose responses depend on the request body, so they can never be prerendered */
56
+ var BODY_DEPENDENT_METHODS = [...MUTATIVE_METHODS, "QUERY"];
57
+ var PAGE_METHODS = [
58
+ "GET",
59
+ "POST",
60
+ "HEAD"
61
+ ];
62
+ import.meta.dirname;
63
+ var IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
64
+ /**
65
+ * If an an adapter deploys a catch-all serverless function, the rerouted URL
66
+ * is stored in this header.
67
+ */
68
+ var REROUTED_URL_HEADER = "x-sveltekit-rerouted-url";
69
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/internal/server/event.js
70
+ /** @import { RequestEvent } from '@sveltejs/kit' */
71
+ /** @import { RequestStore } from 'types' */
72
+ /** @import { AsyncLocalStorage } from 'node:async_hooks' */
73
+ /** @type {RequestStore | null} */
74
+ var sync_store = null;
75
+ /** @type {AsyncLocalStorage<RequestStore | null> | null} */
76
+ var als;
77
+ import("node:async_hooks").then((hooks) => als = new hooks.AsyncLocalStorage()).catch(() => {});
78
+ function get_request_store() {
79
+ const result = try_get_request_store();
80
+ if (!result) {
81
+ if (als) throw new Error("Could not get the request store. This is an internal error.");
82
+ request_store_after_await();
83
+ }
84
+ return result;
85
+ }
86
+ function try_get_request_store() {
87
+ return sync_store ?? als?.getStore() ?? null;
88
+ }
89
+ /**
90
+ * @template T
91
+ * @param {RequestStore | null} store
92
+ * @param {() => T} fn
93
+ */
94
+ function with_request_store(store, fn) {
95
+ try {
96
+ sync_store = store;
97
+ return als ? als.run(store, fn) : fn();
98
+ } finally {
99
+ if (!IN_WEBCONTAINER) sync_store = null;
100
+ }
101
+ }
102
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/internal/server/index.js
103
+ /**
104
+ * @template {{ tracing: { enabled: boolean, root: Span, current: Span } }} T
105
+ * @param {T} event_like
106
+ * @param {Span} current
107
+ * @returns {T}
108
+ */
109
+ function merge_tracing(event_like, current) {
110
+ return {
111
+ ...event_like,
112
+ tracing: {
113
+ ...event_like.tracing,
114
+ current
115
+ }
116
+ };
117
+ }
118
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/shared-errors.js
119
+ /**
120
+ * Invalid array key `%key%`
121
+ * @param {{ "key": string }} _values
122
+ * @returns {never}
123
+ */
124
+ function form_field_array_conflict(_values) {
125
+ if (verbose) throw_error("form_field_array_conflict", `Invalid array key \`${_values.key}\``, form_field_array_conflict);
126
+ throw new Error("https://svelte.dev/e/kit/form_field_array_conflict");
127
+ }
128
+ /**
129
+ * Form cannot contain duplicated keys — `%name%` has %count% values
130
+ * @param {{ "name": string; "count": string }} _values
131
+ * @returns {never}
132
+ */
133
+ function form_field_duplicate(_values) {
134
+ if (verbose) throw_error("form_field_duplicate", `Form cannot contain duplicated keys — \`${_values.name}\` has ${_values.count} values`, form_field_duplicate);
135
+ throw new Error("https://svelte.dev/e/kit/form_field_duplicate");
136
+ }
137
+ /**
138
+ * Invalid key `%key%`: This key is not allowed to prevent prototype pollution.
139
+ * @param {{ "key": string }} _values
140
+ * @returns {never}
141
+ */
142
+ function form_field_forbidden_key(_values) {
143
+ if (verbose) throw_error("form_field_forbidden_key", `Invalid key \`${_values.key}\`: This key is not allowed to prevent prototype pollution.`, form_field_forbidden_key);
144
+ throw new Error("https://svelte.dev/e/kit/form_field_forbidden_key");
145
+ }
146
+ /**
147
+ * Invalid field name `%name%`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields
148
+ * @param {{ "name": string }} _values
149
+ * @returns {never}
150
+ */
151
+ function form_field_invalid_name(_values) {
152
+ if (verbose) throw_error("form_field_invalid_name", `Invalid field name \`${_values.name}\`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields`, form_field_invalid_name);
153
+ throw new Error("https://svelte.dev/e/kit/form_field_invalid_name");
154
+ }
155
+ /**
156
+ * Form contained a field that wasn't created with `form.fields.as(...)`: `%name%`
157
+ * @param {{ "name": string }} _values
158
+ * @returns {never}
159
+ */
160
+ function form_field_unbound(_values) {
161
+ if (verbose) throw_error("form_field_unbound", `Form contained a field that wasn't created with \`form.fields.as(...)\`: \`${_values.name}\``, form_field_unbound);
162
+ throw new Error("https://svelte.dev/e/kit/form_field_unbound");
163
+ }
164
+ /**
165
+ * %type% inputs must have a value
166
+ * @param {{ "type": string }} _values
167
+ * @returns {never}
168
+ */
169
+ function form_input_missing_value(_values) {
170
+ if (verbose) throw_error("form_input_missing_value", `${_values.type} inputs must have a value`, form_input_missing_value);
171
+ throw new Error("https://svelte.dev/e/kit/form_input_missing_value");
172
+ }
173
+ /**
174
+ * HTTP error status codes must be between 400 and 599 — %status% is invalid
175
+ * @param {{ "status": string }} _values
176
+ * @returns {never}
177
+ */
178
+ function invalid_error_status(_values) {
179
+ if (verbose) throw_error("invalid_error_status", `HTTP error status codes must be between 400 and 599 — ${_values.status} is invalid`, invalid_error_status);
180
+ throw new Error("https://svelte.dev/e/kit/invalid_error_status");
181
+ }
182
+ /**
183
+ * Invalid export `%key%` (valid exports are %exports%, or anything with a `'_'` prefix)
184
+ * @param {{ "key": string; "exports": string; "file"?: string }} _values
185
+ * @returns {never}
186
+ */
187
+ function invalid_export(_values) {
188
+ if (verbose) throw_error("invalid_export", _values?.file !== void 0 ? `Invalid export \`${_values.key}\` in \`${_values.file}\` (valid exports are ${_values.exports}, or anything with a \`'_'\` prefix)` : `Invalid export \`${_values.key}\` (valid exports are ${_values.exports}, or anything with a \`'_'\` prefix)`, invalid_export);
189
+ throw new Error("https://svelte.dev/e/kit/invalid_export");
190
+ }
191
+ /**
192
+ * Invalid export `%key%` (`%key%` is a valid export in %locations%)
193
+ * @param {{ "key": string; "locations": string; "file"?: string }} _values
194
+ * @returns {never}
195
+ */
196
+ function invalid_export_location(_values) {
197
+ if (verbose) throw_error("invalid_export_location", _values?.file !== void 0 ? `Invalid export \`${_values.key}\` in \`${_values.file}\` (\`${_values.key}\` is a valid export in ${_values.locations})` : `Invalid export \`${_values.key}\` (\`${_values.key}\` is a valid export in ${_values.locations})`, invalid_export_location);
198
+ throw new Error("https://svelte.dev/e/kit/invalid_export_location");
199
+ }
200
+ /**
201
+ * a `load` function %location% returned %type%, but must return a plain object at the top level (i.e. `return {...}`)
202
+ * @param {{ "location": string; "type": string }} _values
203
+ * @returns {never}
204
+ */
205
+ function load_invalid_response(_values) {
206
+ if (verbose) throw_error("load_invalid_response", `a \`load\` function ${_values.location} returned ${_values.type}, but must return a plain object at the top level (i.e. \`return {...}\`)`, load_invalid_response);
207
+ throw new Error("https://svelte.dev/e/kit/load_invalid_response");
208
+ }
209
+ /**
210
+ * Async param matchers are not supported
211
+ * @param {void} _values
212
+ * @returns {never}
213
+ */
214
+ function param_matcher_async(_values) {
215
+ if (verbose) throw_error("param_matcher_async", `Async param matchers are not supported`, param_matcher_async);
216
+ throw new Error("https://svelte.dev/e/kit/param_matcher_async");
217
+ }
218
+ /**
219
+ * Param matcher must return a string, number, boolean, or bigint
220
+ * @param {void} _values
221
+ * @returns {never}
222
+ */
223
+ function param_matcher_result_invalid(_values) {
224
+ if (verbose) throw_error("param_matcher_result_invalid", `Param matcher must return a string, number, boolean, or bigint`, param_matcher_result_invalid);
225
+ throw new Error("https://svelte.dev/e/kit/param_matcher_result_invalid");
226
+ }
227
+ /**
228
+ * %type% are not valid remote function arguments
229
+ * @param {{ "type": string }} _values
230
+ * @returns {never}
231
+ */
232
+ function remote_argument_unsupported(_values) {
233
+ if (verbose) throw_error("remote_argument_unsupported", `${_values.type} are not valid remote function arguments`, remote_argument_unsupported);
234
+ throw new Error("https://svelte.dev/e/kit/remote_argument_unsupported");
235
+ }
236
+ /**
237
+ * Cannot access `event.url.hash`. Consider using `page.url.hash` inside a component instead
238
+ * @param {void} _values
239
+ * @returns {never}
240
+ */
241
+ function url_hash_unavailable(_values) {
242
+ if (verbose) throw_error("url_hash_unavailable", `Cannot access \`event.url.hash\`. Consider using \`page.url.hash\` inside a component instead`, url_hash_unavailable);
243
+ throw new Error("https://svelte.dev/e/kit/url_hash_unavailable");
244
+ }
245
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/utils/url.js
246
+ /**
247
+ * Matches a URI scheme. See https://www.rfc-editor.org/rfc/rfc3986#section-3.1
248
+ * @type {RegExp}
249
+ */
250
+ var SCHEME = /^[a-z][a-z\d+\-.]*:/i;
251
+ var internal = new URL("a://");
252
+ /**
253
+ * @param {string} base
254
+ * @param {string} path
255
+ */
256
+ function resolve(base, path) {
257
+ if (path[0] === "/" && path[1] === "/") return path;
258
+ let url = new URL(base, internal);
259
+ url = new URL(path, url);
260
+ return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
261
+ }
262
+ /**
263
+ * Relative reference from `from` to `to`, which must differ only by a trailing slash
264
+ * @param {string} from
265
+ * @param {string} to
266
+ * @returns {string}
267
+ */
268
+ function relative_pathname(from, to) {
269
+ const segment = to.replace(/\/$/, "").split("/").at(-1);
270
+ return from.endsWith("/") ? `../${segment}` : `./${segment}/`;
271
+ }
272
+ /**
273
+ * @param {string} path
274
+ * @param {import('types').TrailingSlash} trailing_slash
275
+ */
276
+ function normalize_path(path, trailing_slash) {
277
+ if (path === "/" || trailing_slash === "ignore") return path;
278
+ if (trailing_slash === "never") return path.endsWith("/") ? path.slice(0, -1) : path;
279
+ else if (trailing_slash === "always" && !path.endsWith("/")) return path + "/";
280
+ return path;
281
+ }
282
+ /**
283
+ * Decode pathname excluding %25 to prevent further double decoding of params
284
+ * @param {string} pathname
285
+ */
286
+ function decode_pathname(pathname) {
287
+ return pathname.split("%25").map(decodeURI).join("%25");
288
+ }
289
+ /**
290
+ * @param {URL} url
291
+ * @param {() => void} callback
292
+ * @param {(search_param: string) => void} search_params_callback
293
+ * @param {boolean} [allow_hash]
294
+ */
295
+ function make_trackable(url, callback, search_params_callback, allow_hash = false) {
296
+ const tracked = new URL(url);
297
+ Object.defineProperty(tracked, "searchParams", {
298
+ value: new Proxy(tracked.searchParams, { get(obj, key) {
299
+ if (key === "get" || key === "getAll" || key === "has") return (param, ...rest) => {
300
+ search_params_callback(param);
301
+ return obj[key](param, ...rest);
302
+ };
303
+ callback();
304
+ const value = Reflect.get(obj, key);
305
+ return typeof value === "function" ? value.bind(obj) : value;
306
+ } }),
307
+ enumerable: true,
308
+ configurable: true
309
+ });
310
+ /**
311
+ * URL properties that could change during the lifetime of the page,
312
+ * which excludes things like `origin`
313
+ * @type {(keyof URL)[]}
314
+ */
315
+ const tracked_url_properties = [
316
+ "href",
317
+ "pathname",
318
+ "search",
319
+ "toString",
320
+ "toJSON"
321
+ ];
322
+ if (allow_hash) tracked_url_properties.push("hash");
323
+ for (const property of tracked_url_properties) Object.defineProperty(tracked, property, {
324
+ get() {
325
+ callback();
326
+ return url[property];
327
+ },
328
+ enumerable: true,
329
+ configurable: true
330
+ });
331
+ tracked[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
332
+ return inspect(url, opts);
333
+ };
334
+ tracked.searchParams[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
335
+ return inspect(url.searchParams, opts);
336
+ };
337
+ if (!allow_hash) disable_hash(tracked);
338
+ return tracked;
339
+ }
340
+ /**
341
+ * Disallow access to `url.hash` on the server and in `load`
342
+ * @param {URL} url
343
+ */
344
+ function disable_hash(url) {
345
+ allow_nodejs_console_log(url);
346
+ Object.defineProperty(url, "hash", { get() {
347
+ return url_hash_unavailable();
348
+ } });
349
+ }
350
+ /**
351
+ * Disallow access to `url.search` and `url.searchParams` during prerendering
352
+ * @param {URL} url
353
+ */
354
+ function disable_search(url) {
355
+ allow_nodejs_console_log(url);
356
+ for (const property of ["search", "searchParams"]) Object.defineProperty(url, property, { get() {
357
+ return url_search_unavailable_prerender({ property });
358
+ } });
359
+ }
360
+ /**
361
+ * Allow URL to be console logged, bypassing disabled properties.
362
+ * @param {URL} url
363
+ */
364
+ function allow_nodejs_console_log(url) {
365
+ url[Symbol.for("nodejs.util.inspect.custom")] = (_depth, opts, inspect) => {
366
+ return inspect(new URL(url), opts);
367
+ };
368
+ }
369
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/shared-warnings.js
370
+ /**
371
+ * `%route%`: Calling `depends('%dependency%')` will throw an error in Firefox because `%scheme%` is a special URI scheme
372
+ * @param {{ "route": string; "dependency": string; "scheme": string }} _values
373
+ */
374
+ function depends_special_scheme(_values) {
375
+ console.warn("https://svelte.dev/e/kit/depends_special_scheme");
376
+ }
377
+ /**
378
+ * The properties of `form.fields` are virtual, so operators like `in` and `Object.keys` are meaningless. If you need the current value of a form field, use `form.fields.x.value()`
379
+ * @param {void} _values
380
+ */
381
+ function form_fields_enumerated(_values) {
382
+ console.warn("https://svelte.dev/e/kit/form_fields_enumerated");
383
+ }
384
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/index.js
385
+ /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
386
+ var text_encoder = new TextEncoder();
387
+ /**
388
+ * Throws an error with a HTTP status code and an optional message.
389
+ * When called during request handling, this will cause SvelteKit to
390
+ * return an error response; the error will be passed to `handleError` as an _expected_ error.
391
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
392
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
393
+ * @param {string} [message] The error message.
394
+ * @overload
395
+ * @param {{ status: number; message: string } extends App.Error ? number : never} status
396
+ * @param {{ status: number; message: string } extends App.Error ? string : never} [message]
397
+ * @return {never}
398
+ * @throws {import('./public.js').HttpError} This error instructs SvelteKit to initiate HTTP error handling.
399
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
400
+ */
401
+ /**
402
+ * Throws an error with a HTTP status code and an optional message.
403
+ * When called during request handling, this will cause SvelteKit to
404
+ * return an error response; the error will be passed to `handleError` as an _expected_ error.
405
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
406
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
407
+ * @param {string} message The error message.
408
+ * @param {keyof Omit<App.Error, 'status' | 'message'> extends never ? never : Omit<App.Error, 'status' | 'message'>} properties Additional properties of the App.Error type.
409
+ * @overload
410
+ * @param {number} status
411
+ * @param {string} message
412
+ * @param {keyof Omit<App.Error, 'status' | 'message'> extends never ? never : Omit<App.Error, 'status' | 'message'>} properties
413
+ * @return {never}
414
+ * @throws {import('./public.js').HttpError} This error instructs SvelteKit to initiate HTTP error handling.
415
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
416
+ */
417
+ /**
418
+ * Throws an error with a HTTP status code and an optional message.
419
+ * When called during request handling, this will cause SvelteKit to
420
+ * return an error response; the error will be passed to `handleError` as an _expected_ error.
421
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
422
+ * @deprecated Passing an `App.Error` body as the second argument is deprecated — pass the `message` as the second argument, and any additional properties as the third
423
+ * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
424
+ * @param {Omit<App.Error, 'status'> & { status?: App.Error['status'] }} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
425
+ * @overload
426
+ * @param {number} status
427
+ * @param {Omit<App.Error, 'status'> & { status?: App.Error['status'] }} properties
428
+ * @return {never}
429
+ * @throws {import('./public.js').HttpError} This error instructs SvelteKit to initiate HTTP error handling.
430
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
431
+ */
432
+ /**
433
+ * Throws an error with a HTTP status code and an optional message.
434
+ * When called during request handling, this will cause SvelteKit to
435
+ * return an error response; the error will be passed to `handleError` as an _expected_ error.
436
+ * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
437
+ * @param {any} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
438
+ * @param {any} [message] A string, or (deprecated) a partial App.Error object
439
+ * @param {any} [properties] Additional properties of the App.Error type when passing a string message.
440
+ * @return {never}
441
+ * @throws {import('./public.js').HttpError} This error instructs SvelteKit to initiate HTTP error handling.
442
+ * @throws {Error} If the provided status is invalid (not between 400 and 599).
443
+ */
444
+ function error(status, message, properties) {
445
+ if (isNaN(status) || status < 400 || status > 599) invalid_error_status({ status: String(status) });
446
+ if (message !== void 0 && typeof message !== "string") ({message, ...properties} = message);
447
+ throw new HttpError({
448
+ ...properties,
449
+ status,
450
+ message: message ?? `Error: ${status}`
451
+ });
452
+ }
453
+ /**
454
+ * Checks whether this is a redirect thrown by {@link redirect}.
455
+ * @param {unknown} e The object to check.
456
+ * @return {e is import('./public.js').Redirect}
457
+ */
458
+ function isRedirect(e) {
459
+ return e instanceof Redirect;
460
+ }
461
+ /**
462
+ * Create a `Response` object from the supplied body.
463
+ * @param {string} body The value that will be used as-is.
464
+ * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
465
+ * @deprecated use `new Response`
466
+ */
467
+ function text(body, init) {
468
+ const headers = new Headers(init?.headers);
469
+ if (!headers.has("content-length")) {
470
+ const encoded = text_encoder.encode(body);
471
+ headers.set("content-length", encoded.byteLength.toString());
472
+ return new Response(encoded, {
473
+ ...init,
474
+ headers
475
+ });
476
+ }
477
+ return new Response(body, {
478
+ ...init,
479
+ headers
480
+ });
481
+ }
482
+ export { ENDPOINT_METHODS as A, param_matcher_result_invalid as C, try_get_request_store as D, get_request_store as E, SVELTE_KIT_ASSETS as F, bold as I, enable_verbose_errors as L, MUTATIVE_METHODS as M, PAGE_METHODS as N, with_request_store as O, REROUTED_URL_HEADER as P, normal as R, param_matcher_async as S, merge_tracing as T, form_field_unbound as _, form_fields_enumerated as a, invalid_export_location as b, disable_search as c, relative_pathname as d, resolve as f, form_field_invalid_name as g, form_field_forbidden_key as h, depends_special_scheme as i, IN_WEBCONTAINER as j, BODY_DEPENDENT_METHODS as k, make_trackable as l, form_field_duplicate as m, isRedirect as n, SCHEME as o, form_field_array_conflict as p, text as r, decode_pathname as s, error as t, normalize_path as u, form_input_missing_value as v, remote_argument_unsupported as w, load_invalid_response as x, invalid_export as y };
483
+
484
+ //# sourceMappingURL=exports.js.map