diff --git a/.vscode/settings.json b/.vscode/settings.json index 4b9d409e..5ca266b9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "source.fixAll": "explicit", "source.organizeImports": "explicit" }, + "explorer.fileNesting.enabled": true, "files.exclude": { "**/node_modules": true }, diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 1e8f9521..bf1434d4 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -52,6 +52,7 @@ export default defineConfig({ items: [ { text: 'Introduction', link: 'introduction' }, { text: 'Quick Start', link: 'quick-start' }, + { text: 'Migration to 1.0 Alpha', link: 'migration' }, { text: 'Define Collections', link: 'define-collections' }, { text: 'Using Collections', link: 'using-collections' }, { text: 'Velite Schemas', link: 'velite-schemas' } diff --git a/docs/guide/custom-schema.md b/docs/guide/custom-schema.md index bcf1a692..46fbf00e 100644 --- a/docs/guide/custom-schema.md +++ b/docs/guide/custom-schema.md @@ -20,15 +20,20 @@ import { defineSchema, s } from 'velite' export const title = defineSchema(() => s.string().min(1).max(100)) // for validating email -export const email = defineSchema(() => s.string().email({ message: 'Invalid email address' })) +export const email = defineSchema(() => s.email({ message: 'Invalid email address' })) -// custom validation logic -export const hello = defineSchema(() => - s.string().refine(value => { - if (value !== 'hello') { - return 'Value must be "hello"' +// custom validation logic using refine +export const hello = defineSchema(() => s.string().refine(value => value === 'hello', 'Value must be "hello"')) + +// custom validation logic using superRefine (for more control) +export const customValidation = defineSchema(() => + s.string().superRefine((value, ctx) => { + if (value.length < 5) { + ctx.addIssue({ code: 'custom', message: 'Value must be at least 5 characters' }) + } + if (!value.includes('@')) { + ctx.addIssue({ code: 'custom', message: 'Value must contain @ symbol' }) } - return true }) ) ``` @@ -40,10 +45,28 @@ Refer to [Zod documentation](https://zod.dev) for more information about Zod. ```ts import { defineSchema, s } from 'velite' -// for transforming title +// for transforming title (simple transform) export const title = defineSchema(() => s.string().transform(value => value.toUpperCase())) -// ... +// for transforming with error handling (using ctx.addIssue) +export const safeTransform = defineSchema(() => + s.string().transform((value, ctx) => { + try { + return value.toUpperCase() + } catch (err) { + ctx.addIssue({ fatal: true, code: 'custom', message: 'Transform failed' }) + return value + } + }) +) + +// async transform (zod 4 supports async transforms) +export const asyncTransform = defineSchema(() => + s.string().transform(async (value, ctx) => { + // async operations... + return processedValue + }) +) ``` ### Example @@ -59,7 +82,7 @@ import type { Image } from 'velite' * Remote Image with metadata schema */ export const remoteImage = () => - s.string().transform(async (value, { addIssue }) => { + s.string().transform(async (value, ctx) => { try { const response = await fetch(value) const blob = await response.blob() @@ -69,7 +92,7 @@ export const remoteImage = () => return { src: value, ...metadata } } catch (err) { const message = err instanceof Error ? err.message : String(err) - addIssue({ fatal: true, code: 'custom', message }) + ctx.addIssue({ fatal: true, code: 'custom', message }) return null as never } }) @@ -78,22 +101,60 @@ export const remoteImage = () => ## Schema Context > [!TIP] -> Considering that Velite's scenario often needs to obtain metadata information about the current file in the schema, Velite does not use the original Zod package. Instead, it uses a custom Zod package that provides a `meta` member in the schema context. +> In Zod 4, the context object (`ctx`) in `refine`, `superRefine`, and `transform` provides an `addIssue()` method for adding validation errors. Velite extends this context to provide access to file metadata through `context()` function. + +### Using Context API ```ts -import { defineSchema, s } from 'velite' +import { context, defineSchema, s } from 'velite' -// convert a nonexistent field +// Access file context in transform export const path = defineSchema(() => - s.custom().transform((value, ctx) => { - if (ctx.meta.path) { - return ctx.meta.path + s.custom().transform(value => { + // Use context() to access current file information + const { file, config } = context() + + if (value == null) { + return file.path } return value }) ) ``` +### Context API Reference + +The `context()` function returns an object with: + +- `config`: The resolved Velite configuration +- `file`: The current [`VeliteFile`](../reference/types.md#velitefile) being processed + +### Error Handling in Transforms + +```ts +import { defineSchema, s } from 'velite' + +export const safeTransform = defineSchema(() => + s.string().transform(async (value, ctx) => { + try { + // async operation + const result = await processValue(value) + return result + } catch (err) { + // Add error issue using Zod 4 API + ctx.addIssue({ + fatal: true, // Set to true to stop processing + code: 'custom', // Error code + message: err.message // Error message + }) + return null as never // Type assertion for TypeScript + } + }) +) +``` + ### Reference -the type of `meta` is `ZodMeta`, which extends [`VeliteFile`](../reference/types.md#velitefile). +- `context()` returns `{ config: Config, file: VeliteFile }` +- `ctx.addIssue()` accepts `{ fatal?: boolean, code: string, message: string }` +- See [`VeliteFile`](../reference/types.md#velitefile) for file metadata structure diff --git a/docs/guide/define-collections.md b/docs/guide/define-collections.md index b924f73c..9b4750bf 100644 --- a/docs/guide/define-collections.md +++ b/docs/guide/define-collections.md @@ -156,35 +156,49 @@ const posts = defineCollection({ ### Transform Context Metadata -The `transform()` function can receive a second argument, which is the context object. This is useful for adding computed fields to the content items in a collection. +The `transform()` function can receive a second argument, which is the context object (in Zod 4). To access file metadata, use the `context()` function from Velite. ```js +import { context, s } from 'velite' + const posts = defineCollection({ schema: s .object({ // fields }) - .transform((data, { meta }) => ({ - ...data, - // computed fields - path: meta.path // or parse to filename based slug - })) + .transform(data => { + const { file } = context() + return { + ...data, + // computed fields + path: file.path, // or parse to filename based slug + basename: file.basename + } + }) }) ``` -the type of `meta` is `ZodMeta`, which extends [`VeliteFile`](../reference/types.md#velitefile). for more information, see [Custom Schema](custom-schema.md). +For more information about accessing file context, see [Custom Schema](custom-schema.md). ## Content Body -Velite's built-in loader keeps content's raw body in `meta.content`, and the plain text body in `meta.plain`. +Velite's built-in loader keeps content's raw body in `file.content`, and the plain text body in `file.plain`. -To add them as a field, you can use a custom schema. +To add them as a field, you can use a custom schema with the `context()` function. ```js +import { context, s } from 'velite' + const posts = defineCollection({ schema: s.object({ - content: s.custom().transform((data, { meta }) => meta.content), - plain: s.custom().transform((data, { meta }) => meta.plain) + content: s.custom().transform(() => { + const { file } = context() + return file.content + }), + plain: s.custom().transform(() => { + const { file } = context() + return file.plain + }) }) }) ``` diff --git a/docs/guide/last-modified.md b/docs/guide/last-modified.md index ee3eeb0c..e74c8f42 100644 --- a/docs/guide/last-modified.md +++ b/docs/guide/last-modified.md @@ -12,17 +12,15 @@ Create a timestamp schema based on file stat. ```ts import { stat } from 'fs/promises' -import { defineSchema } from 'velite' +import { context, defineSchema } from 'velite' const timestamp = defineSchema(() => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the file modified timestamp' }) - } - - const stats = await stat(meta.path) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { file } = context() + const stats = await stat(file.path) return stats.mtime.toISOString() }) ) @@ -45,18 +43,17 @@ const posts = defineCollection({ ```ts import { exec } from 'child_process' import { promisify } from 'util' -import { defineSchema } from 'velite' +import { context, defineSchema } from 'velite' const execAsync = promisify(exec) const timestamp = defineSchema(() => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the value from `git log -1 --format=%cd`' }) - } - const { stdout } = await execAsync(`git log -1 --format=%cd ${meta.path}`) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { file } = context() + const { stdout } = await execAsync(`git log -1 --format=%cd ${file.path}`) return new Date(stdout || Date.now()).toISOString() }) ) diff --git a/docs/guide/migration.md b/docs/guide/migration.md new file mode 100644 index 00000000..7e451220 --- /dev/null +++ b/docs/guide/migration.md @@ -0,0 +1,203 @@ +# Migration to 1.0 Alpha + +Velite 1.0 alpha modernizes the parser pipeline around Zod 4 and introduces framework plugins for app integrations. This guide covers the changes you should apply when upgrading from `0.3.x` or an earlier `1.0.0-alpha` build. + +## Upgrade Packages + +Install the alpha release and update your package manager lockfile: + +```bash +pnpm add -D velite@1.0.0-alpha.2 +``` + +If you use the framework plugins, install the matching package: + +```bash +pnpm add -D @velite/plugin-next@latest +pnpm add -D @velite/plugin-vite@latest +``` + +## Runtime Requirements + +Velite now targets Node.js `>=20.19.0`. + +This aligns the package with current versions of the runtime dependencies used by the build and watch pipeline. Update local development, CI, and deployment environments before upgrading. + +## Zod 4 Schema Semantics + +Velite now uses the official `zod` package directly. The `s` helper still includes Velite-specific schemas and all Zod exports, and `z` is also exported from `velite` for code that prefers the Zod namespace. + +```ts +import { s, z } from 'velite' + +const post = s.object({ + title: z.string(), + slug: s.path() +}) +``` + +### Replace `ctx.meta` With `context()` + +The parser no longer passes Velite file metadata through Zod's transform context. Use `context()` to access the current file and resolved config. + +Before: + +```ts +import { defineSchema, s } from 'velite' + +export const sourcePath = defineSchema(() => + s.custom().transform((value, { meta }) => { + return value ?? meta.path + }) +) +``` + +After: + +```ts +import { context, defineSchema, s } from 'velite' + +export const sourcePath = defineSchema(() => + s + .custom(value => typeof value === 'string') + .optional() + .transform(value => { + return value ?? context().file.path + }) +) +``` + +The `context()` function returns: + +```ts +{ + config: Config + file: VeliteFile +} +``` + +### Mark Context-Derived Fields as Optional + +In Zod 4, object keys are required unless the schema is explicitly optional. If a field is usually missing from frontmatter and should be derived from the current file, add `.optional()` before `.transform()`. + +Before: + +```ts +const posts = defineCollection({ + schema: s.object({ + content: s.custom().transform(value => value ?? context().file.content ?? '') + }) +}) +``` + +After: + +```ts +const posts = defineCollection({ + schema: s.object({ + content: s + .custom(value => typeof value === 'string') + .optional() + .transform(value => value ?? context().file.content ?? '') + }) +}) +``` + +Velite's built-in context-derived schemas already follow this pattern, including `s.path()`, `s.raw()`, `s.markdown()`, `s.mdx()`, `s.excerpt()`, `s.metadata()`, and `s.toc()`. + +### Do Not Use `addIssue()` for Warnings + +Zod 4 treats any `ctx.addIssue()` call as a validation failure. `fatal: false` does not mean "warning" and does not keep the parse result successful. + +Before: + +```ts +s.string().transform((value, ctx) => { + ctx.addIssue({ fatal: false, code: 'custom', message: 'Using fallback value' }) + return value +}) +``` + +After: + +```ts +s.string().transform(value => { + return value +}) +``` + +Only call `ctx.addIssue()` when the current value should fail validation. + +## Next.js Integration + +Use `@velite/plugin-next` instead of manually starting Velite from `next.config.ts`. + +Before: + +```ts +const isDev = process.argv.includes('dev') +const isBuild = process.argv.includes('build') + +if (!process.env.VELITE_STARTED && (isDev || isBuild)) { + process.env.VELITE_STARTED = '1' + import('velite').then(m => m.build({ watch: isDev, clean: !isDev })) +} + +export default {} +``` + +After: + +```ts +import { withVelite } from '@velite/plugin-next' + +export default withVelite() +``` + +To pass Velite options: + +```ts +import { createNextPlugin } from '@velite/plugin-next' + +const withVelite = createNextPlugin({ config: './velite.config.ts' }) + +export default withVelite({ + reactStrictMode: true +}) +``` + +## Vite Integration + +`@velite/plugin-vite` supports Vite 5 through Vite 8. Keep the plugin in your Vite config and upgrade Vite normally: + +```ts +import { velite } from '@velite/plugin-vite' +import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite' + +export default defineConfig({ + plugins: [velite(), react()] +}) +``` + +## Type Exports + +The public entry exports Zod-related helpers for schema typing: + +```ts +import { z } from 'velite' + +import type { infer, Schema, ZodType } from 'velite' +``` + +Use `context()` for Velite parser metadata instead of relying on `ZodMeta`. + +## Recommended Upgrade Checklist + +- Update Node.js to `>=20.19.0` in local development and CI. +- Upgrade `velite` to `1.0.0-alpha.2`. +- Replace `ctx.meta` access with `context()`. +- Add `.optional()` to custom schemas that derive missing object fields from the current file. +- Remove `ctx.addIssue({ fatal: false, ... })` warning patterns. +- Switch Next.js projects to `@velite/plugin-next`. +- Run `velite build`, your app build, and your type checks. diff --git a/docs/guide/using-mdx.md b/docs/guide/using-mdx.md index 5a52ab6b..2001e7f1 100644 --- a/docs/guide/using-mdx.md +++ b/docs/guide/using-mdx.md @@ -260,6 +260,7 @@ import { dirname, join } from 'node:path' import { globalExternals } from '@fal-works/esbuild-plugin-global-externals' import mdxPlugin from '@mdx-js/esbuild' import { build } from 'esbuild' +import { context, s } from 'velite' import type { Plugin } from 'esbuild' @@ -312,10 +313,11 @@ const compileMdx = async (source: string, path: string, options: CompileOptions) } export const mdxBundle = (options: MdxOptions = {}) => - custom().transform(async (value, { meta: { path, content, config }, addIssue }) => { - value = value ?? content + s.custom().transform(async (value, ctx) => { + const { file, config } = context() + value = value ?? file.content if (value == null) { - addIssue({ fatal: true, code: 'custom', message: 'The content is empty' }) + ctx.addIssue({ fatal: true, code: 'custom', message: 'The content is empty' }) return null as never } @@ -339,9 +341,9 @@ export const mdxBundle = (options: MdxOptions = {}) => const compilerOptions = { ...config.mdx, ...options, outputFormat, remarkPlugins, rehypePlugins } try { - return await compileMdx(value, path, compilerOptions) + return await compileMdx(value, file.path, compilerOptions) } catch (err: any) { - addIssue({ fatal: true, code: 'custom', message: err.message }) + ctx.addIssue({ fatal: true, code: 'custom', message: err.message }) return null as never } }) diff --git a/docs/guide/velite-schemas.md b/docs/guide/velite-schemas.md index a326a051..8cec9cd0 100644 --- a/docs/guide/velite-schemas.md +++ b/docs/guide/velite-schemas.md @@ -49,7 +49,7 @@ name: s.unique('taxonomies') // 'foo' => 'foo' // case 2. non-unique value (in all unique by 'taxonomies') -// 'foo' => issue 'Already exists' +// 'foo' => issue 'Duplicate 'foo' with '/path/to/existing/file.yml'' ``` ### Parameters diff --git a/docs/other/snippets.md b/docs/other/snippets.md index f9f1902a..b4d61212 100644 --- a/docs/other/snippets.md +++ b/docs/other/snippets.md @@ -6,17 +6,15 @@ ```ts import { stat } from 'fs/promises' -import { defineSchema } from 'velite' +import { context, defineSchema } from 'velite' const timestamp = defineSchema(() => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the file modified timestamp' }) - } - - const stats = await stat(meta.path) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { file } = context() + const stats = await stat(file.path) return stats.mtime.toISOString() }) ) @@ -36,18 +34,17 @@ const posts = defineCollection({ ```ts import { exec } from 'child_process' import { promisify } from 'util' -import { defineSchema } from 'velite' +import { context, defineSchema } from 'velite' const execAsync = promisify(exec) const timestamp = defineSchema(() => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the value from `git log -1 --format=%cd`' }) - } - const { stdout } = await execAsync(`git log -1 --format=%cd ${meta.path}`) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { file } = context() + const { stdout } = await execAsync(`git log -1 --format=%cd ${file.path}`) return new Date(stdout || Date.now()).toISOString() }) ) @@ -73,7 +70,7 @@ import type { Image } from 'velite' * Remote Image with metadata schema */ export const remoteImage = () => - s.string().transform(async (value, { addIssue }) => { + s.string().transform(async (value, ctx) => { try { const response = await fetch(value) const blob = await response.blob() @@ -83,7 +80,7 @@ export const remoteImage = () => return { src: value, ...metadata } } catch (err) { const message = err instanceof Error ? err.message : String(err) - addIssue({ fatal: true, code: 'custom', message }) + ctx.addIssue({ fatal: true, code: 'custom', message }) return null as never } }) @@ -253,9 +250,7 @@ import { toHtml } from 'hast-util-to-html' import { truncate } from 'hast-util-truncate' import { fromMarkdown } from 'mdast-util-from-markdown' import { toHast } from 'mdast-util-to-hast' - -import { extractHastLinkedFiles } from '../assets' -import { custom } from './zod' +import { context, s } from 'velite' export interface ExcerptOptions { /** @@ -273,16 +268,17 @@ export interface ExcerptOptions { } export const excerpt = ({ separator = 'more', length = 300 }: ExcerptOptions = {}) => - custom().transform(async (value, { meta: { path, content, config } }) => { - if (value == null && content != null) { - value = content + s.custom().transform(async (value, ctx) => { + const { file, config } = context() + if (value == null && file.content != null) { + value = file.content } try { const mdast = fromMarkdown(value) const hast = raw(toHast(mdast, { allowDangerousHtml: true })) const exHast = hastExcerpt(hast, { comment: separator, maxSearchSize: 1024 }) const output = exHast ?? truncate(hast, { size: length, ellipsis: '…' }) - await rehypeCopyLinkedFiles(config.output)(output, { path }) + await rehypeCopyLinkedFiles(config.output)(output, { path: file.path }) return toHtml(output) } catch (err: any) { ctx.addIssue({ fatal: true, code: 'custom', message: err.message }) diff --git a/docs/reference/config.md b/docs/reference/config.md index 5753e9d9..3c6dd5e5 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -276,7 +276,7 @@ More options, see [MDX Compile Options](https://mdxjs.com/packages/mdx/#compileo ## `prepare` -- Type: `(data: Result, context: Context) => Promisable` +- Type: `(data: Result, context: HookContext) => Promisable` Data prepare hook, executed before write to file. You can apply additional processing to the output data, such as modify them, add missing data, handle relationships, or write them to files. return false to prevent the default output to a file if you wanted. @@ -299,6 +299,6 @@ export default defineConfig({ ## `complete` -- Type: `(data: Result, context: Context) => Promisable` +- Type: `(data: Result, context: HookContext) => Promisable` Build success hook, executed after the build is complete. You can do anything after the build is complete, such as print some tips or deploy the output files. diff --git a/docs/reference/types.md b/docs/reference/types.md index e7072494..f5800d2d 100644 --- a/docs/reference/types.md +++ b/docs/reference/types.md @@ -66,8 +66,6 @@ interface Loader { ## VeliteFile ```ts -interface ZodMeta extends VeliteFile {} - class VeliteFile extends VFile { /** * Get parsed records from file @@ -102,11 +100,12 @@ class VeliteFile extends VFile { static get(path: string): VeliteFile | undefined /** - * Create meta object from file path - * @param options meta options + * Create file object from file path + * @param path file path + * @param loaders file loaders * @returns resolved meta object */ - static async create({ path, config }: { path: string; config: Config }): Promise + static async create(path: string, loaders: Loader[]): Promise } ``` diff --git a/examples/basic/velite.config.js b/examples/basic/velite.config.js index fa619921..da52821e 100644 --- a/examples/basic/velite.config.js +++ b/examples/basic/velite.config.js @@ -2,9 +2,9 @@ import { exec } from 'node:child_process' import { promisify } from 'node:util' -import { defineConfig, s } from 'velite' +import { context, defineConfig, s } from 'velite' -const slugify = input => +const slugify = (/** @type {string} */ input) => input .toLowerCase() .replace(/\s+/g, '-') @@ -24,12 +24,10 @@ const meta = s const execAsync = promisify(exec) const timestamp = () => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the value from `git log -1 --format=%cd`' }) - } - const { stdout } = await execAsync(`git log -1 --format=%cd ${meta.path}`) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { stdout } = await execAsync(`git log -1 --format=%cd ${context().file.path}`) return new Date(stdout || Date.now()).toISOString() }) @@ -52,7 +50,7 @@ export default defineConfig({ title: s.string().max(99), description: s.string().max(999).optional(), keywords: s.array(s.string()), - author: s.object({ name: s.string(), email: s.string().email(), url: s.string().url() }), + author: s.object({ name: s.string(), email: s.email(), url: s.url() }), links: s.array(s.object({ text: s.string(), link: s.string(), type: s.enum(['navigation', 'footer', 'copyright']) })), socials: s.array(s.object({ name: s.string(), icon, link: s.string().optional(), image: s.image().optional() })) }) @@ -63,7 +61,7 @@ export default defineConfig({ schema: s .object({ name: s.unique('categories'), - slug: s.slug('global'), + slug: s.slug(), cover: s.image().optional(), description: s.string().max(999).optional(), count @@ -76,7 +74,7 @@ export default defineConfig({ schema: s .object({ name: s.string().max(20), - slug: s.slug('global'), + slug: s.slug(), cover: s.image().optional(), description: s.string().max(999).optional(), count @@ -89,11 +87,11 @@ export default defineConfig({ schema: s .object({ title: s.string().max(99), - slug: s.slug('global'), + slug: s.slug(), body: s.mdx(), raw: s.raw() }) - .transform((data, { meta }) => ({ ...data, permalink: `/${data.slug}`, basename: meta.basename })) + .transform(data => ({ ...data, permalink: `/${data.slug}`, basename: context().file.basename })) }, posts: { name: 'Post', diff --git a/examples/nextjs/next.config.ts b/examples/nextjs/next.config.ts index 193e2579..0b9fe042 100644 --- a/examples/nextjs/next.config.ts +++ b/examples/nextjs/next.config.ts @@ -1,17 +1,6 @@ -import type { NextConfig } from 'next' +import { withVelite } from '@velite/plugin-next' -const isDev = process.argv.indexOf('dev') !== -1 -const isBuild = process.argv.indexOf('build') !== -1 -if (!process.env.VELITE_STARTED && (isDev || isBuild)) { - process.env.VELITE_STARTED = '1' - import('velite').then(m => m.build({ watch: isDev, clean: !isDev })) -} - -const nextConfig: NextConfig = { - /* config options here */ -} - -export default nextConfig +export default withVelite() // legacy next.config.js ↓ (not support turbopack) diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 8bba9f0f..54f3e8f1 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -10,20 +10,21 @@ "content": "velite --clean" }, "dependencies": { - "@tailwindcss/postcss": "^4.1.12", - "@tailwindcss/typography": "^0.5.16", - "@types/node": "^24.3.0", - "@types/react": "19.2.7", + "@tailwindcss/postcss": "^4.3.0", + "@tailwindcss/typography": "^0.5.19", + "@types/node": "^25.8.0", + "@types/react": "19.2.14", "@types/react-dom": "19.2.3", - "next": "16.0.7", + "@velite/plugin-next": "workspace:*", + "next": "16.2.6", "next-themes": "^0.4.6", - "postcss": "^8.5.6", - "react": "19.2.1", - "react-dom": "19.2.1", - "rehype-pretty-code": "^0.14.1", - "shiki": "^3.11.0", - "tailwindcss": "^4.1.12", - "typescript": "^5.9.2", + "postcss": "^8.5.14", + "react": "19.2.6", + "react-dom": "19.2.6", + "rehype-pretty-code": "^0.14.3", + "shiki": "^4.0.2", + "tailwindcss": "^4.3.0", + "typescript": "^6.0.3", "velite": "workspace:*" } } diff --git a/examples/nextjs/velite.config.ts b/examples/nextjs/velite.config.ts index a89fba3e..e4a56e12 100644 --- a/examples/nextjs/velite.config.ts +++ b/examples/nextjs/velite.config.ts @@ -1,7 +1,7 @@ import { exec } from 'node:child_process' import { promisify } from 'node:util' import rehypePrettyCode from 'rehype-pretty-code' -import { defineCollection, defineConfig, s } from 'velite' +import { context, defineCollection, defineConfig, s } from 'velite' const slugify = (input: string) => input @@ -25,12 +25,10 @@ const execAsync = promisify(exec) // refer to https://velite.js.org/guide/last-modified#based-on-git-timestamp for more details const timestamp = () => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the value from `git log -1 --format=%cd`' }) - } - const { stdout } = await execAsync(`git log -1 --format=%cd ${meta.path}`) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { stdout } = await execAsync(`git log -1 --format=%cd ${context().file.path}`) return new Date(stdout || Date.now()).toISOString() }) @@ -43,7 +41,7 @@ const options = defineCollection({ title: s.string().max(99), description: s.string().max(999).optional(), keywords: s.array(s.string()), - author: s.object({ name: s.string(), email: s.string().email(), url: s.string().url() }), + author: s.object({ name: s.string(), email: s.email(), url: s.url() }), links: s.array(s.object({ text: s.string(), link: s.string(), type: s.enum(['navigation', 'footer', 'copyright']) })), socials: s.array(s.object({ name: s.string(), icon, link: s.string().optional(), image: s.image().optional() })) }) diff --git a/examples/vite/package.json b/examples/vite/package.json index 99e68538..636d52dd 100644 --- a/examples/vite/package.json +++ b/examples/vite/package.json @@ -10,24 +10,24 @@ "preview": "vite preview" }, "dependencies": { - "react": "^19.1.1", - "react-dom": "^19.1.1" + "react": "^19.2.6", + "react-dom": "^19.2.6" }, "devDependencies": { - "@eslint/js": "^9.34.0", - "@types/react": "^19.1.11", - "@types/react-dom": "^19.1.7", + "@eslint/js": "^10.0.1", + "@types/react": "^19.2.14", + "@types/react-dom": "^19.2.3", "@velite/plugin-vite": "workspace:*", - "@vitejs/plugin-react": "^5.0.1", - "eslint": "^9.34.0", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-react-refresh": "^0.4.20", - "globals": "^16.3.0", - "rehype-pretty-code": "^0.14.1", - "shiki": "^3.11.0", - "typescript": "^5.9.2", - "typescript-eslint": "^8.40.0", + "@vitejs/plugin-react": "^6.0.2", + "eslint": "^10.4.0", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.2", + "globals": "^17.6.0", + "rehype-pretty-code": "^0.14.3", + "shiki": "^4.0.2", + "typescript": "^6.0.3", + "typescript-eslint": "^8.59.3", "velite": "workspace:*", - "vite": "^7.1.3" + "vite": "^8.0.13" } } diff --git a/examples/vite/tsconfig.app.json b/examples/vite/tsconfig.app.json index 7e50d0b3..3ad10469 100644 --- a/examples/vite/tsconfig.app.json +++ b/examples/vite/tsconfig.app.json @@ -21,7 +21,6 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true, - "baseUrl": ".", "paths": { "@/*": ["./*"], "#velite": ["./.velite"] diff --git a/examples/vite/velite.config.ts b/examples/vite/velite.config.ts index a89fba3e..e4a56e12 100644 --- a/examples/vite/velite.config.ts +++ b/examples/vite/velite.config.ts @@ -1,7 +1,7 @@ import { exec } from 'node:child_process' import { promisify } from 'node:util' import rehypePrettyCode from 'rehype-pretty-code' -import { defineCollection, defineConfig, s } from 'velite' +import { context, defineCollection, defineConfig, s } from 'velite' const slugify = (input: string) => input @@ -25,12 +25,10 @@ const execAsync = promisify(exec) // refer to https://velite.js.org/guide/last-modified#based-on-git-timestamp for more details const timestamp = () => s - .custom(i => i === undefined || typeof i === 'string') - .transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.timestamp()` schema will resolve the value from `git log -1 --format=%cd`' }) - } - const { stdout } = await execAsync(`git log -1 --format=%cd ${meta.path}`) + .custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { stdout } = await execAsync(`git log -1 --format=%cd ${context().file.path}`) return new Date(stdout || Date.now()).toISOString() }) @@ -43,7 +41,7 @@ const options = defineCollection({ title: s.string().max(99), description: s.string().max(999).optional(), keywords: s.array(s.string()), - author: s.object({ name: s.string(), email: s.string().email(), url: s.string().url() }), + author: s.object({ name: s.string(), email: s.email(), url: s.url() }), links: s.array(s.object({ text: s.string(), link: s.string(), type: s.enum(['navigation', 'footer', 'copyright']) })), socials: s.array(s.object({ name: s.string(), icon, link: s.string().optional(), image: s.image().optional() })) }) diff --git a/package.json b/package.json index 740bbde1..9d838d7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "velite", - "version": "0.3.0", + "version": "1.0.0-alpha.2", "description": "Turns Markdown / MDX, YAML, JSON, or other files into app's data layer with type-safe schema.", "keywords": [ "contentlayer", @@ -40,7 +40,7 @@ ], "format": "esm", "platform": "node", - "target": "node18", + "target": "node20", "banner": { "js": "import {createRequire as __createRequire} from 'module';const require=__createRequire(import.meta.url);" }, @@ -58,17 +58,18 @@ }, "dependencies": { "@mdx-js/mdx": "^3.1.1", - "esbuild": "^0.25.12", + "esbuild": "^0.28.0", "sharp": "^0.34.5", - "terser": "^5.44.1" + "terser": "^5.44.1", + "zod": "^4.4.3" }, "devDependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.7.0", "@types/hast": "^3.0.4", "@types/mdast": "^4.0.4", - "@types/node": "^22.19.1", + "@types/node": "^25.8.0", "@types/picomatch": "^4.0.2", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "fast-glob": "^3.3.3", "hast-util-raw": "^9.1.0", "hast-util-to-string": "^3.0.1", @@ -76,8 +77,8 @@ "mdast-util-from-markdown": "^2.0.2", "mdast-util-to-hast": "^13.2.1", "mdast-util-toc": "^7.1.0", - "picomatch": "^4.0.3", - "prettier": "^3.7.4", + "picomatch": "^4.0.4", + "prettier": "^3.8.3", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.1", "remark-gfm": "^4.0.1", @@ -85,16 +86,16 @@ "remark-rehype": "^11.1.2", "simple-git-hooks": "^2.13.1", "tsup": "^8.5.1", - "tsx": "^4.21.0", - "typescript": "^5.9.3", + "tsx": "^4.22.0", + "typescript": "^6.0.3", "unified": "^11.0.5", "unist-util-visit": "^5.0.0", "vfile": "^6.0.3", "vfile-reporter": "^8.1.1", - "yaml": "^2.8.2" + "yaml": "^2.9.0" }, - "packageManager": "pnpm@10.15.0", + "packageManager": "pnpm@11.1.2", "engines": { - "node": "^18.20.0 || >=20.3.0" + "node": ">=20.19.0" } } diff --git a/packages/next/index.d.ts b/packages/next/index.d.ts new file mode 100644 index 00000000..a40cfc78 --- /dev/null +++ b/packages/next/index.d.ts @@ -0,0 +1,19 @@ +import type { NextConfig } from 'next' +import type { Options as VeliteOptions } from 'velite' + +export type Options = Omit + +type NextConfigFunction = (phase: string, options: { defaultConfig: NextConfig }) => Promise | NextConfig +type NextConfigInput = NextConfig | NextConfigFunction + +/** + * Create a Next.js plugin for integrating Velite + */ +declare const createNextPlugin: (options?: Options) => (nextConfig?: T) => Promise + +/** + * Next.js plugin for integrating Velite + */ +declare const withVelite: ReturnType + +export { createNextPlugin, withVelite, type Options } diff --git a/packages/next/index.js b/packages/next/index.js new file mode 100644 index 00000000..914ca6c2 --- /dev/null +++ b/packages/next/index.js @@ -0,0 +1,50 @@ +/** + * Thanks to `https://github.com/sdorra/content-collections` for Next.js v16+ Velite integration. + */ + +/** + * Create a Next.js plugin for integrating Velite + * @param {Omit} pluginOptions + * @returns {import('next').NextConfig} Next.js plugin + */ +export const createNextPlugin = (pluginOptions = {}) => { + const [command] = process.argv.slice(2).filter(i => !i.startsWith('-')) + + // typegen loads next.config.js + const isTypegen = command === 'typegen' + + // the build step loads next.config.js + const isBuild = command === 'build' + + // starting with v16 next dev doesn't load next.config.js + // next dev - calls next-start in a forked process + // next-start loads next.config.js + // process.argv are not visible by next-start + const isDev = + // to make this compatible with previous versions + // check if command is NOT set (next-start) and we are in development mode + typeof command === 'undefined' && process.env.NODE_ENV === 'development' + + /** + * @param {import('next').NextConfig} nextConfig + * @returns {Promise} + */ + return async (nextConfig = {}) => { + // prevent multiple calls + if (process.env.__VELITE_STARTED) return nextConfig + + // if not dev, build, or typegen, return the next config + if (!isDev && !isBuild && !isTypegen) return nextConfig + + // start velite + process.env.__VELITE_STARTED = '1' + + const { build } = await import('velite') + + await build({ ...pluginOptions, watch: isDev, clean: !isDev }) + + return nextConfig + } +} + +export const withVelite = createNextPlugin() diff --git a/packages/next/package.json b/packages/next/package.json new file mode 100644 index 00000000..4302ba02 --- /dev/null +++ b/packages/next/package.json @@ -0,0 +1,24 @@ +{ + "name": "@velite/plugin-next", + "version": "0.1.0-alpha.1", + "description": "Next.js plugin for integrating Velite", + "type": "module", + "exports": "./index.js", + "types": "./index.d.ts", + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "next-plugin", + "velite", + "content" + ], + "peerDependencies": { + "next": "^16.0.0", + "velite": "workspace:*" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/next/readme.md b/packages/next/readme.md new file mode 100644 index 00000000..0977bfcd --- /dev/null +++ b/packages/next/readme.md @@ -0,0 +1,24 @@ +# @velite/plugin-next + +A Next.js plugin for integrating Velite content processing. + +## Installation + +```bash +npm install -D velite @velite/plugin-next +``` + +## Usage + +```ts +// next.config.ts +import { withVelite } from '@velite/plugin-next' + +export default withVelite({ + // other next config here... +}) +``` + +## License + +[MIT](../../license) © [zce](https://zce.me) diff --git a/packages/vite/package.json b/packages/vite/package.json index cedd0872..0f76a0e1 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "@velite/plugin-vite", - "version": "0.0.1", + "version": "0.1.0-alpha.1", "description": "Vite plugin for integrating Velite", "type": "module", "exports": "./index.js", @@ -15,7 +15,7 @@ "content" ], "peerDependencies": { - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "velite": "workspace:*" }, "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c84e0221..176bb8c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,18 +12,21 @@ importers: specifier: ^3.1.1 version: 3.1.1 esbuild: - specifier: ^0.25.12 - version: 0.25.12 + specifier: ^0.28.0 + version: 0.28.0 sharp: specifier: ^0.34.5 version: 0.34.5 terser: specifier: ^5.44.1 version: 5.44.1 + zod: + specifier: ^4.4.3 + version: 4.4.3 devDependencies: '@ianvs/prettier-plugin-sort-imports': specifier: ^4.7.0 - version: 4.7.0(@vue/compiler-sfc@3.5.13)(prettier@3.7.4) + version: 4.7.0(@vue/compiler-sfc@3.5.13)(prettier@3.8.3) '@types/hast': specifier: ^3.0.4 version: 3.0.4 @@ -31,14 +34,14 @@ importers: specifier: ^4.0.4 version: 4.0.4 '@types/node': - specifier: ^22.19.1 - version: 22.19.1 + specifier: ^25.8.0 + version: 25.8.0 '@types/picomatch': specifier: ^4.0.2 version: 4.0.2 chokidar: - specifier: ^4.0.3 - version: 4.0.3 + specifier: ^5.0.0 + version: 5.0.0 fast-glob: specifier: ^3.3.3 version: 3.3.3 @@ -61,11 +64,11 @@ importers: specifier: ^7.1.0 version: 7.1.0 picomatch: - specifier: ^4.0.3 - version: 4.0.3 + specifier: ^4.0.4 + version: 4.0.4 prettier: - specifier: ^3.7.4 - version: 3.7.4 + specifier: ^3.8.3 + version: 3.8.3 rehype-raw: specifier: ^7.0.0 version: 7.0.0 @@ -86,13 +89,13 @@ importers: version: 2.13.1 tsup: specifier: ^8.5.1 - version: 8.5.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.2) + version: 8.5.1(jiti@2.6.1)(postcss@8.5.14)(tsx@4.22.0)(typescript@6.0.3)(yaml@2.9.0) tsx: - specifier: ^4.21.0 - version: 4.21.0 + specifier: ^4.22.0 + version: 4.22.0 typescript: - specifier: ^5.9.3 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 unified: specifier: ^11.0.5 version: 11.0.5 @@ -106,14 +109,14 @@ importers: specifier: ^8.1.1 version: 8.1.1 yaml: - specifier: ^2.8.2 - version: 2.8.2 + specifier: ^2.9.0 + version: 2.9.0 docs: devDependencies: vitepress: specifier: latest - version: 1.6.4(@algolia/client-search@5.20.0)(@types/node@24.3.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(terser@5.44.1)(typescript@5.9.3) + version: 1.6.4(@algolia/client-search@5.20.0)(@types/node@25.8.0)(lightningcss@1.32.0)(postcss@8.5.14)(search-insights@2.17.3)(terser@5.44.1)(typescript@6.0.3) examples/basic: devDependencies: @@ -124,47 +127,50 @@ importers: examples/nextjs: dependencies: '@tailwindcss/postcss': - specifier: ^4.1.12 - version: 4.1.12 + specifier: ^4.3.0 + version: 4.3.0 '@tailwindcss/typography': - specifier: ^0.5.16 - version: 0.5.16(tailwindcss@4.1.12) + specifier: ^0.5.19 + version: 0.5.19(tailwindcss@4.3.0) '@types/node': - specifier: ^24.3.0 - version: 24.3.0 + specifier: ^25.8.0 + version: 25.8.0 '@types/react': - specifier: 19.2.7 - version: 19.2.7 + specifier: 19.2.14 + version: 19.2.14 '@types/react-dom': specifier: 19.2.3 - version: 19.2.3(@types/react@19.2.7) + version: 19.2.3(@types/react@19.2.14) + '@velite/plugin-next': + specifier: workspace:* + version: link:../../packages/next next: - specifier: 16.0.7 - version: 16.0.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + specifier: 16.2.6 + version: 16.2.6(react-dom@19.2.6(react@19.2.6))(react@19.2.6) next-themes: specifier: ^0.4.6 - version: 0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 0.4.6(react-dom@19.2.6(react@19.2.6))(react@19.2.6) postcss: - specifier: ^8.5.6 - version: 8.5.6 + specifier: ^8.5.14 + version: 8.5.14 react: - specifier: 19.2.1 - version: 19.2.1 + specifier: 19.2.6 + version: 19.2.6 react-dom: - specifier: 19.2.1 - version: 19.2.1(react@19.2.1) + specifier: 19.2.6 + version: 19.2.6(react@19.2.6) rehype-pretty-code: - specifier: ^0.14.1 - version: 0.14.1(shiki@3.11.0) + specifier: ^0.14.3 + version: 0.14.3(shiki@4.0.2) shiki: - specifier: ^3.11.0 - version: 3.11.0 + specifier: ^4.0.2 + version: 4.0.2 tailwindcss: - specifier: ^4.1.12 - version: 4.1.12 + specifier: ^4.3.0 + version: 4.3.0 typescript: - specifier: ^5.9.2 - version: 5.9.2 + specifier: ^6.0.3 + version: 6.0.3 velite: specifier: workspace:* version: link:../.. @@ -172,57 +178,66 @@ importers: examples/vite: dependencies: react: - specifier: ^19.1.1 - version: 19.1.1 + specifier: ^19.2.6 + version: 19.2.6 react-dom: - specifier: ^19.1.1 - version: 19.1.1(react@19.1.1) + specifier: ^19.2.6 + version: 19.2.6(react@19.2.6) devDependencies: '@eslint/js': - specifier: ^9.34.0 - version: 9.34.0 + specifier: ^10.0.1 + version: 10.0.1(eslint@10.4.0(jiti@2.6.1)) '@types/react': - specifier: ^19.1.11 - version: 19.1.11 + specifier: ^19.2.14 + version: 19.2.14 '@types/react-dom': - specifier: ^19.1.7 - version: 19.1.7(@types/react@19.1.11) + specifier: ^19.2.3 + version: 19.2.3(@types/react@19.2.14) '@velite/plugin-vite': specifier: workspace:* version: link:../../packages/vite '@vitejs/plugin-react': - specifier: ^5.0.1 - version: 5.0.1(vite@7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2)) + specifier: ^6.0.2 + version: 6.0.2(vite@8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0)) eslint: - specifier: ^9.34.0 - version: 9.34.0(jiti@2.5.1) + specifier: ^10.4.0 + version: 10.4.0(jiti@2.6.1) eslint-plugin-react-hooks: - specifier: ^5.2.0 - version: 5.2.0(eslint@9.34.0(jiti@2.5.1)) + specifier: ^7.1.1 + version: 7.1.1(eslint@10.4.0(jiti@2.6.1)) eslint-plugin-react-refresh: - specifier: ^0.4.20 - version: 0.4.20(eslint@9.34.0(jiti@2.5.1)) + specifier: ^0.5.2 + version: 0.5.2(eslint@10.4.0(jiti@2.6.1)) globals: - specifier: ^16.3.0 - version: 16.3.0 + specifier: ^17.6.0 + version: 17.6.0 rehype-pretty-code: - specifier: ^0.14.1 - version: 0.14.1(shiki@3.11.0) + specifier: ^0.14.3 + version: 0.14.3(shiki@4.0.2) shiki: - specifier: ^3.11.0 - version: 3.11.0 + specifier: ^4.0.2 + version: 4.0.2 typescript: - specifier: ^5.9.2 - version: 5.9.2 + specifier: ^6.0.3 + version: 6.0.3 typescript-eslint: - specifier: ^8.40.0 - version: 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + specifier: ^8.59.3 + version: 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) velite: specifier: workspace:* version: link:../.. vite: - specifier: ^7.1.3 - version: 7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: ^8.0.13 + version: 8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0) + + packages/next: + dependencies: + next: + specifier: ^16.0.0 + version: 16.0.10(react-dom@19.2.6(react@19.2.6))(react@19.2.6) + velite: + specifier: workspace:* + version: link:../.. packages/vite: dependencies: @@ -230,8 +245,8 @@ importers: specifier: workspace:* version: link:../.. vite: - specifier: ^5.0.0 || ^6.0.0 || ^7.0.0 - version: 7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) + specifier: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + version: 8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0) packages: @@ -311,10 +326,6 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} - '@ampproject/remapping@2.3.0': - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -323,8 +334,8 @@ packages: resolution: {integrity: sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==} engines: {node: '>=6.9.0'} - '@babel/core@7.28.3': - resolution: {integrity: sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==} + '@babel/core@7.28.5': + resolution: {integrity: sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==} engines: {node: '>=6.9.0'} '@babel/generator@7.28.5': @@ -349,10 +360,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-plugin-utils@7.27.1': - resolution: {integrity: sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} @@ -365,8 +372,8 @@ packages: resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.28.3': - resolution: {integrity: sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw==} + '@babel/helpers@7.28.4': + resolution: {integrity: sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==} engines: {node: '>=6.9.0'} '@babel/parser@7.28.5': @@ -374,18 +381,6 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-transform-react-jsx-self@7.27.1': - resolution: {integrity: sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-transform-react-jsx-source@7.27.1': - resolution: {integrity: sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/template@7.27.2': resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==} engines: {node: '>=6.9.0'} @@ -421,23 +416,32 @@ packages: search-insights: optional: true + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + '@emnapi/runtime@1.7.1': resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.12': - resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} + '@esbuild/aix-ppc64@0.27.1': + resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.27.1': - resolution: {integrity: sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==} + '@esbuild/aix-ppc64@0.28.0': + resolution: {integrity: sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -448,14 +452,14 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.12': - resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} + '@esbuild/android-arm64@0.27.1': + resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.27.1': - resolution: {integrity: sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==} + '@esbuild/android-arm64@0.28.0': + resolution: {integrity: sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -466,14 +470,14 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.12': - resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} + '@esbuild/android-arm@0.27.1': + resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-arm@0.27.1': - resolution: {integrity: sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==} + '@esbuild/android-arm@0.28.0': + resolution: {integrity: sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -484,14 +488,14 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.12': - resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} + '@esbuild/android-x64@0.27.1': + resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/android-x64@0.27.1': - resolution: {integrity: sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==} + '@esbuild/android-x64@0.28.0': + resolution: {integrity: sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -502,14 +506,14 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.12': - resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} + '@esbuild/darwin-arm64@0.27.1': + resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.27.1': - resolution: {integrity: sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==} + '@esbuild/darwin-arm64@0.28.0': + resolution: {integrity: sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -520,14 +524,14 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.12': - resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} + '@esbuild/darwin-x64@0.27.1': + resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.27.1': - resolution: {integrity: sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==} + '@esbuild/darwin-x64@0.28.0': + resolution: {integrity: sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -538,14 +542,14 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.12': - resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} + '@esbuild/freebsd-arm64@0.27.1': + resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.27.1': - resolution: {integrity: sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==} + '@esbuild/freebsd-arm64@0.28.0': + resolution: {integrity: sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -556,14 +560,14 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.12': - resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} + '@esbuild/freebsd-x64@0.27.1': + resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.1': - resolution: {integrity: sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==} + '@esbuild/freebsd-x64@0.28.0': + resolution: {integrity: sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -574,14 +578,14 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.12': - resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} + '@esbuild/linux-arm64@0.27.1': + resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.27.1': - resolution: {integrity: sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==} + '@esbuild/linux-arm64@0.28.0': + resolution: {integrity: sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -592,14 +596,14 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.12': - resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} + '@esbuild/linux-arm@0.27.1': + resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.27.1': - resolution: {integrity: sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==} + '@esbuild/linux-arm@0.28.0': + resolution: {integrity: sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -610,14 +614,14 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.12': - resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} + '@esbuild/linux-ia32@0.27.1': + resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.27.1': - resolution: {integrity: sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==} + '@esbuild/linux-ia32@0.28.0': + resolution: {integrity: sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -628,14 +632,14 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.12': - resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} + '@esbuild/linux-loong64@0.27.1': + resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.27.1': - resolution: {integrity: sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==} + '@esbuild/linux-loong64@0.28.0': + resolution: {integrity: sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -646,14 +650,14 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.12': - resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} + '@esbuild/linux-mips64el@0.27.1': + resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.27.1': - resolution: {integrity: sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==} + '@esbuild/linux-mips64el@0.28.0': + resolution: {integrity: sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -664,14 +668,14 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.12': - resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} + '@esbuild/linux-ppc64@0.27.1': + resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.27.1': - resolution: {integrity: sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==} + '@esbuild/linux-ppc64@0.28.0': + resolution: {integrity: sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -682,14 +686,14 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.12': - resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} + '@esbuild/linux-riscv64@0.27.1': + resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.27.1': - resolution: {integrity: sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==} + '@esbuild/linux-riscv64@0.28.0': + resolution: {integrity: sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -700,14 +704,14 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.12': - resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} + '@esbuild/linux-s390x@0.27.1': + resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.27.1': - resolution: {integrity: sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==} + '@esbuild/linux-s390x@0.28.0': + resolution: {integrity: sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -718,26 +722,26 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.12': - resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} + '@esbuild/linux-x64@0.27.1': + resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.27.1': - resolution: {integrity: sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==} + '@esbuild/linux-x64@0.28.0': + resolution: {integrity: sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.12': - resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} + '@esbuild/netbsd-arm64@0.27.1': + resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-arm64@0.27.1': - resolution: {integrity: sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==} + '@esbuild/netbsd-arm64@0.28.0': + resolution: {integrity: sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -748,26 +752,26 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.12': - resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} + '@esbuild/netbsd-x64@0.27.1': + resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.1': - resolution: {integrity: sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==} + '@esbuild/netbsd-x64@0.28.0': + resolution: {integrity: sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.12': - resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} + '@esbuild/openbsd-arm64@0.27.1': + resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-arm64@0.27.1': - resolution: {integrity: sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==} + '@esbuild/openbsd-arm64@0.28.0': + resolution: {integrity: sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -778,26 +782,26 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.12': - resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} + '@esbuild/openbsd-x64@0.27.1': + resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.1': - resolution: {integrity: sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==} + '@esbuild/openbsd-x64@0.28.0': + resolution: {integrity: sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.12': - resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} + '@esbuild/openharmony-arm64@0.27.1': + resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/openharmony-arm64@0.27.1': - resolution: {integrity: sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==} + '@esbuild/openharmony-arm64@0.28.0': + resolution: {integrity: sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] @@ -808,14 +812,14 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.12': - resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} + '@esbuild/sunos-x64@0.27.1': + resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.27.1': - resolution: {integrity: sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==} + '@esbuild/sunos-x64@0.28.0': + resolution: {integrity: sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -826,14 +830,14 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.12': - resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} + '@esbuild/win32-arm64@0.27.1': + resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.27.1': - resolution: {integrity: sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==} + '@esbuild/win32-arm64@0.28.0': + resolution: {integrity: sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -844,14 +848,14 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.12': - resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} + '@esbuild/win32-ia32@0.27.1': + resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.27.1': - resolution: {integrity: sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==} + '@esbuild/win32-ia32@0.28.0': + resolution: {integrity: sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -862,55 +866,62 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.12': - resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} + '@esbuild/win32-x64@0.27.1': + resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.27.1': - resolution: {integrity: sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==} + '@esbuild/win32-x64@0.28.0': + resolution: {integrity: sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.7.0': - resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} + '@eslint-community/eslint-utils@4.9.0': + resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-community/eslint-utils@4.9.1': + resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint/config-array@0.21.0': - resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-helpers@0.3.1': - resolution: {integrity: sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/core@0.15.2': - resolution: {integrity: sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-helpers@0.6.0': + resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/eslintrc@3.3.1': - resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/js@9.34.0': - resolution: {integrity: sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true - '@eslint/object-schema@2.1.6': - resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/plugin-kit@0.3.5': - resolution: {integrity: sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.7.1': + resolution: {integrity: sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} @@ -986,89 +997,105 @@ packages: resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-arm@1.2.4': resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-ppc64@1.2.4': resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-riscv64@1.2.4': resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} cpu: [riscv64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-s390x@1.2.4': resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-x64@1.2.4': resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.2.4': resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-linux-arm64@0.34.5': resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-linux-arm@0.34.5': resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-linux-ppc64@0.34.5': resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ppc64] os: [linux] + libc: [glibc] '@img/sharp-linux-riscv64@0.34.5': resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [riscv64] os: [linux] + libc: [glibc] '@img/sharp-linux-s390x@0.34.5': resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-linux-x64@0.34.5': resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-linuxmusl-arm64@0.34.5': resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-linuxmusl-x64@0.34.5': resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-wasm32@0.34.5': resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} @@ -1093,10 +1120,6 @@ packages: cpu: [x64] os: [win32] - '@isaacs/fs-minipass@4.0.1': - resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} - engines: {node: '>=18.0.0'} - '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} @@ -1122,53 +1145,118 @@ packages: '@mdx-js/mdx@3.1.1': resolution: {integrity: sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==} - '@next/env@16.0.7': - resolution: {integrity: sha512-gpaNgUh5nftFKRkRQGnVi5dpcYSKGcZZkQffZ172OrG/XkrnS7UBTQ648YY+8ME92cC4IojpI2LqTC8sTDhAaw==} + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + + '@next/env@16.0.10': + resolution: {integrity: sha512-8tuaQkyDVgeONQ1MeT9Mkk8pQmZapMKFh5B+OrFUlG3rVmYTXcXlBetBgTurKXGaIZvkoqRT9JL5K3phXcgang==} - '@next/swc-darwin-arm64@16.0.7': - resolution: {integrity: sha512-LlDtCYOEj/rfSnEn/Idi+j1QKHxY9BJFmxx7108A6D8K0SB+bNgfYQATPk/4LqOl4C0Wo3LACg2ie6s7xqMpJg==} + '@next/env@16.2.6': + resolution: {integrity: sha512-gd8HoHN4ufj73WmR3JmVolrpJR47ILK6LouP5xElPglaVxir6e1a7VzvTvDWkOoPXT9rkkTzyCxBu4yeZfZwcw==} + + '@next/swc-darwin-arm64@16.0.10': + resolution: {integrity: sha512-4XgdKtdVsaflErz+B5XeG0T5PeXKDdruDf3CRpnhN+8UebNa5N2H58+3GDgpn/9GBurrQ1uWW768FfscwYkJRg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@next/swc-darwin-arm64@16.2.6': + resolution: {integrity: sha512-ZJGkkcNfYgrrMkqOdZ7zoLa1TOy0qpcMfk/z4Mh/FKUz40gVO+HNQWqmLxf67Z5WB64DRp0dhEbyHfel+6sJUg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@16.0.7': - resolution: {integrity: sha512-rtZ7BhnVvO1ICf3QzfW9H3aPz7GhBrnSIMZyr4Qy6boXF0b5E3QLs+cvJmg3PsTCG2M1PBoC+DANUi4wCOKXpA==} + '@next/swc-darwin-x64@16.0.10': + resolution: {integrity: sha512-spbEObMvRKkQ3CkYVOME+ocPDFo5UqHb8EMTS78/0mQ+O1nqE8toHJVioZo4TvebATxgA8XMTHHrScPrn68OGw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@next/swc-darwin-x64@16.2.6': + resolution: {integrity: sha512-v/YLBHIY132Ced3puBJ7YJKw1lqsCrgcNo2aRJlCEyQrrCeRJlvGlnmxhPxNQI3KE3N1DN5r9TPNPvka3nq5RQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@16.0.7': - resolution: {integrity: sha512-mloD5WcPIeIeeZqAIP5c2kdaTa6StwP4/2EGy1mUw8HiexSHGK/jcM7lFuS3u3i2zn+xH9+wXJs6njO7VrAqww==} + '@next/swc-linux-arm64-gnu@16.0.10': + resolution: {integrity: sha512-uQtWE3X0iGB8apTIskOMi2w/MKONrPOUCi5yLO+v3O8Mb5c7K4Q5KD1jvTpTF5gJKa3VH/ijKjKUq9O9UhwOYw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] - '@next/swc-linux-arm64-musl@16.0.7': - resolution: {integrity: sha512-+ksWNrZrthisXuo9gd1XnjHRowCbMtl/YgMpbRvFeDEqEBd523YHPWpBuDjomod88U8Xliw5DHhekBC3EOOd9g==} + '@next/swc-linux-arm64-gnu@16.2.6': + resolution: {integrity: sha512-RPOvqlYBbcQjkz9VQQDZ2T2bARIjXZV1KFlt+V2Mr6SW/e4I9fcKsaA0hdyf2FHoTlsV2xnBd5Y912rP/1Ce6w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] - '@next/swc-linux-x64-gnu@16.0.7': - resolution: {integrity: sha512-4WtJU5cRDxpEE44Ana2Xro1284hnyVpBb62lIpU5k85D8xXxatT+rXxBgPkc7C1XwkZMWpK5rXLXTh9PFipWsA==} + '@next/swc-linux-arm64-musl@16.0.10': + resolution: {integrity: sha512-llA+hiDTrYvyWI21Z0L1GiXwjQaanPVQQwru5peOgtooeJ8qx3tlqRV2P7uH2pKQaUfHxI/WVarvI5oYgGxaTw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@next/swc-linux-arm64-musl@16.2.6': + resolution: {integrity: sha512-URUTu1+dMkxJsPFgm+OeEvq9wf5sujw0EvgYy80TDGHTSLTnIHeqb0Eu8A3sC95IRgjejQL+kC4mw+4yPxiAXA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@next/swc-linux-x64-gnu@16.0.10': + resolution: {integrity: sha512-AK2q5H0+a9nsXbeZ3FZdMtbtu9jxW4R/NgzZ6+lrTm3d6Zb7jYrWcgjcpM1k8uuqlSy4xIyPR2YiuUr+wXsavA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@next/swc-linux-x64-gnu@16.2.6': + resolution: {integrity: sha512-DOj182mPV8G3UkrayLoREM5YEYI+Dk5wv7Ox9xl1fFibAELEsFD0lDPfHIeILlutMMfdyhlzYPELG3peuKaurw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] - '@next/swc-linux-x64-musl@16.0.7': - resolution: {integrity: sha512-HYlhqIP6kBPXalW2dbMTSuB4+8fe+j9juyxwfMwCe9kQPPeiyFn7NMjNfoFOfJ2eXkeQsoUGXg+O2SE3m4Qg2w==} + '@next/swc-linux-x64-musl@16.0.10': + resolution: {integrity: sha512-1TDG9PDKivNw5550S111gsO4RGennLVl9cipPhtkXIFVwo31YZ73nEbLjNC8qG3SgTz/QZyYyaFYMeY4BKZR/g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] + + '@next/swc-linux-x64-musl@16.2.6': + resolution: {integrity: sha512-HKQ5SP/V/ub73UvF7n/zeJlxk2kLmtL7Wzrg4WfmkjmNos5onJ2tKu7yZOPdL18A6Svfn3max29ym+ry7NkK4g==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@next/swc-win32-arm64-msvc@16.0.10': + resolution: {integrity: sha512-aEZIS4Hh32xdJQbHz121pyuVZniSNoqDVx1yIr2hy+ZwJGipeqnMZBJHyMxv2tiuAXGx6/xpTcQJ6btIiBjgmg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] - '@next/swc-win32-arm64-msvc@16.0.7': - resolution: {integrity: sha512-EviG+43iOoBRZg9deGauXExjRphhuYmIOJ12b9sAPy0eQ6iwcPxfED2asb/s2/yiLYOdm37kPaiZu8uXSYPs0Q==} + '@next/swc-win32-arm64-msvc@16.2.6': + resolution: {integrity: sha512-LZXpTlPyS5v7HhSmnvsLGP3iIYgYOBnc8r8ArlT55sGHV89bR2HlDdBjWQ+PY6SJMmk8TuVGFuxalnP3k/0Dwg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@16.0.7': - resolution: {integrity: sha512-gniPjy55zp5Eg0896qSrf3yB1dw4F/3s8VK1ephdsZZ129j2n6e1WqCbE2YgcKhW9hPB9TVZENugquWJD5x0ug==} + '@next/swc-win32-x64-msvc@16.0.10': + resolution: {integrity: sha512-E+njfCoFLb01RAFEnGZn6ERoOqhK1Gl3Lfz1Kjnj0Ulfu7oJbuMyvBKNj/bw8XZnenHDASlygTjZICQW+rYW1Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@next/swc-win32-x64-msvc@16.2.6': + resolution: {integrity: sha512-F0+4i0h9J6C4eE3EAPWsoCk7UW/dbzOjyzxY0qnDUOYFu6FFmdZ6l97/XdV3/Nz3VYyO7UWjyEJUXkGqcoXfMA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1185,16 +1273,109 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@rolldown/pluginutils@1.0.0-beta.32': - resolution: {integrity: sha512-QReCdvxiUZAPkvp1xpAg62IeNzykOFA6syH2CnClif4YmALN1XKpB39XneL80008UbtMShthSVDKmrx05N1q/g==} + '@oxc-project/types@0.130.0': + resolution: {integrity: sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q==} - '@rollup/rollup-android-arm-eabi@4.41.0': - resolution: {integrity: sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==} - cpu: [arm] + '@rolldown/binding-android-arm64@1.0.1': + resolution: {integrity: sha512-fJI3I0r3C3Oj/zdBCpaCmBRZYf07xpaq4yCfDDoSFm+beWNzbIl26puW8RraUdugoJw/95zerNOn6jasAhzSmg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] os: [android] - '@rollup/rollup-android-arm-eabi@4.48.1': - resolution: {integrity: sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==} + '@rolldown/binding-darwin-arm64@1.0.1': + resolution: {integrity: sha512-cKnAhWEsV7TPcA/5EAteDp6KcJZBQ2G+BqE7zayMMi7kMvwRsbv7WT9aOnn0WNl4SKEIf43vjS31iUPu80nzXg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.1': + resolution: {integrity: sha512-YKrVwQjIRBPo+5G/u03wGjbdy4q7pyzCe93DK9VJ7zkVmeg8LJ7GbgsiHWdR4xSoe4CAXRD7Bcjgbtr64bkXNg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.1': + resolution: {integrity: sha512-z/oBsREo46SsFqBwYtFe0kpJeBijAT48O/WXLI4suiCLBkr03RTtTJMCzSdDd2znlh8VJizL09XVkQgk8IZonw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.1': + resolution: {integrity: sha512-ik8q7GM11zxvYxFc2PeDcT6TBvhCQMaUxfph/M5l9sKuTs/Sjg3L+Byw0F7w0ZVLBZmx30P+gG0ECzzN+MFcmQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.1': + resolution: {integrity: sha512-QoSx2EkyrrdZ6kcyE8stqZ62t0Yra8Fs5ia9lOxJrh6TMQJK7gQKmscdTHf7pOXKREKrVwOtJcQG3qVSfc866A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.0.1': + resolution: {integrity: sha512-uwNwFpwKeNiZawfAWBgg0VIztPTV3ihhh1vV334h9ivnNLorxnQMU6Fz8wG1Zb4Qh9LC1/MkcyT3YlDXG3Rsgg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.0.1': + resolution: {integrity: sha512-zY1bul7OWr7DFBiJ++wofXvnr8B45ce3QsQUhKrIhXsygAh7bTkwyeM1bi1a2g5C/yC/N8TZyGDEoMfm/l9mpg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.0.1': + resolution: {integrity: sha512-0frlsT/f4Ft6I7SMESTKnF3cZsdicQn1dCMkF/jT9wDLE+gGoiQfv1nmT9e+s7s/fekvvy6tZM2jHvI2tkbJDQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.0.1': + resolution: {integrity: sha512-XABVmGp9Tg0WspTVvwduTc4fpqy6JnAUrSQe6OuyqD/03nI7r0O9OWUkMIwFrjKAIqolvqoA4ZrJppgwE0Gxmw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.0.1': + resolution: {integrity: sha512-bV4fzswuzVcKD90o/VM6QqKxnxlDq0g2BISDLNVmxrnhpv1DDbyPhCIjYfvzYLV+MvkKKnQt2Q6AO86SEBULUQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.0.1': + resolution: {integrity: sha512-/Mh0Zhq3OP7fVs0kcQHZP6lZEthMGTaSf8UBQYSFEZDWGXXlEC+nJ6EqenaK2t4LBXMe3A+K/G2BVXXdtOr4PQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.1': + resolution: {integrity: sha512-+1xc9X45l8ufsBAm6Gjvx2qDRIY9lTVt0cgWNcJ+1gdhXvkbxePA60yRTwSTuXL09CMhyJmjpV7E3NoyxbqFQQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.1': + resolution: {integrity: sha512-1D+UqZdfnuR+Jy1GgMJwi85bD40H21uNmOPRWQhw4oRSuolZ/B5rixZ45DK2KXOTCvmVCecauWgEhbw8bI7tOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.1': + resolution: {integrity: sha512-INAycaWuhlOK3wk4mRHGsdgwYWmd9cChdPdE9bwWmy6rn9VqVNYNFGhOdXrofXUxwHIncSiPNb8tNm8knDVIeQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@rollup/rollup-android-arm-eabi@4.41.0': + resolution: {integrity: sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==} cpu: [arm] os: [android] @@ -1208,11 +1389,6 @@ packages: cpu: [arm64] os: [android] - '@rollup/rollup-android-arm64@4.48.1': - resolution: {integrity: sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==} - cpu: [arm64] - os: [android] - '@rollup/rollup-android-arm64@4.53.3': resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==} cpu: [arm64] @@ -1223,11 +1399,6 @@ packages: cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.48.1': - resolution: {integrity: sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==} - cpu: [arm64] - os: [darwin] - '@rollup/rollup-darwin-arm64@4.53.3': resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==} cpu: [arm64] @@ -1238,11 +1409,6 @@ packages: cpu: [x64] os: [darwin] - '@rollup/rollup-darwin-x64@4.48.1': - resolution: {integrity: sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==} - cpu: [x64] - os: [darwin] - '@rollup/rollup-darwin-x64@4.53.3': resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==} cpu: [x64] @@ -1253,11 +1419,6 @@ packages: cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.48.1': - resolution: {integrity: sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==} - cpu: [arm64] - os: [freebsd] - '@rollup/rollup-freebsd-arm64@4.53.3': resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==} cpu: [arm64] @@ -1268,11 +1429,6 @@ packages: cpu: [x64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.48.1': - resolution: {integrity: sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==} - cpu: [x64] - os: [freebsd] - '@rollup/rollup-freebsd-x64@4.53.3': resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==} cpu: [x64] @@ -1282,166 +1438,133 @@ packages: resolution: {integrity: sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==} cpu: [arm] os: [linux] - - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': - resolution: {integrity: sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==} - cpu: [arm] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-gnueabihf@4.53.3': resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.41.0': resolution: {integrity: sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==} cpu: [arm] os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.48.1': - resolution: {integrity: sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==} - cpu: [arm] - os: [linux] + libc: [musl] '@rollup/rollup-linux-arm-musleabihf@4.53.3': resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.41.0': resolution: {integrity: sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==} cpu: [arm64] os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.48.1': - resolution: {integrity: sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==} - cpu: [arm64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-gnu@4.53.3': resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.41.0': resolution: {integrity: sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==} cpu: [arm64] os: [linux] - - '@rollup/rollup-linux-arm64-musl@4.48.1': - resolution: {integrity: sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==} - cpu: [arm64] - os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-musl@4.53.3': resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.53.3': resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loongarch64-gnu@4.41.0': resolution: {integrity: sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==} cpu: [loong64] os: [linux] - - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': - resolution: {integrity: sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==} - cpu: [loong64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.41.0': resolution: {integrity: sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==} cpu: [ppc64] os: [linux] - - '@rollup/rollup-linux-ppc64-gnu@4.48.1': - resolution: {integrity: sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==} - cpu: [ppc64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.53.3': resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.41.0': resolution: {integrity: sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==} cpu: [riscv64] os: [linux] - - '@rollup/rollup-linux-riscv64-gnu@4.48.1': - resolution: {integrity: sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==} - cpu: [riscv64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.53.3': resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.41.0': resolution: {integrity: sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==} cpu: [riscv64] os: [linux] - - '@rollup/rollup-linux-riscv64-musl@4.48.1': - resolution: {integrity: sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==} - cpu: [riscv64] - os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-musl@4.53.3': resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.41.0': resolution: {integrity: sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==} cpu: [s390x] os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.48.1': - resolution: {integrity: sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==} - cpu: [s390x] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.53.3': resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.41.0': resolution: {integrity: sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==} cpu: [x64] os: [linux] - - '@rollup/rollup-linux-x64-gnu@4.48.1': - resolution: {integrity: sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==} - cpu: [x64] - os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.53.3': resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.41.0': resolution: {integrity: sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==} cpu: [x64] os: [linux] - - '@rollup/rollup-linux-x64-musl@4.48.1': - resolution: {integrity: sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==} - cpu: [x64] - os: [linux] + libc: [musl] '@rollup/rollup-linux-x64-musl@4.53.3': resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openharmony-arm64@4.53.3': resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==} @@ -1453,11 +1576,6 @@ packages: cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.48.1': - resolution: {integrity: sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==} - cpu: [arm64] - os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.53.3': resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==} cpu: [arm64] @@ -1468,11 +1586,6 @@ packages: cpu: [ia32] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.48.1': - resolution: {integrity: sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==} - cpu: [ia32] - os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.53.3': resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==} cpu: [ia32] @@ -1488,11 +1601,6 @@ packages: cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.48.1': - resolution: {integrity: sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==} - cpu: [x64] - os: [win32] - '@rollup/rollup-win32-x64-msvc@4.53.3': resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==} cpu: [x64] @@ -1504,8 +1612,9 @@ packages: '@shikijs/core@2.5.0': resolution: {integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==} - '@shikijs/core@3.11.0': - resolution: {integrity: sha512-oJwU+DxGqp6lUZpvtQgVOXNZcVsirN76tihOLBmwILkKuRuwHteApP8oTXmL4tF5vS5FbOY0+8seXmiCoslk4g==} + '@shikijs/core@4.0.2': + resolution: {integrity: sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==} + engines: {node: '>=20'} '@shikijs/engine-javascript@2.1.0': resolution: {integrity: sha512-cgIUdAliOsoaa0rJz/z+jvhrpRd+fVAoixVFEVxUq5FA+tHgBZAIfVJSgJNVRj2hs/wZ1+4hMe82eKAThVh0nQ==} @@ -1513,8 +1622,9 @@ packages: '@shikijs/engine-javascript@2.5.0': resolution: {integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w==} - '@shikijs/engine-javascript@3.11.0': - resolution: {integrity: sha512-6/ov6pxrSvew13k9ztIOnSBOytXeKs5kfIR7vbhdtVRg+KPzvp2HctYGeWkqv7V6YIoLicnig/QF3iajqyElZA==} + '@shikijs/engine-javascript@4.0.2': + resolution: {integrity: sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag==} + engines: {node: '>=20'} '@shikijs/engine-oniguruma@2.1.0': resolution: {integrity: sha512-Ujik33wEDqgqY2WpjRDUBECGcKPv3eGGkoXPujIXvokLaRmGky8NisSk8lHUGeSFxo/Cz5sgFej9sJmA9yeepg==} @@ -1522,20 +1632,27 @@ packages: '@shikijs/engine-oniguruma@2.5.0': resolution: {integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw==} - '@shikijs/engine-oniguruma@3.11.0': - resolution: {integrity: sha512-4DwIjIgETK04VneKbfOE4WNm4Q7WC1wo95wv82PoHKdqX4/9qLRUwrfKlmhf0gAuvT6GHy0uc7t9cailk6Tbhw==} + '@shikijs/engine-oniguruma@4.0.2': + resolution: {integrity: sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg==} + engines: {node: '>=20'} '@shikijs/langs@2.5.0': resolution: {integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w==} - '@shikijs/langs@3.11.0': - resolution: {integrity: sha512-Njg/nFL4HDcf/ObxcK2VeyidIq61EeLmocrwTHGGpOQx0BzrPWM1j55XtKQ1LvvDWH15cjQy7rg96aJ1/l63uw==} + '@shikijs/langs@4.0.2': + resolution: {integrity: sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==} + engines: {node: '>=20'} + + '@shikijs/primitive@4.0.2': + resolution: {integrity: sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==} + engines: {node: '>=20'} '@shikijs/themes@2.5.0': resolution: {integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw==} - '@shikijs/themes@3.11.0': - resolution: {integrity: sha512-BhhWRzCTEk2CtWt4S4bgsOqPJRkapvxdsifAwqP+6mk5uxboAQchc0etiJ0iIasxnMsb764qGD24DK9albcU9Q==} + '@shikijs/themes@4.0.2': + resolution: {integrity: sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==} + engines: {node: '>=20'} '@shikijs/transformers@2.1.0': resolution: {integrity: sha512-3sfvh6OKUVkT5wZFU1xxiq1qqNIuCwUY3yOb9ZGm19y80UZ/eoroLE2orGNzfivyTxR93GfXXZC/ghPR0/SBow==} @@ -1546,8 +1663,9 @@ packages: '@shikijs/types@2.5.0': resolution: {integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw==} - '@shikijs/types@3.11.0': - resolution: {integrity: sha512-RB7IMo2E7NZHyfkqAuaf4CofyY8bPzjWPjJRzn6SEak3b46fIQyG6Vx5fG/obqkfppQ+g8vEsiD7Uc6lqQt32Q==} + '@shikijs/types@4.0.2': + resolution: {integrity: sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==} + engines: {node: '>=20'} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} @@ -1555,65 +1673,69 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} - '@tailwindcss/node@4.1.12': - resolution: {integrity: sha512-3hm9brwvQkZFe++SBt+oLjo4OLDtkvlE8q2WalaD/7QWaeM7KEJbAiY/LJZUaCs7Xa8aUu4xy3uoyX4q54UVdQ==} + '@tailwindcss/node@4.3.0': + resolution: {integrity: sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g==} - '@tailwindcss/oxide-android-arm64@4.1.12': - resolution: {integrity: sha512-oNY5pq+1gc4T6QVTsZKwZaGpBb2N1H1fsc1GD4o7yinFySqIuRZ2E4NvGasWc6PhYJwGK2+5YT1f9Tp80zUQZQ==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-android-arm64@4.3.0': + resolution: {integrity: sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng==} + engines: {node: '>= 20'} cpu: [arm64] os: [android] - '@tailwindcss/oxide-darwin-arm64@4.1.12': - resolution: {integrity: sha512-cq1qmq2HEtDV9HvZlTtrj671mCdGB93bVY6J29mwCyaMYCP/JaUBXxrQQQm7Qn33AXXASPUb2HFZlWiiHWFytw==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-darwin-arm64@4.3.0': + resolution: {integrity: sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ==} + engines: {node: '>= 20'} cpu: [arm64] os: [darwin] - '@tailwindcss/oxide-darwin-x64@4.1.12': - resolution: {integrity: sha512-6UCsIeFUcBfpangqlXay9Ffty9XhFH1QuUFn0WV83W8lGdX8cD5/+2ONLluALJD5+yJ7k8mVtwy3zMZmzEfbLg==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-darwin-x64@4.3.0': + resolution: {integrity: sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA==} + engines: {node: '>= 20'} cpu: [x64] os: [darwin] - '@tailwindcss/oxide-freebsd-x64@4.1.12': - resolution: {integrity: sha512-JOH/f7j6+nYXIrHobRYCtoArJdMJh5zy5lr0FV0Qu47MID/vqJAY3r/OElPzx1C/wdT1uS7cPq+xdYYelny1ww==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-freebsd-x64@4.3.0': + resolution: {integrity: sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ==} + engines: {node: '>= 20'} cpu: [x64] os: [freebsd] - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.12': - resolution: {integrity: sha512-v4Ghvi9AU1SYgGr3/j38PD8PEe6bRfTnNSUE3YCMIRrrNigCFtHZ2TCm8142X8fcSqHBZBceDx+JlFJEfNg5zQ==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': + resolution: {integrity: sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA==} + engines: {node: '>= 20'} cpu: [arm] os: [linux] - '@tailwindcss/oxide-linux-arm64-gnu@4.1.12': - resolution: {integrity: sha512-YP5s1LmetL9UsvVAKusHSyPlzSRqYyRB0f+Kl/xcYQSPLEw/BvGfxzbH+ihUciePDjiXwHh+p+qbSP3SlJw+6g==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': + resolution: {integrity: sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg==} + engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [glibc] - '@tailwindcss/oxide-linux-arm64-musl@4.1.12': - resolution: {integrity: sha512-V8pAM3s8gsrXcCv6kCHSuwyb/gPsd863iT+v1PGXC4fSL/OJqsKhfK//v8P+w9ThKIoqNbEnsZqNy+WDnwQqCA==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': + resolution: {integrity: sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==} + engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [musl] - '@tailwindcss/oxide-linux-x64-gnu@4.1.12': - resolution: {integrity: sha512-xYfqYLjvm2UQ3TZggTGrwxjYaLB62b1Wiysw/YE3Yqbh86sOMoTn0feF98PonP7LtjsWOWcXEbGqDL7zv0uW8Q==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': + resolution: {integrity: sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==} + engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [glibc] - '@tailwindcss/oxide-linux-x64-musl@4.1.12': - resolution: {integrity: sha512-ha0pHPamN+fWZY7GCzz5rKunlv9L5R8kdh+YNvP5awe3LtuXb5nRi/H27GeL2U+TdhDOptU7T6Is7mdwh5Ar3A==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-linux-x64-musl@4.3.0': + resolution: {integrity: sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==} + engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [musl] - '@tailwindcss/oxide-wasm32-wasi@4.1.12': - resolution: {integrity: sha512-4tSyu3dW+ktzdEpuk6g49KdEangu3eCYoqPhWNsZgUhyegEda3M9rG0/j1GV/JjVVsj+lG7jWAyrTlLzd/WEBg==} + '@tailwindcss/oxide-wasm32-wasi@4.3.0': + resolution: {integrity: sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==} engines: {node: '>=14.0.0'} cpu: [wasm32] bundledDependencies: @@ -1624,45 +1746,39 @@ packages: - '@emnapi/wasi-threads' - tslib - '@tailwindcss/oxide-win32-arm64-msvc@4.1.12': - resolution: {integrity: sha512-iGLyD/cVP724+FGtMWslhcFyg4xyYyM+5F4hGvKA7eifPkXHRAUDFaimu53fpNg9X8dfP75pXx/zFt/jlNF+lg==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': + resolution: {integrity: sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ==} + engines: {node: '>= 20'} cpu: [arm64] os: [win32] - '@tailwindcss/oxide-win32-x64-msvc@4.1.12': - resolution: {integrity: sha512-NKIh5rzw6CpEodv/++r0hGLlfgT/gFN+5WNdZtvh6wpU2BpGNgdjvj6H2oFc8nCM839QM1YOhjpgbAONUb4IxA==} - engines: {node: '>= 10'} + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': + resolution: {integrity: sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA==} + engines: {node: '>= 20'} cpu: [x64] os: [win32] - '@tailwindcss/oxide@4.1.12': - resolution: {integrity: sha512-gM5EoKHW/ukmlEtphNwaGx45fGoEmP10v51t9unv55voWh6WrOL19hfuIdo2FjxIaZzw776/BUQg7Pck++cIVw==} - engines: {node: '>= 10'} + '@tailwindcss/oxide@4.3.0': + resolution: {integrity: sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg==} + engines: {node: '>= 20'} - '@tailwindcss/postcss@4.1.12': - resolution: {integrity: sha512-5PpLYhCAwf9SJEeIsSmCDLgyVfdBhdBpzX1OJ87anT9IVR0Z9pjM0FNixCAUAHGnMBGB8K99SwAheXrT0Kh6QQ==} + '@tailwindcss/postcss@4.3.0': + resolution: {integrity: sha512-Jm05Tjx+9yCLGv5qw1c+84Psds8MnyrEQYCB+FFk2lgGiUjlRqdxke4mVTuYrj2xnVZqKim2Apr5ySuQRYAw/w==} - '@tailwindcss/typography@0.5.16': - resolution: {integrity: sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==} + '@tailwindcss/typography@0.5.19': + resolution: {integrity: sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==} peerDependencies: tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1' - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.27.0': - resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} - - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - - '@types/babel__traverse@7.20.7': - resolution: {integrity: sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==} + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} @@ -1696,30 +1812,19 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@22.19.1': - resolution: {integrity: sha512-LCCV0HdSZZZb34qifBsyWlUmok6W7ouER+oQIGBScS8EsZsQbrtFTUrDX4hOl+CS6p7cnNC4td+qrSVGSCTUfQ==} - - '@types/node@24.3.0': - resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==} + '@types/node@25.8.0': + resolution: {integrity: sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==} '@types/picomatch@4.0.2': resolution: {integrity: sha512-qHHxQ+P9PysNEGbALT8f8YOSHW0KJu6l2xU8DYY0fu/EmGxXdVnuTLvFUvBgPJMSqXq29SYHveejeAha+4AYgA==} - '@types/react-dom@19.1.7': - resolution: {integrity: sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw==} - peerDependencies: - '@types/react': ^19.0.0 - '@types/react-dom@19.2.3': resolution: {integrity: sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==} peerDependencies: '@types/react': ^19.2.0 - '@types/react@19.1.11': - resolution: {integrity: sha512-lr3jdBw/BGj49Eps7EvqlUaoeA0xpj3pc0RoJkHpYaCHkVK7i28dKyImLQb3JVlqs3aYSXf7qYuWOW/fgZnTXQ==} - - '@types/react@19.2.7': - resolution: {integrity: sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg==} + '@types/react@19.2.14': + resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==} '@types/supports-color@8.1.3': resolution: {integrity: sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==} @@ -1736,73 +1841,81 @@ packages: '@types/web-bluetooth@0.0.20': resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} - '@typescript-eslint/eslint-plugin@8.40.0': - resolution: {integrity: sha512-w/EboPlBwnmOBtRbiOvzjD+wdiZdgFeo17lkltrtn7X37vagKKWJABvyfsJXTlHe6XBzugmYgd4A4nW+k8Mixw==} + '@typescript-eslint/eslint-plugin@8.59.3': + resolution: {integrity: sha512-PwFvSKsXGShKGW6n5bZOhGHEcCZXM8HofLK9fNsEwZXzFRjoY+XT1Vsf1zgyXdwTr0ZYz1/2tkZ0DBTT9jZjhw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.40.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/parser': ^8.59.3 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/parser@8.40.0': - resolution: {integrity: sha512-jCNyAuXx8dr5KJMkecGmZ8KI61KBUhkCob+SD+C+I5+Y1FWI2Y3QmY4/cxMCC5WAsZqoEtEETVhUiUMIGCf6Bw==} + '@typescript-eslint/parser@8.59.3': + resolution: {integrity: sha512-HPwA+hVkfcriajbNvTmZv4VRauibay+cWArYUYq7u7W7PmGShMxbPxLvrwDme55a6d5alG3nrYfhyJ/G28XlLg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.40.0': - resolution: {integrity: sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw==} + '@typescript-eslint/project-service@8.59.3': + resolution: {integrity: sha512-ECiUWa/KYRGDFUqTNehaRgzDshnJfkTABJxVemHk4ko22gcr0ukloKjWvyQ64g8YCV/UI47kN1dbmjf/GaQYng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <6.0.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.40.0': - resolution: {integrity: sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w==} + '@typescript-eslint/scope-manager@8.59.3': + resolution: {integrity: sha512-t2LvZnoEfzKtnPjgeEu41xw5gxq9mQVfYy4OoZ4Vlt0sk3JwxmhCca/AR7DwOiHrjWgjAj6as4AhRLKSDfvZIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.40.0': - resolution: {integrity: sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw==} + '@typescript-eslint/tsconfig-utils@8.59.3': + resolution: {integrity: sha512-PcIJHjmaREXLgIAIzLnSY9VucEzz8FKXsRgFa1DmdGCK/5tJpW03TKJF01Q6VZd1lLdz2sIKPWaDUZN9dp//dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <6.0.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.40.0': - resolution: {integrity: sha512-eE60cK4KzAc6ZrzlJnflXdrMqOBaugeukWICO2rB0KNvwdIMaEaYiywwHMzA1qFpTxrLhN9Lp4E/00EgWcD3Ow==} + '@typescript-eslint/type-utils@8.59.3': + resolution: {integrity: sha512-g71d8QD8UaiHGvrJwyIS1hCX5r63w6Jll+4VEYhEAHXTDIqX1JgxhTAbEHtKntL9kuc4jRo7/GWw5xfCepSccQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.40.0': - resolution: {integrity: sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg==} + '@typescript-eslint/types@8.59.3': + resolution: {integrity: sha512-ePFoH0g4ludssdRFqqDxQePCxU4WQyRa9+XVwjm7yLn0FKhMeoetC+qBEEI1Eyb1pGSDveTIT09Bvw2WhlGayg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.40.0': - resolution: {integrity: sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ==} + '@typescript-eslint/typescript-estree@8.59.3': + resolution: {integrity: sha512-CbRjVRAf7Lr9Kr8RopKcbY45p2VfmmHrm0ygOCYFi7oU8q19m0Fs/6iHS7kNOmwpp+ob07ZVcAqlxUod9lYdmg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <6.0.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.40.0': - resolution: {integrity: sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg==} + '@typescript-eslint/utils@8.59.3': + resolution: {integrity: sha512-JAvT14goBzRzzzZyqq3P9BLArIxTtQURUtFgQ/V7FO+eU+Gg6ES+5ymOPP1wRxXcxAYeivCk4uS3jCKWI1K8Zg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.40.0': - resolution: {integrity: sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA==} + '@typescript-eslint/visitor-keys@8.59.3': + resolution: {integrity: sha512-f1UQF7ggd42YiwI5wGrRaPsa+P0CINBlrkLPmGfpq/u/I/oVtecoEIfFR9ag/oa1sLOsRNZ6xehf6qMZhQGBDg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} + deprecated: Potential CWE-502 - Update to 1.3.1 or higher - '@vitejs/plugin-react@5.0.1': - resolution: {integrity: sha512-DE4UNaBXwtVoDJ0ccBdLVjFTWL70NRuWNCxEieTI3lrq9ORB9aOCQEKstwDXBl87NvFdbqh/p7eINGyj0BthJA==} + '@vitejs/plugin-react@6.0.2': + resolution: {integrity: sha512-DlSMqo4WhThw4vB8Mpn0Woe9J+Jfq1geJ61AKW0QEgLzGMNwtIMdxbDUzLxcun8W7NbJO0e2Jg/Nxm3cCSVzzg==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: - vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 + babel-plugin-react-compiler: ^1.0.0 + vite: ^8.0.0 + peerDependenciesMeta: + '@rolldown/plugin-babel': + optional: true + babel-plugin-react-compiler: + optional: true '@vitejs/plugin-vue@5.2.1': resolution: {integrity: sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==} @@ -1909,8 +2022,13 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} algoliasearch@5.20.0: resolution: {integrity: sha512-groO71Fvi5SWpxjI9Ia+chy0QBwT61mg6yxJV27f5YFf+Mw+STT75K6SHySpP8Co5LsCrtsbCH5dJZSRtkSKaQ==} @@ -1924,10 +2042,6 @@ packages: resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - ansi-styles@6.2.3: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} @@ -1935,9 +2049,6 @@ packages: any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - astring@1.9.0: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true @@ -1945,17 +2056,21 @@ packages: bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + baseline-browser-mapping@2.10.29: + resolution: {integrity: sha512-Asa2krT+XTPZINCS+2QcyS8WTkObE77RwkydwF7h6DmnKqbvlalz93m/dnphUyCa6SWSP51VgtEUf2FN+gelFQ==} + engines: {node: '>=6.0.0'} + hasBin: true birpc@0.2.19: resolution: {integrity: sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==} - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + brace-expansion@5.0.6: + resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} + engines: {node: 18 || 20 || >=22} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -1979,20 +2094,12 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - caniuse-lite@1.0.30001718: resolution: {integrity: sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -2009,9 +2116,9 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - chownr@3.0.0: - resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} - engines: {node: '>=18'} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} cli-cursor@5.0.0: resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} @@ -2027,13 +2134,6 @@ packages: collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -2051,9 +2151,6 @@ packages: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confbox@0.1.8: resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} @@ -2077,21 +2174,9 @@ packages: engines: {node: '>=4'} hasBin: true - csstype@3.1.3: - resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} - debug@4.4.1: - resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -2130,8 +2215,8 @@ packages: emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} - enhanced-resolve@5.18.3: - resolution: {integrity: sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==} + enhanced-resolve@5.21.3: + resolution: {integrity: sha512-QyL119InA+XXEkNLNTPCXPugSvOfhwv0JOlGNzvxs0hZaiHLNvXSpudUWsOlsXGWJh8G6ckCScEkVHfX3kw/2Q==} engines: {node: '>=10.13.0'} entities@4.5.0: @@ -2157,13 +2242,13 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.12: - resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} + esbuild@0.27.1: + resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==} engines: {node: '>=18'} hasBin: true - esbuild@0.27.1: - resolution: {integrity: sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==} + esbuild@0.28.0: + resolution: {integrity: sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==} engines: {node: '>=18'} hasBin: true @@ -2179,32 +2264,32 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - eslint-plugin-react-hooks@5.2.0: - resolution: {integrity: sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==} - engines: {node: '>=10'} + eslint-plugin-react-hooks@7.1.1: + resolution: {integrity: sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==} + engines: {node: '>=18'} peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0 - eslint-plugin-react-refresh@0.4.20: - resolution: {integrity: sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==} + eslint-plugin-react-refresh@0.5.2: + resolution: {integrity: sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==} peerDependencies: - eslint: '>=8.40' + eslint: ^9 || ^10 - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - eslint@9.34.0: - resolution: {integrity: sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@10.4.0: + resolution: {integrity: sha512-loXy6bWOoP3EP6JA7jo6p5jMpBJmHmsNZM5SFRHLdh1MGOPurMnNBj4ZlAbaqUAaQWbCr7jHV4P7gzAyryZWkQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: jiti: '*' @@ -2212,12 +2297,12 @@ packages: jiti: optional: true - espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -2325,9 +2410,6 @@ packages: resolution: {integrity: sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==} engines: {node: '>=18'} - get-tsconfig@4.13.0: - resolution: {integrity: sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==} - github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} @@ -2339,24 +2421,13 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - - globals@16.3.0: - resolution: {integrity: sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==} + globals@17.6.0: + resolution: {integrity: sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==} engines: {node: '>=18'} graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - hast-util-from-html@2.0.3: resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} @@ -2390,6 +2461,12 @@ packages: hastscript@9.0.1: resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} + hermes-estree@0.25.1: + resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==} + + hermes-parser@0.25.1: + resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} @@ -2400,14 +2477,10 @@ packages: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - ignore@7.0.4: - resolution: {integrity: sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==} + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -2454,8 +2527,8 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - jiti@2.5.1: - resolution: {integrity: sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==} + jiti@2.6.1: + resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true joycon@3.1.1: @@ -2465,10 +2538,6 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - jsesc@3.1.0: resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} engines: {node: '>=6'} @@ -2495,68 +2564,78 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - lightningcss-darwin-arm64@1.30.1: - resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==} + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-x64@1.30.1: - resolution: {integrity: sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==} + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-freebsd-x64@1.30.1: - resolution: {integrity: sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==} + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] - lightningcss-linux-arm-gnueabihf@1.30.1: - resolution: {integrity: sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==} + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm64-gnu@1.30.1: - resolution: {integrity: sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==} + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] - lightningcss-linux-arm64-musl@1.30.1: - resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==} + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] - lightningcss-linux-x64-gnu@1.30.1: - resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==} + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] - lightningcss-linux-x64-musl@1.30.1: - resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==} + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] - lightningcss-win32-arm64-msvc@1.30.1: - resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==} + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] - lightningcss-win32-x64-msvc@1.30.1: - resolution: {integrity: sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==} + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss@1.30.1: - resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==} + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} lilconfig@3.1.3: @@ -2583,15 +2662,6 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.castarray@4.4.0: - resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==} - - lodash.isplainobject@4.0.6: - resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - log-update@6.1.0: resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} @@ -2786,32 +2856,16 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} minisearch@7.1.1: resolution: {integrity: sha512-b3YZEYCEH4EdCAtYP7OlDyx7FdPwNzuNwLQ34SfJpM9dlbBZzeXndGavTrC+VCiRWomL21SWfMc6SCKO/U2ZNw==} - minizlib@3.0.2: - resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} - engines: {node: '>= 18'} - mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} - mkdirp@3.0.1: - resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} - engines: {node: '>=10'} - hasBin: true - mlly@1.8.0: resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} @@ -2839,8 +2893,29 @@ packages: react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc - next@16.0.7: - resolution: {integrity: sha512-3mBRJyPxT4LOxAJI6IsXeFtKfiJUbjCLgvXO02fV8Wy/lIhPvP94Fe7dGhUgHXcQy4sSuYwQNcOLhIfOm0rL0A==} + next@16.0.10: + resolution: {integrity: sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA==} + engines: {node: '>=20.9.0'} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.51.1 + babel-plugin-react-compiler: '*' + react: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + react-dom: ^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + babel-plugin-react-compiler: + optional: true + sass: + optional: true + + next@16.2.6: + resolution: {integrity: sha512-qOVgKJg1+At15NpeUP+eJgCHvTCgXsogweq87Ri/Ix7PkqQHg4sdaXmSFqKlgaIXE4kW0g25LE68W87UANlHtw==} engines: {node: '>=20.9.0'} hasBin: true peerDependencies: @@ -2880,8 +2955,8 @@ packages: oniguruma-to-es@3.1.1: resolution: {integrity: sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ==} - oniguruma-to-es@4.3.3: - resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==} + oniguruma-to-es@4.3.4: + resolution: {integrity: sha512-3VhUGN3w2eYxnTzHn+ikMI+fp/96KoRSVK9/kMTcFqj1NRDh2IhQCKvYxDnWePKRXY/AqH+Fuiyb7VHSzBjHfA==} optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} @@ -2895,10 +2970,6 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - parse-entities@4.0.2: resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} @@ -2933,6 +3004,10 @@ packages: resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} engines: {node: '>=12'} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -2971,6 +3046,10 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.14: + resolution: {integrity: sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==} + engines: {node: ^10 || ^12 || >=14} + postcss@8.5.6: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} @@ -2982,8 +3061,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.7.4: - resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + prettier@3.8.3: + resolution: {integrity: sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==} engines: {node: '>=14'} hasBin: true @@ -2997,32 +3076,23 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - react-dom@19.1.1: - resolution: {integrity: sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw==} + react-dom@19.2.6: + resolution: {integrity: sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==} peerDependencies: - react: ^19.1.1 + react: ^19.2.6 - react-dom@19.2.1: - resolution: {integrity: sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==} - peerDependencies: - react: ^19.2.1 - - react-refresh@0.17.0: - resolution: {integrity: sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==} - engines: {node: '>=0.10.0'} - - react@19.1.1: - resolution: {integrity: sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ==} - engines: {node: '>=0.10.0'} - - react@19.2.1: - resolution: {integrity: sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==} + react@19.2.6: + resolution: {integrity: sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==} engines: {node: '>=0.10.0'} readdirp@4.1.2: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} + recma-build-jsx@1.0.0: resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} @@ -3055,11 +3125,11 @@ packages: rehype-parse@9.0.1: resolution: {integrity: sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==} - rehype-pretty-code@0.14.1: - resolution: {integrity: sha512-IpG4OL0iYlbx78muVldsK86hdfNoht0z63AP7sekQNW2QOTmjxB7RbTO+rhIYNGRljgHxgVZoPwUl6bIC9SbjA==} + rehype-pretty-code@0.14.3: + resolution: {integrity: sha512-Cz692FeYusTjT5cfFWLc4r7JhgC3/JlJptgUh4iffBxWxUnWW1oqbWFi7jGCeq00DYUm8yzoTnvpocaYa5x82g==} engines: {node: '>=18'} peerDependencies: - shiki: ^1.0.0 || ^2.0.0 || ^3.0.0 + shiki: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 rehype-raw@7.0.0: resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} @@ -3085,17 +3155,10 @@ packages: remark-stringify@11.0.0: resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - restore-cursor@5.1.0: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} @@ -3107,13 +3170,13 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rollup@4.41.0: - resolution: {integrity: sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} + rolldown@1.0.1: + resolution: {integrity: sha512-X0KQHljNnEkWNqqiz9zJrGunh1B0HgOxLXvnFpCOcadzcy5qohZ3tqMEUg00vncoRovXuK3ZqCT9KnnKzoInFQ==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.48.1: - resolution: {integrity: sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==} + rollup@4.41.0: + resolution: {integrity: sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3125,9 +3188,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - scheduler@0.26.0: - resolution: {integrity: sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==} - scheduler@0.27.0: resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} @@ -3158,8 +3218,9 @@ packages: shiki@2.5.0: resolution: {integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ==} - shiki@3.11.0: - resolution: {integrity: sha512-VgKumh/ib38I1i3QkMn6mAQA6XjjQubqaAYhfge71glAll0/4xnt8L2oSuC45Qcr/G5Kbskj4RliMQddGmy/Og==} + shiki@4.0.2: + resolution: {integrity: sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==} + engines: {node: '>=20'} signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} @@ -3218,10 +3279,6 @@ packages: resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - style-to-js@1.1.21: resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} @@ -3250,10 +3307,6 @@ packages: resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} engines: {node: '>=16'} - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - supports-color@9.4.0: resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} engines: {node: '>=12'} @@ -3261,17 +3314,13 @@ packages: tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} - tailwindcss@4.1.12: - resolution: {integrity: sha512-DzFtxOi+7NsFf7DBtI3BJsynR+0Yp6etH+nRPTbpWnS2pZBaSksv/JGctNwSWzbFjp0vxSqknaUylseZqMDGrA==} + tailwindcss@4.3.0: + resolution: {integrity: sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q==} - tapable@2.2.2: - resolution: {integrity: sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==} + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} engines: {node: '>=6'} - tar@7.4.3: - resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} - engines: {node: '>=18'} - terser@5.44.1: resolution: {integrity: sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==} engines: {node: '>=10'} @@ -3287,14 +3336,14 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.14: - resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} - engines: {node: '>=12.0.0'} - tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} + engines: {node: '>=12.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3309,8 +3358,8 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@2.1.0: - resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' @@ -3340,8 +3389,8 @@ packages: typescript: optional: true - tsx@4.21.0: - resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + tsx@4.22.0: + resolution: {integrity: sha512-8ccZMPD69s1AbKXx0C5ddTNZfNjwV04iIKgjZmKfKxMynEtSYcK0Lh7iQFh53fI5Yu4pb9usgAiqyPmEONaALg==} engines: {node: '>=18.0.0'} hasBin: true @@ -3349,31 +3398,23 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - typescript-eslint@8.40.0: - resolution: {integrity: sha512-Xvd2l+ZmFDPEt4oj1QEXzA4A2uUK6opvKu3eGN9aGjB8au02lIVcLyi375w94hHyejTOmzIU77L8ol2sRg9n7Q==} + typescript-eslint@8.59.3: + resolution: {integrity: sha512-KgusgyDgG4LI8Ih/sWaCtZ06tckLAS5CvT5A4D1Q7bYVoAAyzwiZvE4BmwDHkhRVkvhRBepKeASoFzQetha7Fg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <6.0.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - typescript@5.9.2: - resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==} - engines: {node: '>=14.17'} - hasBin: true - - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} - undici-types@6.21.0: - resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - - undici-types@7.10.0: - resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==} + undici-types@7.24.6: + resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==} unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -3457,15 +3498,16 @@ packages: terser: optional: true - vite@7.1.3: - resolution: {integrity: sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw==} + vite@8.0.13: + resolution: {integrity: sha512-MFtjBYgzmSxmgA4RAfjIyXWpGe1oALnjgUTzzV7QLx/TKxCzjtMH6Fd9/eVK+5Fg1qNoz5VAwsmMs/NofrmJvw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.18 + esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 - lightningcss: ^1.21.0 sass: ^1.70.0 sass-embedded: ^1.70.0 stylus: '>=0.54.8' @@ -3476,12 +3518,14 @@ packages: peerDependenciesMeta: '@types/node': optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true jiti: optional: true less: optional: true - lightningcss: - optional: true sass: optional: true sass-embedded: @@ -3536,19 +3580,32 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yallist@5.0.0: - resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} - engines: {node: '>=18'} - yaml@2.8.2: resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==} engines: {node: '>= 14.6'} hasBin: true + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zod-validation-error@4.0.2: + resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + + zod@4.1.13: + resolution: {integrity: sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==} + + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -3661,11 +3718,6 @@ snapshots: '@alloc/quick-lru@5.2.0': {} - '@ampproject/remapping@2.3.0': - dependencies: - '@jridgewell/gen-mapping': 0.3.13 - '@jridgewell/trace-mapping': 0.3.31 - '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.28.5 @@ -3674,20 +3726,20 @@ snapshots: '@babel/compat-data@7.27.2': {} - '@babel/core@7.28.3': + '@babel/core@7.28.5': dependencies: - '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.27.1 '@babel/generator': 7.28.5 '@babel/helper-compilation-targets': 7.27.2 - '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.3) - '@babel/helpers': 7.28.3 + '@babel/helper-module-transforms': 7.28.3(@babel/core@7.28.5) + '@babel/helpers': 7.28.4 '@babel/parser': 7.28.5 '@babel/template': 7.27.2 '@babel/traverse': 7.28.5 '@babel/types': 7.28.5 + '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.1 + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -3719,24 +3771,22 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.3)': + '@babel/helper-module-transforms@7.28.3(@babel/core@7.28.5)': dependencies: - '@babel/core': 7.28.3 + '@babel/core': 7.28.5 '@babel/helper-module-imports': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 '@babel/traverse': 7.28.5 transitivePeerDependencies: - supports-color - '@babel/helper-plugin-utils@7.27.1': {} - '@babel/helper-string-parser@7.27.1': {} '@babel/helper-validator-identifier@7.28.5': {} '@babel/helper-validator-option@7.27.1': {} - '@babel/helpers@7.28.3': + '@babel/helpers@7.28.4': dependencies: '@babel/template': 7.27.2 '@babel/types': 7.28.5 @@ -3745,16 +3795,6 @@ snapshots: dependencies: '@babel/types': 7.28.5 - '@babel/plugin-transform-react-jsx-self@7.27.1(@babel/core@7.28.3)': - dependencies: - '@babel/core': 7.28.3 - '@babel/helper-plugin-utils': 7.27.1 - - '@babel/plugin-transform-react-jsx-source@7.27.1(@babel/core@7.28.3)': - dependencies: - '@babel/core': 7.28.3 - '@babel/helper-plugin-utils': 7.27.1 - '@babel/template@7.27.2': dependencies: '@babel/code-frame': 7.27.1 @@ -3802,278 +3842,289 @@ snapshots: transitivePeerDependencies: - '@algolia/client-search' + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + '@emnapi/runtime@1.7.1': dependencies: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.21.5': + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.25.12': + '@esbuild/aix-ppc64@0.21.5': optional: true '@esbuild/aix-ppc64@0.27.1': optional: true - '@esbuild/android-arm64@0.21.5': + '@esbuild/aix-ppc64@0.28.0': optional: true - '@esbuild/android-arm64@0.25.12': + '@esbuild/android-arm64@0.21.5': optional: true '@esbuild/android-arm64@0.27.1': optional: true - '@esbuild/android-arm@0.21.5': + '@esbuild/android-arm64@0.28.0': optional: true - '@esbuild/android-arm@0.25.12': + '@esbuild/android-arm@0.21.5': optional: true '@esbuild/android-arm@0.27.1': optional: true - '@esbuild/android-x64@0.21.5': + '@esbuild/android-arm@0.28.0': optional: true - '@esbuild/android-x64@0.25.12': + '@esbuild/android-x64@0.21.5': optional: true '@esbuild/android-x64@0.27.1': optional: true - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/android-x64@0.28.0': optional: true - '@esbuild/darwin-arm64@0.25.12': + '@esbuild/darwin-arm64@0.21.5': optional: true '@esbuild/darwin-arm64@0.27.1': optional: true - '@esbuild/darwin-x64@0.21.5': + '@esbuild/darwin-arm64@0.28.0': optional: true - '@esbuild/darwin-x64@0.25.12': + '@esbuild/darwin-x64@0.21.5': optional: true '@esbuild/darwin-x64@0.27.1': optional: true - '@esbuild/freebsd-arm64@0.21.5': + '@esbuild/darwin-x64@0.28.0': optional: true - '@esbuild/freebsd-arm64@0.25.12': + '@esbuild/freebsd-arm64@0.21.5': optional: true '@esbuild/freebsd-arm64@0.27.1': optional: true - '@esbuild/freebsd-x64@0.21.5': + '@esbuild/freebsd-arm64@0.28.0': optional: true - '@esbuild/freebsd-x64@0.25.12': + '@esbuild/freebsd-x64@0.21.5': optional: true '@esbuild/freebsd-x64@0.27.1': optional: true - '@esbuild/linux-arm64@0.21.5': + '@esbuild/freebsd-x64@0.28.0': optional: true - '@esbuild/linux-arm64@0.25.12': + '@esbuild/linux-arm64@0.21.5': optional: true '@esbuild/linux-arm64@0.27.1': optional: true - '@esbuild/linux-arm@0.21.5': + '@esbuild/linux-arm64@0.28.0': optional: true - '@esbuild/linux-arm@0.25.12': + '@esbuild/linux-arm@0.21.5': optional: true '@esbuild/linux-arm@0.27.1': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/linux-arm@0.28.0': optional: true - '@esbuild/linux-ia32@0.25.12': + '@esbuild/linux-ia32@0.21.5': optional: true '@esbuild/linux-ia32@0.27.1': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/linux-ia32@0.28.0': optional: true - '@esbuild/linux-loong64@0.25.12': + '@esbuild/linux-loong64@0.21.5': optional: true '@esbuild/linux-loong64@0.27.1': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/linux-loong64@0.28.0': optional: true - '@esbuild/linux-mips64el@0.25.12': + '@esbuild/linux-mips64el@0.21.5': optional: true '@esbuild/linux-mips64el@0.27.1': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-mips64el@0.28.0': optional: true - '@esbuild/linux-ppc64@0.25.12': + '@esbuild/linux-ppc64@0.21.5': optional: true '@esbuild/linux-ppc64@0.27.1': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-ppc64@0.28.0': optional: true - '@esbuild/linux-riscv64@0.25.12': + '@esbuild/linux-riscv64@0.21.5': optional: true '@esbuild/linux-riscv64@0.27.1': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/linux-riscv64@0.28.0': optional: true - '@esbuild/linux-s390x@0.25.12': + '@esbuild/linux-s390x@0.21.5': optional: true '@esbuild/linux-s390x@0.27.1': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/linux-s390x@0.28.0': optional: true - '@esbuild/linux-x64@0.25.12': + '@esbuild/linux-x64@0.21.5': optional: true '@esbuild/linux-x64@0.27.1': optional: true - '@esbuild/netbsd-arm64@0.25.12': + '@esbuild/linux-x64@0.28.0': optional: true '@esbuild/netbsd-arm64@0.27.1': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/netbsd-arm64@0.28.0': optional: true - '@esbuild/netbsd-x64@0.25.12': + '@esbuild/netbsd-x64@0.21.5': optional: true '@esbuild/netbsd-x64@0.27.1': optional: true - '@esbuild/openbsd-arm64@0.25.12': + '@esbuild/netbsd-x64@0.28.0': optional: true '@esbuild/openbsd-arm64@0.27.1': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/openbsd-arm64@0.28.0': optional: true - '@esbuild/openbsd-x64@0.25.12': + '@esbuild/openbsd-x64@0.21.5': optional: true '@esbuild/openbsd-x64@0.27.1': optional: true - '@esbuild/openharmony-arm64@0.25.12': + '@esbuild/openbsd-x64@0.28.0': optional: true '@esbuild/openharmony-arm64@0.27.1': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/openharmony-arm64@0.28.0': optional: true - '@esbuild/sunos-x64@0.25.12': + '@esbuild/sunos-x64@0.21.5': optional: true '@esbuild/sunos-x64@0.27.1': optional: true - '@esbuild/win32-arm64@0.21.5': + '@esbuild/sunos-x64@0.28.0': optional: true - '@esbuild/win32-arm64@0.25.12': + '@esbuild/win32-arm64@0.21.5': optional: true '@esbuild/win32-arm64@0.27.1': optional: true - '@esbuild/win32-ia32@0.21.5': + '@esbuild/win32-arm64@0.28.0': optional: true - '@esbuild/win32-ia32@0.25.12': + '@esbuild/win32-ia32@0.21.5': optional: true '@esbuild/win32-ia32@0.27.1': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-ia32@0.28.0': optional: true - '@esbuild/win32-x64@0.25.12': + '@esbuild/win32-x64@0.21.5': optional: true '@esbuild/win32-x64@0.27.1': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.34.0(jiti@2.5.1))': + '@esbuild/win32-x64@0.28.0': + optional: true + + '@eslint-community/eslint-utils@4.9.0(eslint@10.4.0(jiti@2.6.1))': + dependencies: + eslint: 10.4.0(jiti@2.6.1) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/eslint-utils@4.9.1(eslint@10.4.0(jiti@2.6.1))': dependencies: - eslint: 9.34.0(jiti@2.5.1) + eslint: 10.4.0(jiti@2.6.1) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.1': {} + '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.21.0': + '@eslint/config-array@0.23.5': dependencies: - '@eslint/object-schema': 2.1.6 - debug: 4.4.1 - minimatch: 3.1.2 + '@eslint/object-schema': 3.0.5 + debug: 4.4.3 + minimatch: 10.2.5 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.3.1': {} - - '@eslint/core@0.15.2': + '@eslint/config-helpers@0.6.0': dependencies: - '@types/json-schema': 7.0.15 + '@eslint/core': 1.2.1 - '@eslint/eslintrc@3.3.1': + '@eslint/core@1.2.1': dependencies: - ajv: 6.12.6 - debug: 4.4.1 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color + '@types/json-schema': 7.0.15 - '@eslint/js@9.34.0': {} + '@eslint/js@10.0.1(eslint@10.4.0(jiti@2.6.1))': + optionalDependencies: + eslint: 10.4.0(jiti@2.6.1) - '@eslint/object-schema@2.1.6': {} + '@eslint/object-schema@3.0.5': {} - '@eslint/plugin-kit@0.3.5': + '@eslint/plugin-kit@0.7.1': dependencies: - '@eslint/core': 0.15.2 + '@eslint/core': 1.2.1 levn: 0.4.1 '@humanfs/core@0.19.1': {} @@ -4089,13 +4140,13 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} - '@ianvs/prettier-plugin-sort-imports@4.7.0(@vue/compiler-sfc@3.5.13)(prettier@3.7.4)': + '@ianvs/prettier-plugin-sort-imports@4.7.0(@vue/compiler-sfc@3.5.13)(prettier@3.8.3)': dependencies: '@babel/generator': 7.28.5 '@babel/parser': 7.28.5 '@babel/traverse': 7.28.5 '@babel/types': 7.28.5 - prettier: 3.7.4 + prettier: 3.8.3 semver: 7.7.3 optionalDependencies: '@vue/compiler-sfc': 3.5.13 @@ -4204,10 +4255,6 @@ snapshots: '@img/sharp-win32-x64@0.34.5': optional: true - '@isaacs/fs-minipass@4.0.1': - dependencies: - minipass: 7.1.2 - '@jridgewell/gen-mapping@0.3.13': dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4264,30 +4311,63 @@ snapshots: transitivePeerDependencies: - supports-color - '@next/env@16.0.7': {} + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.2 + optional: true + + '@next/env@16.0.10': {} + + '@next/env@16.2.6': {} + + '@next/swc-darwin-arm64@16.0.10': + optional: true + + '@next/swc-darwin-arm64@16.2.6': + optional: true + + '@next/swc-darwin-x64@16.0.10': + optional: true + + '@next/swc-darwin-x64@16.2.6': + optional: true + + '@next/swc-linux-arm64-gnu@16.0.10': + optional: true + + '@next/swc-linux-arm64-gnu@16.2.6': + optional: true + + '@next/swc-linux-arm64-musl@16.0.10': + optional: true + + '@next/swc-linux-arm64-musl@16.2.6': + optional: true - '@next/swc-darwin-arm64@16.0.7': + '@next/swc-linux-x64-gnu@16.0.10': optional: true - '@next/swc-darwin-x64@16.0.7': + '@next/swc-linux-x64-gnu@16.2.6': optional: true - '@next/swc-linux-arm64-gnu@16.0.7': + '@next/swc-linux-x64-musl@16.0.10': optional: true - '@next/swc-linux-arm64-musl@16.0.7': + '@next/swc-linux-x64-musl@16.2.6': optional: true - '@next/swc-linux-x64-gnu@16.0.7': + '@next/swc-win32-arm64-msvc@16.0.10': optional: true - '@next/swc-linux-x64-musl@16.0.7': + '@next/swc-win32-arm64-msvc@16.2.6': optional: true - '@next/swc-win32-arm64-msvc@16.0.7': + '@next/swc-win32-x64-msvc@16.0.10': optional: true - '@next/swc-win32-x64-msvc@16.0.7': + '@next/swc-win32-x64-msvc@16.2.6': optional: true '@nodelib/fs.scandir@2.1.5': @@ -4302,129 +4382,138 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.19.1 - '@rolldown/pluginutils@1.0.0-beta.32': {} + '@oxc-project/types@0.130.0': {} - '@rollup/rollup-android-arm-eabi@4.41.0': + '@rolldown/binding-android-arm64@1.0.1': optional: true - '@rollup/rollup-android-arm-eabi@4.48.1': + '@rolldown/binding-darwin-arm64@1.0.1': optional: true - '@rollup/rollup-android-arm-eabi@4.53.3': + '@rolldown/binding-darwin-x64@1.0.1': optional: true - '@rollup/rollup-android-arm64@4.41.0': + '@rolldown/binding-freebsd-x64@1.0.1': optional: true - '@rollup/rollup-android-arm64@4.48.1': + '@rolldown/binding-linux-arm-gnueabihf@1.0.1': optional: true - '@rollup/rollup-android-arm64@4.53.3': + '@rolldown/binding-linux-arm64-gnu@1.0.1': optional: true - '@rollup/rollup-darwin-arm64@4.41.0': + '@rolldown/binding-linux-arm64-musl@1.0.1': optional: true - '@rollup/rollup-darwin-arm64@4.48.1': + '@rolldown/binding-linux-ppc64-gnu@1.0.1': optional: true - '@rollup/rollup-darwin-arm64@4.53.3': + '@rolldown/binding-linux-s390x-gnu@1.0.1': optional: true - '@rollup/rollup-darwin-x64@4.41.0': + '@rolldown/binding-linux-x64-gnu@1.0.1': optional: true - '@rollup/rollup-darwin-x64@4.48.1': + '@rolldown/binding-linux-x64-musl@1.0.1': optional: true - '@rollup/rollup-darwin-x64@4.53.3': + '@rolldown/binding-openharmony-arm64@1.0.1': optional: true - '@rollup/rollup-freebsd-arm64@4.41.0': + '@rolldown/binding-wasm32-wasi@1.0.1': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true - '@rollup/rollup-freebsd-arm64@4.48.1': + '@rolldown/binding-win32-arm64-msvc@1.0.1': optional: true - '@rollup/rollup-freebsd-arm64@4.53.3': + '@rolldown/binding-win32-x64-msvc@1.0.1': optional: true - '@rollup/rollup-freebsd-x64@4.41.0': + '@rolldown/pluginutils@1.0.1': {} + + '@rollup/rollup-android-arm-eabi@4.41.0': optional: true - '@rollup/rollup-freebsd-x64@4.48.1': + '@rollup/rollup-android-arm-eabi@4.53.3': optional: true - '@rollup/rollup-freebsd-x64@4.53.3': + '@rollup/rollup-android-arm64@4.41.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.41.0': + '@rollup/rollup-android-arm64@4.53.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.48.1': + '@rollup/rollup-darwin-arm64@4.41.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.53.3': + '@rollup/rollup-darwin-arm64@4.53.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.41.0': + '@rollup/rollup-darwin-x64@4.41.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.48.1': + '@rollup/rollup-darwin-x64@4.53.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.53.3': + '@rollup/rollup-freebsd-arm64@4.41.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.41.0': + '@rollup/rollup-freebsd-arm64@4.53.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.48.1': + '@rollup/rollup-freebsd-x64@4.41.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.53.3': + '@rollup/rollup-freebsd-x64@4.53.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.41.0': + '@rollup/rollup-linux-arm-gnueabihf@4.41.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.48.1': + '@rollup/rollup-linux-arm-gnueabihf@4.53.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.53.3': + '@rollup/rollup-linux-arm-musleabihf@4.41.0': optional: true - '@rollup/rollup-linux-loong64-gnu@4.53.3': + '@rollup/rollup-linux-arm-musleabihf@4.53.3': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.41.0': + '@rollup/rollup-linux-arm64-gnu@4.41.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.48.1': + '@rollup/rollup-linux-arm64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.41.0': + '@rollup/rollup-linux-arm64-musl@4.41.0': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.48.1': + '@rollup/rollup-linux-arm64-musl@4.53.3': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.53.3': + '@rollup/rollup-linux-loong64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.41.0': + '@rollup/rollup-linux-loongarch64-gnu@4.41.0': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.41.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.48.1': + '@rollup/rollup-linux-ppc64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.53.3': + '@rollup/rollup-linux-riscv64-gnu@4.41.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.41.0': + '@rollup/rollup-linux-riscv64-gnu@4.53.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.48.1': + '@rollup/rollup-linux-riscv64-musl@4.41.0': optional: true '@rollup/rollup-linux-riscv64-musl@4.53.3': @@ -4433,27 +4522,18 @@ snapshots: '@rollup/rollup-linux-s390x-gnu@4.41.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.48.1': - optional: true - '@rollup/rollup-linux-s390x-gnu@4.53.3': optional: true '@rollup/rollup-linux-x64-gnu@4.41.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.48.1': - optional: true - '@rollup/rollup-linux-x64-gnu@4.53.3': optional: true '@rollup/rollup-linux-x64-musl@4.41.0': optional: true - '@rollup/rollup-linux-x64-musl@4.48.1': - optional: true - '@rollup/rollup-linux-x64-musl@4.53.3': optional: true @@ -4463,18 +4543,12 @@ snapshots: '@rollup/rollup-win32-arm64-msvc@4.41.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.48.1': - optional: true - '@rollup/rollup-win32-arm64-msvc@4.53.3': optional: true '@rollup/rollup-win32-ia32-msvc@4.41.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.48.1': - optional: true - '@rollup/rollup-win32-ia32-msvc@4.53.3': optional: true @@ -4484,9 +4558,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.41.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.48.1': - optional: true - '@rollup/rollup-win32-x64-msvc@4.53.3': optional: true @@ -4508,9 +4579,10 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 - '@shikijs/core@3.11.0': + '@shikijs/core@4.0.2': dependencies: - '@shikijs/types': 3.11.0 + '@shikijs/primitive': 4.0.2 + '@shikijs/types': 4.0.2 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 @@ -4527,11 +4599,11 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 3.1.1 - '@shikijs/engine-javascript@3.11.0': + '@shikijs/engine-javascript@4.0.2': dependencies: - '@shikijs/types': 3.11.0 + '@shikijs/types': 4.0.2 '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 4.3.3 + oniguruma-to-es: 4.3.4 '@shikijs/engine-oniguruma@2.1.0': dependencies: @@ -4543,26 +4615,32 @@ snapshots: '@shikijs/types': 2.5.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/engine-oniguruma@3.11.0': + '@shikijs/engine-oniguruma@4.0.2': dependencies: - '@shikijs/types': 3.11.0 + '@shikijs/types': 4.0.2 '@shikijs/vscode-textmate': 10.0.2 '@shikijs/langs@2.5.0': dependencies: '@shikijs/types': 2.5.0 - '@shikijs/langs@3.11.0': + '@shikijs/langs@4.0.2': dependencies: - '@shikijs/types': 3.11.0 + '@shikijs/types': 4.0.2 + + '@shikijs/primitive@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 '@shikijs/themes@2.5.0': dependencies: '@shikijs/types': 2.5.0 - '@shikijs/themes@3.11.0': + '@shikijs/themes@4.0.2': dependencies: - '@shikijs/types': 3.11.0 + '@shikijs/types': 4.0.2 '@shikijs/transformers@2.1.0': dependencies: @@ -4579,7 +4657,7 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - '@shikijs/types@3.11.0': + '@shikijs/types@4.0.2': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -4590,111 +4668,91 @@ snapshots: dependencies: tslib: 2.8.1 - '@tailwindcss/node@4.1.12': + '@tailwindcss/node@4.3.0': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.18.3 - jiti: 2.5.1 - lightningcss: 1.30.1 - magic-string: 0.30.17 + enhanced-resolve: 5.21.3 + jiti: 2.6.1 + lightningcss: 1.32.0 + magic-string: 0.30.21 source-map-js: 1.2.1 - tailwindcss: 4.1.12 + tailwindcss: 4.3.0 - '@tailwindcss/oxide-android-arm64@4.1.12': + '@tailwindcss/oxide-android-arm64@4.3.0': optional: true - '@tailwindcss/oxide-darwin-arm64@4.1.12': + '@tailwindcss/oxide-darwin-arm64@4.3.0': optional: true - '@tailwindcss/oxide-darwin-x64@4.1.12': + '@tailwindcss/oxide-darwin-x64@4.3.0': optional: true - '@tailwindcss/oxide-freebsd-x64@4.1.12': + '@tailwindcss/oxide-freebsd-x64@4.3.0': optional: true - '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.12': + '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0': optional: true - '@tailwindcss/oxide-linux-arm64-gnu@4.1.12': + '@tailwindcss/oxide-linux-arm64-gnu@4.3.0': optional: true - '@tailwindcss/oxide-linux-arm64-musl@4.1.12': + '@tailwindcss/oxide-linux-arm64-musl@4.3.0': optional: true - '@tailwindcss/oxide-linux-x64-gnu@4.1.12': + '@tailwindcss/oxide-linux-x64-gnu@4.3.0': optional: true - '@tailwindcss/oxide-linux-x64-musl@4.1.12': + '@tailwindcss/oxide-linux-x64-musl@4.3.0': optional: true - '@tailwindcss/oxide-wasm32-wasi@4.1.12': + '@tailwindcss/oxide-wasm32-wasi@4.3.0': optional: true - '@tailwindcss/oxide-win32-arm64-msvc@4.1.12': + '@tailwindcss/oxide-win32-arm64-msvc@4.3.0': optional: true - '@tailwindcss/oxide-win32-x64-msvc@4.1.12': + '@tailwindcss/oxide-win32-x64-msvc@4.3.0': optional: true - '@tailwindcss/oxide@4.1.12': - dependencies: - detect-libc: 2.1.2 - tar: 7.4.3 + '@tailwindcss/oxide@4.3.0': optionalDependencies: - '@tailwindcss/oxide-android-arm64': 4.1.12 - '@tailwindcss/oxide-darwin-arm64': 4.1.12 - '@tailwindcss/oxide-darwin-x64': 4.1.12 - '@tailwindcss/oxide-freebsd-x64': 4.1.12 - '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.12 - '@tailwindcss/oxide-linux-arm64-gnu': 4.1.12 - '@tailwindcss/oxide-linux-arm64-musl': 4.1.12 - '@tailwindcss/oxide-linux-x64-gnu': 4.1.12 - '@tailwindcss/oxide-linux-x64-musl': 4.1.12 - '@tailwindcss/oxide-wasm32-wasi': 4.1.12 - '@tailwindcss/oxide-win32-arm64-msvc': 4.1.12 - '@tailwindcss/oxide-win32-x64-msvc': 4.1.12 - - '@tailwindcss/postcss@4.1.12': + '@tailwindcss/oxide-android-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-arm64': 4.3.0 + '@tailwindcss/oxide-darwin-x64': 4.3.0 + '@tailwindcss/oxide-freebsd-x64': 4.3.0 + '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.0 + '@tailwindcss/oxide-linux-arm64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-arm64-musl': 4.3.0 + '@tailwindcss/oxide-linux-x64-gnu': 4.3.0 + '@tailwindcss/oxide-linux-x64-musl': 4.3.0 + '@tailwindcss/oxide-wasm32-wasi': 4.3.0 + '@tailwindcss/oxide-win32-arm64-msvc': 4.3.0 + '@tailwindcss/oxide-win32-x64-msvc': 4.3.0 + + '@tailwindcss/postcss@4.3.0': dependencies: '@alloc/quick-lru': 5.2.0 - '@tailwindcss/node': 4.1.12 - '@tailwindcss/oxide': 4.1.12 - postcss: 8.5.6 - tailwindcss: 4.1.12 + '@tailwindcss/node': 4.3.0 + '@tailwindcss/oxide': 4.3.0 + postcss: 8.5.14 + tailwindcss: 4.3.0 - '@tailwindcss/typography@0.5.16(tailwindcss@4.1.12)': + '@tailwindcss/typography@0.5.19(tailwindcss@4.3.0)': dependencies: - lodash.castarray: 4.4.0 - lodash.isplainobject: 4.0.6 - lodash.merge: 4.6.2 postcss-selector-parser: 6.0.10 - tailwindcss: 4.1.12 - - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 - '@types/babel__generator': 7.27.0 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.20.7 - - '@types/babel__generator@7.27.0': - dependencies: - '@babel/types': 7.28.5 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.28.5 - '@babel/types': 7.28.5 + tailwindcss: 4.3.0 - '@types/babel__traverse@7.20.7': + '@tybys/wasm-util@0.10.2': dependencies: - '@babel/types': 7.28.5 + tslib: 2.8.1 + optional: true '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 + '@types/esrecurse@4.3.1': {} + '@types/estree-jsx@1.0.5': dependencies: '@types/estree': 1.0.8 @@ -4726,29 +4784,17 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@22.19.1': + '@types/node@25.8.0': dependencies: - undici-types: 6.21.0 - - '@types/node@24.3.0': - dependencies: - undici-types: 7.10.0 + undici-types: 7.24.6 '@types/picomatch@4.0.2': {} - '@types/react-dom@19.1.7(@types/react@19.1.11)': - dependencies: - '@types/react': 19.1.11 - - '@types/react-dom@19.2.3(@types/react@19.2.7)': + '@types/react-dom@19.2.3(@types/react@19.2.14)': dependencies: - '@types/react': 19.2.7 + '@types/react': 19.2.14 - '@types/react@19.1.11': - dependencies: - csstype: 3.1.3 - - '@types/react@19.2.7': + '@types/react@19.2.14': dependencies: csstype: 3.2.3 @@ -4762,117 +4808,108 @@ snapshots: '@types/web-bluetooth@0.0.20': {} - '@typescript-eslint/eslint-plugin@8.40.0(@typescript-eslint/parser@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/type-utils': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/utils': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.40.0 - eslint: 9.34.0(jiti@2.5.1) - graphemer: 1.4.0 - ignore: 7.0.4 + '@typescript-eslint/eslint-plugin@8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3))(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/type-utils': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.59.3 + eslint: 10.4.0(jiti@2.6.1) + ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/parser@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3)': dependencies: - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2) - '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.9.2 + eslint: 10.4.0(jiti@2.6.1) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.40.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2) - '@typescript-eslint/types': 8.40.0 + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) + '@typescript-eslint/types': 8.59.3 debug: 4.4.3 - typescript: 5.9.2 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.40.0': + '@typescript-eslint/scope-manager@8.59.3': dependencies: - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/visitor-keys': 8.59.3 - '@typescript-eslint/tsconfig-utils@8.40.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.59.3(typescript@6.0.3)': dependencies: - typescript: 5.9.2 + typescript: 6.0.3 - '@typescript-eslint/type-utils@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3)': dependencies: - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) debug: 4.4.3 - eslint: 9.34.0(jiti@2.5.1) - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + eslint: 10.4.0(jiti@2.6.1) + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.40.0': {} + '@typescript-eslint/types@8.59.3': {} - '@typescript-eslint/typescript-estree@8.40.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.59.3(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.40.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2) - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/project-service': 8.59.3(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.59.3(typescript@6.0.3) + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/visitor-keys': 8.59.3 debug: 4.4.3 - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 + minimatch: 10.2.5 semver: 7.7.3 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + tinyglobby: 0.2.15 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2)': + '@typescript-eslint/utils@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2) - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.9.2 + '@eslint-community/eslint-utils': 4.9.1(eslint@10.4.0(jiti@2.6.1)) + '@typescript-eslint/scope-manager': 8.59.3 + '@typescript-eslint/types': 8.59.3 + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + eslint: 10.4.0(jiti@2.6.1) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.40.0': + '@typescript-eslint/visitor-keys@8.59.3': dependencies: - '@typescript-eslint/types': 8.40.0 - eslint-visitor-keys: 4.2.1 + '@typescript-eslint/types': 8.59.3 + eslint-visitor-keys: 5.0.1 '@ungap/structured-clone@1.3.0': {} - '@vitejs/plugin-react@5.0.1(vite@7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2))': + '@vitejs/plugin-react@6.0.2(vite@8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0))': dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-transform-react-jsx-source': 7.27.1(@babel/core@7.28.3) - '@rolldown/pluginutils': 1.0.0-beta.32 - '@types/babel__core': 7.20.5 - react-refresh: 0.17.0 - vite: 7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2) - transitivePeerDependencies: - - supports-color + '@rolldown/pluginutils': 1.0.1 + vite: 8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0) - '@vitejs/plugin-vue@5.2.1(vite@5.4.14(@types/node@24.3.0)(lightningcss@1.30.1)(terser@5.44.1))(vue@3.5.13(typescript@5.9.3))': + '@vitejs/plugin-vue@5.2.1(vite@5.4.14(@types/node@25.8.0)(lightningcss@1.32.0)(terser@5.44.1))(vue@3.5.13(typescript@6.0.3))': dependencies: - vite: 5.4.14(@types/node@24.3.0)(lightningcss@1.30.1)(terser@5.44.1) - vue: 3.5.13(typescript@5.9.3) + vite: 5.4.14(@types/node@25.8.0)(lightningcss@1.32.0)(terser@5.44.1) + vue: 3.5.13(typescript@6.0.3) '@vue/compiler-core@3.5.13': dependencies: @@ -4936,30 +4973,30 @@ snapshots: '@vue/reactivity': 3.5.13 '@vue/runtime-core': 3.5.13 '@vue/shared': 3.5.13 - csstype: 3.1.3 + csstype: 3.2.3 - '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.9.3))': + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@6.0.3))': dependencies: '@vue/compiler-ssr': 3.5.13 '@vue/shared': 3.5.13 - vue: 3.5.13(typescript@5.9.3) + vue: 3.5.13(typescript@6.0.3) '@vue/shared@3.5.13': {} - '@vueuse/core@12.5.0(typescript@5.9.3)': + '@vueuse/core@12.5.0(typescript@6.0.3)': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 12.5.0 - '@vueuse/shared': 12.5.0(typescript@5.9.3) - vue: 3.5.13(typescript@5.9.3) + '@vueuse/shared': 12.5.0(typescript@6.0.3) + vue: 3.5.13(typescript@6.0.3) transitivePeerDependencies: - typescript - '@vueuse/integrations@12.5.0(focus-trap@7.6.4)(typescript@5.9.3)': + '@vueuse/integrations@12.5.0(focus-trap@7.6.4)(typescript@6.0.3)': dependencies: - '@vueuse/core': 12.5.0(typescript@5.9.3) - '@vueuse/shared': 12.5.0(typescript@5.9.3) - vue: 3.5.13(typescript@5.9.3) + '@vueuse/core': 12.5.0(typescript@6.0.3) + '@vueuse/shared': 12.5.0(typescript@6.0.3) + vue: 3.5.13(typescript@6.0.3) optionalDependencies: focus-trap: 7.6.4 transitivePeerDependencies: @@ -4967,9 +5004,9 @@ snapshots: '@vueuse/metadata@12.5.0': {} - '@vueuse/shared@12.5.0(typescript@5.9.3)': + '@vueuse/shared@12.5.0(typescript@6.0.3)': dependencies: - vue: 3.5.13(typescript@5.9.3) + vue: 3.5.13(typescript@6.0.3) transitivePeerDependencies: - typescript @@ -4977,9 +5014,15 @@ snapshots: dependencies: acorn: 8.15.0 + acorn-jsx@5.3.2(acorn@8.16.0): + dependencies: + acorn: 8.16.0 + acorn@8.15.0: {} - ajv@6.12.6: + acorn@8.16.0: {} + + ajv@6.15.0: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 @@ -5008,32 +5051,23 @@ snapshots: ansi-regex@6.2.2: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - ansi-styles@6.2.3: {} any-promise@1.3.0: {} - argparse@2.0.1: {} - astring@1.9.0: {} bail@2.0.2: {} - balanced-match@1.0.2: {} + balanced-match@4.0.4: {} - birpc@0.2.19: {} + baseline-browser-mapping@2.10.29: {} - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 + birpc@0.2.19: {} - brace-expansion@2.0.1: + brace-expansion@5.0.6: dependencies: - balanced-match: 1.0.2 + balanced-match: 4.0.4 braces@3.0.3: dependencies: @@ -5055,17 +5089,10 @@ snapshots: cac@6.7.14: {} - callsites@3.1.0: {} - caniuse-lite@1.0.30001718: {} ccount@2.0.1: {} - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -5078,7 +5105,9 @@ snapshots: dependencies: readdirp: 4.1.2 - chownr@3.0.0: {} + chokidar@5.0.0: + dependencies: + readdirp: 5.0.0 cli-cursor@5.0.0: dependencies: @@ -5093,12 +5122,6 @@ snapshots: collapse-white-space@2.1.0: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - colorette@2.0.20: {} comma-separated-tokens@2.0.3: {} @@ -5109,8 +5132,6 @@ snapshots: commander@4.1.1: {} - concat-map@0.0.1: {} - confbox@0.1.8: {} consola@3.4.2: {} @@ -5129,14 +5150,8 @@ snapshots: cssesc@3.0.0: {} - csstype@3.1.3: {} - csstype@3.2.3: {} - debug@4.4.1: - dependencies: - ms: 2.1.3 - debug@4.4.3: dependencies: ms: 2.1.3 @@ -5163,10 +5178,10 @@ snapshots: emoji-regex@10.6.0: {} - enhanced-resolve@5.18.3: + enhanced-resolve@5.21.3: dependencies: graceful-fs: 4.2.11 - tapable: 2.2.2 + tapable: 2.3.3 entities@4.5.0: {} @@ -5214,35 +5229,6 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.25.12: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.12 - '@esbuild/android-arm': 0.25.12 - '@esbuild/android-arm64': 0.25.12 - '@esbuild/android-x64': 0.25.12 - '@esbuild/darwin-arm64': 0.25.12 - '@esbuild/darwin-x64': 0.25.12 - '@esbuild/freebsd-arm64': 0.25.12 - '@esbuild/freebsd-x64': 0.25.12 - '@esbuild/linux-arm': 0.25.12 - '@esbuild/linux-arm64': 0.25.12 - '@esbuild/linux-ia32': 0.25.12 - '@esbuild/linux-loong64': 0.25.12 - '@esbuild/linux-mips64el': 0.25.12 - '@esbuild/linux-ppc64': 0.25.12 - '@esbuild/linux-riscv64': 0.25.12 - '@esbuild/linux-s390x': 0.25.12 - '@esbuild/linux-x64': 0.25.12 - '@esbuild/netbsd-arm64': 0.25.12 - '@esbuild/netbsd-x64': 0.25.12 - '@esbuild/openbsd-arm64': 0.25.12 - '@esbuild/openbsd-x64': 0.25.12 - '@esbuild/openharmony-arm64': 0.25.12 - '@esbuild/sunos-x64': 0.25.12 - '@esbuild/win32-arm64': 0.25.12 - '@esbuild/win32-ia32': 0.25.12 - '@esbuild/win32-x64': 0.25.12 - esbuild@0.27.1: optionalDependencies: '@esbuild/aix-ppc64': 0.27.1 @@ -5272,53 +5258,87 @@ snapshots: '@esbuild/win32-ia32': 0.27.1 '@esbuild/win32-x64': 0.27.1 + esbuild@0.28.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.0 + '@esbuild/android-arm': 0.28.0 + '@esbuild/android-arm64': 0.28.0 + '@esbuild/android-x64': 0.28.0 + '@esbuild/darwin-arm64': 0.28.0 + '@esbuild/darwin-x64': 0.28.0 + '@esbuild/freebsd-arm64': 0.28.0 + '@esbuild/freebsd-x64': 0.28.0 + '@esbuild/linux-arm': 0.28.0 + '@esbuild/linux-arm64': 0.28.0 + '@esbuild/linux-ia32': 0.28.0 + '@esbuild/linux-loong64': 0.28.0 + '@esbuild/linux-mips64el': 0.28.0 + '@esbuild/linux-ppc64': 0.28.0 + '@esbuild/linux-riscv64': 0.28.0 + '@esbuild/linux-s390x': 0.28.0 + '@esbuild/linux-x64': 0.28.0 + '@esbuild/netbsd-arm64': 0.28.0 + '@esbuild/netbsd-x64': 0.28.0 + '@esbuild/openbsd-arm64': 0.28.0 + '@esbuild/openbsd-x64': 0.28.0 + '@esbuild/openharmony-arm64': 0.28.0 + '@esbuild/sunos-x64': 0.28.0 + '@esbuild/win32-arm64': 0.28.0 + '@esbuild/win32-ia32': 0.28.0 + '@esbuild/win32-x64': 0.28.0 + escalade@3.2.0: {} escape-string-regexp@4.0.0: {} escape-string-regexp@5.0.0: {} - eslint-plugin-react-hooks@5.2.0(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-react-hooks@7.1.1(eslint@10.4.0(jiti@2.6.1)): dependencies: - eslint: 9.34.0(jiti@2.5.1) + '@babel/core': 7.28.5 + '@babel/parser': 7.28.5 + eslint: 10.4.0(jiti@2.6.1) + hermes-parser: 0.25.1 + zod: 4.1.13 + zod-validation-error: 4.0.2(zod@4.1.13) + transitivePeerDependencies: + - supports-color - eslint-plugin-react-refresh@0.4.20(eslint@9.34.0(jiti@2.5.1)): + eslint-plugin-react-refresh@0.5.2(eslint@10.4.0(jiti@2.6.1)): dependencies: - eslint: 9.34.0(jiti@2.5.1) + eslint: 10.4.0(jiti@2.6.1) - eslint-scope@8.4.0: + eslint-scope@9.1.2: dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.8 esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.2.1: {} + eslint-visitor-keys@5.0.1: {} - eslint@9.34.0(jiti@2.5.1): + eslint@10.4.0(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.34.0(jiti@2.5.1)) - '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.21.0 - '@eslint/config-helpers': 0.3.1 - '@eslint/core': 0.15.2 - '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.34.0 - '@eslint/plugin-kit': 0.3.5 + '@eslint-community/eslint-utils': 4.9.0(eslint@10.4.0(jiti@2.6.1)) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.6.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.1 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.7 - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - chalk: 4.1.2 + '@types/estree': 1.0.8 + ajv: 6.15.0 cross-spawn: 7.0.6 - debug: 4.4.1 + debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.6.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 8.0.0 @@ -5328,22 +5348,21 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 + minimatch: 10.2.5 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 2.5.1 + jiti: 2.6.1 transitivePeerDependencies: - supports-color - espree@10.4.0: + espree@11.2.0: dependencies: - acorn: 8.15.0 - acorn-jsx: 5.3.2(acorn@8.15.0) - eslint-visitor-keys: 4.2.1 + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) + eslint-visitor-keys: 5.0.1 - esquery@1.6.0: + esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -5416,6 +5435,10 @@ snapshots: optionalDependencies: picomatch: 4.0.3 + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -5453,10 +5476,6 @@ snapshots: get-east-asian-width@1.4.0: {} - get-tsconfig@4.13.0: - dependencies: - resolve-pkg-maps: 1.0.0 - github-slugger@2.0.0: {} glob-parent@5.1.2: @@ -5467,16 +5486,10 @@ snapshots: dependencies: is-glob: 4.0.3 - globals@14.0.0: {} - - globals@16.3.0: {} + globals@17.6.0: {} graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - - has-flag@4.0.0: {} - hast-util-from-html@2.0.3: dependencies: '@types/hast': 3.0.4 @@ -5598,18 +5611,19 @@ snapshots: property-information: 7.1.0 space-separated-tokens: 2.0.2 + hermes-estree@0.25.1: {} + + hermes-parser@0.25.1: + dependencies: + hermes-estree: 0.25.1 + hookable@5.5.3: {} html-void-elements@3.0.0: {} ignore@5.3.2: {} - ignore@7.0.4: {} - - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 + ignore@7.0.5: {} imurmurhash@0.1.4: {} @@ -5644,16 +5658,12 @@ snapshots: isexe@2.0.0: {} - jiti@2.5.1: {} + jiti@2.6.1: {} joycon@3.1.1: {} js-tokens@4.0.0: {} - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - jsesc@3.1.0: {} json-buffer@3.0.1: {} @@ -5673,50 +5683,54 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - lightningcss-darwin-arm64@1.30.1: + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: optional: true - lightningcss-darwin-x64@1.30.1: + lightningcss-darwin-x64@1.32.0: optional: true - lightningcss-freebsd-x64@1.30.1: + lightningcss-freebsd-x64@1.32.0: optional: true - lightningcss-linux-arm-gnueabihf@1.30.1: + lightningcss-linux-arm-gnueabihf@1.32.0: optional: true - lightningcss-linux-arm64-gnu@1.30.1: + lightningcss-linux-arm64-gnu@1.32.0: optional: true - lightningcss-linux-arm64-musl@1.30.1: + lightningcss-linux-arm64-musl@1.32.0: optional: true - lightningcss-linux-x64-gnu@1.30.1: + lightningcss-linux-x64-gnu@1.32.0: optional: true - lightningcss-linux-x64-musl@1.30.1: + lightningcss-linux-x64-musl@1.32.0: optional: true - lightningcss-win32-arm64-msvc@1.30.1: + lightningcss-win32-arm64-msvc@1.32.0: optional: true - lightningcss-win32-x64-msvc@1.30.1: + lightningcss-win32-x64-msvc@1.32.0: optional: true - lightningcss@1.30.1: + lightningcss@1.32.0: dependencies: detect-libc: 2.1.2 optionalDependencies: - lightningcss-darwin-arm64: 1.30.1 - lightningcss-darwin-x64: 1.30.1 - lightningcss-freebsd-x64: 1.30.1 - lightningcss-linux-arm-gnueabihf: 1.30.1 - lightningcss-linux-arm64-gnu: 1.30.1 - lightningcss-linux-arm64-musl: 1.30.1 - lightningcss-linux-x64-gnu: 1.30.1 - lightningcss-linux-x64-musl: 1.30.1 - lightningcss-win32-arm64-msvc: 1.30.1 - lightningcss-win32-x64-msvc: 1.30.1 + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 lilconfig@3.1.3: {} @@ -5747,12 +5761,6 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash.castarray@4.4.0: {} - - lodash.isplainobject@4.0.6: {} - - lodash.merge@4.6.2: {} - log-update@6.1.0: dependencies: ansi-escapes: 7.2.0 @@ -6227,26 +6235,14 @@ snapshots: mimic-function@5.0.1: {} - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@9.0.5: + minimatch@10.2.5: dependencies: - brace-expansion: 2.0.1 - - minipass@7.1.2: {} + brace-expansion: 5.0.6 minisearch@7.1.1: {} - minizlib@3.0.2: - dependencies: - minipass: 7.1.2 - mitt@3.0.1: {} - mkdirp@3.0.1: {} - mlly@1.8.0: dependencies: acorn: 8.15.0 @@ -6268,29 +6264,53 @@ snapshots: natural-compare@1.4.0: {} - next-themes@0.4.6(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + next-themes@0.4.6(react-dom@19.2.6(react@19.2.6))(react@19.2.6): dependencies: - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + + next@16.0.10(react-dom@19.2.6(react@19.2.6))(react@19.2.6): + dependencies: + '@next/env': 16.0.10 + '@swc/helpers': 0.5.15 + caniuse-lite: 1.0.30001718 + postcss: 8.4.31 + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + styled-jsx: 5.1.6(react@19.2.6) + optionalDependencies: + '@next/swc-darwin-arm64': 16.0.10 + '@next/swc-darwin-x64': 16.0.10 + '@next/swc-linux-arm64-gnu': 16.0.10 + '@next/swc-linux-arm64-musl': 16.0.10 + '@next/swc-linux-x64-gnu': 16.0.10 + '@next/swc-linux-x64-musl': 16.0.10 + '@next/swc-win32-arm64-msvc': 16.0.10 + '@next/swc-win32-x64-msvc': 16.0.10 + sharp: 0.34.5 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros - next@16.0.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + next@16.2.6(react-dom@19.2.6(react@19.2.6))(react@19.2.6): dependencies: - '@next/env': 16.0.7 + '@next/env': 16.2.6 '@swc/helpers': 0.5.15 + baseline-browser-mapping: 2.10.29 caniuse-lite: 1.0.30001718 postcss: 8.4.31 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) - styled-jsx: 5.1.6(react@19.2.1) + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) + styled-jsx: 5.1.6(react@19.2.6) optionalDependencies: - '@next/swc-darwin-arm64': 16.0.7 - '@next/swc-darwin-x64': 16.0.7 - '@next/swc-linux-arm64-gnu': 16.0.7 - '@next/swc-linux-arm64-musl': 16.0.7 - '@next/swc-linux-x64-gnu': 16.0.7 - '@next/swc-linux-x64-musl': 16.0.7 - '@next/swc-win32-arm64-msvc': 16.0.7 - '@next/swc-win32-x64-msvc': 16.0.7 + '@next/swc-darwin-arm64': 16.2.6 + '@next/swc-darwin-x64': 16.2.6 + '@next/swc-linux-arm64-gnu': 16.2.6 + '@next/swc-linux-arm64-musl': 16.2.6 + '@next/swc-linux-x64-gnu': 16.2.6 + '@next/swc-linux-x64-musl': 16.2.6 + '@next/swc-win32-arm64-msvc': 16.2.6 + '@next/swc-win32-x64-msvc': 16.2.6 sharp: 0.34.5 transitivePeerDependencies: - '@babel/core' @@ -6318,7 +6338,7 @@ snapshots: regex: 6.0.1 regex-recursion: 6.0.2 - oniguruma-to-es@4.3.3: + oniguruma-to-es@4.3.4: dependencies: oniguruma-parser: 0.12.1 regex: 6.0.1 @@ -6341,10 +6361,6 @@ snapshots: dependencies: p-limit: 3.1.0 - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - parse-entities@4.0.2: dependencies: '@types/unist': 2.0.11 @@ -6375,6 +6391,8 @@ snapshots: picomatch@4.0.3: {} + picomatch@4.0.4: {} + pidtree@0.6.0: {} pirates@4.0.7: {} @@ -6385,14 +6403,14 @@ snapshots: mlly: 1.8.0 pathe: 2.0.3 - postcss-load-config@6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.21.0)(yaml@2.8.2): + postcss-load-config@6.0.1(jiti@2.6.1)(postcss@8.5.14)(tsx@4.22.0)(yaml@2.9.0): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.5.1 - postcss: 8.5.6 - tsx: 4.21.0 - yaml: 2.8.2 + jiti: 2.6.1 + postcss: 8.5.14 + tsx: 4.22.0 + yaml: 2.9.0 postcss-selector-parser@6.0.10: dependencies: @@ -6405,6 +6423,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postcss@8.5.14: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + postcss@8.5.6: dependencies: nanoid: 3.3.11 @@ -6415,7 +6439,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.7.4: {} + prettier@3.8.3: {} property-information@7.1.0: {} @@ -6423,24 +6447,17 @@ snapshots: queue-microtask@1.2.3: {} - react-dom@19.1.1(react@19.1.1): + react-dom@19.2.6(react@19.2.6): dependencies: - react: 19.1.1 - scheduler: 0.26.0 - - react-dom@19.2.1(react@19.2.1): - dependencies: - react: 19.2.1 + react: 19.2.6 scheduler: 0.27.0 - react-refresh@0.17.0: {} - - react@19.1.1: {} - - react@19.2.1: {} + react@19.2.6: {} readdirp@4.1.2: {} + readdirp@5.0.0: {} + recma-build-jsx@1.0.0: dependencies: '@types/estree': 1.0.8 @@ -6495,13 +6512,13 @@ snapshots: hast-util-from-html: 2.0.3 unified: 11.0.5 - rehype-pretty-code@0.14.1(shiki@3.11.0): + rehype-pretty-code@0.14.3(shiki@4.0.2): dependencies: '@types/hast': 3.0.4 hast-util-to-string: 3.0.1 parse-numeric-range: 1.3.0 rehype-parse: 9.0.1 - shiki: 3.11.0 + shiki: 4.0.2 unified: 11.0.5 unist-util-visit: 5.0.0 @@ -6566,12 +6583,8 @@ snapshots: mdast-util-to-markdown: 2.1.2 unified: 11.0.5 - resolve-from@4.0.0: {} - resolve-from@5.0.0: {} - resolve-pkg-maps@1.0.0: {} - restore-cursor@5.1.0: dependencies: onetime: 7.0.0 @@ -6581,6 +6594,27 @@ snapshots: rfdc@1.4.1: {} + rolldown@1.0.1: + dependencies: + '@oxc-project/types': 0.130.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.1 + '@rolldown/binding-darwin-arm64': 1.0.1 + '@rolldown/binding-darwin-x64': 1.0.1 + '@rolldown/binding-freebsd-x64': 1.0.1 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.1 + '@rolldown/binding-linux-arm64-gnu': 1.0.1 + '@rolldown/binding-linux-arm64-musl': 1.0.1 + '@rolldown/binding-linux-ppc64-gnu': 1.0.1 + '@rolldown/binding-linux-s390x-gnu': 1.0.1 + '@rolldown/binding-linux-x64-gnu': 1.0.1 + '@rolldown/binding-linux-x64-musl': 1.0.1 + '@rolldown/binding-openharmony-arm64': 1.0.1 + '@rolldown/binding-wasm32-wasi': 1.0.1 + '@rolldown/binding-win32-arm64-msvc': 1.0.1 + '@rolldown/binding-win32-x64-msvc': 1.0.1 + rollup@4.41.0: dependencies: '@types/estree': 1.0.7 @@ -6607,32 +6641,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.41.0 fsevents: 2.3.3 - rollup@4.48.1: - dependencies: - '@types/estree': 1.0.8 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.48.1 - '@rollup/rollup-android-arm64': 4.48.1 - '@rollup/rollup-darwin-arm64': 4.48.1 - '@rollup/rollup-darwin-x64': 4.48.1 - '@rollup/rollup-freebsd-arm64': 4.48.1 - '@rollup/rollup-freebsd-x64': 4.48.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.48.1 - '@rollup/rollup-linux-arm-musleabihf': 4.48.1 - '@rollup/rollup-linux-arm64-gnu': 4.48.1 - '@rollup/rollup-linux-arm64-musl': 4.48.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.48.1 - '@rollup/rollup-linux-ppc64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-gnu': 4.48.1 - '@rollup/rollup-linux-riscv64-musl': 4.48.1 - '@rollup/rollup-linux-s390x-gnu': 4.48.1 - '@rollup/rollup-linux-x64-gnu': 4.48.1 - '@rollup/rollup-linux-x64-musl': 4.48.1 - '@rollup/rollup-win32-arm64-msvc': 4.48.1 - '@rollup/rollup-win32-ia32-msvc': 4.48.1 - '@rollup/rollup-win32-x64-msvc': 4.48.1 - fsevents: 2.3.3 - rollup@4.53.3: dependencies: '@types/estree': 1.0.8 @@ -6665,8 +6673,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - scheduler@0.26.0: {} - scheduler@0.27.0: {} search-insights@2.17.3: {} @@ -6723,14 +6729,14 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - shiki@3.11.0: + shiki@4.0.2: dependencies: - '@shikijs/core': 3.11.0 - '@shikijs/engine-javascript': 3.11.0 - '@shikijs/engine-oniguruma': 3.11.0 - '@shikijs/langs': 3.11.0 - '@shikijs/themes': 3.11.0 - '@shikijs/types': 3.11.0 + '@shikijs/core': 4.0.2 + '@shikijs/engine-javascript': 4.0.2 + '@shikijs/engine-oniguruma': 4.0.2 + '@shikijs/langs': 4.0.2 + '@shikijs/themes': 4.0.2 + '@shikijs/types': 4.0.2 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 @@ -6786,8 +6792,6 @@ snapshots: dependencies: ansi-regex: 6.2.2 - strip-json-comments@3.1.1: {} - style-to-js@1.1.21: dependencies: style-to-object: 1.0.14 @@ -6796,10 +6800,10 @@ snapshots: dependencies: inline-style-parser: 0.2.7 - styled-jsx@5.1.6(react@19.2.1): + styled-jsx@5.1.6(react@19.2.6): dependencies: client-only: 0.0.1 - react: 19.2.1 + react: 19.2.6 sucrase@3.35.1: dependencies: @@ -6815,26 +6819,13 @@ snapshots: dependencies: copy-anything: 3.0.5 - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - supports-color@9.4.0: {} tabbable@6.2.0: {} - tailwindcss@4.1.12: {} - - tapable@2.2.2: {} + tailwindcss@4.3.0: {} - tar@7.4.3: - dependencies: - '@isaacs/fs-minipass': 4.0.1 - chownr: 3.0.0 - minipass: 7.1.2 - minizlib: 3.0.2 - mkdirp: 3.0.1 - yallist: 5.0.0 + tapable@2.3.3: {} terser@5.44.1: dependencies: @@ -6853,15 +6844,15 @@ snapshots: tinyexec@0.3.2: {} - tinyglobby@0.2.14: + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinyglobby@0.2.15: + tinyglobby@0.2.16: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 to-regex-range@5.0.1: dependencies: @@ -6873,15 +6864,15 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.1.0(typescript@5.9.2): + ts-api-utils@2.5.0(typescript@6.0.3): dependencies: - typescript: 5.9.2 + typescript: 6.0.3 ts-interface-checker@0.1.13: {} tslib@2.8.1: {} - tsup@8.5.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.2): + tsup@8.5.1(jiti@2.6.1)(postcss@8.5.14)(tsx@4.22.0)(typescript@6.0.3)(yaml@2.9.0): dependencies: bundle-require: 5.1.0(esbuild@0.27.1) cac: 6.7.14 @@ -6892,7 +6883,7 @@ snapshots: fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.5.1)(postcss@8.5.6)(tsx@4.21.0)(yaml@2.8.2) + postcss-load-config: 6.0.1(jiti@2.6.1)(postcss@8.5.14)(tsx@4.22.0)(yaml@2.9.0) resolve-from: 5.0.0 rollup: 4.53.3 source-map: 0.7.6 @@ -6901,18 +6892,17 @@ snapshots: tinyglobby: 0.2.15 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.5.6 - typescript: 5.9.3 + postcss: 8.5.14 + typescript: 6.0.3 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - tsx@4.21.0: + tsx@4.22.0: dependencies: - esbuild: 0.27.1 - get-tsconfig: 4.13.0 + esbuild: 0.28.0 optionalDependencies: fsevents: 2.3.3 @@ -6920,26 +6910,22 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2): + typescript-eslint@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.40.0(@typescript-eslint/parser@8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2))(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/parser': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.40.0(eslint@9.34.0(jiti@2.5.1))(typescript@5.9.2) - eslint: 9.34.0(jiti@2.5.1) - typescript: 5.9.2 + '@typescript-eslint/eslint-plugin': 8.59.3(@typescript-eslint/parser@8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3))(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/parser': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.59.3(typescript@6.0.3) + '@typescript-eslint/utils': 8.59.3(eslint@10.4.0(jiti@2.6.1))(typescript@6.0.3) + eslint: 10.4.0(jiti@2.6.1) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - typescript@5.9.2: {} - - typescript@5.9.3: {} + typescript@6.0.3: {} ufo@1.6.1: {} - undici-types@6.21.0: {} - - undici-types@7.10.0: {} + undici-types@7.24.6: {} unified@11.0.5: dependencies: @@ -7026,35 +7012,34 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@5.4.14(@types/node@24.3.0)(lightningcss@1.30.1)(terser@5.44.1): + vite@5.4.14(@types/node@25.8.0)(lightningcss@1.32.0)(terser@5.44.1): dependencies: esbuild: 0.21.5 postcss: 8.5.6 rollup: 4.41.0 optionalDependencies: - '@types/node': 24.3.0 + '@types/node': 25.8.0 fsevents: 2.3.3 - lightningcss: 1.30.1 + lightningcss: 1.32.0 terser: 5.44.1 - vite@7.1.3(@types/node@24.3.0)(jiti@2.5.1)(lightningcss@1.30.1)(terser@5.44.1)(tsx@4.21.0)(yaml@2.8.2): + vite@8.0.13(@types/node@25.8.0)(esbuild@0.28.0)(jiti@2.6.1)(terser@5.44.1)(tsx@4.22.0)(yaml@2.9.0): dependencies: - esbuild: 0.25.12 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.48.1 - tinyglobby: 0.2.14 + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.14 + rolldown: 1.0.1 + tinyglobby: 0.2.16 optionalDependencies: - '@types/node': 24.3.0 + '@types/node': 25.8.0 + esbuild: 0.28.0 fsevents: 2.3.3 - jiti: 2.5.1 - lightningcss: 1.30.1 + jiti: 2.6.1 terser: 5.44.1 - tsx: 4.21.0 - yaml: 2.8.2 + tsx: 4.22.0 + yaml: 2.9.0 - vitepress@1.6.4(@algolia/client-search@5.20.0)(@types/node@24.3.0)(lightningcss@1.30.1)(postcss@8.5.6)(search-insights@2.17.3)(terser@5.44.1)(typescript@5.9.3): + vitepress@1.6.4(@algolia/client-search@5.20.0)(@types/node@25.8.0)(lightningcss@1.32.0)(postcss@8.5.14)(search-insights@2.17.3)(terser@5.44.1)(typescript@6.0.3): dependencies: '@docsearch/css': 3.8.2 '@docsearch/js': 3.8.2(@algolia/client-search@5.20.0)(search-insights@2.17.3) @@ -7063,19 +7048,19 @@ snapshots: '@shikijs/transformers': 2.1.0 '@shikijs/types': 2.5.0 '@types/markdown-it': 14.1.2 - '@vitejs/plugin-vue': 5.2.1(vite@5.4.14(@types/node@24.3.0)(lightningcss@1.30.1)(terser@5.44.1))(vue@3.5.13(typescript@5.9.3)) + '@vitejs/plugin-vue': 5.2.1(vite@5.4.14(@types/node@25.8.0)(lightningcss@1.32.0)(terser@5.44.1))(vue@3.5.13(typescript@6.0.3)) '@vue/devtools-api': 7.7.0 '@vue/shared': 3.5.13 - '@vueuse/core': 12.5.0(typescript@5.9.3) - '@vueuse/integrations': 12.5.0(focus-trap@7.6.4)(typescript@5.9.3) + '@vueuse/core': 12.5.0(typescript@6.0.3) + '@vueuse/integrations': 12.5.0(focus-trap@7.6.4)(typescript@6.0.3) focus-trap: 7.6.4 mark.js: 8.11.1 minisearch: 7.1.1 shiki: 2.5.0 - vite: 5.4.14(@types/node@24.3.0)(lightningcss@1.30.1)(terser@5.44.1) - vue: 3.5.13(typescript@5.9.3) + vite: 5.4.14(@types/node@25.8.0)(lightningcss@1.32.0)(terser@5.44.1) + vue: 3.5.13(typescript@6.0.3) optionalDependencies: - postcss: 8.5.6 + postcss: 8.5.14 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -7103,15 +7088,15 @@ snapshots: - typescript - universal-cookie - vue@3.5.13(typescript@5.9.3): + vue@3.5.13(typescript@6.0.3): dependencies: '@vue/compiler-dom': 3.5.13 '@vue/compiler-sfc': 3.5.13 '@vue/runtime-dom': 3.5.13 - '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.9.3)) + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@6.0.3)) '@vue/shared': 3.5.13 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 web-namespaces@2.0.1: {} @@ -7129,10 +7114,18 @@ snapshots: yallist@3.1.1: {} - yallist@5.0.0: {} - yaml@2.8.2: {} + yaml@2.9.0: {} + yocto-queue@0.1.0: {} + zod-validation-error@4.0.2(zod@4.1.13): + dependencies: + zod: 4.1.13 + + zod@4.1.13: {} + + zod@4.4.3: {} + zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 32e312f9..9b1d7471 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -2,7 +2,7 @@ packages: - docs - examples/* - packages/* -onlyBuiltDependencies: - - esbuild - - sharp - - simple-git-hooks +allowBuilds: + esbuild: true + sharp: true + simple-git-hooks: true diff --git a/src/build.ts b/src/build.ts index 7b5b6c7e..86828697 100644 --- a/src/build.ts +++ b/src/build.ts @@ -5,14 +5,15 @@ import { reporter } from 'vfile-reporter' import { assets } from './assets' import { resolveConfig } from './config' +import { parseWithContext } from './context' import { VeliteFile } from './file' import { logger } from './logger' import { outputAssets, outputData, outputEntry } from './output' -import { getParsedType, ParseContext } from './schemas/zod' +import { uniqueCache } from './schemas/unique' import { matchPatterns } from './utils' import type { LogLevel } from './logger' -import type { Schema, ZodMeta } from './schemas' +import type { Schema } from './schemas' import type { Config } from './types' // cache resolved result for rebuild @@ -34,7 +35,7 @@ const load = async (config: Config, path: string, schema: Schema, changed?: stri if (exists) return exists } - const file = await VeliteFile.create({ path, config }) + const file = await VeliteFile.create(path, config.loaders) // may be one or more records in one file, such as yaml array or json array const isArr = Array.isArray(file.records) @@ -43,34 +44,18 @@ const load = async (config: Config, path: string, schema: Schema, changed?: stri const parsed = await Promise.all( list.map(async (data, index) => { // push index in path if file is array - const path = isArr ? [index] : [] - - const ctx: ParseContext = { - common: { issues: [], async: true }, - path, - meta: file as ZodMeta, - data, - parent: null, - parsedType: getParsedType(data), - schemaErrorMap: schema._def.errorMap - } - - // parse data with given schema - const ret = schema._parse({ data, path, meta: ctx.meta, parent: ctx }) + const pathPrefix = isArr ? [index] : [] - const result = await (ret instanceof Promise ? ret : Promise.resolve(ret)) + const result = await parseWithContext(schema, data, { config, file }) - if (result.status === 'valid') return result.value + if (result.success) return result.data // report error if parsing failed - ctx.common.issues.forEach(issue => { - const source = issue.path.map(i => (typeof i === 'number' ? `[${i}]` : i)).join('.') - const message = file.message(issue.message, { source }) - message.fatal = result.status === 'aborted' || issue.fatal + result.error.issues.forEach(issue => { + const source = [...pathPrefix, ...(issue.path ?? [])].map(p => (typeof p === 'number' ? `[${p}]` : String(p))).join('.') + const message = file.message(issue.message ?? 'Validation error', { source }) + message.fatal = (issue as any).fatal || config.strict === true }) - - // return parsed data unless fatal error - return result.status !== 'aborted' && result.value }) ) @@ -188,6 +173,7 @@ const watch = async (config: Config) => { if (configImports.includes(fullpath)) { logger.info('velite config changed, restarting...') watcher.close() + uniqueCache.reset() return build({ config: config.configPath, clean: false, watch: true }) } @@ -195,9 +181,7 @@ const watch = async (config: Config) => { if (!matchPatterns(filename, patterns)) return // remove changed file cache - for (const [key, value] of config.cache.entries()) { - if (value === fullpath) config.cache.delete(key) - } + uniqueCache.reset(fullpath) const begin = performance.now() logger.info(`changed: '${fullpath}', rebuilding...`) diff --git a/src/config.ts b/src/config.ts index a606de4f..80f970eb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -101,7 +101,6 @@ export const resolveConfig = async (path?: string, options: { strict?: boolean; ...loadedConfig, configPath, configImports, - cache: new Map(), root: resolve(cwd, loadedConfig.root ?? 'content'), output: { data: resolve(cwd, loadedConfig.output?.data ?? '.velite'), diff --git a/src/context.ts b/src/context.ts new file mode 100644 index 00000000..ad8261a9 --- /dev/null +++ b/src/context.ts @@ -0,0 +1,37 @@ +import { AsyncLocalStorage } from 'node:async_hooks' + +import type { VeliteFile } from './file' +import type { Schema } from './schemas' +import type { Config } from './types' + +/** + * Context in pipeline + */ +export interface Context { + /** + * Resolved config being used + */ + readonly config: Config + /** + * Current file being parsed + */ + readonly file: VeliteFile +} + +const store = new AsyncLocalStorage() + +/** + * Get current context in pipeline + */ +export const context = () => { + const ctx = store.getStore() + if (ctx) return ctx + throw new Error('Missing parser context') +} + +/** + * Run safeParse with context injected. + */ +export const parseWithContext = async (schema: Schema, data: unknown, context: Context) => { + return store.run(context, () => schema.safeParseAsync(data)) +} diff --git a/src/file.ts b/src/file.ts index eaf55daf..b6a1862e 100644 --- a/src/file.ts +++ b/src/file.ts @@ -7,22 +7,16 @@ import { VFile } from 'vfile' import type { Nodes } from 'hast' import type { Root } from 'mdast' -import type { Config } from './types' +import type { Loader } from './types' // cache loaded files for rebuild const loaded = new Map() export class VeliteFile extends VFile { - config: Config private _mdast: Root | undefined private _hast: Nodes | undefined private _plain: string | undefined - constructor({ path, config }: { path: string; config: Config }) { - super({ path }) - this.config = config - } - /** * Get parsed records from file */ @@ -81,14 +75,14 @@ export class VeliteFile extends VFile { * @param options meta options * @returns resolved meta object */ - static async create({ path, config }: { path: string; config: Config }): Promise { - const meta = new VeliteFile({ path, config }) - const loader = config.loaders.find(loader => loader.test.test(path)) - if (loader == null) return meta.fail(`no loader found for '${path}'`) - meta.value = await readFile(path) - meta.data = await loader.load(meta) - if (meta.data?.data == null) return meta.fail(`no data loaded from '${path}'`) - loaded.set(path, meta) - return meta + static async create(path: string, loaders: Loader[]): Promise { + const loader = loaders.find(l => l.test.test(path)) + const file = new VeliteFile({ path }) + if (loader == null) return file.fail(`no loader found for '${path}'`) + file.value = await readFile(path) + file.data = await loader.load(file) + if (file.data?.data == null) return file.fail(`no data loaded from '${path}'`) + loaded.set(path, file) + return file } } diff --git a/src/index.ts b/src/index.ts index 1c92b088..b4eaf8ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ -export * from './logger' -export * from './schemas' export * from './assets' export * from './build' -export * from './types' +export * from './context' export * from './file' +export * from './logger' +export * from './schemas' +export * from './types' diff --git a/src/schemas/excerpt.ts b/src/schemas/excerpt.ts index a37f4b34..bf4ebe52 100644 --- a/src/schemas/excerpt.ts +++ b/src/schemas/excerpt.ts @@ -1,4 +1,6 @@ -import { custom } from './zod' +import { custom } from 'zod' + +import { context } from '../context' export interface ExcerptOptions { // /** @@ -16,12 +18,14 @@ export interface ExcerptOptions { } export const excerpt = ({ length = 260 }: ExcerptOptions = {}) => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta, addIssue }) => { - value = value ?? meta.plain - if (value == null || value.length === 0) { - addIssue({ code: 'custom', message: 'The content is empty' }) - return '' - } + custom(i => typeof i === 'string') + .optional() + .transform(async (value, ctx) => { + value = value ?? context().file.plain + if (value == null || value.length === 0) { + ctx.addIssue({ code: 'custom', message: 'The content is empty' }) + return '' + } - return value.slice(0, length) - }) + return value.slice(0, length) + }) diff --git a/src/schemas/file.ts b/src/schemas/file.ts index 4e2405e5..128c2af7 100644 --- a/src/schemas/file.ts +++ b/src/schemas/file.ts @@ -1,5 +1,7 @@ +import { string } from 'zod' + import { isRelativePath, processAsset } from '../assets' -import { string } from './zod' +import { context } from '../context' export interface FileOptions { /** @@ -13,14 +15,14 @@ export interface FileOptions { * A file path relative to this file. */ export const file = ({ allowNonRelativePath = true }: FileOptions = {}) => - string().transform(async (value, { meta, addIssue }) => { + string().transform(async (value, ctx) => { try { if (allowNonRelativePath && !isRelativePath(value)) return value - const { output } = meta.config - return await processAsset(value, meta.path, output.name, output.base) + const { file, config } = context() + return await processAsset(value, file.path, config.output.name, config.output.base) } catch (err) { const message = err instanceof Error ? err.message : String(err) - addIssue({ fatal: true, code: 'custom', message }) + ctx.addIssue({ fatal: true, code: 'custom', message, continue: false }) return null as never } }) diff --git a/src/schemas/image.ts b/src/schemas/image.ts index be17b396..c9c77f9c 100644 --- a/src/schemas/image.ts +++ b/src/schemas/image.ts @@ -1,8 +1,9 @@ import { readFile } from 'node:fs/promises' import { join } from 'node:path' +import { string } from 'zod' import { getImageMetadata, processAsset } from '../assets' -import { string } from './zod' +import { context } from '../context' import type { Image } from '../assets' @@ -23,7 +24,7 @@ export interface ImageOptions { * Image schema */ export const image = ({ absoluteRoot }: ImageOptions = {}) => - string().transform(async (value, { meta, addIssue }) => { + string().transform(async (value, ctx) => { try { if (absoluteRoot && /^\//.test(value)) { const buffer = await readFile(join(absoluteRoot, value)) @@ -42,12 +43,13 @@ export const image = ({ absoluteRoot }: ImageOptions = {}) => // return { src: value, ...metadata } // } - const { output } = meta.config + const { file, config } = context() + // process asset as relative path - return await processAsset(value, meta.path, output.name, output.base, true) + return await processAsset(value, file.path, config.output.name, config.output.base, true) } catch (err) { const message = err instanceof Error ? err.message : String(err) - addIssue({ fatal: true, code: 'custom', message }) + ctx.addIssue({ fatal: true, code: 'custom', message }) return null as never } }) diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 79b20c00..3fe01d23 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,3 +1,5 @@ +import * as z from 'zod' + import { excerpt } from './excerpt' import { file } from './file' import { image } from './image' @@ -10,24 +12,25 @@ import { raw } from './raw' import { slug } from './slug' import { toc } from './toc' import { unique } from './unique' -import * as z from './zod' export const s = { ...z, - isodate, - unique, - slug, + excerpt, file, image, - metadata, - excerpt, + isodate, markdown, mdx, + metadata, path, raw, - toc -} + slug, + toc, + unique +} as const -export { z } // keep z for backward compatibility +export { z } -export type { Schema, ZodType, ZodMeta, infer } from './zod' +export type Schema = z.ZodType +export type ZodType = z.ZodType +export type infer = z.infer diff --git a/src/schemas/isodate.ts b/src/schemas/isodate.ts index 3ed59901..cc4e92c7 100644 --- a/src/schemas/isodate.ts +++ b/src/schemas/isodate.ts @@ -1,4 +1,4 @@ -import { string } from './zod' +import { string } from 'zod' export const isodate = () => string() diff --git a/src/schemas/markdown.ts b/src/schemas/markdown.ts index b0c57942..bc507c5a 100644 --- a/src/schemas/markdown.ts +++ b/src/schemas/markdown.ts @@ -5,9 +5,10 @@ import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import { unified } from 'unified' import { visit } from 'unist-util-visit' +import { custom } from 'zod' import { rehypeCopyLinkedFiles } from '../assets' -import { custom } from './zod' +import { context } from '../context' import type { Root as Hast } from 'hast' import type { Root as Mdast } from 'mdast' @@ -39,43 +40,46 @@ const rehypeMetaString = () => (tree: Hast) => { } export const markdown = (options: MarkdownOptions = {}) => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta, addIssue }) => { - value = value ?? meta.content - if (value == null || value.length === 0) { - addIssue({ code: 'custom', message: 'The content is empty' }) - return '' - } + custom(i => typeof i === 'string') + .optional() + .transform(async (value, ctx) => { + const { file, config } = context() + value = value ?? file.content + if (value == null || value.length === 0) { + ctx.addIssue({ code: 'custom', message: 'The content is empty' }) + return '' + } - const { markdown, output } = meta.config + const { markdown, output } = config - const enableGfm = options.gfm ?? markdown?.gfm ?? true - const removeComments = options.removeComments ?? markdown?.removeComments ?? true - const copyLinkedFiles = options.copyLinkedFiles ?? markdown?.copyLinkedFiles ?? true + const enableGfm = options.gfm ?? markdown?.gfm ?? true + const removeComments = options.removeComments ?? markdown?.removeComments ?? true + const copyLinkedFiles = options.copyLinkedFiles ?? markdown?.copyLinkedFiles ?? true - const remarkPlugins = [] as PluggableList - const rehypePlugins = [] as PluggableList + const remarkPlugins = [] as PluggableList + const rehypePlugins = [] as PluggableList - if (enableGfm) remarkPlugins.push(remarkGfm) // support gfm (autolink literals, footnotes, strikethrough, tables, tasklists). - if (removeComments) remarkPlugins.push(remarkRemoveComments) // remove html comments - if (copyLinkedFiles) rehypePlugins.push([rehypeCopyLinkedFiles, output]) // copy linked files to public path and replace their urls with public urls - if (options.remarkPlugins != null) remarkPlugins.push(...options.remarkPlugins) // apply remark plugins - if (options.rehypePlugins != null) rehypePlugins.push(...options.rehypePlugins) // apply rehype plugins - if (markdown?.remarkPlugins != null) remarkPlugins.push(...markdown.remarkPlugins) // apply global remark plugins - if (markdown?.rehypePlugins != null) rehypePlugins.push(...markdown.rehypePlugins) // apply global rehype plugins + if (enableGfm) remarkPlugins.push(remarkGfm) // support gfm (autolink literals, footnotes, strikethrough, tables, tasklists). + if (removeComments) remarkPlugins.push(remarkRemoveComments) // remove html comments + if (copyLinkedFiles) rehypePlugins.push([rehypeCopyLinkedFiles, output]) // copy linked files to public path and replace their urls with public urls + if (options.remarkPlugins != null) remarkPlugins.push(...options.remarkPlugins) // apply remark plugins + if (options.rehypePlugins != null) rehypePlugins.push(...options.rehypePlugins) // apply rehype plugins + if (markdown?.remarkPlugins != null) remarkPlugins.push(...markdown.remarkPlugins) // apply global remark plugins + if (markdown?.rehypePlugins != null) rehypePlugins.push(...markdown.rehypePlugins) // apply global rehype plugins - try { - const html = await unified() - .use(remarkParse) // parse markdown content to a syntax tree - .use(remarkPlugins) // apply remark plugins - .use(remarkRehype, { allowDangerousHtml: true }) - .use(rehypeMetaString) // ensure `data.meta` is preserved in `properties.metastring` for rehype syntax highlighters - .use(rehypeRaw) // turn markdown syntax tree to html syntax tree, with raw html support - .use(rehypePlugins) // apply rehype plugins - .use(rehypeStringify) // serialize html syntax tree - .process({ value, path: meta.path }) - return html.toString() - } catch (err: any) { - addIssue({ fatal: true, code: 'custom', message: err.message }) - return null as never - } - }) + try { + const html = await unified() + .use(remarkParse) // parse markdown content to a syntax tree + .use(remarkPlugins) // apply remark plugins + .use(remarkRehype, { allowDangerousHtml: true }) + .use(rehypeMetaString) // ensure `data.meta` is preserved in `properties.metastring` for rehype syntax highlighters + .use(rehypeRaw) // turn markdown syntax tree to html syntax tree, with raw html support + .use(rehypePlugins) // apply rehype plugins + .use(rehypeStringify) // serialize html syntax tree + .process({ value, path: file.path }) + return html.toString() + } catch (err: any) { + ctx.addIssue({ fatal: true, code: 'custom', message: err.message }) + return null as never + } + }) diff --git a/src/schemas/mdx.ts b/src/schemas/mdx.ts index 41e14f2d..c6e257a8 100644 --- a/src/schemas/mdx.ts +++ b/src/schemas/mdx.ts @@ -1,8 +1,9 @@ import remarkGfm from 'remark-gfm' import { visit } from 'unist-util-visit' +import { custom } from 'zod' import { remarkCopyLinkedFiles } from '../assets' -import { custom } from './zod' +import { context } from '../context' import type { Root } from 'mdast' import type { PluggableList } from 'unified' @@ -18,52 +19,55 @@ const remarkRemoveComments = () => (tree: Root) => { } export const mdx = (options: MdxOptions = {}) => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta, addIssue }) => { - value = value ?? meta.content - if (value == null || value.length === 0) { - addIssue({ code: 'custom', message: 'The content is empty' }) - return '' - } + custom(i => typeof i === 'string') + .optional() + .transform(async (value, ctx) => { + const { file, config } = context() + value = value ?? file.content + if (value == null || value.length === 0) { + ctx.addIssue({ code: 'custom', message: 'The content is empty' }) + return '' + } - const { mdx, output } = meta.config + const { mdx, output } = config - const enableGfm = options.gfm ?? mdx?.gfm ?? true - const enableMinify = options.minify ?? mdx?.minify ?? true - const removeComments = options.removeComments ?? mdx?.removeComments ?? true - const copyLinkedFiles = options.copyLinkedFiles ?? mdx?.copyLinkedFiles ?? true - const outputFormat = options.outputFormat ?? mdx?.outputFormat ?? 'function-body' + const enableGfm = options.gfm ?? mdx?.gfm ?? true + const enableMinify = options.minify ?? mdx?.minify ?? true + const removeComments = options.removeComments ?? mdx?.removeComments ?? true + const copyLinkedFiles = options.copyLinkedFiles ?? mdx?.copyLinkedFiles ?? true + const outputFormat = options.outputFormat ?? mdx?.outputFormat ?? 'function-body' - const remarkPlugins = [] as PluggableList - const rehypePlugins = [] as PluggableList + const remarkPlugins = [] as PluggableList + const rehypePlugins = [] as PluggableList - if (enableGfm) remarkPlugins.push(remarkGfm) // support gfm (autolink literals, footnotes, strikethrough, tables, tasklists). - if (removeComments) remarkPlugins.push(remarkRemoveComments) // remove html comments - if (copyLinkedFiles) remarkPlugins.push([remarkCopyLinkedFiles, output]) // copy linked files to public path and replace their urls with public urls - if (options.remarkPlugins != null) remarkPlugins.push(...options.remarkPlugins) // apply remark plugins - if (options.rehypePlugins != null) rehypePlugins.push(...options.rehypePlugins) // apply rehype plugins - if (mdx?.remarkPlugins != null) remarkPlugins.push(...mdx.remarkPlugins) // apply global remark plugins - if (mdx?.rehypePlugins != null) rehypePlugins.push(...mdx.rehypePlugins) // apply global rehype plugins + if (enableGfm) remarkPlugins.push(remarkGfm) // support gfm (autolink literals, footnotes, strikethrough, tables, tasklists). + if (removeComments) remarkPlugins.push(remarkRemoveComments) // remove html comments + if (copyLinkedFiles) remarkPlugins.push([remarkCopyLinkedFiles, output]) // copy linked files to public path and replace their urls with public urls + if (options.remarkPlugins != null) remarkPlugins.push(...options.remarkPlugins) // apply remark plugins + if (options.rehypePlugins != null) rehypePlugins.push(...options.rehypePlugins) // apply rehype plugins + if (mdx?.remarkPlugins != null) remarkPlugins.push(...mdx.remarkPlugins) // apply global remark plugins + if (mdx?.rehypePlugins != null) rehypePlugins.push(...mdx.rehypePlugins) // apply global rehype plugins - const compilerOptions = { ...mdx, ...options, outputFormat, remarkPlugins, rehypePlugins } + const compilerOptions = { ...mdx, ...options, outputFormat, remarkPlugins, rehypePlugins } - const { compile } = await import('@mdx-js/mdx') + const { compile } = await import('@mdx-js/mdx') - try { - const code = await compile({ value, path: meta.path }, compilerOptions) + try { + const code = await compile({ value, path: file.path }, compilerOptions) - if (!enableMinify) return code.toString() + if (!enableMinify) return code.toString() - const { minify } = await import('terser') - const minified = await minify(code.toString(), { - module: true, - compress: true, - keep_classnames: true, - mangle: { keep_fnames: true }, - parse: { bare_returns: true } - }) - return minified.code ?? code.toString() - } catch (err: any) { - addIssue({ fatal: true, code: 'custom', message: err.message }) - return null as never - } - }) + const { minify } = await import('terser') + const minified = await minify(code.toString(), { + module: true, + compress: true, + keep_classnames: true, + mangle: { keep_fnames: true }, + parse: { bare_returns: true } + }) + return minified.code ?? code.toString() + } catch (err: any) { + ctx.addIssue({ fatal: true, code: 'custom', message: err.message }) + return null as never + } + }) diff --git a/src/schemas/metadata.ts b/src/schemas/metadata.ts index 6320787b..8087d5a7 100644 --- a/src/schemas/metadata.ts +++ b/src/schemas/metadata.ts @@ -1,4 +1,6 @@ -import { custom } from './zod' +import { custom } from 'zod' + +import { context } from '../context' // Unicode ranges for Han (Chinese) and Hiragana/Katakana (Japanese) characters const cjRanges = [ @@ -60,35 +62,37 @@ export interface Metadata { } export const metadata = () => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta, addIssue }) => { - value = value ?? meta.plain - if (value == null || value.length === 0) { - addIssue({ code: 'custom', message: 'The content is empty' }) - return { readingTime: 0, wordCount: 0 } - } + custom(i => typeof i === 'string') + .optional() + .transform(async (value, ctx) => { + value = value ?? context().file.plain + if (value == null || value.length === 0) { + ctx.addIssue({ code: 'custom', message: 'The content is empty' }) + return { readingTime: 0, wordCount: 0 } + } - // https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-remark/src/utils/time-to-read.js - const avgWPM = 265 + // https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-transformer-remark/src/utils/time-to-read.js + const avgWPM = 265 - const latinChars = [] - const cjChars = [] + const latinChars = [] + const cjChars = [] - for (const char of value) { - if (isCjChar(char)) { - cjChars.push(char) - } else { - latinChars.push(char) + for (const char of value) { + if (isCjChar(char)) { + cjChars.push(char) + } else { + latinChars.push(char) + } } - } - // Multiply non-latin character string length by 0.56, because - // on average one word consists of 2 characters in both Chinese and Japanese - const wordCount = wordLength(latinChars.join('')) + cjChars.length * 0.56 + // Multiply non-latin character string length by 0.56, because + // on average one word consists of 2 characters in both Chinese and Japanese + const wordCount = wordLength(latinChars.join('')) + cjChars.length * 0.56 - const time = Math.round(wordCount / avgWPM) + const time = Math.round(wordCount / avgWPM) - return { - readingTime: time === 0 ? 1 : time, - wordCount: wordCount - } - }) + return { + readingTime: time === 0 ? 1 : time, + wordCount: wordCount + } + }) diff --git a/src/schemas/path.ts b/src/schemas/path.ts index bd32af73..445e3254 100644 --- a/src/schemas/path.ts +++ b/src/schemas/path.ts @@ -1,6 +1,7 @@ import { relative } from 'node:path' +import { custom } from 'zod' -import { custom } from './zod' +import { context } from '../context' /** * Options for flattened path @@ -23,14 +24,14 @@ export interface PathOptions { * @returns flattened path based on the file path */ export const path = (options?: PathOptions) => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta, addIssue }) => { - if (value != null) { - addIssue({ fatal: false, code: 'custom', message: '`s.path()` schema will resolve the flattening path based on the file path' }) - } + custom(i => typeof i === 'string') + .optional() + .transform(async () => { + const { config, file } = context() - const flattened = relative(meta.config.root, meta.path) - .replace(/\.[^.]+$/, '') - .replace(/\\/g, '/') + const flattened = relative(config.root, file.path) + .replace(/\.[^.]+$/, '') + .replace(/\\/g, '/') - return options?.removeIndex === false ? flattened : flattened.replace(/\/index$/, '') - }) + return options?.removeIndex === false ? flattened : flattened.replace(/\/index$/, '') + }) diff --git a/src/schemas/raw.ts b/src/schemas/raw.ts index fa5778a1..c3e7c31f 100644 --- a/src/schemas/raw.ts +++ b/src/schemas/raw.ts @@ -1,4 +1,10 @@ -import { custom } from './zod' +import { custom } from 'zod' + +import { context } from '../context' export const raw = () => - custom(i => i === undefined || typeof i === 'string').transform(async (value, { meta }) => value ?? meta.content ?? '') + custom(i => typeof i === 'string') + .optional() + .transform(value => { + return value ?? context().file.content ?? '' + }) diff --git a/src/schemas/slug.ts b/src/schemas/slug.ts index 82bdbc21..b4b9e310 100644 --- a/src/schemas/slug.ts +++ b/src/schemas/slug.ts @@ -1,23 +1,14 @@ -import { string } from './zod' +import { unique } from './unique' /** * generate a slug schema - * @param by unique by this, used to create a unique set of slugs + * @param group unique by this, used to create a unique set of slugs * @param reserved reserved slugs, will be rejected * @returns slug schema */ -export const slug = (by: string = 'global', reserved: string[] = []) => - string() +export const slug = (group: string = 'global', reserved: string[] = []) => + unique(`slug:${group}`) .min(3) .max(200) .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/i, 'Invalid slug') .refine(value => !reserved.includes(value), 'Reserved slug') - .superRefine((value, { path, meta, addIssue }) => { - const key = `schemas:slug:${by}:${value}` - const { cache } = meta.config - if (cache.has(key)) { - addIssue({ fatal: true, code: 'custom', message: `duplicate slug '${value}' in '${meta.path}:${path.join('.')}'` }) - } else { - cache.set(key, meta.path) - } - }) diff --git a/src/schemas/toc.ts b/src/schemas/toc.ts index 92bb5e14..274b08c1 100644 --- a/src/schemas/toc.ts +++ b/src/schemas/toc.ts @@ -2,8 +2,9 @@ import { Link, List, Paragraph } from 'mdast' import { fromMarkdown } from 'mdast-util-from-markdown' import { toc as extractToc } from 'mdast-util-toc' import { visit } from 'unist-util-visit' +import { custom } from 'zod' -import { custom } from './zod' +import { context } from '../context' import type { Options } from 'mdast-util-toc' @@ -98,24 +99,23 @@ const parse = (tree?: List): TocEntry[] => { } export const toc = (options?: T) => - custom(i => i === undefined || typeof i === 'string').transform( - async (value, { meta, addIssue }) => { - value = value ?? meta.content + custom(i => typeof i === 'string') + .optional() + .transform(async (value, ctx) => { + const { file } = context() + value = value ?? file.content if (value == null || value.length === 0) { - addIssue({ code: 'custom', message: 'The content is empty' }) + ctx.addIssue({ code: 'custom', message: 'The content is empty' }) return (options?.original ? {} : []) as T extends { original: true } ? TocTree : TocEntry[] } try { - // extract ast tree from markdown/mdx content - const tree = value != null ? fromMarkdown(value) : meta.mdast + const tree = value != null ? fromMarkdown(value) : file.mdast if (tree == null) throw new Error('No tree found') const tocTree = extractToc(tree, options) - // return the original tree if requested if (options?.original) return tocTree as T extends { original: true } ? TocTree : TocEntry[] return parse(tocTree.map) as T extends { original: true } ? TocTree : TocEntry[] } catch (err: any) { - addIssue({ fatal: true, code: 'custom', message: err.message }) + ctx.addIssue({ fatal: true, code: 'custom', message: err.message }) return null as never } - } - ) + }) diff --git a/src/schemas/unique.ts b/src/schemas/unique.ts index 567226de..4c05464c 100644 --- a/src/schemas/unique.ts +++ b/src/schemas/unique.ts @@ -1,17 +1,40 @@ -import { string } from './zod' +import { string } from 'zod' + +import { context } from '../context' + +class UniqueCache { + private readonly store = new Map() + + set(group: string, value: string, path: string) { + this.store.set(`${group}:${value}`, path) + } + + get(group: string, value: string) { + return this.store.get(`${group}:${value}`) + } + + reset(path?: string) { + if (path == null) return this.store.clear() + + for (const [key, value] of this.store.entries()) { + if (value === path) this.store.delete(key) + } + } +} + +export const uniqueCache = new UniqueCache() /** * generate a unique schema - * @param by unique by + * @param group unique by * @returns unique schema */ -export const unique = (by: string = 'global') => - string().superRefine((value, { path, meta, addIssue }) => { - const key = `schemas:unique:${by}:${value}` - const { cache } = meta.config - if (cache.has(key)) { - addIssue({ fatal: true, code: 'custom', message: `duplicate value '${value}' in '${meta.path}:${path.join('.')}'` }) +export const unique = (group: string = 'global') => + string().superRefine(async (value, ctx) => { + const conflict = uniqueCache.get(group, value) + if (conflict) { + ctx.addIssue({ fatal: true, code: 'custom', message: `Duplicate '${value}' with '${conflict}'` }) } else { - cache.set(key, meta.path) + uniqueCache.set(group, value, context().file.path) } }) diff --git a/src/schemas/zod/ZodError.ts b/src/schemas/zod/ZodError.ts deleted file mode 100644 index a765ca55..00000000 --- a/src/schemas/zod/ZodError.ts +++ /dev/null @@ -1,327 +0,0 @@ -import { Primitive } from './helpers/typeAliases' -import { util, ZodParsedType } from './helpers/util' - -import type { TypeOf, ZodType } from '.' - -type allKeys = T extends any ? keyof T : never - -export type inferFlattenedErrors, U = string> = typeToFlattenedError, U> -export type typeToFlattenedError = { - formErrors: U[] - fieldErrors: { - [P in allKeys]?: U[] - } -} - -export const ZodIssueCode = util.arrayToEnum([ - 'invalid_type', - 'invalid_literal', - 'custom', - 'invalid_union', - 'invalid_union_discriminator', - 'invalid_enum_value', - 'unrecognized_keys', - 'invalid_arguments', - 'invalid_return_type', - 'invalid_date', - 'invalid_string', - 'too_small', - 'too_big', - 'invalid_intersection_types', - 'not_multiple_of', - 'not_finite' -]) - -export type ZodIssueCode = keyof typeof ZodIssueCode - -export type ZodIssueBase = { - path: (string | number)[] - message?: string -} - -export interface ZodInvalidTypeIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_type - expected: ZodParsedType - received: ZodParsedType -} - -export interface ZodInvalidLiteralIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_literal - expected: unknown - received: unknown -} - -export interface ZodUnrecognizedKeysIssue extends ZodIssueBase { - code: typeof ZodIssueCode.unrecognized_keys - keys: string[] -} - -export interface ZodInvalidUnionIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_union - unionErrors: ZodError[] -} - -export interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_union_discriminator - options: Primitive[] -} - -export interface ZodInvalidEnumValueIssue extends ZodIssueBase { - received: string | number - code: typeof ZodIssueCode.invalid_enum_value - options: (string | number)[] -} - -export interface ZodInvalidArgumentsIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_arguments - argumentsError: ZodError -} - -export interface ZodInvalidReturnTypeIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_return_type - returnTypeError: ZodError -} - -export interface ZodInvalidDateIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_date -} - -export type StringValidation = - | 'email' - | 'url' - | 'emoji' - | 'uuid' - | 'nanoid' - | 'regex' - | 'cuid' - | 'cuid2' - | 'ulid' - | 'datetime' - | 'date' - | 'time' - | 'duration' - | 'ip' - | 'base64' - | { includes: string; position?: number } - | { startsWith: string } - | { endsWith: string } - -export interface ZodInvalidStringIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_string - validation: StringValidation -} - -export interface ZodTooSmallIssue extends ZodIssueBase { - code: typeof ZodIssueCode.too_small - minimum: number | bigint - inclusive: boolean - exact?: boolean - type: 'array' | 'string' | 'number' | 'set' | 'date' | 'bigint' -} - -export interface ZodTooBigIssue extends ZodIssueBase { - code: typeof ZodIssueCode.too_big - maximum: number | bigint - inclusive: boolean - exact?: boolean - type: 'array' | 'string' | 'number' | 'set' | 'date' | 'bigint' -} - -export interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase { - code: typeof ZodIssueCode.invalid_intersection_types -} - -export interface ZodNotMultipleOfIssue extends ZodIssueBase { - code: typeof ZodIssueCode.not_multiple_of - multipleOf: number | bigint -} - -export interface ZodNotFiniteIssue extends ZodIssueBase { - code: typeof ZodIssueCode.not_finite -} - -export interface ZodCustomIssue extends ZodIssueBase { - code: typeof ZodIssueCode.custom - params?: { [k: string]: any } -} - -export type DenormalizedError = { [k: string]: DenormalizedError | string[] } - -export type ZodIssueOptionalMessage = - | ZodInvalidTypeIssue - | ZodInvalidLiteralIssue - | ZodUnrecognizedKeysIssue - | ZodInvalidUnionIssue - | ZodInvalidUnionDiscriminatorIssue - | ZodInvalidEnumValueIssue - | ZodInvalidArgumentsIssue - | ZodInvalidReturnTypeIssue - | ZodInvalidDateIssue - | ZodInvalidStringIssue - | ZodTooSmallIssue - | ZodTooBigIssue - | ZodInvalidIntersectionTypesIssue - | ZodNotMultipleOfIssue - | ZodNotFiniteIssue - | ZodCustomIssue - -export type ZodIssue = ZodIssueOptionalMessage & { - fatal?: boolean - message: string -} - -export const quotelessJson = (obj: any) => { - const json = JSON.stringify(obj, null, 2) - return json.replace(/"([^"]+)":/g, '$1:') -} - -type recursiveZodFormattedError = T extends [any, ...any[]] - ? { [K in keyof T]?: ZodFormattedError } - : T extends any[] - ? { [k: number]: ZodFormattedError } - : T extends object - ? { [K in keyof T]?: ZodFormattedError } - : unknown - -export type ZodFormattedError = { - _errors: U[] -} & recursiveZodFormattedError> - -export type inferFormattedError, U = string> = ZodFormattedError, U> - -export class ZodError extends Error { - issues: ZodIssue[] = [] - - get errors() { - return this.issues - } - - constructor(issues: ZodIssue[]) { - super() - - const actualProto = new.target.prototype - if (Object.setPrototypeOf) { - // eslint-disable-next-line ban/ban - Object.setPrototypeOf(this, actualProto) - } else { - ;(this as any).__proto__ = actualProto - } - this.name = 'ZodError' - this.issues = issues - } - - format(): ZodFormattedError - format(mapper: (issue: ZodIssue) => U): ZodFormattedError - format(_mapper?: any) { - const mapper: (issue: ZodIssue) => any = - _mapper || - function (issue: ZodIssue) { - return issue.message - } - const fieldErrors: ZodFormattedError = { _errors: [] } as any - const processError = (error: ZodError) => { - for (const issue of error.issues) { - if (issue.code === 'invalid_union') { - issue.unionErrors.map(processError) - } else if (issue.code === 'invalid_return_type') { - processError(issue.returnTypeError) - } else if (issue.code === 'invalid_arguments') { - processError(issue.argumentsError) - } else if (issue.path.length === 0) { - ;(fieldErrors as any)._errors.push(mapper(issue)) - } else { - let curr: any = fieldErrors - let i = 0 - while (i < issue.path.length) { - const el = issue.path[i] - const terminal = i === issue.path.length - 1 - - if (!terminal) { - curr[el] = curr[el] || { _errors: [] } - // if (typeof el === "string") { - // curr[el] = curr[el] || { _errors: [] }; - // } else if (typeof el === "number") { - // const errorArray: any = []; - // errorArray._errors = []; - // curr[el] = curr[el] || errorArray; - // } - } else { - curr[el] = curr[el] || { _errors: [] } - curr[el]._errors.push(mapper(issue)) - } - - curr = curr[el] - i++ - } - } - } - } - - processError(this) - return fieldErrors - } - - static create = (issues: ZodIssue[]) => { - const error = new ZodError(issues) - return error - } - - static assert(value: unknown): asserts value is ZodError { - if (!(value instanceof ZodError)) { - throw new Error(`Not a ZodError: ${value}`) - } - } - - toString() { - return this.message - } - get message() { - return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2) - } - - get isEmpty(): boolean { - return this.issues.length === 0 - } - - addIssue = (sub: ZodIssue) => { - this.issues = [...this.issues, sub] - } - - addIssues = (subs: ZodIssue[] = []) => { - this.issues = [...this.issues, ...subs] - } - - flatten(): typeToFlattenedError - flatten(mapper?: (issue: ZodIssue) => U): typeToFlattenedError - flatten(mapper: (issue: ZodIssue) => U = (issue: ZodIssue) => issue.message as any): any { - const fieldErrors: any = {} - const formErrors: U[] = [] - for (const sub of this.issues) { - if (sub.path.length > 0) { - fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [] - fieldErrors[sub.path[0]].push(mapper(sub)) - } else { - formErrors.push(mapper(sub)) - } - } - return { formErrors, fieldErrors } - } - - get formErrors() { - return this.flatten() - } -} - -type stripPath = T extends any ? util.OmitKeys : never - -export type IssueData = stripPath & { - path?: (string | number)[] - fatal?: boolean -} - -export type ErrorMapCtx = { - defaultError: string - data: any -} - -export type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { message: string } diff --git a/src/schemas/zod/errors.ts b/src/schemas/zod/errors.ts deleted file mode 100644 index b86b700a..00000000 --- a/src/schemas/zod/errors.ts +++ /dev/null @@ -1,14 +0,0 @@ -import defaultErrorMap from './locales/en' - -import type { ZodErrorMap } from './ZodError' - -let overrideErrorMap = defaultErrorMap -export { defaultErrorMap } - -export function setErrorMap(map: ZodErrorMap) { - overrideErrorMap = map -} - -export function getErrorMap() { - return overrideErrorMap -} diff --git a/src/schemas/zod/external.ts b/src/schemas/zod/external.ts deleted file mode 100644 index 492b3594..00000000 --- a/src/schemas/zod/external.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './errors' -export * from './helpers/parseUtil' -export * from './helpers/typeAliases' -export * from './helpers/util' -export * from './types' -export * from './ZodError' diff --git a/src/schemas/zod/helpers/enumUtil.ts b/src/schemas/zod/helpers/enumUtil.ts deleted file mode 100644 index af3dcf72..00000000 --- a/src/schemas/zod/helpers/enumUtil.ts +++ /dev/null @@ -1,11 +0,0 @@ -export namespace enumUtil { - type UnionToIntersectionFn = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never - - type GetUnionLast = UnionToIntersectionFn extends () => infer Last ? Last : never - - type UnionToTuple = [T] extends [never] ? Tuple : UnionToTuple>, [GetUnionLast, ...Tuple]> - - type CastToStringTuple = T extends [string, ...string[]] ? T : never - - export type UnionToTupleString = CastToStringTuple> -} diff --git a/src/schemas/zod/helpers/errorUtil.ts b/src/schemas/zod/helpers/errorUtil.ts deleted file mode 100644 index abfb1d86..00000000 --- a/src/schemas/zod/helpers/errorUtil.ts +++ /dev/null @@ -1,5 +0,0 @@ -export namespace errorUtil { - export type ErrMessage = string | { message?: string } - export const errToObj = (message?: ErrMessage) => (typeof message === 'string' ? { message } : message || {}) - export const toString = (message?: ErrMessage): string | undefined => (typeof message === 'string' ? message : message?.message) -} diff --git a/src/schemas/zod/helpers/parseUtil.ts b/src/schemas/zod/helpers/parseUtil.ts deleted file mode 100644 index 77a1c2dc..00000000 --- a/src/schemas/zod/helpers/parseUtil.ts +++ /dev/null @@ -1,174 +0,0 @@ -import { VeliteFile } from '../../../file' -import { getErrorMap } from '../errors' -import defaultErrorMap from '../locales/en' - -import type { IssueData, ZodErrorMap, ZodIssue } from '../ZodError' -import type { ZodParsedType } from './util' - -export const makeIssue = (params: { data: any; path: (string | number)[]; errorMaps: ZodErrorMap[]; issueData: IssueData }): ZodIssue => { - const { data, path, errorMaps, issueData } = params - const fullPath = [...path, ...(issueData.path || [])] - const fullIssue = { - ...issueData, - path: fullPath - } - - if (issueData.message !== undefined) { - return { - ...issueData, - path: fullPath, - message: issueData.message - } - } - - let errorMessage = '' - const maps = errorMaps - .filter(m => !!m) - .slice() - .reverse() as ZodErrorMap[] - for (const map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message - } - - return { - ...issueData, - path: fullPath, - message: errorMessage - } -} - -export interface ZodMeta extends VeliteFile {} - -export type ParseParams = { - path: (string | number)[] - meta: ZodMeta - errorMap: ZodErrorMap - async: boolean -} - -export type ParsePathComponent = string | number -export type ParsePath = ParsePathComponent[] -export const EMPTY_PATH: ParsePath = [] - -export interface ParseContext { - readonly common: { - readonly issues: ZodIssue[] - readonly contextualErrorMap?: ZodErrorMap - readonly async: boolean - } - readonly path: ParsePath - readonly meta: ZodMeta - readonly schemaErrorMap?: ZodErrorMap - readonly parent: ParseContext | null - readonly data: any - readonly parsedType: ZodParsedType -} - -export type ParseInput = { - data: any - path: (string | number)[] - meta: ZodMeta - parent: ParseContext -} - -export function addIssueToContext(ctx: ParseContext, issueData: IssueData): void { - const overrideMap = getErrorMap() - const issue = makeIssue({ - issueData: issueData, - data: ctx.data, - path: ctx.path, - errorMaps: [ - ctx.common.contextualErrorMap, // contextual error map is first priority - ctx.schemaErrorMap, // then schema-bound map if available - overrideMap, // then global override map - overrideMap === defaultErrorMap ? undefined : defaultErrorMap // then global default map - ].filter(x => !!x) as ZodErrorMap[] - }) - ctx.common.issues.push(issue) -} - -export type ObjectPair = { - key: SyncParseReturnType - value: SyncParseReturnType -} -export class ParseStatus { - value: 'aborted' | 'dirty' | 'valid' = 'valid' - dirty() { - if (this.value === 'valid') this.value = 'dirty' - } - abort() { - if (this.value !== 'aborted') this.value = 'aborted' - } - - static mergeArray(status: ParseStatus, results: SyncParseReturnType[]): SyncParseReturnType { - const arrayValue: any[] = [] - for (const s of results) { - if (s.status === 'aborted') return INVALID - if (s.status === 'dirty') status.dirty() - arrayValue.push(s.value) - } - - return { status: status.value, value: arrayValue } - } - - static async mergeObjectAsync(status: ParseStatus, pairs: { key: ParseReturnType; value: ParseReturnType }[]): Promise> { - const syncPairs: ObjectPair[] = [] - for (const pair of pairs) { - const key = await pair.key - const value = await pair.value - syncPairs.push({ - key, - value - }) - } - return ParseStatus.mergeObjectSync(status, syncPairs) - } - - static mergeObjectSync( - status: ParseStatus, - pairs: { - key: SyncParseReturnType - value: SyncParseReturnType - alwaysSet?: boolean - }[] - ): SyncParseReturnType { - const finalObject: any = {} - for (const pair of pairs) { - const { key, value } = pair - if (key.status === 'aborted') return INVALID - if (value.status === 'aborted') return INVALID - if (key.status === 'dirty') status.dirty() - if (value.status === 'dirty') status.dirty() - - if (key.value !== '__proto__' && (typeof value.value !== 'undefined' || pair.alwaysSet)) { - finalObject[key.value] = value.value - } - } - - return { status: status.value, value: finalObject } - } -} -export interface ParseResult { - status: 'aborted' | 'dirty' | 'valid' - data: any -} - -export type INVALID = { status: 'aborted' } -export const INVALID: INVALID = Object.freeze({ - status: 'aborted' -}) - -export type DIRTY = { status: 'dirty'; value: T } -export const DIRTY = (value: T): DIRTY => ({ status: 'dirty', value }) - -export type OK = { status: 'valid'; value: T } -export const OK = (value: T): OK => ({ status: 'valid', value }) - -export type SyncParseReturnType = OK | DIRTY | INVALID -export type AsyncParseReturnType = Promise> -export type ParseReturnType = SyncParseReturnType | AsyncParseReturnType - -export const isAborted = (x: ParseReturnType): x is INVALID => (x as any).status === 'aborted' -export const isDirty = (x: ParseReturnType): x is OK | DIRTY => (x as any).status === 'dirty' -export const isValid = (x: ParseReturnType): x is OK => (x as any).status === 'valid' -export const isAsync = (x: ParseReturnType): x is AsyncParseReturnType => typeof Promise !== 'undefined' && x instanceof Promise diff --git a/src/schemas/zod/helpers/partialUtil.ts b/src/schemas/zod/helpers/partialUtil.ts deleted file mode 100644 index 11ac30f2..00000000 --- a/src/schemas/zod/helpers/partialUtil.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { ZodArray, ZodNullable, ZodObject, ZodOptional, ZodRawShape, ZodTuple, ZodTupleItems, ZodTypeAny } from '../index' - -export namespace partialUtil { - // export type DeepPartial = T extends AnyZodObject - // ? ZodObject< - // { [k in keyof T["_shape"]]: InternalDeepPartial }, - // T["_unknownKeys"], - // T["_catchall"] - // > - // : T extends ZodArray - // ? ZodArray, Card> - // : ZodOptional; - - // { - // // optional: T extends ZodOptional ? T : ZodOptional; - // // array: T extends ZodArray ? ZodArray> : never; - // object: T extends AnyZodObject - // ? ZodObject< - // { [k in keyof T["_shape"]]: DeepPartial }, - // T["_unknownKeys"], - // T["_catchall"] - // > - // : never; - // rest: ReturnType; // ZodOptional; - // }[T extends AnyZodObject - // ? "object" // T extends ZodOptional // ? 'optional' // : - // : "rest"]; - - export type DeepPartial = - T extends ZodObject - ? ZodObject<{ [k in keyof T['shape']]: ZodOptional> }, T['_def']['unknownKeys'], T['_def']['catchall']> - : T extends ZodArray - ? ZodArray, Card> - : T extends ZodOptional - ? ZodOptional> - : T extends ZodNullable - ? ZodNullable> - : T extends ZodTuple - ? { - [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial : never - } extends infer PI - ? PI extends ZodTupleItems - ? ZodTuple - : never - : never - : T - // { - // // optional: T extends ZodOptional ? T : ZodOptional; - // // array: T extends ZodArray ? ZodArray> : never; - // object: T extends ZodObject - // ? ZodOptional< - // ZodObject< - // { [k in keyof Shape]: DeepPartial }, - // Params, - // Catchall - // > - // > - // : never; - // rest: ReturnType; - // }[T extends ZodObject - // ? "object" // T extends ZodOptional // ? 'optional' // : - // : "rest"]; -} diff --git a/src/schemas/zod/helpers/typeAliases.ts b/src/schemas/zod/helpers/typeAliases.ts deleted file mode 100644 index 1b4dda26..00000000 --- a/src/schemas/zod/helpers/typeAliases.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type Primitive = string | number | symbol | bigint | boolean | null | undefined -export type Scalars = Primitive | Primitive[] diff --git a/src/schemas/zod/helpers/util.ts b/src/schemas/zod/helpers/util.ts deleted file mode 100644 index fdb987fb..00000000 --- a/src/schemas/zod/helpers/util.ts +++ /dev/null @@ -1,197 +0,0 @@ -export namespace util { - type AssertEqual = (() => V extends T ? 1 : 2) extends () => V extends U ? 1 : 2 ? true : false - - export type isAny = 0 extends 1 & T ? true : false - export const assertEqual = (val: AssertEqual) => val - export function assertIs(_arg: T): void {} - export function assertNever(_x: never): never { - throw new Error() - } - - export type Omit = Pick> - export type OmitKeys = Pick> - export type MakePartial = Omit & Partial> - export type Exactly = T & Record, never> - - export const arrayToEnum = (items: U): { [k in U[number]]: k } => { - const obj: any = {} - for (const item of items) { - obj[item] = item - } - return obj as any - } - - export const getValidEnumValues = (obj: any) => { - const validKeys = objectKeys(obj).filter((k: any) => typeof obj[obj[k]] !== 'number') - const filtered: any = {} - for (const k of validKeys) { - filtered[k] = obj[k] - } - return objectValues(filtered) - } - - export const objectValues = (obj: any) => { - return objectKeys(obj).map(function (e) { - return obj[e] - }) - } - - export const objectKeys: ObjectConstructor['keys'] = - typeof Object.keys === 'function' // eslint-disable-line ban/ban - ? (obj: any) => Object.keys(obj) // eslint-disable-line ban/ban - : (object: any) => { - const keys = [] - for (const key in object) { - if (Object.prototype.hasOwnProperty.call(object, key)) { - keys.push(key) - } - } - return keys - } - - export const find = (arr: T[], checker: (arg: T) => any): T | undefined => { - for (const item of arr) { - if (checker(item)) return item - } - return undefined - } - - export type identity = objectUtil.identity - export type flatten = objectUtil.flatten - - export type noUndefined = T extends undefined ? never : T - - export const isInteger: NumberConstructor['isInteger'] = - typeof Number.isInteger === 'function' - ? val => Number.isInteger(val) // eslint-disable-line ban/ban - : val => typeof val === 'number' && isFinite(val) && Math.floor(val) === val - - export function joinValues(array: T, separator = ' | '): string { - return array.map(val => (typeof val === 'string' ? `'${val}'` : val)).join(separator) - } - - export const jsonStringifyReplacer = (_: string, value: any): any => { - if (typeof value === 'bigint') { - return value.toString() - } - return value - } -} - -export namespace objectUtil { - export type MergeShapes = { - [k in Exclude]: U[k] - } & V - - type optionalKeys = { - [k in keyof T]: undefined extends T[k] ? k : never - }[keyof T] - type requiredKeys = { - [k in keyof T]: undefined extends T[k] ? never : k - }[keyof T] - export type addQuestionMarks = { - [K in requiredKeys]: T[K] - } & { - [K in optionalKeys]?: T[K] - } & { [k in keyof T]?: unknown } - - export type identity = T - export type flatten = identity<{ [k in keyof T]: T[k] }> - - export type noNeverKeys = { - [k in keyof T]: [T[k]] extends [never] ? never : k - }[keyof T] - - export type noNever = identity<{ - [k in noNeverKeys]: k extends keyof T ? T[k] : never - }> - - export const mergeShapes = (first: U, second: T): T & U => { - return { - ...first, - ...second // second overwrites first - } - } - - export type extendShape = { - [K in keyof A as K extends keyof B ? never : K]: A[K] - } & { - [K in keyof B]: B[K] - } -} - -export const ZodParsedType = util.arrayToEnum([ - 'string', - 'nan', - 'number', - 'integer', - 'float', - 'boolean', - 'date', - 'bigint', - 'symbol', - 'function', - 'undefined', - 'null', - 'array', - 'object', - 'unknown', - 'promise', - 'void', - 'never', - 'map', - 'set' -]) - -export type ZodParsedType = keyof typeof ZodParsedType - -export const getParsedType = (data: any): ZodParsedType => { - const t = typeof data - - switch (t) { - case 'undefined': - return ZodParsedType.undefined - - case 'string': - return ZodParsedType.string - - case 'number': - return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number - - case 'boolean': - return ZodParsedType.boolean - - case 'function': - return ZodParsedType.function - - case 'bigint': - return ZodParsedType.bigint - - case 'symbol': - return ZodParsedType.symbol - - case 'object': - if (Array.isArray(data)) { - return ZodParsedType.array - } - if (data === null) { - return ZodParsedType.null - } - if (data.then && typeof data.then === 'function' && data.catch && typeof data.catch === 'function') { - return ZodParsedType.promise - } - if (typeof Map !== 'undefined' && data instanceof Map) { - return ZodParsedType.map - } - if (typeof Set !== 'undefined' && data instanceof Set) { - return ZodParsedType.set - } - if (typeof Date !== 'undefined' && data instanceof Date) { - return ZodParsedType.date - } - return ZodParsedType.object - - default: - return ZodParsedType.unknown - } -} diff --git a/src/schemas/zod/index.ts b/src/schemas/zod/index.ts deleted file mode 100644 index 15c748cd..00000000 --- a/src/schemas/zod/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// don't edit this directory manually -// this is a fork of zod -// https://github.com/colinhacks/zod/pull/3023 -export * from './external' diff --git a/src/schemas/zod/locales/en.ts b/src/schemas/zod/locales/en.ts deleted file mode 100644 index d2935419..00000000 --- a/src/schemas/zod/locales/en.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { util, ZodParsedType } from '../helpers/util' -import { ZodErrorMap, ZodIssueCode } from '../ZodError' - -const errorMap: ZodErrorMap = (issue, _ctx) => { - let message: string - switch (issue.code) { - case ZodIssueCode.invalid_type: - if (issue.received === ZodParsedType.undefined) { - message = 'Required' - } else { - message = `Expected ${issue.expected}, received ${issue.received}` - } - break - case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}` - break - case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ', ')}` - break - case ZodIssueCode.invalid_union: - message = `Invalid input` - break - case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}` - break - case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'` - break - case ZodIssueCode.invalid_arguments: - message = `Invalid function arguments` - break - case ZodIssueCode.invalid_return_type: - message = `Invalid function return type` - break - case ZodIssueCode.invalid_date: - message = `Invalid date` - break - case ZodIssueCode.invalid_string: - if (typeof issue.validation === 'object') { - if ('includes' in issue.validation) { - message = `Invalid input: must include "${issue.validation.includes}"` - - if (typeof issue.validation.position === 'number') { - message = `${message} at one or more positions greater than or equal to ${issue.validation.position}` - } - } else if ('startsWith' in issue.validation) { - message = `Invalid input: must start with "${issue.validation.startsWith}"` - } else if ('endsWith' in issue.validation) { - message = `Invalid input: must end with "${issue.validation.endsWith}"` - } else { - util.assertNever(issue.validation) - } - } else if (issue.validation !== 'regex') { - message = `Invalid ${issue.validation}` - } else { - message = 'Invalid' - } - break - case ZodIssueCode.too_small: - if (issue.type === 'array') - message = `Array must contain ${issue.exact ? 'exactly' : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)` - else if (issue.type === 'string') - message = `String must contain ${issue.exact ? 'exactly' : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)` - else if (issue.type === 'number') - message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}` - else if (issue.type === 'date') - message = `Date must be ${ - issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than ` - }${new Date(Number(issue.minimum))}` - else message = 'Invalid input' - break - case ZodIssueCode.too_big: - if (issue.type === 'array') - message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)` - else if (issue.type === 'string') - message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)` - else if (issue.type === 'number') - message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}` - else if (issue.type === 'bigint') - message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}` - else if (issue.type === 'date') - message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}` - else message = 'Invalid input' - break - case ZodIssueCode.custom: - message = `Invalid input` - break - case ZodIssueCode.invalid_intersection_types: - message = `Intersection results could not be merged` - break - case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue.multipleOf}` - break - case ZodIssueCode.not_finite: - message = 'Number must be finite' - break - default: - message = _ctx.defaultError - util.assertNever(issue) - } - return { message } -} - -export default errorMap diff --git a/src/schemas/zod/types.ts b/src/schemas/zod/types.ts deleted file mode 100644 index fd13287f..00000000 --- a/src/schemas/zod/types.ts +++ /dev/null @@ -1,4847 +0,0 @@ -import { defaultErrorMap, getErrorMap } from './errors' -import { enumUtil } from './helpers/enumUtil' -import { errorUtil } from './helpers/errorUtil' -import { - addIssueToContext, - AsyncParseReturnType, - DIRTY, - INVALID, - isAborted, - isAsync, - isDirty, - isValid, - makeIssue, - OK, - ParseContext, - ParseInput, - ParseParams, - ParsePath, - ParseReturnType, - ParseStatus, - SyncParseReturnType, - ZodMeta -} from './helpers/parseUtil' -import { partialUtil } from './helpers/partialUtil' -import { Primitive } from './helpers/typeAliases' -import { getParsedType, objectUtil, util, ZodParsedType } from './helpers/util' -import { IssueData, StringValidation, ZodCustomIssue, ZodError, ZodErrorMap, ZodIssue, ZodIssueCode } from './ZodError' - -/////////////////////////////////////// -/////////////////////////////////////// -////////// ////////// -////////// ZodType ////////// -////////// ////////// -/////////////////////////////////////// -/////////////////////////////////////// - -export interface RefinementCtx { - addIssue: (arg: IssueData) => void - path: (string | number)[] - meta: ZodMeta -} -export type ZodRawShape = { [k: string]: ZodTypeAny } -export type ZodTypeAny = ZodType -export type TypeOf> = T['_output'] -export type input> = T['_input'] -export type output> = T['_output'] -export type { TypeOf as infer } - -export type CustomErrorParams = Partial> -export interface ZodTypeDef { - errorMap?: ZodErrorMap - description?: string -} - -class ParseInputLazyPath implements ParseInput { - parent: ParseContext - data: any - _path: ParsePath - meta: ZodMeta - _key: string | number | (string | number)[] - _cachedPath: ParsePath = [] - constructor(parent: ParseContext, value: any, path: ParsePath, meta: ZodMeta, key: string | number | (string | number)[]) { - this.parent = parent - this.data = value - this._path = path - this.meta = meta - this._key = key - } - get path() { - if (!this._cachedPath.length) { - if (this._key instanceof Array) { - this._cachedPath.push(...this._path, ...this._key) - } else { - this._cachedPath.push(...this._path, this._key) - } - } - - return this._cachedPath - } -} - -const handleResult = ( - ctx: ParseContext, - result: SyncParseReturnType -): { success: true; data: Output } | { success: false; error: ZodError } => { - if (isValid(result)) { - return { success: true, data: result.value } - } else { - if (!ctx.common.issues.length) { - throw new Error('Validation failed but no issues detected.') - } - - return { - success: false, - get error() { - if ((this as any)._error) return (this as any)._error as Error - const error = new ZodError(ctx.common.issues) - ;(this as any)._error = error - return (this as any)._error - } - } - } -} - -export type RawCreateParams = - | { - errorMap?: ZodErrorMap - invalid_type_error?: string - required_error?: string - message?: string - description?: string - } - | undefined -export type ProcessedCreateParams = { - errorMap?: ZodErrorMap - description?: string -} -function processCreateParams(params: RawCreateParams): ProcessedCreateParams { - if (!params) return {} - const { errorMap, invalid_type_error, required_error, description } = params - if (errorMap && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`) - } - if (errorMap) return { errorMap: errorMap, description } - const customMap: ZodErrorMap = (iss, ctx) => { - const { message } = params - - if (iss.code === 'invalid_enum_value') { - return { message: message ?? ctx.defaultError } - } - if (typeof ctx.data === 'undefined') { - return { message: message ?? required_error ?? ctx.defaultError } - } - if (iss.code !== 'invalid_type') return { message: ctx.defaultError } - return { message: message ?? invalid_type_error ?? ctx.defaultError } - } - return { errorMap: customMap, description } -} - -export type SafeParseSuccess = { - success: true - data: Output - error?: never -} -export type SafeParseError = { - success: false - error: ZodError - data?: never -} - -export type SafeParseReturnType = SafeParseSuccess | SafeParseError - -export abstract class ZodType { - readonly _type!: Output - readonly _output!: Output - readonly _input!: Input - readonly _def!: Def - - get description() { - return this._def.description - } - - abstract _parse(input: ParseInput): ParseReturnType - - _getType(input: ParseInput): string { - return getParsedType(input.data) - } - - _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext { - return ( - ctx || { - common: input.parent.common, - data: input.data, - - parsedType: getParsedType(input.data), - - schemaErrorMap: this._def.errorMap, - path: input.path, - meta: input.parent.meta, - parent: input.parent - } - ) - } - - _processInputParams(input: ParseInput): { - status: ParseStatus - ctx: ParseContext - } { - return { - status: new ParseStatus(), - ctx: { - common: input.parent.common, - data: input.data, - - parsedType: getParsedType(input.data), - - schemaErrorMap: this._def.errorMap, - path: input.path, - meta: input.meta, - parent: input.parent - } - } - } - - _parseSync(input: ParseInput): SyncParseReturnType { - const result = this._parse(input) - if (isAsync(result)) { - throw new Error('Synchronous parse encountered promise.') - } - return result - } - - _parseAsync(input: ParseInput): AsyncParseReturnType { - const result = this._parse(input) - return Promise.resolve(result) - } - - parse(data: unknown, params?: Partial): Output { - const result = this.safeParse(data, params) - if (result.success) return result.data - throw result.error - } - - safeParse(data: unknown, params?: Partial): SafeParseReturnType { - const ctx: ParseContext = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - meta: params?.meta || ({} as ZodMeta), - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - } - const result = this._parseSync({ - data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - - return handleResult(ctx, result) - } - - async parseAsync(data: unknown, params?: Partial): Promise { - const result = await this.safeParseAsync(data, params) - if (result.success) return result.data - throw result.error - } - - async safeParseAsync(data: unknown, params?: Partial): Promise> { - const ctx: ParseContext = { - common: { - issues: [], - contextualErrorMap: params?.errorMap, - async: true - }, - path: params?.path || [], - meta: params?.meta || ({} as ZodMeta), - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType(data) - } - - const maybeAsyncResult = this._parse({ - data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)) - return handleResult(ctx, result) - } - - /** Alias of safeParseAsync */ - spa = this.safeParseAsync - - refine( - check: (arg: Output) => arg is RefinedOutput, - message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams) - ): ZodEffects - refine( - check: (arg: Output) => unknown | Promise, - message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams) - ): ZodEffects - refine(check: (arg: Output) => unknown, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects { - const getIssueProperties = (val: Output) => { - if (typeof message === 'string' || typeof message === 'undefined') { - return { message } - } else if (typeof message === 'function') { - return message(val) - } else { - return message - } - } - return this._refinement((val, ctx) => { - const result = check(val) - const setError = () => - ctx.addIssue({ - code: ZodIssueCode.custom, - ...getIssueProperties(val) - }) - if (typeof Promise !== 'undefined' && result instanceof Promise) { - return result.then(data => { - if (!data) { - setError() - return false - } else { - return true - } - }) - } - if (!result) { - setError() - return false - } else { - return true - } - }) - } - - refinement( - check: (arg: Output) => arg is RefinedOutput, - refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData) - ): ZodEffects - refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects - refinement(check: (arg: Output) => unknown, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === 'function' ? refinementData(val, ctx) : refinementData) - return false - } else { - return true - } - }) - } - - _refinement(refinement: RefinementEffect['refinement']): ZodEffects { - return new ZodEffects({ - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: 'refinement', refinement } - }) - } - - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise): ZodEffects - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => unknown | Promise): ZodEffects { - return this._refinement(refinement) - } - - constructor(def: Def) { - this._def = def - this.parse = this.parse.bind(this) - this.safeParse = this.safeParse.bind(this) - this.parseAsync = this.parseAsync.bind(this) - this.safeParseAsync = this.safeParseAsync.bind(this) - this.spa = this.spa.bind(this) - this.refine = this.refine.bind(this) - this.refinement = this.refinement.bind(this) - this.superRefine = this.superRefine.bind(this) - this.optional = this.optional.bind(this) - this.nullable = this.nullable.bind(this) - this.nullish = this.nullish.bind(this) - this.array = this.array.bind(this) - this.promise = this.promise.bind(this) - this.or = this.or.bind(this) - this.and = this.and.bind(this) - this.transform = this.transform.bind(this) - this.brand = this.brand.bind(this) - this.default = this.default.bind(this) - this.catch = this.catch.bind(this) - this.describe = this.describe.bind(this) - this.pipe = this.pipe.bind(this) - this.readonly = this.readonly.bind(this) - this.isNullable = this.isNullable.bind(this) - this.isOptional = this.isOptional.bind(this) - } - - optional(): ZodOptional { - return ZodOptional.create(this, this._def) as any - } - nullable(): ZodNullable { - return ZodNullable.create(this, this._def) as any - } - nullish(): ZodOptional> { - return this.nullable().optional() - } - array(): ZodArray { - return ZodArray.create(this, this._def) - } - promise(): ZodPromise { - return ZodPromise.create(this, this._def) - } - - or(option: T): ZodUnion<[this, T]> { - return ZodUnion.create([this, option], this._def) as any - } - - and(incoming: T): ZodIntersection { - return ZodIntersection.create(this, incoming, this._def) - } - - transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodEffects { - return new ZodEffects({ - ...processCreateParams(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect: { type: 'transform', transform } - }) as any - } - - default(def: util.noUndefined): ZodDefault - default(def: () => util.noUndefined): ZodDefault - default(def: any) { - const defaultValueFunc = typeof def === 'function' ? def : () => def - - return new ZodDefault({ - ...processCreateParams(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind.ZodDefault - }) as any - } - - brand(brand?: B): ZodBranded - brand(): ZodBranded { - return new ZodBranded({ - typeName: ZodFirstPartyTypeKind.ZodBranded, - type: this, - ...processCreateParams(this._def) - }) - } - - catch(def: Output): ZodCatch - catch(def: (ctx: { error: ZodError; input: Input }) => Output): ZodCatch - catch(def: any) { - const catchValueFunc = typeof def === 'function' ? def : () => def - - return new ZodCatch({ - ...processCreateParams(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind.ZodCatch - }) as any - } - - describe(description: string): this { - const This = (this as any).constructor - return new This({ - ...this._def, - description - }) - } - - pipe(target: T): ZodPipeline { - return ZodPipeline.create(this, target) - } - readonly(): ZodReadonly { - return ZodReadonly.create(this) - } - - isOptional(): boolean { - return this.safeParse(undefined).success - } - isNullable(): boolean { - return this.safeParse(null).success - } -} - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodString ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// -export type IpVersion = 'v4' | 'v6' -export type ZodStringCheck = - | { kind: 'min'; value: number; message?: string } - | { kind: 'max'; value: number; message?: string } - | { kind: 'length'; value: number; message?: string } - | { kind: 'email'; message?: string } - | { kind: 'url'; message?: string } - | { kind: 'emoji'; message?: string } - | { kind: 'uuid'; message?: string } - | { kind: 'nanoid'; message?: string } - | { kind: 'cuid'; message?: string } - | { kind: 'includes'; value: string; position?: number; message?: string } - | { kind: 'cuid2'; message?: string } - | { kind: 'ulid'; message?: string } - | { kind: 'startsWith'; value: string; message?: string } - | { kind: 'endsWith'; value: string; message?: string } - | { kind: 'regex'; regex: RegExp; message?: string } - | { kind: 'trim'; message?: string } - | { kind: 'toLowerCase'; message?: string } - | { kind: 'toUpperCase'; message?: string } - | { - kind: 'datetime' - offset: boolean - local: boolean - precision: number | null - message?: string - } - | { - kind: 'date' - // withDate: true; - message?: string - } - | { - kind: 'time' - precision: number | null - message?: string - } - | { kind: 'duration'; message?: string } - | { kind: 'ip'; version?: IpVersion; message?: string } - | { kind: 'base64'; message?: string } - -export interface ZodStringDef extends ZodTypeDef { - checks: ZodStringCheck[] - typeName: ZodFirstPartyTypeKind.ZodString - coerce: boolean -} - -const cuidRegex = /^c[^\s-]{8,}$/i -const cuid2Regex = /^[0-9a-z]+$/ -const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/ -// const uuidRegex = -// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i; -const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i -const nanoidRegex = /^[a-z0-9_-]{21}$/i -const durationRegex = - /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/ - -// from https://stackoverflow.com/a/46181/1550155 -// old version: too slow, didn't support unicode -// const emailRegex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i; -//old email regex -// const emailRegex = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@((?!-)([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{1,})[^-<>()[\].,;:\s@"]$/i; -// eslint-disable-next-line -// const emailRegex = -// /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/; -// const emailRegex = -// /^[a-zA-Z0-9\.\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -// const emailRegex = -// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i; -const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i -// const emailRegex = -// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9\-]+)*$/i; - -// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression -const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$` -let emojiRegex: RegExp - -// faster, simpler, safer -const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/ - -const ipv6Regex = - /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/ - -// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript -const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/ - -// simple -// const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`; -// no leap year validation -// const dateRegexSource = `\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\d|2\\d))`; -// with leap year validation -const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))` -const dateRegex = new RegExp(`^${dateRegexSource}$`) - -function timeRegexSource(args: { precision?: number | null }) { - // let regex = `\\d{2}:\\d{2}:\\d{2}`; - let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d` - - if (args.precision) { - regex = `${regex}\\.\\d{${args.precision}}` - } else if (args.precision == null) { - regex = `${regex}(\\.\\d+)?` - } - return regex -} -function timeRegex(args: { offset?: boolean; local?: boolean; precision?: number | null }) { - return new RegExp(`^${timeRegexSource(args)}$`) -} - -// Adapted from https://stackoverflow.com/a/3143231 -export function datetimeRegex(args: { precision?: number | null; offset?: boolean; local?: boolean }) { - let regex = `${dateRegexSource}T${timeRegexSource(args)}` - - const opts: string[] = [] - opts.push(args.local ? `Z?` : `Z`) - if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`) - regex = `${regex}(${opts.join('|')})` - return new RegExp(`^${regex}$`) -} - -function isValidIP(ip: string, version?: IpVersion) { - if ((version === 'v4' || !version) && ipv4Regex.test(ip)) { - return true - } - if ((version === 'v6' || !version) && ipv6Regex.test(ip)) { - return true - } - - return false -} - -export class ZodString extends ZodType { - _parse(input: ParseInput): ParseReturnType { - if (this._def.coerce) { - input.data = String(input.data) - } - const parsedType = this._getType(input) - - if (parsedType !== ZodParsedType.string) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.string, - received: ctx.parsedType - }) - return INVALID - } - - const status = new ParseStatus() - let ctx: undefined | ParseContext = undefined - - for (const check of this._def.checks) { - if (check.kind === 'min') { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: 'string', - inclusive: true, - exact: false, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'max') { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: 'string', - inclusive: true, - exact: false, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'length') { - const tooBig = input.data.length > check.value - const tooSmall = input.data.length < check.value - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx) - if (tooBig) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: 'string', - inclusive: true, - exact: true, - message: check.message - }) - } else if (tooSmall) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: 'string', - inclusive: true, - exact: true, - message: check.message - }) - } - status.dirty() - } - } else if (check.kind === 'email') { - if (!emailRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'email', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'emoji') { - if (!emojiRegex) { - emojiRegex = new RegExp(_emojiRegex, 'u') - } - if (!emojiRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'emoji', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'uuid') { - if (!uuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'uuid', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'nanoid') { - if (!nanoidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'nanoid', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'cuid') { - if (!cuidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'cuid', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'cuid2') { - if (!cuid2Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'cuid2', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'ulid') { - if (!ulidRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'ulid', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'url') { - try { - new URL(input.data) - } catch { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'url', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'regex') { - check.regex.lastIndex = 0 - const testResult = check.regex.test(input.data) - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'regex', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'trim') { - input.data = input.data.trim() - } else if (check.kind === 'includes') { - if (!(input.data as string).includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'toLowerCase') { - input.data = input.data.toLowerCase() - } else if (check.kind === 'toUpperCase') { - input.data = input.data.toUpperCase() - } else if (check.kind === 'startsWith') { - if (!(input.data as string).startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'endsWith') { - if (!(input.data as string).endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'datetime') { - const regex = datetimeRegex(check) - - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: 'datetime', - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'date') { - const regex = dateRegex - - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: 'date', - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'time') { - const regex = timeRegex(check) - - if (!regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_string, - validation: 'time', - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'duration') { - if (!durationRegex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'duration', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'ip') { - if (!isValidIP(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'ip', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'base64') { - if (!base64Regex.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - validation: 'base64', - code: ZodIssueCode.invalid_string, - message: check.message - }) - status.dirty() - } - } else { - util.assertNever(check) - } - } - - return { status: status.value, value: input.data } - } - - protected _regex(regex: RegExp, validation: StringValidation, message?: errorUtil.ErrMessage) { - return this.refinement(data => regex.test(data), { - validation, - code: ZodIssueCode.invalid_string, - ...errorUtil.errToObj(message) - }) - } - - _addCheck(check: ZodStringCheck) { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }) - } - - email(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'email', ...errorUtil.errToObj(message) }) - } - - url(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'url', ...errorUtil.errToObj(message) }) - } - - emoji(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'emoji', ...errorUtil.errToObj(message) }) - } - - uuid(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'uuid', ...errorUtil.errToObj(message) }) - } - nanoid(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'nanoid', ...errorUtil.errToObj(message) }) - } - cuid(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'cuid', ...errorUtil.errToObj(message) }) - } - - cuid2(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'cuid2', ...errorUtil.errToObj(message) }) - } - ulid(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'ulid', ...errorUtil.errToObj(message) }) - } - base64(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'base64', ...errorUtil.errToObj(message) }) - } - - ip(options?: string | { version?: 'v4' | 'v6'; message?: string }) { - return this._addCheck({ kind: 'ip', ...errorUtil.errToObj(options) }) - } - - datetime( - options?: - | string - | { - message?: string | undefined - precision?: number | null - offset?: boolean - local?: boolean - } - ) { - if (typeof options === 'string') { - return this._addCheck({ - kind: 'datetime', - precision: null, - offset: false, - local: false, - message: options - }) - } - return this._addCheck({ - kind: 'datetime', - - precision: typeof options?.precision === 'undefined' ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil.errToObj(options?.message) - }) - } - - date(message?: string) { - return this._addCheck({ kind: 'date', message }) - } - - time( - options?: - | string - | { - message?: string | undefined - precision?: number | null - } - ) { - if (typeof options === 'string') { - return this._addCheck({ - kind: 'time', - precision: null, - message: options - }) - } - return this._addCheck({ - kind: 'time', - precision: typeof options?.precision === 'undefined' ? null : options?.precision, - ...errorUtil.errToObj(options?.message) - }) - } - - duration(message?: errorUtil.ErrMessage) { - return this._addCheck({ kind: 'duration', ...errorUtil.errToObj(message) }) - } - - regex(regex: RegExp, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'regex', - regex: regex, - ...errorUtil.errToObj(message) - }) - } - - includes(value: string, options?: { message?: string; position?: number }) { - return this._addCheck({ - kind: 'includes', - value: value, - position: options?.position, - ...errorUtil.errToObj(options?.message) - }) - } - - startsWith(value: string, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'startsWith', - value: value, - ...errorUtil.errToObj(message) - }) - } - - endsWith(value: string, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'endsWith', - value: value, - ...errorUtil.errToObj(message) - }) - } - - min(minLength: number, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: minLength, - ...errorUtil.errToObj(message) - }) - } - - max(maxLength: number, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: maxLength, - ...errorUtil.errToObj(message) - }) - } - - length(len: number, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'length', - value: len, - ...errorUtil.errToObj(message) - }) - } - - /** - * @deprecated Use z.string().min(1) instead. - * @see {@link ZodString.min} - */ - nonempty(message?: errorUtil.ErrMessage) { - return this.min(1, errorUtil.errToObj(message)) - } - - trim() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: 'trim' }] - }) - } - - toLowerCase() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: 'toLowerCase' }] - }) - } - - toUpperCase() { - return new ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: 'toUpperCase' }] - }) - } - - get isDatetime() { - return !!this._def.checks.find(ch => ch.kind === 'datetime') - } - - get isDate() { - return !!this._def.checks.find(ch => ch.kind === 'date') - } - - get isTime() { - return !!this._def.checks.find(ch => ch.kind === 'time') - } - get isDuration() { - return !!this._def.checks.find(ch => ch.kind === 'duration') - } - - get isEmail() { - return !!this._def.checks.find(ch => ch.kind === 'email') - } - - get isURL() { - return !!this._def.checks.find(ch => ch.kind === 'url') - } - - get isEmoji() { - return !!this._def.checks.find(ch => ch.kind === 'emoji') - } - - get isUUID() { - return !!this._def.checks.find(ch => ch.kind === 'uuid') - } - get isNANOID() { - return !!this._def.checks.find(ch => ch.kind === 'nanoid') - } - get isCUID() { - return !!this._def.checks.find(ch => ch.kind === 'cuid') - } - - get isCUID2() { - return !!this._def.checks.find(ch => ch.kind === 'cuid2') - } - get isULID() { - return !!this._def.checks.find(ch => ch.kind === 'ulid') - } - get isIP() { - return !!this._def.checks.find(ch => ch.kind === 'ip') - } - get isBase64() { - return !!this._def.checks.find(ch => ch.kind === 'base64') - } - - get minLength() { - let min: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'min') { - if (min === null || ch.value > min) min = ch.value - } - } - return min - } - - get maxLength() { - let max: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'max') { - if (max === null || ch.value < max) max = ch.value - } - } - return max - } - - static create = (params?: RawCreateParams & { coerce?: true }): ZodString => { - return new ZodString({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }) - } -} - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodNumber ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// -export type ZodNumberCheck = - | { kind: 'min'; value: number; inclusive: boolean; message?: string } - | { kind: 'max'; value: number; inclusive: boolean; message?: string } - | { kind: 'int'; message?: string } - | { kind: 'multipleOf'; value: number; message?: string } - | { kind: 'finite'; message?: string } - -// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034 -function floatSafeRemainder(val: number, step: number) { - const valDecCount = (val.toString().split('.')[1] || '').length - const stepDecCount = (step.toString().split('.')[1] || '').length - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount - const valInt = parseInt(val.toFixed(decCount).replace('.', '')) - const stepInt = parseInt(step.toFixed(decCount).replace('.', '')) - return (valInt % stepInt) / Math.pow(10, decCount) -} - -export interface ZodNumberDef extends ZodTypeDef { - checks: ZodNumberCheck[] - typeName: ZodFirstPartyTypeKind.ZodNumber - coerce: boolean -} - -export class ZodNumber extends ZodType { - _parse(input: ParseInput): ParseReturnType { - if (this._def.coerce) { - input.data = Number(input.data) - } - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.number) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.number, - received: ctx.parsedType - }) - return INVALID - } - - let ctx: undefined | ParseContext = undefined - const status = new ParseStatus() - - for (const check of this._def.checks) { - if (check.kind === 'int') { - if (!util.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: 'integer', - received: 'float', - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'min') { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: check.value, - type: 'number', - inclusive: check.inclusive, - exact: false, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'max') { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: check.value, - type: 'number', - inclusive: check.inclusive, - exact: false, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'multipleOf') { - if (floatSafeRemainder(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'finite') { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.not_finite, - message: check.message - }) - status.dirty() - } - } else { - util.assertNever(check) - } - } - - return { status: status.value, value: input.data } - } - - static create = (params?: RawCreateParams & { coerce?: boolean }): ZodNumber => { - return new ZodNumber({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams(params) - }) - } - - gte(value: number, message?: errorUtil.ErrMessage) { - return this.setLimit('min', value, true, errorUtil.toString(message)) - } - min = this.gte - - gt(value: number, message?: errorUtil.ErrMessage) { - return this.setLimit('min', value, false, errorUtil.toString(message)) - } - - lte(value: number, message?: errorUtil.ErrMessage) { - return this.setLimit('max', value, true, errorUtil.toString(message)) - } - max = this.lte - - lt(value: number, message?: errorUtil.ErrMessage) { - return this.setLimit('max', value, false, errorUtil.toString(message)) - } - - protected setLimit(kind: 'min' | 'max', value: number, inclusive: boolean, message?: string) { - return new ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }) - } - - _addCheck(check: ZodNumberCheck) { - return new ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }) - } - - int(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'int', - message: errorUtil.toString(message) - }) - } - - positive(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }) - } - - negative(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: 0, - inclusive: false, - message: errorUtil.toString(message) - }) - } - - nonpositive(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }) - } - - nonnegative(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: 0, - inclusive: true, - message: errorUtil.toString(message) - }) - } - - multipleOf(value: number, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'multipleOf', - value: value, - message: errorUtil.toString(message) - }) - } - step = this.multipleOf - - finite(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'finite', - message: errorUtil.toString(message) - }) - } - - safe(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil.toString(message) - })._addCheck({ - kind: 'max', - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil.toString(message) - }) - } - - get minValue() { - let min: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'min') { - if (min === null || ch.value > min) min = ch.value - } - } - return min - } - - get maxValue() { - let max: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'max') { - if (max === null || ch.value < max) max = ch.value - } - } - return max - } - - get isInt() { - return !!this._def.checks.find(ch => ch.kind === 'int' || (ch.kind === 'multipleOf' && util.isInteger(ch.value))) - } - - get isFinite() { - let max: number | null = null, - min: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'finite' || ch.kind === 'int' || ch.kind === 'multipleOf') { - return true - } else if (ch.kind === 'min') { - if (min === null || ch.value > min) min = ch.value - } else if (ch.kind === 'max') { - if (max === null || ch.value < max) max = ch.value - } - } - return Number.isFinite(min) && Number.isFinite(max) - } -} - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodBigInt ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// -export type ZodBigIntCheck = - | { kind: 'min'; value: bigint; inclusive: boolean; message?: string } - | { kind: 'max'; value: bigint; inclusive: boolean; message?: string } - | { kind: 'multipleOf'; value: bigint; message?: string } - -export interface ZodBigIntDef extends ZodTypeDef { - checks: ZodBigIntCheck[] - typeName: ZodFirstPartyTypeKind.ZodBigInt - coerce: boolean -} - -export class ZodBigInt extends ZodType { - _parse(input: ParseInput): ParseReturnType { - if (this._def.coerce) { - input.data = BigInt(input.data) - } - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.bigint) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.bigint, - received: ctx.parsedType - }) - return INVALID - } - - let ctx: undefined | ParseContext = undefined - const status = new ParseStatus() - - for (const check of this._def.checks) { - if (check.kind === 'min') { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - type: 'bigint', - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'max') { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - type: 'bigint', - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }) - status.dirty() - } - } else if (check.kind === 'multipleOf') { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.not_multiple_of, - multipleOf: check.value, - message: check.message - }) - status.dirty() - } - } else { - util.assertNever(check) - } - } - - return { status: status.value, value: input.data } - } - - static create = (params?: RawCreateParams & { coerce?: boolean }): ZodBigInt => { - return new ZodBigInt({ - checks: [], - typeName: ZodFirstPartyTypeKind.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams(params) - }) - } - - gte(value: bigint, message?: errorUtil.ErrMessage) { - return this.setLimit('min', value, true, errorUtil.toString(message)) - } - min = this.gte - - gt(value: bigint, message?: errorUtil.ErrMessage) { - return this.setLimit('min', value, false, errorUtil.toString(message)) - } - - lte(value: bigint, message?: errorUtil.ErrMessage) { - return this.setLimit('max', value, true, errorUtil.toString(message)) - } - max = this.lte - - lt(value: bigint, message?: errorUtil.ErrMessage) { - return this.setLimit('max', value, false, errorUtil.toString(message)) - } - - protected setLimit(kind: 'min' | 'max', value: bigint, inclusive: boolean, message?: string) { - return new ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value, - inclusive, - message: errorUtil.toString(message) - } - ] - }) - } - - _addCheck(check: ZodBigIntCheck) { - return new ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }) - } - - positive(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }) - } - - negative(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: BigInt(0), - inclusive: false, - message: errorUtil.toString(message) - }) - } - - nonpositive(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }) - } - - nonnegative(message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: BigInt(0), - inclusive: true, - message: errorUtil.toString(message) - }) - } - - multipleOf(value: bigint, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'multipleOf', - value, - message: errorUtil.toString(message) - }) - } - - get minValue() { - let min: bigint | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'min') { - if (min === null || ch.value > min) min = ch.value - } - } - return min - } - - get maxValue() { - let max: bigint | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'max') { - if (max === null || ch.value < max) max = ch.value - } - } - return max - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// /////////// -////////// ZodBoolean ////////// -////////// /////////// -////////////////////////////////////////// -////////////////////////////////////////// -export interface ZodBooleanDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodBoolean - coerce: boolean -} - -export class ZodBoolean extends ZodType { - _parse(input: ParseInput): ParseReturnType { - if (this._def.coerce) { - input.data = Boolean(input.data) - } - const parsedType = this._getType(input) - - if (parsedType !== ZodParsedType.boolean) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.boolean, - received: ctx.parsedType - }) - return INVALID - } - return OK(input.data) - } - - static create = (params?: RawCreateParams & { coerce?: boolean }): ZodBoolean => { - return new ZodBoolean({ - typeName: ZodFirstPartyTypeKind.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////// -/////////////////////////////////////// -////////// //////// -////////// ZodDate //////// -////////// //////// -/////////////////////////////////////// -/////////////////////////////////////// -export type ZodDateCheck = { kind: 'min'; value: number; message?: string } | { kind: 'max'; value: number; message?: string } -export interface ZodDateDef extends ZodTypeDef { - checks: ZodDateCheck[] - coerce: boolean - typeName: ZodFirstPartyTypeKind.ZodDate -} - -export class ZodDate extends ZodType { - _parse(input: ParseInput): ParseReturnType { - if (this._def.coerce) { - input.data = new Date(input.data) - } - const parsedType = this._getType(input) - - if (parsedType !== ZodParsedType.date) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.date, - received: ctx.parsedType - }) - return INVALID - } - - if (isNaN(input.data.getTime())) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_date - }) - return INVALID - } - - const status = new ParseStatus() - let ctx: undefined | ParseContext = undefined - - for (const check of this._def.checks) { - if (check.kind === 'min') { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: 'date' - }) - status.dirty() - } - } else if (check.kind === 'max') { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx) - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: 'date' - }) - status.dirty() - } - } else { - util.assertNever(check) - } - } - - return { - status: status.value, - value: new Date((input.data as Date).getTime()) - } - } - - _addCheck(check: ZodDateCheck) { - return new ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }) - } - - min(minDate: Date, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'min', - value: minDate.getTime(), - message: errorUtil.toString(message) - }) - } - - max(maxDate: Date, message?: errorUtil.ErrMessage) { - return this._addCheck({ - kind: 'max', - value: maxDate.getTime(), - message: errorUtil.toString(message) - }) - } - - get minDate() { - let min: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'min') { - if (min === null || ch.value > min) min = ch.value - } - } - - return min != null ? new Date(min) : null - } - - get maxDate() { - let max: number | null = null - for (const ch of this._def.checks) { - if (ch.kind === 'max') { - if (max === null || ch.value < max) max = ch.value - } - } - - return max != null ? new Date(max) : null - } - - static create = (params?: RawCreateParams & { coerce?: boolean }): ZodDate => { - return new ZodDate({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind.ZodDate, - ...processCreateParams(params) - }) - } -} - -//////////////////////////////////////////// -//////////////////////////////////////////// -////////// ////////// -////////// ZodSymbol ////////// -////////// ////////// -//////////////////////////////////////////// -//////////////////////////////////////////// -export interface ZodSymbolDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodSymbol -} - -export class ZodSymbol extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.symbol) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.symbol, - received: ctx.parsedType - }) - return INVALID - } - - return OK(input.data) - } - - static create = (params?: RawCreateParams): ZodSymbol => { - return new ZodSymbol({ - typeName: ZodFirstPartyTypeKind.ZodSymbol, - ...processCreateParams(params) - }) - } -} - -//////////////////////////////////////////// -//////////////////////////////////////////// -////////// ////////// -////////// ZodUndefined ////////// -////////// ////////// -//////////////////////////////////////////// -//////////////////////////////////////////// -export interface ZodUndefinedDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodUndefined -} - -export class ZodUndefined extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.undefined, - received: ctx.parsedType - }) - return INVALID - } - return OK(input.data) - } - params?: RawCreateParams - - static create = (params?: RawCreateParams): ZodUndefined => { - return new ZodUndefined({ - typeName: ZodFirstPartyTypeKind.ZodUndefined, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////// -/////////////////////////////////////// -////////// ////////// -////////// ZodNull ////////// -////////// ////////// -/////////////////////////////////////// -/////////////////////////////////////// -export interface ZodNullDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodNull -} - -export class ZodNull extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.null) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.null, - received: ctx.parsedType - }) - return INVALID - } - return OK(input.data) - } - static create = (params?: RawCreateParams): ZodNull => { - return new ZodNull({ - typeName: ZodFirstPartyTypeKind.ZodNull, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////// -////////////////////////////////////// -////////// ////////// -////////// ZodAny ////////// -////////// ////////// -////////////////////////////////////// -////////////////////////////////////// -export interface ZodAnyDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodAny -} - -export class ZodAny extends ZodType { - // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject. - _any = true as const - _parse(input: ParseInput): ParseReturnType { - return OK(input.data) - } - static create = (params?: RawCreateParams): ZodAny => { - return new ZodAny({ - typeName: ZodFirstPartyTypeKind.ZodAny, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// ////////// -////////// ZodUnknown ////////// -////////// ////////// -////////////////////////////////////////// -////////////////////////////////////////// -export interface ZodUnknownDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodUnknown -} - -export class ZodUnknown extends ZodType { - // required - _unknown = true as const - _parse(input: ParseInput): ParseReturnType { - return OK(input.data) - } - - static create = (params?: RawCreateParams): ZodUnknown => { - return new ZodUnknown({ - typeName: ZodFirstPartyTypeKind.ZodUnknown, - ...processCreateParams(params) - }) - } -} - -//////////////////////////////////////// -//////////////////////////////////////// -////////// ////////// -////////// ZodNever ////////// -////////// ////////// -//////////////////////////////////////// -//////////////////////////////////////// -export interface ZodNeverDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodNever -} - -export class ZodNever extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.never, - received: ctx.parsedType - }) - return INVALID - } - static create = (params?: RawCreateParams): ZodNever => { - return new ZodNever({ - typeName: ZodFirstPartyTypeKind.ZodNever, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////// -/////////////////////////////////////// -////////// ////////// -////////// ZodVoid ////////// -////////// ////////// -/////////////////////////////////////// -/////////////////////////////////////// -export interface ZodVoidDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodVoid -} - -export class ZodVoid extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.undefined) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.void, - received: ctx.parsedType - }) - return INVALID - } - return OK(input.data) - } - - static create = (params?: RawCreateParams): ZodVoid => { - return new ZodVoid({ - typeName: ZodFirstPartyTypeKind.ZodVoid, - ...processCreateParams(params) - }) - } -} - -//////////////////////////////////////// -//////////////////////////////////////// -////////// ////////// -////////// ZodArray ////////// -////////// ////////// -//////////////////////////////////////// -//////////////////////////////////////// -export interface ZodArrayDef extends ZodTypeDef { - type: T - typeName: ZodFirstPartyTypeKind.ZodArray - exactLength: { value: number; message?: string } | null - minLength: { value: number; message?: string } | null - maxLength: { value: number; message?: string } | null -} - -export type ArrayCardinality = 'many' | 'atleastone' -export type arrayOutputType = Cardinality extends 'atleastone' - ? [T['_output'], ...T['_output'][]] - : T['_output'][] - -export class ZodArray extends ZodType< - arrayOutputType, - ZodArrayDef, - Cardinality extends 'atleastone' ? [T['_input'], ...T['_input'][]] : T['_input'][] -> { - _parse(input: ParseInput): ParseReturnType { - const { ctx, status } = this._processInputParams(input) - - const def = this._def - - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }) - return INVALID - } - - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value - const tooSmall = ctx.data.length < def.exactLength.value - if (tooBig || tooSmall) { - addIssueToContext(ctx, { - code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, - minimum: (tooSmall ? def.exactLength.value : undefined) as number, - maximum: (tooBig ? def.exactLength.value : undefined) as number, - type: 'array', - inclusive: true, - exact: true, - message: def.exactLength.message - }) - status.dirty() - } - } - - if (def.minLength !== null) { - if (ctx.data.length < def.minLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minLength.value, - type: 'array', - inclusive: true, - exact: false, - message: def.minLength.message - }) - status.dirty() - } - } - - if (def.maxLength !== null) { - if (ctx.data.length > def.maxLength.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxLength.value, - type: 'array', - inclusive: true, - exact: false, - message: def.maxLength.message - }) - status.dirty() - } - } - - if (ctx.common.async) { - return Promise.all( - ([...ctx.data] as any[]).map((item, i) => { - return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, ctx.meta, i)) - }) - ).then(result => { - return ParseStatus.mergeArray(status, result) - }) - } - - const result = ([...ctx.data] as any[]).map((item, i) => { - return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, ctx.meta, i)) - }) - - return ParseStatus.mergeArray(status, result) - } - - get element() { - return this._def.type - } - - min(minLength: number, message?: errorUtil.ErrMessage): this { - return new ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil.toString(message) } - }) as any - } - - max(maxLength: number, message?: errorUtil.ErrMessage): this { - return new ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil.toString(message) } - }) as any - } - - length(len: number, message?: errorUtil.ErrMessage): this { - return new ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil.toString(message) } - }) as any - } - - nonempty(message?: errorUtil.ErrMessage): ZodArray { - return this.min(1, message) as any - } - - static create = (schema: T, params?: RawCreateParams): ZodArray => { - return new ZodArray({ - type: schema, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind.ZodArray, - ...processCreateParams(params) - }) - } -} - -export type ZodNonEmptyArray = ZodArray - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodObject ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// - -export type UnknownKeysParam = 'passthrough' | 'strict' | 'strip' - -export interface ZodObjectDef< - T extends ZodRawShape = ZodRawShape, - UnknownKeys extends UnknownKeysParam = UnknownKeysParam, - Catchall extends ZodTypeAny = ZodTypeAny -> extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodObject - shape: () => T - catchall: Catchall - unknownKeys: UnknownKeys -} - -export type mergeTypes = { - [k in keyof A | keyof B]: k extends keyof B ? B[k] : k extends keyof A ? A[k] : never -} - -export type objectOutputType< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - UnknownKeys extends UnknownKeysParam = UnknownKeysParam -> = objectUtil.flatten>> & CatchallOutput & PassthroughType - -export type baseObjectOutputType = { - [k in keyof Shape]: Shape[k]['_output'] -} - -export type objectInputType< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - UnknownKeys extends UnknownKeysParam = UnknownKeysParam -> = objectUtil.flatten> & CatchallInput & PassthroughType -export type baseObjectInputType = objectUtil.addQuestionMarks<{ - [k in keyof Shape]: Shape[k]['_input'] -}> - -export type CatchallOutput = ZodType extends T ? unknown : { [k: string]: T['_output'] } - -export type CatchallInput = ZodType extends T ? unknown : { [k: string]: T['_input'] } - -export type PassthroughType = T extends 'passthrough' ? { [k: string]: unknown } : unknown - -export type deoptional = T extends ZodOptional ? deoptional : T extends ZodNullable ? ZodNullable> : T - -export type SomeZodObject = ZodObject - -export type noUnrecognized = { - [k in keyof Obj]: k extends keyof Shape ? Obj[k] : never -} - -function deepPartialify(schema: ZodTypeAny): any { - if (schema instanceof ZodObject) { - const newShape: any = {} - - for (const key in schema.shape) { - const fieldSchema = schema.shape[key] - newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)) - } - return new ZodObject({ - ...schema._def, - shape: () => newShape - }) as any - } else if (schema instanceof ZodArray) { - return new ZodArray({ - ...schema._def, - type: deepPartialify(schema.element) - }) - } else if (schema instanceof ZodOptional) { - return ZodOptional.create(deepPartialify(schema.unwrap())) - } else if (schema instanceof ZodNullable) { - return ZodNullable.create(deepPartialify(schema.unwrap())) - } else if (schema instanceof ZodTuple) { - return ZodTuple.create(schema.items.map((item: any) => deepPartialify(item))) - } else { - return schema - } -} - -export class ZodObject< - T extends ZodRawShape, - UnknownKeys extends UnknownKeysParam = UnknownKeysParam, - Catchall extends ZodTypeAny = ZodTypeAny, - Output = objectOutputType, - Input = objectInputType -> extends ZodType, Input> { - private _cached: { shape: T; keys: string[] } | null = null - - _getCached(): { shape: T; keys: string[] } { - if (this._cached !== null) return this._cached - const shape = this._def.shape() - const keys = util.objectKeys(shape) - return (this._cached = { shape, keys }) - } - - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.object) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }) - return INVALID - } - - const { status, ctx } = this._processInputParams(input) - - const { shape, keys: shapeKeys } = this._getCached() - const extraKeys: string[] = [] - - if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === 'strip')) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key) - } - } - } - - const pairs: { - key: ParseReturnType - value: ParseReturnType - alwaysSet?: boolean - }[] = [] - for (const key of shapeKeys) { - const keyValidator = shape[key] - const value = ctx.data[key] - pairs.push({ - key: { status: 'valid', value: key }, - value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, ctx.meta, key)), - alwaysSet: key in ctx.data - }) - } - - if (this._def.catchall instanceof ZodNever) { - const unknownKeys = this._def.unknownKeys - - if (unknownKeys === 'passthrough') { - for (const key of extraKeys) { - pairs.push({ - key: { status: 'valid', value: key }, - value: { status: 'valid', value: ctx.data[key] } - }) - } - } else if (unknownKeys === 'strict') { - if (extraKeys.length > 0) { - addIssueToContext(ctx, { - code: ZodIssueCode.unrecognized_keys, - keys: extraKeys - }) - status.dirty() - } - } else if (unknownKeys === 'strip') { - } else { - throw new Error(`Internal ZodObject error: invalid unknownKeys value.`) - } - } else { - // run catchall validation - const catchall = this._def.catchall - - for (const key of extraKeys) { - const value = ctx.data[key] - pairs.push({ - key: { status: 'valid', value: key }, - value: catchall._parse( - new ParseInputLazyPath(ctx, value, ctx.path, ctx.meta, key) //, ctx.child(key), value, getParsedType(value) - ), - alwaysSet: key in ctx.data - }) - } - } - - if (ctx.common.async) { - return Promise.resolve() - .then(async () => { - const syncPairs: any[] = [] - for (const pair of pairs) { - const key = await pair.key - const value = await pair.value - syncPairs.push({ - key, - value, - alwaysSet: pair.alwaysSet - }) - } - return syncPairs - }) - .then(syncPairs => { - return ParseStatus.mergeObjectSync(status, syncPairs) - }) - } else { - return ParseStatus.mergeObjectSync(status, pairs as any) - } - } - - get shape() { - return this._def.shape() - } - - strict(message?: errorUtil.ErrMessage): ZodObject { - errorUtil.errToObj - return new ZodObject({ - ...this._def, - unknownKeys: 'strict', - ...(message !== undefined - ? { - errorMap: (issue, ctx) => { - const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError - if (issue.code === 'unrecognized_keys') - return { - message: errorUtil.errToObj(message).message ?? defaultError - } - return { - message: defaultError - } - } - } - : {}) - }) as any - } - - strip(): ZodObject { - return new ZodObject({ - ...this._def, - unknownKeys: 'strip' - }) as any - } - - passthrough(): ZodObject { - return new ZodObject({ - ...this._def, - unknownKeys: 'passthrough' - }) as any - } - - /** - * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped. - * If you want to pass through unknown properties, use `.passthrough()` instead. - */ - nonstrict = this.passthrough - - // const AugmentFactory = - // (def: Def) => - // ( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, Augmentation>, - // Def["unknownKeys"], - // Def["catchall"] - // > => { - // return new ZodObject({ - // ...def, - // shape: () => ({ - // ...def.shape(), - // ...augmentation, - // }), - // }) as any; - // }; - extend(augmentation: Augmentation): ZodObject, UnknownKeys, Catchall> { - return new ZodObject({ - ...this._def, - shape: () => ({ - ...this._def.shape(), - ...augmentation - }) - }) as any - } - // extend< - // Augmentation extends ZodRawShape, - // NewOutput extends util.flatten<{ - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }>, - // NewInput extends util.flatten<{ - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // }> - // >( - // augmentation: Augmentation - // ): ZodObject< - // extendShape, - // UnknownKeys, - // Catchall, - // NewOutput, - // NewInput - // > { - // return new ZodObject({ - // ...this._def, - // shape: () => ({ - // ...this._def.shape(), - // ...augmentation, - // }), - // }) as any; - // } - /** - * @deprecated Use `.extend` instead - * */ - augment = this.extend - - /** - * Prior to zod@1.0.12 there was a bug in the - * inferred type of merged objects. Please - * upgrade if you are experiencing issues. - */ - merge( - merging: Incoming - ): ZodObject, Incoming['_def']['unknownKeys'], Incoming['_def']['catchall']> { - const merged: any = new ZodObject({ - unknownKeys: merging._def.unknownKeys, - catchall: merging._def.catchall, - shape: () => ({ - ...this._def.shape(), - ...merging._def.shape() - }), - typeName: ZodFirstPartyTypeKind.ZodObject - }) as any - return merged - } - // merge< - // Incoming extends AnyZodObject, - // Augmentation extends Incoming["shape"], - // NewOutput extends { - // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation - // ? Augmentation[k]["_output"] - // : k extends keyof Output - // ? Output[k] - // : never; - // }, - // NewInput extends { - // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation - // ? Augmentation[k]["_input"] - // : k extends keyof Input - // ? Input[k] - // : never; - // } - // >( - // merging: Incoming - // ): ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"], - // NewOutput, - // NewInput - // > { - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - - setKey(key: Key, schema: Schema): ZodObject { - return this.augment({ [key]: schema }) as any - } - // merge( - // merging: Incoming - // ): //ZodObject = (merging) => { - // ZodObject< - // extendShape>, - // Incoming["_def"]["unknownKeys"], - // Incoming["_def"]["catchall"] - // > { - // // const mergedShape = objectUtil.mergeShapes( - // // this._def.shape(), - // // merging._def.shape() - // // ); - // const merged: any = new ZodObject({ - // unknownKeys: merging._def.unknownKeys, - // catchall: merging._def.catchall, - // shape: () => - // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), - // typeName: ZodFirstPartyTypeKind.ZodObject, - // }) as any; - // return merged; - // } - - catchall(index: Index): ZodObject { - return new ZodObject({ - ...this._def, - catchall: index - }) as any - } - - pick>(mask: Mask): ZodObject>, UnknownKeys, Catchall> { - const shape: any = {} - - util.objectKeys(mask).forEach(key => { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key] - } - }) - - return new ZodObject({ - ...this._def, - shape: () => shape - }) as any - } - - omit>(mask: Mask): ZodObject, UnknownKeys, Catchall> { - const shape: any = {} - - util.objectKeys(this.shape).forEach(key => { - if (!mask[key]) { - shape[key] = this.shape[key] - } - }) - - return new ZodObject({ - ...this._def, - shape: () => shape - }) as any - } - - /** - * @deprecated - */ - deepPartial(): partialUtil.DeepPartial { - return deepPartialify(this) as any - } - - partial(): ZodObject<{ [k in keyof T]: ZodOptional }, UnknownKeys, Catchall> - partial>( - mask: Mask - ): ZodObject< - objectUtil.noNever<{ - [k in keyof T]: k extends keyof Mask ? ZodOptional : T[k] - }>, - UnknownKeys, - Catchall - > - partial(mask?: any) { - const newShape: any = {} - - util.objectKeys(this.shape).forEach(key => { - const fieldSchema = this.shape[key] - - if (mask && !mask[key]) { - newShape[key] = fieldSchema - } else { - newShape[key] = fieldSchema.optional() - } - }) - - return new ZodObject({ - ...this._def, - shape: () => newShape - }) as any - } - - required(): ZodObject<{ [k in keyof T]: deoptional }, UnknownKeys, Catchall> - required>( - mask: Mask - ): ZodObject< - objectUtil.noNever<{ - [k in keyof T]: k extends keyof Mask ? deoptional : T[k] - }>, - UnknownKeys, - Catchall - > - required(mask?: any) { - const newShape: any = {} - - util.objectKeys(this.shape).forEach(key => { - if (mask && !mask[key]) { - newShape[key] = this.shape[key] - } else { - const fieldSchema = this.shape[key] - let newField = fieldSchema - - while (newField instanceof ZodOptional) { - newField = (newField as ZodOptional)._def.innerType - } - - newShape[key] = newField - } - }) - - return new ZodObject({ - ...this._def, - shape: () => newShape - }) as any - } - - keyof(): ZodEnum> { - return createZodEnum(util.objectKeys(this.shape) as [string, ...string[]]) as any - } - - static create = ( - shape: T, - params?: RawCreateParams - ): ZodObject, objectInputType> => { - return new ZodObject({ - shape: () => shape, - unknownKeys: 'strip', - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }) as any - } - - static strictCreate = (shape: T, params?: RawCreateParams): ZodObject => { - return new ZodObject({ - shape: () => shape, - unknownKeys: 'strict', - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }) as any - } - - static lazycreate = (shape: () => T, params?: RawCreateParams): ZodObject => { - return new ZodObject({ - shape, - unknownKeys: 'strip', - catchall: ZodNever.create(), - typeName: ZodFirstPartyTypeKind.ZodObject, - ...processCreateParams(params) - }) as any - } -} - -export type AnyZodObject = ZodObject - -//////////////////////////////////////// -//////////////////////////////////////// -////////// ////////// -////////// ZodUnion ////////// -////////// ////////// -//////////////////////////////////////// -//////////////////////////////////////// -export type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]> -export interface ZodUnionDef> extends ZodTypeDef { - options: T - typeName: ZodFirstPartyTypeKind.ZodUnion -} - -export class ZodUnion extends ZodType, T[number]['_input']> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - const options = this._def.options - - function handleResults(results: { ctx: ParseContext; result: SyncParseReturnType }[]) { - // return first issue-free validation if it exists - for (const result of results) { - if (result.result.status === 'valid') { - return result.result - } - } - - for (const result of results) { - if (result.result.status === 'dirty') { - // add issues from dirty option - - ctx.common.issues.push(...result.ctx.common.issues) - return result.result - } - } - - // return invalid - const unionErrors = results.map(result => new ZodError(result.ctx.common.issues)) - - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }) - return INVALID - } - - if (ctx.common.async) { - return Promise.all( - options.map(async option => { - const childCtx: ParseContext = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - } - return { - result: await option._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: childCtx - }), - ctx: childCtx - } - }) - ).then(handleResults) - } else { - let dirty: undefined | { result: DIRTY; ctx: ParseContext } = undefined - const issues: ZodIssue[][] = [] - for (const option of options) { - const childCtx: ParseContext = { - ...ctx, - common: { - ...ctx.common, - issues: [] - }, - parent: null - } - const result = option._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: childCtx - }) - - if (result.status === 'valid') { - return result - } else if (result.status === 'dirty' && !dirty) { - dirty = { result, ctx: childCtx } - } - - if (childCtx.common.issues.length) { - issues.push(childCtx.common.issues) - } - } - - if (dirty) { - ctx.common.issues.push(...dirty.ctx.common.issues) - return dirty.result - } - - const unionErrors = issues.map(issues => new ZodError(issues)) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union, - unionErrors - }) - - return INVALID - } - } - - get options() { - return this._def.options - } - - static create = >(types: T, params?: RawCreateParams): ZodUnion => { - return new ZodUnion({ - options: types, - typeName: ZodFirstPartyTypeKind.ZodUnion, - ...processCreateParams(params) - }) - } -} - -///////////////////////////////////////////////////// -///////////////////////////////////////////////////// -////////// ////////// -////////// ZodDiscriminatedUnion ////////// -////////// ////////// -///////////////////////////////////////////////////// -///////////////////////////////////////////////////// - -const getDiscriminator = (type: T): Primitive[] => { - if (type instanceof ZodLazy) { - return getDiscriminator(type.schema) - } else if (type instanceof ZodEffects) { - return getDiscriminator(type.innerType()) - } else if (type instanceof ZodLiteral) { - return [type.value] - } else if (type instanceof ZodEnum) { - return type.options - } else if (type instanceof ZodNativeEnum) { - // eslint-disable-next-line ban/ban - return util.objectValues(type.enum as any) - } else if (type instanceof ZodDefault) { - return getDiscriminator(type._def.innerType) - } else if (type instanceof ZodUndefined) { - return [undefined] - } else if (type instanceof ZodNull) { - return [null] - } else if (type instanceof ZodOptional) { - return [undefined, ...getDiscriminator(type.unwrap())] - } else if (type instanceof ZodNullable) { - return [null, ...getDiscriminator(type.unwrap())] - } else if (type instanceof ZodBranded) { - return getDiscriminator(type.unwrap()) - } else if (type instanceof ZodReadonly) { - return getDiscriminator(type.unwrap()) - } else if (type instanceof ZodCatch) { - return getDiscriminator(type._def.innerType) - } else { - return [] - } -} - -export type ZodDiscriminatedUnionOption = ZodObject< - { [key in Discriminator]: ZodTypeAny } & ZodRawShape, - UnknownKeysParam, - ZodTypeAny -> - -export interface ZodDiscriminatedUnionDef< - Discriminator extends string, - Options extends ZodDiscriminatedUnionOption[] = ZodDiscriminatedUnionOption[] -> extends ZodTypeDef { - discriminator: Discriminator - options: Options - optionsMap: Map> - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion -} - -export class ZodDiscriminatedUnion[]> extends ZodType< - output, - ZodDiscriminatedUnionDef, - input -> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }) - return INVALID - } - - const discriminator = this.discriminator - - const discriminatorValue: string = ctx.data[discriminator] - - const option = this.optionsMap.get(discriminatorValue) - - if (!option) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }) - return INVALID - } - - if (ctx.common.async) { - return option._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) as any - } else { - return option._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) as any - } - } - - get discriminator() { - return this._def.discriminator - } - - get options() { - return this._def.options - } - - get optionsMap() { - return this._def.optionsMap - } - - /** - * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. - * However, it only allows a union of objects, all of which need to share a discriminator property. This property must - * have a different value for each object in the union. - * @param discriminator the name of the discriminator property - * @param types an array of object schemas - * @param params - */ - static create, ...ZodDiscriminatedUnionOption[]]>( - discriminator: Discriminator, - options: Types, - params?: RawCreateParams - ): ZodDiscriminatedUnion { - // Get all the valid discriminator values - const optionsMap: Map = new Map() - - // try { - for (const type of options) { - const discriminatorValues = getDiscriminator(type.shape[discriminator]) - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`) - } - for (const value of discriminatorValues) { - if (optionsMap.has(value)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`) - } - - optionsMap.set(value, type) - } - } - - return new ZodDiscriminatedUnion< - Discriminator, - // DiscriminatorValue, - Types - >({ - typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////////////// -/////////////////////////////////////////////// -////////// ////////// -////////// ZodIntersection ////////// -////////// ////////// -/////////////////////////////////////////////// -/////////////////////////////////////////////// -export interface ZodIntersectionDef extends ZodTypeDef { - left: T - right: U - typeName: ZodFirstPartyTypeKind.ZodIntersection -} - -function mergeValues(a: any, b: any): { valid: true; data: any } | { valid: false } { - const aType = getParsedType(a) - const bType = getParsedType(b) - - if (a === b) { - return { valid: true, data: a } - } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { - const bKeys = util.objectKeys(b) - const sharedKeys = util.objectKeys(a).filter(key => bKeys.indexOf(key) !== -1) - - const newObj: any = { ...a, ...b } - for (const key of sharedKeys) { - const sharedValue = mergeValues(a[key], b[key]) - if (!sharedValue.valid) { - return { valid: false } - } - newObj[key] = sharedValue.data - } - - return { valid: true, data: newObj } - } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { - if (a.length !== b.length) { - return { valid: false } - } - - const newArray: unknown[] = [] - for (let index = 0; index < a.length; index++) { - const itemA = a[index] - const itemB = b[index] - const sharedValue = mergeValues(itemA, itemB) - - if (!sharedValue.valid) { - return { valid: false } - } - - newArray.push(sharedValue.data) - } - - return { valid: true, data: newArray } - } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) { - return { valid: true, data: a } - } else { - return { valid: false } - } -} - -export class ZodIntersection extends ZodType< - T['_output'] & U['_output'], - ZodIntersectionDef, - T['_input'] & U['_input'] -> { - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - const handleParsed = (parsedLeft: SyncParseReturnType, parsedRight: SyncParseReturnType): SyncParseReturnType => { - if (isAborted(parsedLeft) || isAborted(parsedRight)) { - return INVALID - } - - const merged = mergeValues(parsedLeft.value, parsedRight.value) - - if (!merged.valid) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_intersection_types - }) - return INVALID - } - - if (isDirty(parsedLeft) || isDirty(parsedRight)) { - status.dirty() - } - - return { status: status.value, value: merged.data as any } - } - - if (ctx.common.async) { - return Promise.all([ - this._def.left._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }), - this._def.right._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - ]).then(([left, right]: any) => handleParsed(left, right)) - } else { - return handleParsed( - this._def.left._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }), - this._def.right._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - ) - } - } - - static create = (left: T, right: U, params?: RawCreateParams): ZodIntersection => { - return new ZodIntersection({ - left: left, - right: right, - typeName: ZodFirstPartyTypeKind.ZodIntersection, - ...processCreateParams(params) - }) - } -} - -//////////////////////////////////////// -//////////////////////////////////////// -////////// ////////// -////////// ZodTuple ////////// -////////// ////////// -//////////////////////////////////////// -//////////////////////////////////////// -export type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]] -export type AssertArray = T extends any[] ? T : never -export type OutputTypeOfTuple = AssertArray<{ - [k in keyof T]: T[k] extends ZodType ? T[k]['_output'] : never -}> -export type OutputTypeOfTupleWithRest = Rest extends ZodTypeAny - ? [...OutputTypeOfTuple, ...Rest['_output'][]] - : OutputTypeOfTuple - -export type InputTypeOfTuple = AssertArray<{ - [k in keyof T]: T[k] extends ZodType ? T[k]['_input'] : never -}> -export type InputTypeOfTupleWithRest = Rest extends ZodTypeAny - ? [...InputTypeOfTuple, ...Rest['_input'][]] - : InputTypeOfTuple - -export interface ZodTupleDef extends ZodTypeDef { - items: T - rest: Rest - typeName: ZodFirstPartyTypeKind.ZodTuple -} - -export type AnyZodTuple = ZodTuple<[ZodTypeAny, ...ZodTypeAny[]] | [], ZodTypeAny | null> -export class ZodTuple extends ZodType< - OutputTypeOfTupleWithRest, - ZodTupleDef, - InputTypeOfTupleWithRest -> { - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.array) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.array, - received: ctx.parsedType - }) - return INVALID - } - - if (ctx.data.length < this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: 'array' - }) - - return INVALID - } - - const rest = this._def.rest - - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: 'array' - }) - status.dirty() - } - - const items = ([...ctx.data] as any[]) - .map((item, itemIndex) => { - const schema = this._def.items[itemIndex] || this._def.rest - if (!schema) return null as any as SyncParseReturnType - return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, ctx.meta, itemIndex)) - }) - .filter(x => !!x) // filter nulls - - if (ctx.common.async) { - return Promise.all(items).then(results => { - return ParseStatus.mergeArray(status, results) - }) - } else { - return ParseStatus.mergeArray(status, items as SyncParseReturnType[]) - } - } - - get items() { - return this._def.items - } - - rest(rest: Rest): ZodTuple { - return new ZodTuple({ - ...this._def, - rest - }) - } - - static create = (schemas: T, params?: RawCreateParams): ZodTuple => { - if (!Array.isArray(schemas)) { - throw new Error('You must pass an array of schemas to z.tuple([ ... ])') - } - return new ZodTuple({ - items: schemas, - typeName: ZodFirstPartyTypeKind.ZodTuple, - rest: null, - ...processCreateParams(params) - }) - } -} - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodRecord ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// -export interface ZodRecordDef extends ZodTypeDef { - valueType: Value - keyType: Key - typeName: ZodFirstPartyTypeKind.ZodRecord -} - -export type KeySchema = ZodType -export type RecordType = [string] extends [K] - ? Record - : [number] extends [K] - ? Record - : [symbol] extends [K] - ? Record - : [BRAND] extends [K] - ? Record - : Partial> -export class ZodRecord extends ZodType< - RecordType, - ZodRecordDef, - RecordType -> { - get keySchema() { - return this._def.keyType - } - get valueSchema() { - return this._def.valueType - } - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.object) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.object, - received: ctx.parsedType - }) - return INVALID - } - - const pairs: { - key: ParseReturnType - value: ParseReturnType - alwaysSet: boolean - }[] = [] - - const keyType = this._def.keyType - const valueType = this._def.valueType - - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, ctx.meta, key)), - value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, ctx.meta, key)), - alwaysSet: key in ctx.data - }) - } - - if (ctx.common.async) { - return ParseStatus.mergeObjectAsync(status, pairs) - } else { - return ParseStatus.mergeObjectSync(status, pairs as any) - } - } - - get element() { - return this._def.valueType - } - - static create(valueType: Value, params?: RawCreateParams): ZodRecord - static create(keySchema: Keys, valueType: Value, params?: RawCreateParams): ZodRecord - static create(first: any, second?: any, third?: any): ZodRecord { - if (second instanceof ZodType) { - return new ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(third) - }) - } - - return new ZodRecord({ - keyType: ZodString.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind.ZodRecord, - ...processCreateParams(second) - }) - } -} - -////////////////////////////////////// -////////////////////////////////////// -////////// ////////// -////////// ZodMap ////////// -////////// ////////// -////////////////////////////////////// -////////////////////////////////////// -export interface ZodMapDef extends ZodTypeDef { - valueType: Value - keyType: Key - typeName: ZodFirstPartyTypeKind.ZodMap -} - -export class ZodMap extends ZodType< - Map, - ZodMapDef, - Map -> { - get keySchema() { - return this._def.keyType - } - get valueSchema() { - return this._def.valueType - } - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.map) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.map, - received: ctx.parsedType - }) - return INVALID - } - - const keyType = this._def.keyType - const valueType = this._def.valueType - - const pairs = [...(ctx.data as Map).entries()].map(([key, value], index) => { - return { - key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, ctx.meta, [index, 'key'])), - value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, ctx.meta, [index, 'value'])) - } - }) - - if (ctx.common.async) { - const finalMap = new Map() - return Promise.resolve().then(async () => { - for (const pair of pairs) { - const key = await pair.key - const value = await pair.value - if (key.status === 'aborted' || value.status === 'aborted') { - return INVALID - } - if (key.status === 'dirty' || value.status === 'dirty') { - status.dirty() - } - - finalMap.set(key.value, value.value) - } - return { status: status.value, value: finalMap } - }) - } else { - const finalMap = new Map() - for (const pair of pairs) { - const key = pair.key as SyncParseReturnType - const value = pair.value as SyncParseReturnType - if (key.status === 'aborted' || value.status === 'aborted') { - return INVALID - } - if (key.status === 'dirty' || value.status === 'dirty') { - status.dirty() - } - - finalMap.set(key.value, value.value) - } - return { status: status.value, value: finalMap } - } - } - static create = ( - keyType: Key, - valueType: Value, - params?: RawCreateParams - ): ZodMap => { - return new ZodMap({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind.ZodMap, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////// -////////////////////////////////////// -////////// ////////// -////////// ZodSet ////////// -////////// ////////// -////////////////////////////////////// -////////////////////////////////////// -export interface ZodSetDef extends ZodTypeDef { - valueType: Value - typeName: ZodFirstPartyTypeKind.ZodSet - minSize: { value: number; message?: string } | null - maxSize: { value: number; message?: string } | null -} - -export class ZodSet extends ZodType, ZodSetDef, Set> { - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.set) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.set, - received: ctx.parsedType - }) - return INVALID - } - - const def = this._def - - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_small, - minimum: def.minSize.value, - type: 'set', - inclusive: true, - exact: false, - message: def.minSize.message - }) - status.dirty() - } - } - - if (def.maxSize !== null) { - if (ctx.data.size > def.maxSize.value) { - addIssueToContext(ctx, { - code: ZodIssueCode.too_big, - maximum: def.maxSize.value, - type: 'set', - inclusive: true, - exact: false, - message: def.maxSize.message - }) - status.dirty() - } - } - - const valueType = this._def.valueType - - function finalizeSet(elements: SyncParseReturnType[]) { - const parsedSet = new Set() - for (const element of elements) { - if (element.status === 'aborted') return INVALID - if (element.status === 'dirty') status.dirty() - parsedSet.add(element.value) - } - return { status: status.value, value: parsedSet } - } - - const elements = [...(ctx.data as Set).values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, ctx.meta, i))) - - if (ctx.common.async) { - return Promise.all(elements).then(elements => finalizeSet(elements)) - } else { - return finalizeSet(elements as SyncParseReturnType[]) - } - } - - min(minSize: number, message?: errorUtil.ErrMessage): this { - return new ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil.toString(message) } - }) as any - } - - max(maxSize: number, message?: errorUtil.ErrMessage): this { - return new ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil.toString(message) } - }) as any - } - - size(size: number, message?: errorUtil.ErrMessage): this { - return this.min(size, message).max(size, message) as any - } - - nonempty(message?: errorUtil.ErrMessage): ZodSet { - return this.min(1, message) as any - } - - static create = (valueType: Value, params?: RawCreateParams): ZodSet => { - return new ZodSet({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind.ZodSet, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////////// -/////////////////////////////////////////// -////////// ////////// -////////// ZodFunction ////////// -////////// ////////// -/////////////////////////////////////////// -/////////////////////////////////////////// -export interface ZodFunctionDef = ZodTuple, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef { - args: Args - returns: Returns - typeName: ZodFirstPartyTypeKind.ZodFunction -} - -export type OuterTypeOfFunction, Returns extends ZodTypeAny> = - Args['_input'] extends Array ? (...args: Args['_input']) => Returns['_output'] : never - -export type InnerTypeOfFunction, Returns extends ZodTypeAny> = - Args['_output'] extends Array ? (...args: Args['_output']) => Returns['_input'] : never - -export class ZodFunction, Returns extends ZodTypeAny> extends ZodType< - OuterTypeOfFunction, - ZodFunctionDef, - InnerTypeOfFunction -> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.function) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.function, - received: ctx.parsedType - }) - return INVALID - } - - function makeArgsIssue(args: any, error: ZodError): ZodIssue { - return makeIssue({ - data: args, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter(x => !!x) as ZodErrorMap[], - issueData: { - code: ZodIssueCode.invalid_arguments, - argumentsError: error - } - }) - } - - function makeReturnsIssue(returns: any, error: ZodError): ZodIssue { - return makeIssue({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter(x => !!x) as ZodErrorMap[], - issueData: { - code: ZodIssueCode.invalid_return_type, - returnTypeError: error - } - }) - } - - const params = { errorMap: ctx.common.contextualErrorMap } - const fn = ctx.data - - if (this._def.returns instanceof ZodPromise) { - // Would love a way to avoid disabling this rule, but we need - // an alias (using an arrow function was what caused 2651). - // eslint-disable-next-line @typescript-eslint/no-this-alias - const me = this - return OK(async function (this: any, ...args: any[]) { - const error = new ZodError([]) - const parsedArgs = await me._def.args.parseAsync(args, params).catch(e => { - error.addIssue(makeArgsIssue(args, e)) - throw error - }) - const result = await Reflect.apply(fn, this, parsedArgs as any) - const parsedReturns = await (me._def.returns as unknown as ZodPromise)._def.type.parseAsync(result, params).catch(e => { - error.addIssue(makeReturnsIssue(result, e)) - throw error - }) - return parsedReturns - }) - } else { - // Would love a way to avoid disabling this rule, but we need - // an alias (using an arrow function was what caused 2651). - // eslint-disable-next-line @typescript-eslint/no-this-alias - const me = this - return OK(function (this: any, ...args: any[]) { - const parsedArgs = me._def.args.safeParse(args, params) - if (!parsedArgs.success) { - throw new ZodError([makeArgsIssue(args, parsedArgs.error)]) - } - const result = Reflect.apply(fn, this, parsedArgs.data) - const parsedReturns = me._def.returns.safeParse(result, params) - if (!parsedReturns.success) { - throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]) - } - return parsedReturns.data - }) as any - } - } - - parameters() { - return this._def.args - } - - returnType() { - return this._def.returns - } - - args[0]>(...items: Items): ZodFunction, Returns> { - return new ZodFunction({ - ...this._def, - args: ZodTuple.create(items).rest(ZodUnknown.create()) as any - }) - } - - returns>(returnType: NewReturnType): ZodFunction { - return new ZodFunction({ - ...this._def, - returns: returnType - }) - } - - implement>( - func: F - ): ReturnType extends Returns['_output'] ? (...args: Args['_input']) => ReturnType : OuterTypeOfFunction { - const validatedFunc = this.parse(func) - return validatedFunc as any - } - - strictImplement(func: InnerTypeOfFunction): InnerTypeOfFunction { - const validatedFunc = this.parse(func) - return validatedFunc as any - } - - validate = this.implement - - static create(): ZodFunction, ZodUnknown> - static create>(args: T): ZodFunction - static create(args: T, returns: U): ZodFunction - static create, U extends ZodTypeAny = ZodUnknown>( - args: T, - returns: U, - params?: RawCreateParams - ): ZodFunction - static create(args?: AnyZodTuple, returns?: ZodTypeAny, params?: RawCreateParams) { - return new ZodFunction({ - args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())) as any, - returns: returns || ZodUnknown.create(), - typeName: ZodFirstPartyTypeKind.ZodFunction, - ...processCreateParams(params) - }) as any - } -} - -/////////////////////////////////////// -/////////////////////////////////////// -////////// ////////// -////////// ZodLazy ////////// -////////// ////////// -/////////////////////////////////////// -/////////////////////////////////////// -export interface ZodLazyDef extends ZodTypeDef { - getter: () => T - typeName: ZodFirstPartyTypeKind.ZodLazy -} - -export class ZodLazy extends ZodType, ZodLazyDef, input> { - get schema(): T { - return this._def.getter() - } - - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - const lazySchema = this._def.getter() - return lazySchema._parse({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - } - - static create = (getter: () => T, params?: RawCreateParams): ZodLazy => { - return new ZodLazy({ - getter: getter, - typeName: ZodFirstPartyTypeKind.ZodLazy, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// ////////// -////////// ZodLiteral ////////// -////////// ////////// -////////////////////////////////////////// -////////////////////////////////////////// -export interface ZodLiteralDef extends ZodTypeDef { - value: T - typeName: ZodFirstPartyTypeKind.ZodLiteral -} - -export class ZodLiteral extends ZodType, T> { - _parse(input: ParseInput): ParseReturnType { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_literal, - expected: this._def.value - }) - return INVALID - } - return { status: 'valid', value: input.data } - } - - get value() { - return this._def.value - } - - static create = (value: T, params?: RawCreateParams): ZodLiteral => { - return new ZodLiteral({ - value: value, - typeName: ZodFirstPartyTypeKind.ZodLiteral, - ...processCreateParams(params) - }) - } -} - -/////////////////////////////////////// -/////////////////////////////////////// -////////// ////////// -////////// ZodEnum ////////// -////////// ////////// -/////////////////////////////////////// -/////////////////////////////////////// -export type ArrayKeys = keyof any[] -export type Indices = Exclude - -export type EnumValues = readonly [T, ...T[]] - -export type Values = { - [k in T[number]]: k -} - -export interface ZodEnumDef extends ZodTypeDef { - values: T - typeName: ZodFirstPartyTypeKind.ZodEnum -} - -export type Writeable = { -readonly [P in keyof T]: T[P] } - -export type FilterEnum = Values extends [] - ? [] - : Values extends [infer Head, ...infer Rest] - ? Head extends ToExclude - ? FilterEnum - : [Head, ...FilterEnum] - : never - -export type typecast = A extends T ? A : never - -function createZodEnum>(values: T, params?: RawCreateParams): ZodEnum> -function createZodEnum(values: T, params?: RawCreateParams): ZodEnum -function createZodEnum(values: [string, ...string[]], params?: RawCreateParams) { - return new ZodEnum({ - values, - typeName: ZodFirstPartyTypeKind.ZodEnum, - ...processCreateParams(params) - }) -} - -export class ZodEnum extends ZodType, T[number]> { - #cache: Set | undefined - - _parse(input: ParseInput): ParseReturnType { - if (typeof input.data !== 'string') { - const ctx = this._getOrReturnCtx(input) - const expectedValues = this._def.values - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues) as 'string', - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }) - return INVALID - } - - if (!this.#cache) { - this.#cache = new Set(this._def.values) - } - - if (!this.#cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input) - const expectedValues = this._def.values - - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }) - return INVALID - } - return OK(input.data) - } - - get options() { - return this._def.values - } - - get enum(): Values { - const enumValues: any = {} - for (const val of this._def.values) { - enumValues[val] = val - } - return enumValues as any - } - - get Values(): Values { - const enumValues: any = {} - for (const val of this._def.values) { - enumValues[val] = val - } - return enumValues as any - } - - get Enum(): Values { - const enumValues: any = {} - for (const val of this._def.values) { - enumValues[val] = val - } - return enumValues as any - } - - extract(values: ToExtract, newDef: RawCreateParams = this._def): ZodEnum> { - return ZodEnum.create(values, { - ...this._def, - ...newDef - }) as any - } - - exclude( - values: ToExclude, - newDef: RawCreateParams = this._def - ): ZodEnum>, [string, ...string[]]>> { - return ZodEnum.create(this.options.filter(opt => !values.includes(opt)) as FilterEnum, { - ...this._def, - ...newDef - }) as any - } - - static create = createZodEnum -} - -///////////////////////////////////////////// -///////////////////////////////////////////// -////////// ////////// -////////// ZodNativeEnum ////////// -////////// ////////// -///////////////////////////////////////////// -///////////////////////////////////////////// -export interface ZodNativeEnumDef extends ZodTypeDef { - values: T - typeName: ZodFirstPartyTypeKind.ZodNativeEnum -} - -export type EnumLike = { [k: string]: string | number; [nu: number]: string } - -export class ZodNativeEnum extends ZodType, T[keyof T]> { - #cache: Set | undefined - _parse(input: ParseInput): ParseReturnType { - const nativeEnumValues = util.getValidEnumValues(this._def.values) - - const ctx = this._getOrReturnCtx(input) - if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { - const expectedValues = util.objectValues(nativeEnumValues) - addIssueToContext(ctx, { - expected: util.joinValues(expectedValues) as 'string', - received: ctx.parsedType, - code: ZodIssueCode.invalid_type - }) - return INVALID - } - - if (!this.#cache) { - this.#cache = new Set(util.getValidEnumValues(this._def.values)) - } - - if (!this.#cache.has(input.data)) { - const expectedValues = util.objectValues(nativeEnumValues) - - addIssueToContext(ctx, { - received: ctx.data, - code: ZodIssueCode.invalid_enum_value, - options: expectedValues - }) - return INVALID - } - return OK(input.data as any) - } - - get enum() { - return this._def.values - } - - static create = (values: T, params?: RawCreateParams): ZodNativeEnum => { - return new ZodNativeEnum({ - values: values, - typeName: ZodFirstPartyTypeKind.ZodNativeEnum, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// ////////// -////////// ZodPromise ////////// -////////// ////////// -////////////////////////////////////////// -////////////////////////////////////////// -export interface ZodPromiseDef extends ZodTypeDef { - type: T - typeName: ZodFirstPartyTypeKind.ZodPromise -} - -export class ZodPromise extends ZodType, ZodPromiseDef, Promise> { - unwrap() { - return this._def.type - } - - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.promise, - received: ctx.parsedType - }) - return INVALID - } - - const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data) - - return OK( - promisified.then((data: any) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }) - }) - ) - } - - static create = (schema: T, params?: RawCreateParams): ZodPromise => { - return new ZodPromise({ - type: schema, - typeName: ZodFirstPartyTypeKind.ZodPromise, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////////////// -////////////////////////////////////////////// -////////// ////////// -////////// ZodEffects ////////// -////////// ////////// -////////////////////////////////////////////// -////////////////////////////////////////////// - -export type Refinement = (arg: T, ctx: RefinementCtx) => any -export type SuperRefinement = (arg: T, ctx: RefinementCtx) => void | Promise - -export type RefinementEffect = { - type: 'refinement' - refinement: (arg: T, ctx: RefinementCtx) => any -} -export type TransformEffect = { - type: 'transform' - transform: (arg: T, ctx: RefinementCtx) => any -} -export type PreprocessEffect = { - type: 'preprocess' - transform: (arg: T, ctx: RefinementCtx) => any -} -export type Effect = RefinementEffect | TransformEffect | PreprocessEffect - -export interface ZodEffectsDef extends ZodTypeDef { - schema: T - typeName: ZodFirstPartyTypeKind.ZodEffects - effect: Effect -} - -export class ZodEffects, Input = input> extends ZodType, Input> { - innerType() { - return this._def.schema - } - - sourceType(): T { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects - ? (this._def.schema as unknown as ZodEffects).sourceType() - : (this._def.schema as T) - } - - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - - const effect = this._def.effect || null - - const checkCtx: RefinementCtx = { - addIssue: (arg: IssueData) => { - addIssueToContext(ctx, arg) - if (arg.fatal) { - status.abort() - } else { - status.dirty() - } - }, - get path() { - return ctx.path - }, - get meta() { - return ctx.meta - } - } - - checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx) - - if (effect.type === 'preprocess') { - const processed = effect.transform(ctx.data, checkCtx) - - if (ctx.common.async) { - return Promise.resolve(processed).then(async processed => { - if (status.value === 'aborted') return INVALID - - const result = await this._def.schema._parseAsync({ - data: processed, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - if (result.status === 'aborted') return INVALID - if (result.status === 'dirty') return DIRTY(result.value) - if (status.value === 'dirty') return DIRTY(result.value) - return result - }) - } else { - if (status.value === 'aborted') return INVALID - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - if (result.status === 'aborted') return INVALID - if (result.status === 'dirty') return DIRTY(result.value) - if (status.value === 'dirty') return DIRTY(result.value) - return result - } - } - if (effect.type === 'refinement') { - const executeRefinement = (acc: unknown): any => { - const result = effect.refinement(acc, checkCtx) - if (ctx.common.async) { - return Promise.resolve(result) - } - if (result instanceof Promise) { - throw new Error('Async refinement encountered during synchronous parse operation. Use .parseAsync instead.') - } - return acc - } - - if (ctx.common.async === false) { - const inner = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - if (inner.status === 'aborted') return INVALID - if (inner.status === 'dirty') status.dirty() - - // return value is ignored - executeRefinement(inner.value) - return { status: status.value, value: inner.value } - } else { - return this._def.schema - ._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - .then(inner => { - if (inner.status === 'aborted') return INVALID - if (inner.status === 'dirty') status.dirty() - - return executeRefinement(inner.value).then(() => { - return { status: status.value, value: inner.value } - }) - }) - } - } - - if (effect.type === 'transform') { - if (ctx.common.async === false) { - const base = this._def.schema._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - - if (base.status === 'aborted') return base - if (base.status === 'dirty') status.dirty() - - const result = effect.transform(base.value, checkCtx) - if (result instanceof Promise) { - throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`) - } - - return { status: status.value, value: result } - } else { - return this._def.schema - ._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - .then(base => { - if (base.status === 'aborted') return base - if (base.status === 'dirty') status.dirty() - - return Promise.resolve(effect.transform(base.value, checkCtx)).then(result => ({ status: status.value, value: result })) - }) - } - } - - util.assertNever(effect) - } - - static create = (schema: I, effect: Effect, params?: RawCreateParams): ZodEffects => { - return new ZodEffects({ - schema, - typeName: ZodFirstPartyTypeKind.ZodEffects, - effect, - ...processCreateParams(params) - }) - } - - static createWithPreprocess = ( - preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, - schema: I, - params?: RawCreateParams - ): ZodEffects => { - return new ZodEffects({ - schema, - effect: { type: 'preprocess', transform: preprocess }, - typeName: ZodFirstPartyTypeKind.ZodEffects, - ...processCreateParams(params) - }) - } -} - -export { ZodEffects as ZodTransformer } - -/////////////////////////////////////////// -/////////////////////////////////////////// -////////// ////////// -////////// ZodOptional ////////// -////////// ////////// -/////////////////////////////////////////// -/////////////////////////////////////////// -export interface ZodOptionalDef extends ZodTypeDef { - innerType: T - typeName: ZodFirstPartyTypeKind.ZodOptional -} - -export type ZodOptionalType = ZodOptional - -export class ZodOptional extends ZodType, T['_input'] | undefined> { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType === ZodParsedType.undefined) { - return OK(undefined) - } - return this._def.innerType._parse(input) - } - - unwrap() { - return this._def.innerType - } - - static create = (type: T, params?: RawCreateParams): ZodOptional => { - return new ZodOptional({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodOptional, - ...processCreateParams(params) - }) as any - } -} - -/////////////////////////////////////////// -/////////////////////////////////////////// -////////// ////////// -////////// ZodNullable ////////// -////////// ////////// -/////////////////////////////////////////// -/////////////////////////////////////////// -export interface ZodNullableDef extends ZodTypeDef { - innerType: T - typeName: ZodFirstPartyTypeKind.ZodNullable -} - -export type ZodNullableType = ZodNullable - -export class ZodNullable extends ZodType, T['_input'] | null> { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType === ZodParsedType.null) { - return OK(null) - } - return this._def.innerType._parse(input) - } - - unwrap() { - return this._def.innerType - } - - static create = (type: T, params?: RawCreateParams): ZodNullable => { - return new ZodNullable({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodNullable, - ...processCreateParams(params) - }) as any - } -} - -//////////////////////////////////////////// -//////////////////////////////////////////// -////////// ////////// -////////// ZodDefault ////////// -////////// ////////// -//////////////////////////////////////////// -//////////////////////////////////////////// -export interface ZodDefaultDef extends ZodTypeDef { - innerType: T - defaultValue: () => util.noUndefined - typeName: ZodFirstPartyTypeKind.ZodDefault -} - -export class ZodDefault extends ZodType, ZodDefaultDef, T['_input'] | undefined> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - let data = ctx.data - if (ctx.parsedType === ZodParsedType.undefined) { - data = this._def.defaultValue() - } - return this._def.innerType._parse({ - data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - } - - removeDefault() { - return this._def.innerType - } - - static create = ( - type: T, - params: RawCreateParams & { - default: T['_input'] | (() => util.noUndefined) - } - ): ZodDefault => { - return new ZodDefault({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodDefault, - defaultValue: typeof params.default === 'function' ? params.default : () => params.default as any, - ...processCreateParams(params) - }) as any - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// ////////// -////////// ZodCatch ////////// -////////// ////////// -////////////////////////////////////////// -////////////////////////////////////////// -export interface ZodCatchDef extends ZodTypeDef { - innerType: T - catchValue: (ctx: { error: ZodError; input: unknown }) => T['_input'] - typeName: ZodFirstPartyTypeKind.ZodCatch -} - -export class ZodCatch extends ZodType< - T['_output'], - ZodCatchDef, - unknown // any input will pass validation // T["_input"] -> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - - // newCtx is used to not collect issues from inner types in ctx - const newCtx: ParseContext = { - ...ctx, - common: { - ...ctx.common, - issues: [] - } - } - - const result = this._def.innerType._parse({ - data: newCtx.data, - path: newCtx.path, - meta: ctx.meta, - parent: { - ...newCtx - } - }) - - if (isAsync(result)) { - return result.then(result => { - return { - status: 'valid', - value: - result.status === 'valid' - ? result.value - : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues) - }, - input: newCtx.data - }) - } - }) - } else { - return { - status: 'valid', - value: - result.status === 'valid' - ? result.value - : this._def.catchValue({ - get error() { - return new ZodError(newCtx.common.issues) - }, - input: newCtx.data - }) - } - } - } - - removeCatch() { - return this._def.innerType - } - - static create = ( - type: T, - params: RawCreateParams & { - catch: T['_output'] | (() => T['_output']) - } - ): ZodCatch => { - return new ZodCatch({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodCatch, - catchValue: typeof params.catch === 'function' ? params.catch : () => params.catch, - ...processCreateParams(params) - }) - } -} - -///////////////////////////////////////// -///////////////////////////////////////// -////////// ////////// -////////// ZodNaN ////////// -////////// ////////// -///////////////////////////////////////// -///////////////////////////////////////// - -export interface ZodNaNDef extends ZodTypeDef { - typeName: ZodFirstPartyTypeKind.ZodNaN -} - -export class ZodNaN extends ZodType { - _parse(input: ParseInput): ParseReturnType { - const parsedType = this._getType(input) - if (parsedType !== ZodParsedType.nan) { - const ctx = this._getOrReturnCtx(input) - addIssueToContext(ctx, { - code: ZodIssueCode.invalid_type, - expected: ZodParsedType.nan, - received: ctx.parsedType - }) - return INVALID - } - - return { status: 'valid', value: input.data } - } - - static create = (params?: RawCreateParams): ZodNaN => { - return new ZodNaN({ - typeName: ZodFirstPartyTypeKind.ZodNaN, - ...processCreateParams(params) - }) - } -} - -////////////////////////////////////////// -////////////////////////////////////////// -////////// ////////// -////////// ZodBranded ////////// -////////// ////////// -////////////////////////////////////////// -////////////////////////////////////////// - -export interface ZodBrandedDef extends ZodTypeDef { - type: T - typeName: ZodFirstPartyTypeKind.ZodBranded -} - -export const BRAND: unique symbol = Symbol('zod_brand') -export type BRAND = { - [BRAND]: { [k in T]: true } -} - -export class ZodBranded extends ZodType, ZodBrandedDef, T['_input']> { - _parse(input: ParseInput): ParseReturnType { - const { ctx } = this._processInputParams(input) - const data = ctx.data - return this._def.type._parse({ - data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - } - - unwrap() { - return this._def.type - } -} - -//////////////////////////////////////////// -//////////////////////////////////////////// -////////// ////////// -////////// ZodPipeline ////////// -////////// ////////// -//////////////////////////////////////////// -//////////////////////////////////////////// - -export interface ZodPipelineDef extends ZodTypeDef { - in: A - out: B - typeName: ZodFirstPartyTypeKind.ZodPipeline -} - -export class ZodPipeline extends ZodType, A['_input']> { - _parse(input: ParseInput): ParseReturnType { - const { status, ctx } = this._processInputParams(input) - if (ctx.common.async) { - const handleAsync = async () => { - const inResult = await this._def.in._parseAsync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - if (inResult.status === 'aborted') return INVALID - if (inResult.status === 'dirty') { - status.dirty() - return DIRTY(inResult.value) - } else { - return this._def.out._parseAsync({ - data: inResult.value, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - } - } - return handleAsync() - } else { - const inResult = this._def.in._parseSync({ - data: ctx.data, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - if (inResult.status === 'aborted') return INVALID - if (inResult.status === 'dirty') { - status.dirty() - return { - status: 'dirty', - value: inResult.value - } - } else { - return this._def.out._parseSync({ - data: inResult.value, - path: ctx.path, - meta: ctx.meta, - parent: ctx - }) - } - } - } - - static create(a: A, b: B): ZodPipeline { - return new ZodPipeline({ - in: a, - out: b, - typeName: ZodFirstPartyTypeKind.ZodPipeline - }) - } -} - -/////////////////////////////////////////// -/////////////////////////////////////////// -////////// ////////// -////////// ZodReadonly ////////// -////////// ////////// -/////////////////////////////////////////// -/////////////////////////////////////////// -type BuiltIn = - | (((...args: any[]) => any) | (new (...args: any[]) => any)) - | { readonly [Symbol.toStringTag]: string } - | Date - | Error - | Generator - | Promise - | RegExp - -type MakeReadonly = - T extends Map - ? ReadonlyMap - : T extends Set - ? ReadonlySet - : T extends [infer Head, ...infer Tail] - ? readonly [Head, ...Tail] - : T extends Array - ? ReadonlyArray - : T extends BuiltIn - ? T - : Readonly - -export interface ZodReadonlyDef extends ZodTypeDef { - innerType: T - typeName: ZodFirstPartyTypeKind.ZodReadonly -} - -export class ZodReadonly extends ZodType, ZodReadonlyDef, MakeReadonly> { - _parse(input: ParseInput): ParseReturnType { - const result = this._def.innerType._parse(input) - const freeze = (data: ParseReturnType) => { - if (isValid(data)) { - data.value = Object.freeze(data.value) - } - return data - } - return isAsync(result) ? result.then(data => freeze(data)) : freeze(result) - } - - static create = (type: T, params?: RawCreateParams): ZodReadonly => { - return new ZodReadonly({ - innerType: type, - typeName: ZodFirstPartyTypeKind.ZodReadonly, - ...processCreateParams(params) - }) as any - } - - unwrap() { - return this._def.innerType - } -} - -//////////////////////////////////////// -//////////////////////////////////////// -////////// ////////// -////////// z.custom ////////// -////////// ////////// -//////////////////////////////////////// -//////////////////////////////////////// -type CustomParams = CustomErrorParams & { fatal?: boolean } -export function custom( - check?: (data: any) => any, - params: string | CustomParams | ((input: any) => CustomParams) = {}, - /** - * @deprecated - * - * Pass `fatal` into the params object instead: - * - * ```ts - * z.string().custom((val) => val.length > 5, { fatal: false }) - * ``` - * - */ - fatal?: boolean -): ZodType { - if (check) - return ZodAny.create().superRefine((data, ctx) => { - if (!check(data)) { - const p = typeof params === 'function' ? params(data) : typeof params === 'string' ? { message: params } : params - const _fatal = p.fatal ?? fatal ?? true - const p2 = typeof p === 'string' ? { message: p } : p - ctx.addIssue({ code: 'custom', ...p2, fatal: _fatal }) - } - }) - return ZodAny.create() -} - -export { ZodType as Schema, ZodType as ZodSchema } - -export const late = { - object: ZodObject.lazycreate -} - -export enum ZodFirstPartyTypeKind { - ZodString = 'ZodString', - ZodNumber = 'ZodNumber', - ZodNaN = 'ZodNaN', - ZodBigInt = 'ZodBigInt', - ZodBoolean = 'ZodBoolean', - ZodDate = 'ZodDate', - ZodSymbol = 'ZodSymbol', - ZodUndefined = 'ZodUndefined', - ZodNull = 'ZodNull', - ZodAny = 'ZodAny', - ZodUnknown = 'ZodUnknown', - ZodNever = 'ZodNever', - ZodVoid = 'ZodVoid', - ZodArray = 'ZodArray', - ZodObject = 'ZodObject', - ZodUnion = 'ZodUnion', - ZodDiscriminatedUnion = 'ZodDiscriminatedUnion', - ZodIntersection = 'ZodIntersection', - ZodTuple = 'ZodTuple', - ZodRecord = 'ZodRecord', - ZodMap = 'ZodMap', - ZodSet = 'ZodSet', - ZodFunction = 'ZodFunction', - ZodLazy = 'ZodLazy', - ZodLiteral = 'ZodLiteral', - ZodEnum = 'ZodEnum', - ZodEffects = 'ZodEffects', - ZodNativeEnum = 'ZodNativeEnum', - ZodOptional = 'ZodOptional', - ZodNullable = 'ZodNullable', - ZodDefault = 'ZodDefault', - ZodCatch = 'ZodCatch', - ZodPromise = 'ZodPromise', - ZodBranded = 'ZodBranded', - ZodPipeline = 'ZodPipeline', - ZodReadonly = 'ZodReadonly' -} -export type ZodFirstPartySchemaTypes = - | ZodString - | ZodNumber - | ZodNaN - | ZodBigInt - | ZodBoolean - | ZodDate - | ZodUndefined - | ZodNull - | ZodAny - | ZodUnknown - | ZodNever - | ZodVoid - | ZodArray - | ZodObject - | ZodUnion - | ZodDiscriminatedUnion - | ZodIntersection - | ZodTuple - | ZodRecord - | ZodMap - | ZodSet - | ZodFunction - | ZodLazy - | ZodLiteral - | ZodEnum - | ZodEffects - | ZodNativeEnum - | ZodOptional - | ZodNullable - | ZodDefault - | ZodCatch - | ZodPromise - | ZodBranded - | ZodPipeline - | ZodReadonly - | ZodSymbol - -// requires TS 4.4+ -abstract class Class { - constructor(..._: any[]) {} -} -const instanceOfType = ( - // const instanceOfType = any>( - cls: T, - params: CustomParams = { - message: `Input not instance of ${cls.name}` - } -) => custom>(data => data instanceof cls, params) - -const stringType = ZodString.create -const numberType = ZodNumber.create -const nanType = ZodNaN.create -const bigIntType = ZodBigInt.create -const booleanType = ZodBoolean.create -const dateType = ZodDate.create -const symbolType = ZodSymbol.create -const undefinedType = ZodUndefined.create -const nullType = ZodNull.create -const anyType = ZodAny.create -const unknownType = ZodUnknown.create -const neverType = ZodNever.create -const voidType = ZodVoid.create -const arrayType = ZodArray.create -const objectType = ZodObject.create -const strictObjectType = ZodObject.strictCreate -const unionType = ZodUnion.create -const discriminatedUnionType = ZodDiscriminatedUnion.create -const intersectionType = ZodIntersection.create -const tupleType = ZodTuple.create -const recordType = ZodRecord.create -const mapType = ZodMap.create -const setType = ZodSet.create -const functionType = ZodFunction.create -const lazyType = ZodLazy.create -const literalType = ZodLiteral.create -const enumType = ZodEnum.create -const nativeEnumType = ZodNativeEnum.create -const promiseType = ZodPromise.create -const effectsType = ZodEffects.create -const optionalType = ZodOptional.create -const nullableType = ZodNullable.create -const preprocessType = ZodEffects.createWithPreprocess -const pipelineType = ZodPipeline.create -const ostring = () => stringType().optional() -const onumber = () => numberType().optional() -const oboolean = () => booleanType().optional() - -export const coerce = { - string: (arg => ZodString.create({ ...arg, coerce: true })) as (typeof ZodString)['create'], - number: (arg => ZodNumber.create({ ...arg, coerce: true })) as (typeof ZodNumber)['create'], - boolean: (arg => - ZodBoolean.create({ - ...arg, - coerce: true - })) as (typeof ZodBoolean)['create'], - bigint: (arg => ZodBigInt.create({ ...arg, coerce: true })) as (typeof ZodBigInt)['create'], - date: (arg => ZodDate.create({ ...arg, coerce: true })) as (typeof ZodDate)['create'] -} - -export { - anyType as any, - arrayType as array, - bigIntType as bigint, - booleanType as boolean, - dateType as date, - discriminatedUnionType as discriminatedUnion, - effectsType as effect, - enumType as enum, - functionType as function, - instanceOfType as instanceof, - intersectionType as intersection, - lazyType as lazy, - literalType as literal, - mapType as map, - nanType as nan, - nativeEnumType as nativeEnum, - neverType as never, - nullType as null, - nullableType as nullable, - numberType as number, - objectType as object, - oboolean, - onumber, - optionalType as optional, - ostring, - pipelineType as pipeline, - preprocessType as preprocess, - promiseType as promise, - recordType as record, - setType as set, - strictObjectType as strictObject, - stringType as string, - symbolType as symbol, - effectsType as transformer, - tupleType as tuple, - undefinedType as undefined, - unionType as union, - unknownType as unknown, - voidType as void -} - -export const NEVER = INVALID as never diff --git a/src/types.ts b/src/types.ts index dc7e254f..721ddbc6 100644 --- a/src/types.ts +++ b/src/types.ts @@ -206,7 +206,7 @@ export type Result = { [P in keyof T]: CollectionType extends Partial * return false to prevent the default output to a file if you wanted * @param data loaded data */ - prepare?: (data: Result, context: Context) => Promisable + prepare?: (data: Result, context: HookContext) => Promisable /** * Build success hook * @description * You can do anything after the build is complete, such as print some tips or deploy the output files. * @param data loaded data */ - complete?: (data: Result, context: Context) => Promisable + complete?: (data: Result, context: HookContext) => Promisable } /** @@ -289,13 +289,6 @@ export interface Config extends Readonly { * Dependencies of the config file */ readonly configImports: string[] - /** - * Global cache (need refresh in rebuild) - * memory level cache is enough for Velite. and it's easy & efficient. - * maybe we can use other cache way in the future if needed. - * but for now, we just need a simple cache. - */ - readonly cache: Map /** * The root directory of the contents (relative to config file). */ diff --git a/test/basic.ts b/test/basic.ts index 0d2e60f6..1e51bdd7 100644 --- a/test/basic.ts +++ b/test/basic.ts @@ -1,12 +1,12 @@ import { equal } from 'node:assert' +// import from source +import { exec } from 'node:child_process' import { readFile, rm } from 'node:fs/promises' import { test } from 'node:test' -// import from source -import { build } from '../src' - test('standalone fixtures', async t => { - await build({ config: 'examples/basic/velite.config.js' }) + // will use velite dist + await new Promise((res, rej) => exec('npm run build', { cwd: 'examples/basic' }, (e, s) => (e ? rej(e) : res(s)))) const entry = await readFile('examples/basic/.velite/index.js', 'utf8') equal(entry.length, 398, 'entry output length should be 398') diff --git a/test/schema.ts b/test/schema.ts new file mode 100644 index 00000000..1aa281e4 --- /dev/null +++ b/test/schema.ts @@ -0,0 +1,39 @@ +import { equal } from 'node:assert' +import { test } from 'node:test' + +import { parseWithContext, s, z } from '../src' + +import type { Schema } from '../src' + +test('exports zod utilities from the public entry', () => { + equal(typeof z.string, 'function') +}) + +test('Schema accepts an output type parameter', () => { + const schema: Schema = z.string() + equal(schema.parse('hello'), 'hello') +}) + +test('s.path resolves file path even when input is present', async () => { + const result = await parseWithContext(s.path(), 'manual-value', { + config: { root: '/site/content' } as any, + file: { path: '/site/content/posts/hello.md' } as any + }) + + equal(result.success, true) + if (result.success) equal(result.data, 'posts/hello') +}) + +test('context schemas resolve missing object fields from the current file', async () => { + const result = await parseWithContext( + s.object({ raw: s.raw() }), + {}, + { + config: { root: '/site/content' } as any, + file: { content: 'Hello from file', path: '/site/content/pages/about.mdx' } as any + } + ) + + equal(result.success, true) + equal((result.data as any).raw, 'Hello from file') +}) diff --git a/tsconfig.json b/tsconfig.json index 7e9a26f2..e2ca2a40 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "module": "es2022", "moduleResolution": "bundler", "esModuleInterop": true, + "ignoreDeprecations": "6.0", "skipLibCheck": true, "noEmit": true, "strict": true