diff --git a/.claude/commands/ci-failures.md b/.claude/commands/ci-failures.md index ede4766f6f4280..8c85a5a32aae30 100644 --- a/.claude/commands/ci-failures.md +++ b/.claude/commands/ci-failures.md @@ -1,91 +1,76 @@ # Check CI Failures -Analyze failing tests from PR CI runs with parallel subagent log analysis. +Analyze failing tests from PR CI runs. ## Usage ``` -/ci-failures [pr-number] +/ci-failures ``` -If no PR number provided, detect from current branch. +Automatically detects PR from current branch. ## Instructions -1. Get the PR number from argument or current branch: +1. Run the script to fetch CI failure data: ```bash - gh pr view --json number,headRefName --jq '"\(.number) \(.headRefName)"' + node scripts/ci-failures.js ``` -2. **CRITICAL: Always fetch fresh run IDs** - never trust cached IDs from conversation summaries: + This fetches workflow runs, failed jobs, and logs, then generates markdown files. + +2. Read the generated index file for a summary: ```bash - gh api "repos/vercel/next.js/actions/runs?branch={branch}&per_page=10" \ - --jq '.workflow_runs[] | select(.name == "build-and-test") | "\(.id) attempts:\(.run_attempt) status:\(.status) conclusion:\(.conclusion)"' + # Read scripts/ci-failures/index.md ``` -3. **Prioritize the MOST RECENT run, even if in-progress:** - - If the latest run is `in_progress` or `queued`, check it FIRST - it has the most relevant failures - - Individual jobs complete before the overall run - analyze them as they finish - - Only fall back to older completed runs if the current run has no completed jobs yet + The index shows all failed jobs with links to details. -4. Get all failed jobs from the run (works for in-progress runs too): +3. Spawn parallel haiku subagents to analyze the failing jobs (limit to 3-4 to avoid rate limits) + - **Agent prompt template** (copy-paste for each agent): - ```bash - gh api "repos/vercel/next.js/actions/runs/{run_id}/jobs?per_page=100" \ - --jq '.jobs[] | select(.conclusion == "failure") | "\(.id) \(.name)"' ``` + Analyze CI results for these jobs: scripts/ci-failures/job-{id1}.md scripts/ci-failures/job-{id2}.md + For each failing test, extract: + 1. TEST FILE: (full path, e.g., test/production/required-server-files-ssr-404/test/index.test.ts) + 2. TEST NAME: (the specific test case name)1 + 3. JOB TYPE: (the kind of the job, e.g. turbopack production, webpack dev, rust check) + 4. EXPECTED: (exact expected value from assertion) + 5. RECEIVED: (exact received value from assertion) + 6. CATEGORY: (assertion|timeout|routing|source-map|build|cli-output) + 7. ROOT CAUSE: (one sentence hypothesis) + 8. LOG FILE: (analysed log file that led to conclusion) + Return structured findings grouped by TEST FILE, not by job. + + Also extract other failures that are not related to tests. + Identify if they are likely transient. - **Note:** For runs with >100 jobs, paginate: - - ```bash - gh api "repos/vercel/next.js/actions/runs/{run_id}/jobs?per_page=100&page=2" ``` -5. Spawn parallel haiku subagents to analyze logs (limit to 3-4 to avoid rate limits): - - **CRITICAL: Use the API endpoint for logs, NOT `gh run view`** - - `gh run view --job --log` FAILS when run is in-progress - - **Do NOT group by job name** (e.g., "test dev", "turbopack") - group by failure pattern instead - - Agent prompt should extract structured data using: - ```bash - # Extract assertion failures with context: - gh api "repos/vercel/next.js/actions/jobs/{job_id}/logs" 2>&1 | \ - grep -B3 -A10 "expect.*\(toBe\|toContain\|toEqual\|toStartWith\|toMatch\)" | head -100 - # Also check for test file paths: - gh api "repos/vercel/next.js/actions/jobs/{job_id}/logs" 2>&1 | \ - grep -E "^\s+at Object\.|FAIL\s+test/" | head -20 - ``` - - **Agent prompt template** (copy-paste for each agent): - ``` - Analyze CI logs for these jobs: {job_ids} - For each failing test, extract: - 1. TEST FILE: (full path, e.g., test/production/required-server-files-ssr-404/test/index.test.ts) - 2. TEST NAME: (the specific test case name) - 3. EXPECTED: (exact expected value from assertion) - 4. RECEIVED: (exact received value from assertion) - 5. CATEGORY: (assertion|timeout|routing|source-map|build|cli-output) - 6. ROOT CAUSE: (one sentence hypothesis) - Return structured findings grouped by TEST FILE, not by job. - ``` - -6. **Deduplicate by test file** before summarizing: +4. **Deduplicate by test file** before summarizing: - Group all failures by TEST FILE path, not by CI job name - If multiple jobs fail the same test file, count them but report once - Identify systemic issues (same test failing across many jobs) -7. Create summary table **grouped by test file**: - | Test File | Issue (Expected vs Received) | Jobs | Priority | - |-----------|------------------------------|------|----------| - | `test/production/required-server-files-ssr-404/...` | `"second"` vs `"[slug]"` (routing) | 3 | HIGH | - | `test/integration/server-side-dev-errors/...` | source map paths wrong | 5 | HIGH | - | `test/e2e/app-dir/disable-logging-route/...` | "Compiling" appearing when disabled | 2 | MEDIUM | +5. Analyze failures and create a summary **grouped by test file**: -8. Recommend fixes: + | Test File | Type. | Issue (Expected vs Received) | Jobs | Priority | + | --------------------------------------------------- | -------------- | ----------------------------------- | ---- | -------- | + | `test/production/required-server-files-ssr-404/...` | Turbopack prod | `"second"` vs `"[slug]"` (routing) | 3 | HIGH | + | `test/integration/server-side-dev-errors/...` | webpack dev | source map paths wrong | 5 | HIGH | + | `test/e2e/app-dir/disable-logging-route/...` | prod | "Compiling" appearing when disabled | 2 | MEDIUM | + | N/A | rust check | Formatting incorrect | 2 | MEDIUM | + +6. Recommend fixes: - **HIGH priority**: Show specific expected vs actual values, include test file path - **MEDIUM priority**: Identify root cause pattern - **LOW priority**: Mark as likely flaky/transient +- Do not try to fix these failures. +- If failures would require complex analysis and there are multiple problems, only do some basic analysis and point out that further investigation is needed and could be performant when requested. + ## Failure Categories - **Infrastructure/Transient**: Network errors, 503s, timeouts unrelated to code @@ -96,66 +81,3 @@ If no PR number provided, detect from current branch. - **Routing/SSR**: Dynamic params not resolved, wrong status codes, JSON parse errors - **Source Maps**: `webpack-internal://` paths, wrong line numbers, missing code frames - **CLI Output**: Missing warnings, wrong log order, "Ready" printed before errors - -## Failure Extraction Patterns - -Use these grep patterns to identify specific failure types: - -```bash -# Assertion failures (most common) -grep -B3 -A10 "expect.*\(toBe\|toContain\|toEqual\|toStartWith\)" | head -100 - -# Routing issues (dynamic params, status codes) -grep -E "Expected.*Received|\[slug\]|x-matched-path|Expected: [0-9]+" | head -50 - -# Source map issues -grep -E "webpack-internal://|at .* \(webpack" | head -30 - -# CLI output issues (missing warnings) -grep -E "Ready in|deprecated|Both middleware|Compiling" | head -30 - -# Timeout issues -grep -E "TIMEOUT|TimeoutError|exceeded|Exceeded timeout" | head -20 - -# Test file paths (to identify which test is failing) -grep -E "FAIL test/|at Object\. \(" | head -20 -``` - -## Common Gotchas - -### In-Progress Runs - -- `gh run view {run_id} --job {job_id} --log` **FAILS** when run is in-progress -- `gh api "repos/.../actions/jobs/{job_id}/logs"` **WORKS** for any completed job -- Always use the API endpoint for reliability - -### Pagination - -- GitHub API paginates at 100 jobs per page -- Next.js CI has ~120+ jobs - always check page 2: - ```bash - gh api ".../jobs?per_page=100&page=1" --jq '[.jobs[] | select(.conclusion == "failure")] | length' - gh api ".../jobs?per_page=100&page=2" --jq '[.jobs[] | select(.conclusion == "failure")] | length' - ``` - -### Multiple Attempts - -- CI runs can have multiple attempts (retries) -- Check attempt count: `.run_attempt` field -- Query specific attempt: `.../runs/{id}/attempts/{n}/jobs` -- 404 on attempt endpoint means that attempt doesn't exist - -## Quick Reference - -```bash -# Get failed jobs (works for in-progress runs) -gh api "repos/vercel/next.js/actions/runs/{run_id}/jobs?per_page=100" \ - --jq '.jobs[] | select(.conclusion == "failure") | "\(.id) \(.name)"' - -# Get logs for a specific job (works for in-progress runs) -gh api "repos/vercel/next.js/actions/jobs/{job_id}/logs" 2>&1 | head -500 - -# Search logs for errors -gh api "repos/vercel/next.js/actions/jobs/{job_id}/logs" 2>&1 | \ - grep -E "FAIL|Error|error:|✕|Expected|Received" | head -50 -``` diff --git a/crates/next-core/src/next_client/context.rs b/crates/next-core/src/next_client/context.rs index b4b13eb57f901a..a7f50250d0e7a1 100644 --- a/crates/next-core/src/next_client/context.rs +++ b/crates/next-core/src/next_client/context.rs @@ -11,12 +11,12 @@ use turbopack::module_options::{ side_effect_free_packages_glob, }; use turbopack_browser::{ - BrowserChunkingContext, ChunkSuffix, ContentHashing, CurrentChunkMethod, + BrowserChunkingContext, ContentHashing, CurrentChunkMethod, react_refresh::assert_can_resolve_react_refresh, }; use turbopack_core::{ chunk::{ - ChunkingConfig, ChunkingContext, MangleType, MinifyType, SourceMapSourceType, + AssetSuffix, ChunkingConfig, ChunkingContext, MangleType, MinifyType, SourceMapSourceType, SourceMapsType, UnusedReferences, chunk_id_strategy::ModuleIdStrategy, }, compile_time_info::{CompileTimeDefines, CompileTimeInfo, FreeVarReference, FreeVarReferences}, @@ -26,7 +26,9 @@ use turbopack_core::{ resolve::{parse::Request, pattern::Pattern}, }; use turbopack_css::chunk::CssChunkType; -use turbopack_ecmascript::{AnalyzeMode, TypeofWindow, chunk::EcmascriptChunkType}; +use turbopack_ecmascript::{ + AnalyzeMode, TypeofWindow, chunk::EcmascriptChunkType, references::esm::UrlRewriteBehavior, +}; use turbopack_node::{ execution_context::ExecutionContext, transforms::postcss::{PostCssConfigLocation, PostCssTransformOptions}, @@ -323,6 +325,7 @@ pub async fn get_client_module_options_context( let source_maps = *next_config.client_source_maps(mode).await?; let module_options_context = ModuleOptionsContext { ecmascript: EcmascriptOptionsContext { + esm_url_rewrite_behavior: Some(UrlRewriteBehavior::Relative), enable_typeof_window_inlining: Some(TypeofWindow::Object), source_maps, infer_module_side_effects: *next_config.turbopack_infer_module_side_effects().await?, @@ -333,6 +336,7 @@ pub async fn get_client_module_options_context( module_css_condition: Some(module_styles_rule_condition()), ..Default::default() }, + static_url_tag: Some(rcstr!("client")), environment: Some(env), execution_context: Some(execution_context), tree_shaking_mode: tree_shaking_mode_for_user_code, @@ -468,7 +472,7 @@ pub async fn get_client_chunking_context( next_mode.runtime_type(), ) .chunk_base_path(Some(asset_prefix.clone())) - .chunk_suffix(ChunkSuffix::FromScriptSrc.resolved_cell()) + .asset_suffix(AssetSuffix::Inferred.resolved_cell()) .minify_type(if *minify.await? { MinifyType::Minify { mangle: (!*no_mangling.await?).then_some(MangleType::OptimalSize), diff --git a/crates/next-core/src/next_config.rs b/crates/next-core/src/next_config.rs index 49696c22d317a2..597fea28fe1272 100644 --- a/crates/next-core/src/next_config.rs +++ b/crates/next-core/src/next_config.rs @@ -1766,7 +1766,7 @@ impl NextConfig { /// Returns the suffix to use for chunk loading. #[turbo_tasks::function] - pub async fn chunk_suffix_path(self: Vc) -> Result>> { + pub async fn asset_suffix_path(self: Vc) -> Result>> { let this = self.await?; match &this.deployment_id { diff --git a/crates/next-core/src/next_edge/context.rs b/crates/next-core/src/next_edge/context.rs index a934773fe07eb9..cc5c3d71c59c69 100644 --- a/crates/next-core/src/next_edge/context.rs +++ b/crates/next-core/src/next_edge/context.rs @@ -6,8 +6,8 @@ use turbo_tasks_fs::FileSystemPath; use turbopack_browser::BrowserChunkingContext; use turbopack_core::{ chunk::{ - ChunkingConfig, ChunkingContext, MangleType, MinifyType, SourceMapsType, UnusedReferences, - chunk_id_strategy::ModuleIdStrategy, + AssetSuffix, ChunkingConfig, ChunkingContext, MangleType, MinifyType, SourceMapsType, + UnusedReferences, UrlBehavior, chunk_id_strategy::ModuleIdStrategy, }, compile_time_info::{CompileTimeDefines, CompileTimeInfo, FreeVarReference, FreeVarReferences}, environment::{EdgeWorkerEnvironment, Environment, ExecutionEnvironment, NodeJsVersion}, @@ -324,6 +324,12 @@ pub async fn get_edge_chunking_context( .client_roots_override(rcstr!("client"), client_root.clone()) .asset_root_path_override(rcstr!("client"), client_root.join("static/media")?) .asset_base_path_override(rcstr!("client"), asset_prefix) + .url_behavior_override( + rcstr!("client"), + UrlBehavior { + suffix: AssetSuffix::FromGlobal(rcstr!("NEXT_CLIENT_ASSET_SUFFIX")), + }, + ) // Since one can't read files in edge directly, any asset need to be fetched // instead. This special blob url is handled by the custom fetch // implementation in the edge sandbox. It will respond with the diff --git a/crates/next-core/src/next_manifests/client_reference_manifest.rs b/crates/next-core/src/next_manifests/client_reference_manifest.rs index 771dd9374ada72..c244c9fe19bc50 100644 --- a/crates/next-core/src/next_manifests/client_reference_manifest.rs +++ b/crates/next-core/src/next_manifests/client_reference_manifest.rs @@ -171,8 +171,8 @@ async fn build_manifest( let runtime_server_deployment_id_available = *next_config.runtime_server_deployment_id_available().await?; let suffix_path = if !runtime_server_deployment_id_available { - let chunk_suffix_path = next_config.chunk_suffix_path().owned().await?; - chunk_suffix_path.unwrap_or_default() + let asset_suffix_path = next_config.asset_suffix_path().owned().await?; + asset_suffix_path.unwrap_or_default() } else { rcstr!("") }; diff --git a/crates/next-core/src/next_server/context.rs b/crates/next-core/src/next_server/context.rs index c8ad79a763c918..a0b761dda9b25b 100644 --- a/crates/next-core/src/next_server/context.rs +++ b/crates/next-core/src/next_server/context.rs @@ -15,8 +15,8 @@ use turbopack::{ }; use turbopack_core::{ chunk::{ - ChunkingConfig, MangleType, MinifyType, SourceMapSourceType, SourceMapsType, - UnusedReferences, chunk_id_strategy::ModuleIdStrategy, + AssetSuffix, ChunkingConfig, MangleType, MinifyType, SourceMapSourceType, SourceMapsType, + UnusedReferences, UrlBehavior, chunk_id_strategy::ModuleIdStrategy, }, compile_time_defines, compile_time_info::{CompileTimeDefines, CompileTimeInfo, FreeVarReferences}, @@ -632,20 +632,21 @@ pub async fn get_server_module_options_context( foreign_next_server_rules.extend(internal_custom_rules); - let url_rewrite_behavior = Some( + let (url_rewrite_behavior, static_url_tag) = { //https://github.com/vercel/next.js/blob/bbb730e5ef10115ed76434f250379f6f53efe998/packages/next/src/build/webpack-config.ts#L1384 if let ServerContextType::PagesApi { .. } = ty { - UrlRewriteBehavior::Full + (Some(UrlRewriteBehavior::Full), None) } else { - UrlRewriteBehavior::Relative - }, - ); + (Some(UrlRewriteBehavior::Relative), Some(rcstr!("client"))) + } + }; let module_options_context = ModuleOptionsContext { ecmascript: EcmascriptOptionsContext { esm_url_rewrite_behavior: url_rewrite_behavior, ..module_options_context.ecmascript }, + static_url_tag, ..module_options_context }; @@ -704,6 +705,15 @@ pub async fn get_server_module_options_context( ); next_server_rules.extend(source_transform_rules); + let module_options_context = ModuleOptionsContext { + ecmascript: EcmascriptOptionsContext { + esm_url_rewrite_behavior: Some(UrlRewriteBehavior::Relative), + ..module_options_context.ecmascript + }, + static_url_tag: Some(rcstr!("client")), + ..module_options_context + }; + let foreign_code_module_options_context = ModuleOptionsContext { module_rules: foreign_next_server_rules.clone(), enable_webpack_loaders: foreign_enable_webpack_loaders, @@ -777,6 +787,15 @@ pub async fn get_server_module_options_context( next_server_rules.extend(source_transform_rules); + let module_options_context = ModuleOptionsContext { + ecmascript: EcmascriptOptionsContext { + esm_url_rewrite_behavior: Some(UrlRewriteBehavior::Relative), + ..module_options_context.ecmascript + }, + static_url_tag: Some(rcstr!("client")), + ..module_options_context + }; + let foreign_code_module_options_context = ModuleOptionsContext { module_rules: foreign_next_server_rules.clone(), enable_webpack_loaders: foreign_enable_webpack_loaders, @@ -1044,6 +1063,12 @@ pub async fn get_server_chunking_context_with_client_assets( next_mode.runtime_type(), ) .asset_prefix(Some(asset_prefix)) + .url_behavior_override( + rcstr!("client"), + UrlBehavior { + suffix: AssetSuffix::FromGlobal(rcstr!("NEXT_CLIENT_ASSET_SUFFIX")), + }, + ) .minify_type(if *minify.await? { MinifyType::Minify { // React needs deterministic function names to work correctly. @@ -1129,6 +1154,12 @@ pub async fn get_server_chunking_context( .client_roots_override(rcstr!("client"), client_root.clone()) .asset_root_path_override(rcstr!("client"), client_root.join("static/media")?) .asset_prefix_override(rcstr!("client"), asset_prefix) + .url_behavior_override( + rcstr!("client"), + UrlBehavior { + suffix: AssetSuffix::FromGlobal(rcstr!("NEXT_CLIENT_ASSET_SUFFIX")), + }, + ) .minify_type(if *minify.await? { MinifyType::Minify { mangle: (!*no_mangling.await?).then_some(MangleType::OptimalSize), diff --git a/lerna.json b/lerna.json index 31857d1981d289..8d8077abf93fe1 100644 --- a/lerna.json +++ b/lerna.json @@ -15,5 +15,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "16.2.0-canary.5" + "version": "16.2.0-canary.6" } \ No newline at end of file diff --git a/package.json b/package.json index 4e2268bd1cd18b..a76e601ff3e047 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "eslint-plugin-jsdoc": "48.0.4", "eslint-plugin-mdx": "3.1.5", "eslint-plugin-react": "7.37.0", - "eslint-plugin-react-hooks": "0.0.0-experimental-b546603b-20260121", + "eslint-plugin-react-hooks": "0.0.0-experimental-24d8716e-20260123", "event-stream": "4.0.1", "execa": "2.0.3", "expect": "29.7.0", @@ -258,16 +258,16 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "19.0.0", - "react-builtin": "npm:react@19.3.0-canary-b546603b-20260121", + "react-builtin": "npm:react@19.3.0-canary-24d8716e-20260123", "react-dom": "19.0.0", - "react-dom-builtin": "npm:react-dom@19.3.0-canary-b546603b-20260121", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-b546603b-20260121", - "react-experimental-builtin": "npm:react@0.0.0-experimental-b546603b-20260121", - "react-is-builtin": "npm:react-is@19.3.0-canary-b546603b-20260121", - "react-server-dom-turbopack": "19.3.0-canary-b546603b-20260121", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-b546603b-20260121", - "react-server-dom-webpack": "19.3.0-canary-b546603b-20260121", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-b546603b-20260121", + "react-dom-builtin": "npm:react-dom@19.3.0-canary-24d8716e-20260123", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-24d8716e-20260123", + "react-experimental-builtin": "npm:react@0.0.0-experimental-24d8716e-20260123", + "react-is-builtin": "npm:react-is@19.3.0-canary-24d8716e-20260123", + "react-server-dom-turbopack": "19.3.0-canary-24d8716e-20260123", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-24d8716e-20260123", + "react-server-dom-webpack": "19.3.0-canary-24d8716e-20260123", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-24d8716e-20260123", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -277,8 +277,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.15.2", - "scheduler-builtin": "npm:scheduler@0.28.0-canary-b546603b-20260121", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-b546603b-20260121", + "scheduler-builtin": "npm:scheduler@0.28.0-canary-24d8716e-20260123", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-24d8716e-20260123", "seedrandom": "3.0.5", "semver": "7.3.7", "serve-handler": "6.1.6", @@ -323,10 +323,10 @@ "@types/react-dom": "19.2.1", "@types/retry": "0.12.0", "jest-snapshot": "30.0.0-alpha.6", - "react": "19.3.0-canary-b546603b-20260121", - "react-dom": "19.3.0-canary-b546603b-20260121", - "react-is": "19.3.0-canary-b546603b-20260121", - "scheduler": "0.28.0-canary-b546603b-20260121" + "react": "19.3.0-canary-24d8716e-20260123", + "react-dom": "19.3.0-canary-24d8716e-20260123", + "react-is": "19.3.0-canary-24d8716e-20260123", + "scheduler": "0.28.0-canary-24d8716e-20260123" }, "packageExtensions": { "eslint-plugin-react-hooks@0.0.0-experimental-6de32a5a-20250822": { diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 8e0f2f601a139f..aeee98aaa7aef0 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "keywords": [ "react", "next", diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json index d73acb1f653018..bb436004ed94bd 100644 --- a/packages/eslint-config-next/package.json +++ b/packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-next", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "ESLint configuration used by Next.js.", "license": "MIT", "repository": { @@ -12,7 +12,7 @@ "dist" ], "dependencies": { - "@next/eslint-plugin-next": "16.2.0-canary.5", + "@next/eslint-plugin-next": "16.2.0-canary.6", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.32.0", diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 8c89d0457f5799..02b8d990e6dbfe 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,7 +1,7 @@ { "name": "@next/eslint-plugin-internal", "private": true, - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "ESLint plugin for working on Next.js.", "exports": { ".": "./src/eslint-plugin-internal.js" diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json index 1465ec1affecf6..2515fd9e9d5e6f 100644 --- a/packages/eslint-plugin-next/package.json +++ b/packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { "name": "@next/eslint-plugin-next", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "ESLint plugin for Next.js.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/font/package.json b/packages/font/package.json index c878c5d04c5935..749f1d3bea0210 100644 --- a/packages/font/package.json +++ b/packages/font/package.json @@ -1,7 +1,7 @@ { "name": "@next/font", "private": true, - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "repository": { "url": "vercel/next.js", "directory": "packages/font" diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 2f061baf30b076..36f6e949ce5c4e 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "main": "index.js", "types": "index.d.ts", "license": "MIT", diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json index 4446e24ebdceb6..998e866a6fa017 100644 --- a/packages/next-codemod/package.json +++ b/packages/next-codemod/package.json @@ -1,6 +1,6 @@ { "name": "@next/codemod", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "license": "MIT", "repository": { "type": "git", diff --git a/packages/next-env/package.json b/packages/next-env/package.json index f5e45d7cc756c6..7e5b6176ab5f49 100644 --- a/packages/next-env/package.json +++ b/packages/next-env/package.json @@ -1,6 +1,6 @@ { "name": "@next/env", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "keywords": [ "react", "next", diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 762ce876dbba23..2cd535f7498a38 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json index 274c7139927496..cdc76b2e0b1f71 100644 --- a/packages/next-plugin-storybook/package.json +++ b/packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-storybook", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "repository": { "url": "vercel/next.js", "directory": "packages/next-plugin-storybook" diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json index 1ce59a1f45280d..007c249cfb0d6b 100644 --- a/packages/next-polyfill-module/package.json +++ b/packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-module", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)", "main": "dist/polyfill-module.js", "license": "MIT", diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index d5103b318c31bc..5a4d54b2717819 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next-routing/package.json b/packages/next-routing/package.json index 491f184153016f..e6535265601a2f 100644 --- a/packages/next-routing/package.json +++ b/packages/next-routing/package.json @@ -1,6 +1,6 @@ { "name": "@next/routing", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "keywords": [ "react", "next", diff --git a/packages/next-rspack/package.json b/packages/next-rspack/package.json index 1177bf7070c1a3..47523b91429ba9 100644 --- a/packages/next-rspack/package.json +++ b/packages/next-rspack/package.json @@ -1,6 +1,6 @@ { "name": "next-rspack", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "repository": { "url": "vercel/next.js", "directory": "packages/next-rspack" diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index cffde7af75bf3f..e4239d3039591c 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -1,6 +1,6 @@ { "name": "@next/swc", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "private": true, "files": [ "native/" diff --git a/packages/next/package.json b/packages/next/package.json index 468687d015eebc..473e1b1f0e94fa 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "16.2.0-canary.5", + "version": "16.2.0-canary.6", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -97,7 +97,7 @@ ] }, "dependencies": { - "@next/env": "16.2.0-canary.5", + "@next/env": "16.2.0-canary.6", "@swc/helpers": "0.5.15", "baseline-browser-mapping": "^2.8.3", "caniuse-lite": "^1.0.30001579", @@ -162,11 +162,11 @@ "@modelcontextprotocol/sdk": "1.18.1", "@mswjs/interceptors": "0.23.0", "@napi-rs/triples": "1.2.0", - "@next/font": "16.2.0-canary.5", - "@next/polyfill-module": "16.2.0-canary.5", - "@next/polyfill-nomodule": "16.2.0-canary.5", - "@next/react-refresh-utils": "16.2.0-canary.5", - "@next/swc": "16.2.0-canary.5", + "@next/font": "16.2.0-canary.6", + "@next/polyfill-module": "16.2.0-canary.6", + "@next/polyfill-nomodule": "16.2.0-canary.6", + "@next/react-refresh-utils": "16.2.0-canary.6", + "@next/swc": "16.2.0-canary.6", "@opentelemetry/api": "1.6.0", "@playwright/test": "1.51.1", "@rspack/core": "1.6.7", diff --git a/packages/next/src/build/swc/generated-native.d.ts b/packages/next/src/build/swc/generated-native.d.ts index 2d0bb2be415d0f..ab56d7807ba0dd 100644 --- a/packages/next/src/build/swc/generated-native.d.ts +++ b/packages/next/src/build/swc/generated-native.d.ts @@ -407,7 +407,7 @@ export interface NapiNextTurbopackCallbacksJsObject { opts: TurbopackInternalErrorOpts ) => never } -/** Arguments for [`NapiNextTurbopackCallbacks::throw_turbopack_internal_error`]. */ +/** Arguments for `NapiNextTurbopackCallbacks::throw_turbopack_internal_error`. */ export interface TurbopackInternalErrorOpts { message: string anonymizedLocation?: string diff --git a/packages/next/src/client/register-deployment-id-global.ts b/packages/next/src/client/register-deployment-id-global.ts index eabb977e31df92..b27ae185c854dc 100644 --- a/packages/next/src/client/register-deployment-id-global.ts +++ b/packages/next/src/client/register-deployment-id-global.ts @@ -1,2 +1,4 @@ import { getDeploymentId } from '../shared/lib/deployment-id' -;(globalThis as any).NEXT_DEPLOYMENT_ID = getDeploymentId() + +const deploymentId = getDeploymentId() +;(globalThis as any).NEXT_DEPLOYMENT_ID = deploymentId diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 8eed3f9708efd3..4f6f4b59e75509 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -32672,11 +32672,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32713,10 +32713,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -32864,7 +32864,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index 3898c00e269260..7815f88aade3e0 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -19825,14 +19825,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2237 = React.version; if ( - "19.3.0-experimental-b546603b-20260121" !== + "19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion$jscomp$inline_2237 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2237, - "19.3.0-experimental-b546603b-20260121" + "19.3.0-experimental-24d8716e-20260123" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19854,10 +19854,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2940 = { bundleType: 0, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2941 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -19964,4 +19964,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index 62c934a4b09b5c..9ca71947857ef1 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -32729,11 +32729,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -32770,10 +32770,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -33251,7 +33251,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index 48a96a141d55cd..5567fb324323a6 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -21907,14 +21907,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2541 = React.version; if ( - "19.3.0-experimental-b546603b-20260121" !== + "19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion$jscomp$inline_2541 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2541, - "19.3.0-experimental-b546603b-20260121" + "19.3.0-experimental-24d8716e-20260123" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -21936,10 +21936,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_3261 = { bundleType: 0, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_3262 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -22207,7 +22207,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 17fdf75ced5517..3e6cb92a29c601 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -10516,5 +10516,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index 08396004fc028b..c14c449c3e4636 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -7035,4 +7035,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js index 1ad5c837c957fa..6c77ee234cdd5d 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.development.js @@ -10516,5 +10516,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js index 5cbd3229fa2c17..323b8b1e69af60 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.node.production.js @@ -7138,4 +7138,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js index 60aae2e4724c87..03c16f9a81b360 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.development.js @@ -9492,11 +9492,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -11319,5 +11319,5 @@ startWork(request); }); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js index 43a2793d29ca44..1d7e9e9381eb24 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.browser.production.js @@ -7688,12 +7688,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.3.0-experimental-b546603b-20260121" + "19.3.0-experimental-24d8716e-20260123" ) ); } @@ -7944,4 +7944,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js index 1644f0ca4f76c0..94f4349da5847e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.bun.production.js @@ -7383,11 +7383,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7932,4 +7932,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js index 2b8dc2dfdc0f6c..0b5862b99cb661 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.development.js @@ -9521,11 +9521,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react-experimental"), @@ -11344,5 +11344,5 @@ startWork(request); }); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js index 89b87045cb5688..fbb50ec6f6d88e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.edge.production.js @@ -7806,11 +7806,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -8060,4 +8060,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js index 5b2d9c9df8dedb..0ae0bbd7bee151 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.development.js @@ -9381,11 +9381,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -11510,5 +11510,5 @@ } }; }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js index 6cfa167bb0bbdd..3e567fdbc2c601 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server.node.production.js @@ -7685,11 +7685,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -8239,4 +8239,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js index 9cf1980aa00b74..132d78dad1a2ae 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.development.js @@ -32993,11 +32993,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-experimental-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-experimental-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-experimental-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -33034,10 +33034,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -33351,5 +33351,5 @@ } }; }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js index 0c1a12ec7559d3..b0f066f62dd6b6 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-unstable_testing.production.js @@ -20141,14 +20141,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2266 = React.version; if ( - "19.3.0-experimental-b546603b-20260121" !== + "19.3.0-experimental-24d8716e-20260123" !== isomorphicReactPackageVersion$jscomp$inline_2266 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2266, - "19.3.0-experimental-b546603b-20260121" + "19.3.0-experimental-24d8716e-20260123" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -20170,10 +20170,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2974 = { bundleType: 0, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121" + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2975 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -20431,4 +20431,4 @@ exports.observeVisibleRects = function ( } }; }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js index 8ae346db9d3ac9..54e70f2066bb05 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.development.js @@ -422,7 +422,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js index 40507ecbd03987..4e9842d6adb88b 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.production.js @@ -213,4 +213,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js index f2384b4d5bed94..d3d563e1b90e7f 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js index 20dfb12898a1b4..fb102a9165b7c5 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom-experimental/package.json b/packages/next/src/compiled/react-dom-experimental/package.json index 2efe917684c193..f91f1efcc1ec2d 100644 --- a/packages/next/src/compiled/react-dom-experimental/package.json +++ b/packages/next/src/compiled/react-dom-experimental/package.json @@ -72,10 +72,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.0.0-experimental-b546603b-20260121" + "scheduler": "0.0.0-experimental-24d8716e-20260123" }, "peerDependencies": { - "react": "0.0.0-experimental-b546603b-20260121" + "react": "0.0.0-experimental-24d8716e-20260123" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js index 0f4e7b84059db3..3fbd2ff57dbbbb 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.development.js @@ -30422,11 +30422,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30463,10 +30463,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121" + reconcilerVersion: "19.3.0-canary-24d8716e-20260123" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30604,7 +30604,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js index a6b9c11c6ea90c..895633f0f6c2ed 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-client.production.js @@ -18028,14 +18028,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2044 = React.version; if ( - "19.3.0-canary-b546603b-20260121" !== + "19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion$jscomp$inline_2044 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2044, - "19.3.0-canary-b546603b-20260121" + "19.3.0-canary-24d8716e-20260123" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -18057,10 +18057,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2634 = { bundleType: 0, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121" + reconcilerVersion: "19.3.0-canary-24d8716e-20260123" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2635 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -18158,4 +18158,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js index b346255bbc7356..0ca9f558105d0e 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.development.js @@ -30480,11 +30480,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -30521,10 +30521,10 @@ !(function () { var internals = { bundleType: 1, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121" + reconcilerVersion: "19.3.0-canary-24d8716e-20260123" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -30992,7 +30992,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js index c78bd0e564ca83..0af0f069083a38 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-profiling.profiling.js @@ -19957,14 +19957,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2348 = React.version; if ( - "19.3.0-canary-b546603b-20260121" !== + "19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion$jscomp$inline_2348 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2348, - "19.3.0-canary-b546603b-20260121" + "19.3.0-canary-24d8716e-20260123" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -19986,10 +19986,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2951 = { bundleType: 0, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121" + reconcilerVersion: "19.3.0-canary-24d8716e-20260123" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2952 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -20248,7 +20248,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js index c1291e1347b1c7..6628bdfb55ed2d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.development.js @@ -10140,5 +10140,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js index 4822e3443c9a3f..44337cb8c75d2b 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.browser.production.js @@ -6763,4 +6763,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js index 5db8b04f9085f6..1d102cce82f15f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.development.js @@ -10140,5 +10140,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js index eb9e005e0f856f..53ade1e2d09738 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server-legacy.node.production.js @@ -6855,4 +6855,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server' ); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js index 03b5d0901698bc..64627f1a54dc0f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.development.js @@ -9103,11 +9103,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react"), @@ -10913,5 +10913,5 @@ startWork(request); }); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js index 8b281ea480087b..95d79a3c98d689 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.browser.production.js @@ -7365,12 +7365,12 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion, - "19.3.0-canary-b546603b-20260121" + "19.3.0-canary-24d8716e-20260123" ) ); } @@ -7621,4 +7621,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js index 9aff7043adce63..7b9286b584816d 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.bun.production.js @@ -7073,11 +7073,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7622,4 +7622,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js index 93e9d5beb16bae..c30674f9ba1406 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.development.js @@ -9126,11 +9126,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } var React = require("next/dist/compiled/react"), @@ -10932,5 +10932,5 @@ startWork(request); }); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js index 91869d2d0a9dd7..0e9b1525b397d3 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.edge.production.js @@ -7472,11 +7472,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7726,4 +7726,4 @@ exports.resumeAndPrerender = function (children, postponedState, options) { startWork(request); }); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js index 87b600596905b6..63fd0b726e0184 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.development.js @@ -9000,11 +9000,11 @@ } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } function createDrainHandler(destination, request) { @@ -11112,5 +11112,5 @@ } }; }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js index 2f5dff6158c924..a603c1fd39666f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom-server.node.production.js @@ -7363,11 +7363,11 @@ function getPostponedState(request) { } function ensureCorrectIsomorphicReactVersion() { var isomorphicReactPackageVersion = React.version; - if ("19.3.0-canary-b546603b-20260121" !== isomorphicReactPackageVersion) + if ("19.3.0-canary-24d8716e-20260123" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.3.0-canary-b546603b-20260121\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.3.0-canary-24d8716e-20260123\nLearn more: https://react.dev/warnings/version-mismatch") ); } ensureCorrectIsomorphicReactVersion(); @@ -7917,4 +7917,4 @@ exports.resumeToPipeableStream = function (children, postponedState, options) { } }; }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js index 4ac92be2b13776..00e5488b330b9c 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.development.js @@ -422,7 +422,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js index 171ccec7d886c6..89e6184458b08f 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.production.js @@ -213,4 +213,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js index 2ba519544382fa..c44b7f1fe8ba40 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.development.js @@ -336,5 +336,5 @@ })) : Internals.d.m(href)); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js index 0cab99d0a03b12..91de6df43478be 100644 --- a/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js +++ b/packages/next/src/compiled/react-dom/cjs/react-dom.react-server.production.js @@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-dom/package.json b/packages/next/src/compiled/react-dom/package.json index 9d34d75c575f70..0c86540cb3d267 100644 --- a/packages/next/src/compiled/react-dom/package.json +++ b/packages/next/src/compiled/react-dom/package.json @@ -67,10 +67,10 @@ "./package.json": "./package.json" }, "dependencies": { - "scheduler": "0.28.0-canary-b546603b-20260121" + "scheduler": "0.28.0-canary-24d8716e-20260123" }, "peerDependencies": { - "react": "19.3.0-canary-b546603b-20260121" + "react": "19.3.0-canary-24d8716e-20260123" }, "browser": { "./server.js": "./server.browser.js", diff --git a/packages/next/src/compiled/react-experimental/cjs/react.development.js b/packages/next/src/compiled/react-experimental/cjs/react.development.js index 411ab9d807cff5..650bdc5e5fb207 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.development.js @@ -1391,7 +1391,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-experimental/cjs/react.production.js b/packages/next/src/compiled/react-experimental/cjs/react.production.js index 2bbdbd71c62c30..c10761c0efd3aa 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.production.js @@ -613,4 +613,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js index 03706d0b977858..29027c08644a7a 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.development.js @@ -1061,5 +1061,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.3.0-experimental-b546603b-20260121"; + exports.version = "19.3.0-experimental-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js index c5f72a2b53e64f..e42fd14be952b6 100644 --- a/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react-experimental/cjs/react.react-server.production.js @@ -579,4 +579,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.3.0-experimental-b546603b-20260121"; +exports.version = "19.3.0-experimental-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react-is/package.json b/packages/next/src/compiled/react-is/package.json index 4407c718fbb51c..c9babb5ac9692c 100644 --- a/packages/next/src/compiled/react-is/package.json +++ b/packages/next/src/compiled/react-is/package.json @@ -1,6 +1,6 @@ { "name": "react-is", - "version": "19.3.0-canary-b546603b-20260121", + "version": "19.3.0-canary-24d8716e-20260123", "description": "Brand checking of React Elements.", "main": "index.js", "sideEffects": false, diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js index ae555281bbc076..44612abdf9692d 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/cjs/react-server-dom-turbopack-client.browser.development.js @@ -5000,10 +5000,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121", + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json index 616d7c7e396e8d..c6cb2ed85a9467 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack-experimental/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "0.0.0-experimental-b546603b-20260121", - "react-dom": "0.0.0-experimental-b546603b-20260121" + "react": "0.0.0-experimental-24d8716e-20260123", + "react-dom": "0.0.0-experimental-24d8716e-20260123" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js index b214883d093ac0..cc0da97f4ae407 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js @@ -5000,10 +5000,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-server-dom-turbopack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121", + reconcilerVersion: "19.3.0-canary-24d8716e-20260123", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-turbopack/package.json b/packages/next/src/compiled/react-server-dom-turbopack/package.json index fb70ed7454c200..2d405c6f0b6cc8 100644 --- a/packages/next/src/compiled/react-server-dom-turbopack/package.json +++ b/packages/next/src/compiled/react-server-dom-turbopack/package.json @@ -48,7 +48,7 @@ "neo-async": "^2.6.1" }, "peerDependencies": { - "react": "19.3.0-canary-b546603b-20260121", - "react-dom": "19.3.0-canary-b546603b-20260121" + "react": "19.3.0-canary-24d8716e-20260123", + "react-dom": "19.3.0-canary-24d8716e-20260123" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js index 478ff0daa77a1d..3019f84c21db68 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/cjs/react-server-dom-webpack-client.browser.development.js @@ -5016,10 +5016,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.3.0-experimental-b546603b-20260121", + version: "19.3.0-experimental-24d8716e-20260123", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-experimental-b546603b-20260121", + reconcilerVersion: "19.3.0-experimental-24d8716e-20260123", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json index 79ac0674350fb8..2ca11d9f09c71f 100644 --- a/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack-experimental/package.json @@ -52,8 +52,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "0.0.0-experimental-b546603b-20260121", - "react-dom": "0.0.0-experimental-b546603b-20260121", + "react": "0.0.0-experimental-24d8716e-20260123", + "react-dom": "0.0.0-experimental-24d8716e-20260123", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js index 2c350014050f1c..b7eb7fc28b8d9d 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +++ b/packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js @@ -5016,10 +5016,10 @@ return hook.checkDCE ? !0 : !1; })({ bundleType: 1, - version: "19.3.0-canary-b546603b-20260121", + version: "19.3.0-canary-24d8716e-20260123", rendererPackageName: "react-server-dom-webpack", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.3.0-canary-b546603b-20260121", + reconcilerVersion: "19.3.0-canary-24d8716e-20260123", getCurrentComponentInfo: function () { return currentOwnerInDEV; } diff --git a/packages/next/src/compiled/react-server-dom-webpack/package.json b/packages/next/src/compiled/react-server-dom-webpack/package.json index 09f68a22973aed..50443298ce05c3 100644 --- a/packages/next/src/compiled/react-server-dom-webpack/package.json +++ b/packages/next/src/compiled/react-server-dom-webpack/package.json @@ -52,8 +52,8 @@ "webpack-sources": "^3.2.0" }, "peerDependencies": { - "react": "19.3.0-canary-b546603b-20260121", - "react-dom": "19.3.0-canary-b546603b-20260121", + "react": "19.3.0-canary-24d8716e-20260123", + "react-dom": "19.3.0-canary-24d8716e-20260123", "webpack": "^5.59.0" } } \ No newline at end of file diff --git a/packages/next/src/compiled/react/cjs/react.development.js b/packages/next/src/compiled/react/cjs/react.development.js index e3505759a5e0c5..e2d2ebd1534b6d 100644 --- a/packages/next/src/compiled/react/cjs/react.development.js +++ b/packages/next/src/compiled/react/cjs/react.development.js @@ -1322,7 +1322,7 @@ exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react/cjs/react.production.js b/packages/next/src/compiled/react/cjs/react.production.js index 6ef61a0e20ad8b..92bf291d9377c3 100644 --- a/packages/next/src/compiled/react/cjs/react.production.js +++ b/packages/next/src/compiled/react/cjs/react.production.js @@ -562,4 +562,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/react/cjs/react.react-server.development.js b/packages/next/src/compiled/react/cjs/react.react-server.development.js index ed8dacae0621b1..4ce9d01925e5c1 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.development.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.development.js @@ -874,5 +874,5 @@ exports.useMemo = function (create, deps) { return resolveDispatcher().useMemo(create, deps); }; - exports.version = "19.3.0-canary-b546603b-20260121"; + exports.version = "19.3.0-canary-24d8716e-20260123"; })(); diff --git a/packages/next/src/compiled/react/cjs/react.react-server.production.js b/packages/next/src/compiled/react/cjs/react.react-server.production.js index 93de2d7c2b4044..e71f30e14e5ef3 100644 --- a/packages/next/src/compiled/react/cjs/react.react-server.production.js +++ b/packages/next/src/compiled/react/cjs/react.react-server.production.js @@ -433,4 +433,4 @@ exports.useId = function () { exports.useMemo = function (create, deps) { return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.3.0-canary-b546603b-20260121"; +exports.version = "19.3.0-canary-24d8716e-20260123"; diff --git a/packages/next/src/compiled/unistore/unistore.js b/packages/next/src/compiled/unistore/unistore.js index 4adb8d57533be8..4dce1f1bec8f42 100644 --- a/packages/next/src/compiled/unistore/unistore.js +++ b/packages/next/src/compiled/unistore/unistore.js @@ -1 +1 @@ -(()=>{var t={774:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a{var t={135:t=>{function n(t,i){for(var _ in i)t[_]=i[_];return t}t.exports=function(t){var i=[];function u(t){for(var _=[],a=0;a=9.0.0' @@ -1085,7 +1085,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../next-env '@swc/helpers': specifier: 0.5.15 @@ -1100,17 +1100,17 @@ importers: specifier: 8.4.31 version: 8.4.31 react: - specifier: 19.3.0-canary-b546603b-20260121 - version: 19.3.0-canary-b546603b-20260121 + specifier: 19.3.0-canary-24d8716e-20260123 + version: 19.3.0-canary-24d8716e-20260123 react-dom: - specifier: 19.3.0-canary-b546603b-20260121 - version: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + specifier: 19.3.0-canary-24d8716e-20260123 + version: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) sass: specifier: ^1.3.0 version: 1.77.8 styled-jsx: specifier: 5.1.6 - version: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-b546603b-20260121) + version: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: sharp: specifier: ^0.34.5 @@ -1181,7 +1181,7 @@ importers: version: 7.27.0 '@base-ui-components/react': specifier: 1.0.0-beta.2 - version: 1.0.0-beta.2(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + version: 1.0.0-beta.2(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) '@capsizecss/metrics': specifier: 3.4.0 version: 3.4.0 @@ -1213,19 +1213,19 @@ importers: specifier: 1.2.0 version: 1.2.0 '@next/font': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../font '@next/polyfill-module': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../next-polyfill-nomodule '@next/react-refresh-utils': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../react-refresh-utils '@next/swc': - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../next-swc '@opentelemetry/api': specifier: 1.6.0 @@ -1250,13 +1250,13 @@ importers: version: 3.0.0(@swc/helpers@0.5.15)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)) '@storybook/blocks': specifier: 8.6.0 - version: 8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2)) + version: 8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2)) '@storybook/react': specifier: 8.6.0 - version: 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) + version: 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) '@storybook/react-webpack5': specifier: 8.6.0 - version: 8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) + version: 8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) '@storybook/test': specifier: 8.6.0 version: 8.6.0(storybook@8.6.0(prettier@3.6.2)) @@ -1754,7 +1754,7 @@ importers: version: 1.0.35 unistore: specifier: 3.4.1 - version: 3.4.1(react@19.3.0-canary-b546603b-20260121) + version: 3.4.1(react@19.3.0-canary-24d8716e-20260123) util: specifier: 0.12.4 version: 0.12.4 @@ -1936,14 +1936,14 @@ importers: packages/third-parties: dependencies: react: - specifier: 19.3.0-canary-b546603b-20260121 - version: 19.3.0-canary-b546603b-20260121 + specifier: 19.3.0-canary-24d8716e-20260123 + version: 19.3.0-canary-24d8716e-20260123 third-party-capital: specifier: 1.0.20 version: 1.0.20 devDependencies: next: - specifier: 16.2.0-canary.5 + specifier: 16.2.0-canary.6 version: link:../next outdent: specifier: 0.8.0 @@ -2000,14 +2000,14 @@ importers: specifier: 29.5.0 version: 29.5.0 react: - specifier: 19.3.0-canary-b546603b-20260121 - version: 19.3.0-canary-b546603b-20260121 + specifier: 19.3.0-canary-24d8716e-20260123 + version: 19.3.0-canary-24d8716e-20260123 react-test-renderer: specifier: 18.2.0 - version: 18.2.0(react@19.3.0-canary-b546603b-20260121) + version: 18.2.0(react@19.3.0-canary-24d8716e-20260123) styled-jsx: specifier: ^5.1.2 - version: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-b546603b-20260121) + version: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-24d8716e-20260123) turbopack/packages/devlow-bench: dependencies: @@ -2895,8 +2895,8 @@ packages: engines: {node: '>=14.0.0'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -2905,8 +2905,8 @@ packages: resolution: {integrity: sha512-9+uaWyF1o/PgXqHLJnC81IIG0HlV3o9eFCQ5hWZDMx5NHrFk0rrwqEFGQOB8lti/rnbxNPi+kYYw1D4e8xSn/Q==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -3061,7 +3061,7 @@ packages: resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -3078,7 +3078,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks@1.0.1': resolution: {integrity: sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@emotion/utils@1.2.1': resolution: {integrity: sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg==} @@ -3583,20 +3583,20 @@ packages: '@floating-ui/react-dom@2.1.0': resolution: {integrity: sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 '@floating-ui/react-dom@2.1.5': resolution: {integrity: sha512-HDO/1/1oH9fjj4eLgegrlH3dklZpHtUYYFiVwMUwfGvk9jWDRWqkklA2/NFScknrcNSspbV868WjXORvreDX+Q==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 '@floating-ui/react@0.26.16': resolution: {integrity: sha512-HEf43zxZNAI/E781QIVpYSF3K2VH4TTYZpqecjdsFkjsaU1EbaWcM++kw0HXFffj7gDUcBFevX8s0rQGQpxkow==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 '@floating-ui/utils@0.2.10': resolution: {integrity: sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==} @@ -4313,13 +4313,13 @@ packages: resolution: {integrity: sha512-l9ypojKN3PjwO1CSLIsqxi7mA25+7w+xc71Q+JuCCREI0tuGwkZsKbIOpuTATIJOjPh8ycLiW7QxX1LYsRTq6w==} peerDependencies: '@mantine/hooks': 7.10.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 '@mantine/hooks@7.11.2': resolution: {integrity: sha512-jhyVe/sbDEG2U8rr2lMecUPgQxcfr5hh9HazqGfkS7ZRIMDO7uJ947yAcTMGGkp5Lxtt5TBFt1Cb6tiB2/1agg==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@mapbox/node-pre-gyp@1.0.5': resolution: {integrity: sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==} @@ -4339,13 +4339,13 @@ packages: '@mdx-js/react@2.2.1': resolution: {integrity: sha512-YdXcMcEnqZhzql98RNrqYo9cEhTTesBiCclEtoiQUbJwx87q9453GTapYU6kJ8ZZ2ek1Vp25SiAXEFy5O/eAPw==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@mdx-js/react@3.1.0': resolution: {integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@modelcontextprotocol/sdk@1.18.1': resolution: {integrity: sha512-d//GE8/Yh7aC3e7p+kZG8JqqEAwwDUmAfvH1quogtbk+ksS6E0RR6toKKESPYYZVre0meqkJb27zb+dhqE9Sgw==} @@ -5016,8 +5016,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5029,8 +5029,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5042,8 +5042,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5055,8 +5055,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5068,8 +5068,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5081,8 +5081,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5094,8 +5094,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5106,7 +5106,7 @@ packages: resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5115,7 +5115,7 @@ packages: resolution: {integrity: sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5124,7 +5124,7 @@ packages: resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5133,7 +5133,7 @@ packages: resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5142,7 +5142,7 @@ packages: resolution: {integrity: sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5151,7 +5151,7 @@ packages: resolution: {integrity: sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5161,8 +5161,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5174,8 +5174,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5186,7 +5186,7 @@ packages: resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5195,7 +5195,7 @@ packages: resolution: {integrity: sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5205,8 +5205,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5218,8 +5218,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5231,8 +5231,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5243,7 +5243,7 @@ packages: resolution: {integrity: sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5252,7 +5252,7 @@ packages: resolution: {integrity: sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5262,8 +5262,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5275,8 +5275,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5287,7 +5287,7 @@ packages: resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5296,7 +5296,7 @@ packages: resolution: {integrity: sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5306,8 +5306,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5319,8 +5319,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5332,8 +5332,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5345,8 +5345,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5358,8 +5358,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5371,8 +5371,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5384,8 +5384,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5397,8 +5397,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5410,8 +5410,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5423,8 +5423,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5436,8 +5436,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5449,8 +5449,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5462,8 +5462,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5475,8 +5475,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5488,8 +5488,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5501,8 +5501,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5514,8 +5514,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5527,8 +5527,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5540,8 +5540,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5552,7 +5552,7 @@ packages: resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5561,7 +5561,7 @@ packages: resolution: {integrity: sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5570,7 +5570,7 @@ packages: resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5580,8 +5580,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5593,8 +5593,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5606,8 +5606,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5619,8 +5619,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5631,7 +5631,7 @@ packages: resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5640,7 +5640,7 @@ packages: resolution: {integrity: sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5649,7 +5649,7 @@ packages: resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5658,7 +5658,7 @@ packages: resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5667,7 +5667,7 @@ packages: resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5676,7 +5676,7 @@ packages: resolution: {integrity: sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5685,7 +5685,7 @@ packages: resolution: {integrity: sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5694,7 +5694,7 @@ packages: resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5703,7 +5703,7 @@ packages: resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5712,7 +5712,7 @@ packages: resolution: {integrity: sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5721,7 +5721,7 @@ packages: resolution: {integrity: sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5730,7 +5730,7 @@ packages: resolution: {integrity: sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5739,7 +5739,7 @@ packages: resolution: {integrity: sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5748,7 +5748,7 @@ packages: resolution: {integrity: sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ==} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5758,8 +5758,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -5771,8 +5771,8 @@ packages: peerDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -6076,8 +6076,8 @@ packages: '@storybook/blocks@8.6.0': resolution: {integrity: sha512-3PNxlB5Ooj8CIhttbDxeV6kW7ui+2GEdTngtqhnsUHVjzeTKpilsk2lviOeUzqlyq5FDK+rhpZ3L3DJ9pDvioA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 storybook: ^8.6.0 peerDependenciesMeta: react: @@ -6127,8 +6127,8 @@ packages: resolution: {integrity: sha512-Nz/UzeYQdUZUhacrPyfkiiysSjydyjgg/p0P9HxB4p/WaJUUjMAcaoaLgy3EXx61zZJ3iD36WPuDkZs5QYrA0A==} engines: {node: '>=14.0.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 '@storybook/instrumenter@8.6.0': resolution: {integrity: sha512-eEY/Hfa3Vj5Nv4vHRHlSqjoyW6oAKNK3rKIXfL/eawQwb7rKhzijDLG5YBH44Hh7dEPIqUp0LEdgpyIY7GXezg==} @@ -6144,8 +6144,8 @@ packages: resolution: {integrity: sha512-04T86VG0UJtiozgZkTR5sY1qM3E0Rgwqwllvyy7kFFdkV+Sv/VsPjW9sC38s9C8FtCYRL8pJZz81ey3oylpIMA==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 storybook: ^8.6.0 typescript: '*' peerDependenciesMeta: @@ -6166,16 +6166,16 @@ packages: '@storybook/react-dom-shim@8.6.0': resolution: {integrity: sha512-5Y+vMHhcx0xnaNsLQMbkmjc3zkDn/fGBNsiLH2e4POvW3ZQvOxjoyxAsEQaKwLtFgsdCFSd2tR89F6ItYrA2JQ==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 storybook: ^8.6.0 '@storybook/react-webpack5@8.6.0': resolution: {integrity: sha512-2L9CYDPn1OL0B8K5EU/Wpo9Slg8f0vkYPaPioQnmcK3Q4SJR4JAuDVWHUtNdxhaPOkHIy887Tfrf6BEC/blMaQ==} engines: {node: '>=18.0.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -6187,8 +6187,8 @@ packages: engines: {node: '>=18.0.0'} peerDependencies: '@storybook/test': 8.6.0 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 storybook: ^8.6.0 typescript: '>= 4.2.x' peerDependenciesMeta: @@ -6456,8 +6456,8 @@ packages: engines: {node: '>=18'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -8395,8 +8395,8 @@ packages: cmdk@1.0.4: resolution: {integrity: sha512-AnsjfHyHpQ/EFeAnG216WY7A5LiYCoZzCSygiLvfXC3H3LFGCprErteUcszaVluGOhuOTbJS3jWHrSDYPBBygg==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 co@4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} @@ -10062,8 +10062,8 @@ packages: peerDependencies: eslint: '>=8.0.0' - eslint-plugin-react-hooks@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-H3VKOGMsvpcR0RvDplyyMp4UCEu1gX4yjj3iG1vlQndv8qqjeQOJahAvUVyHcqlZZhNgHYVm31yzGPGSWpqxSg==} + eslint-plugin-react-hooks@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-tEnrKVERUjAi55XD9ZnGRE5lthl7R5X9AGailw2gd/9Y+esGpyj2Kcg0MPA/sBqfjS79+LDT5aT4r2Zm6hQxvw==} 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 @@ -10712,8 +10712,8 @@ packages: '@types/react': 19.2.2 algoliasearch: 5.x.x next: 14.x.x || 15.x.x - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 react-router: 7.x.x waku: ^0.26.0 peerDependenciesMeta: @@ -10745,7 +10745,7 @@ packages: '@fumadocs/mdx-remote': ^1.4.0 fumadocs-core: ^14.0.0 || ^15.0.0 next: ^15.3.0 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 vite: 6.x.x || 7.x.x peerDependenciesMeta: '@fumadocs/mdx-remote': @@ -10762,8 +10762,8 @@ packages: peerDependencies: '@types/react': 19.2.2 next: 14.x.x || 15.x.x - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 tailwindcss: ^3.4.14 || ^4.0.0 peerDependenciesMeta: '@types/react': @@ -13092,12 +13092,12 @@ packages: lucide-react@0.383.0: resolution: {integrity: sha512-13xlG0CQCJtzjSQYwwJ3WRqMHtRj3EXmLlorrARt7y+IHnxUCp3XyFNL1DfaGySWxHObDvnu1u1dV+0VMKHUSg==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 lucide-react@0.554.0: resolution: {integrity: sha512-St+z29uthEJVx0Is7ellNkgTEhaeSoA42I7JjOCBCrc5X6LYMGSv0P/2uS5HDLTExP5tpiqRD2PyUEOS6s9UXA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} @@ -13893,8 +13893,8 @@ packages: next-themes@0.4.6: resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 next-tick@1.0.0: resolution: {integrity: sha512-mc/caHeUcdjnC/boPWJefDr4KUIWQNv+tlnFnJd38QMou86QtxQzBJfxgGRzvx8jazYRqrVlaHarfO72uNxPOg==} @@ -13908,8 +13908,8 @@ packages: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.51.1 babel-plugin-react-compiler: '*' - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': @@ -13930,8 +13930,8 @@ packages: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.51.1 babel-plugin-react-compiler: '*' - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': @@ -15823,23 +15823,23 @@ packages: resolution: {integrity: sha512-APPU8HB2uZnpl6Vt/+0AFoVYgSRtfiP6FLrZgPPTDmqSb2R4qZRbgd0A3VzIFxDt5e+Fozjx79WjLWnF69DK8g==} engines: {node: '>=16.14.0'} - react-dom@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-nROauGxSWJk6jwA5KYBeOF4SimpEXFEhP2uwqdi8+MUiRF653EWFJlwDigfxT3L+CfJwKOBGpKZB7EKlYyq6lA==} + react-dom@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-plS1PRiWYWPbN7yZgYvn0IwtrZ31Gui5/O2GNK+z42xJKqwuyAaPWcAugfItkxVzey0pcsMjVomA2gEfE5E1aw==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 - react-dom@19.3.0-canary-b546603b-20260121: - resolution: {integrity: sha512-oLuX+l/WAx6oN8MVeTRMLPXf7ZnNU4/FcDzYXwAWNrERUU7lHLsfqjkEB8IvrS4mpX83VtoZMno6vU3PvZNLzQ==} + react-dom@19.3.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-3WpIrjlK6QNrpE2/3vsoz7VuYJXAaZMqFsH/xtr7VmkVtrmde5ywoEjlVF/PExV/bqtjIKSGtxmMh/uPdDQiQQ==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-dom@19.3.0-canary-fd524fe0-20251121: resolution: {integrity: sha512-+M3m+8ysDcPmt7ncitPOX5O71OOKF6lq6INFZFUMJjEGDxvl4CS2D41DJG5MnXcwiWTZLAp/uILZtt4sKTRSyQ==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 - react-is@19.3.0-canary-b546603b-20260121: - resolution: {integrity: sha512-EdEtarX66byu3NHO2at523tSsNkMCUq0Lo5LT5Js7XOfYLsZ0gdYFmoqrR9J9utzKKXOm7Vcu28UxazgdtIO4g==} + react-is@19.3.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-5ZKfF3+jsuW04FvkTfUCJmRU6+3z0KVTIeUxiS90q/gskG8NT/GSOOTlfPuO6KCJRXMWn4GiObAR1YeAwMh0ig==} react-is@19.3.0-canary-fd524fe0-20251121: resolution: {integrity: sha512-06VG41yCv5V7FPCLxo4hBaiLEoReJ35LK9VvEqveBJq5cbEhakZznJLnPU1oJ3CCrL4DyBsPXw9EiYlrOL8c3Q==} @@ -15850,14 +15850,14 @@ packages: react-medium-image-zoom@5.3.0: resolution: {integrity: sha512-RCIzVlsKqy3BYgGgYbolUfuvx0aSKC7YhX/IJGEp+WJxsqdIVYJHkBdj++FAj6VD7RiWj6VVmdCfa/9vJE9hZg==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 react-number-format@5.4.0: resolution: {integrity: sha512-NWdICrqLhI7rAS8yUeLVd6Wr4cN7UjJ9IBTS0f/a9i7UB4x4Ti70kGnksBtZ7o4Z7YRbvCMMR/jQmkoOBa/4fg==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 react-refresh@0.12.0: resolution: {integrity: sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==} @@ -15868,7 +15868,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -15878,7 +15878,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -15888,7 +15888,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -15898,58 +15898,58 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true - react-server-dom-turbopack@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-hxNB+zppbaV6Fu8CGLzI+mDdnTMCHcpyAmI1Mw+LwLHxQzYg+DfOs/GKvk7nxwPmsKlkh4DgAzBSMmUKekKatQ==} + react-server-dom-turbopack@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-uKdnfSu4rYOZIoAlBY1Rmt3qCUxKKxiGvvPcbCI5H9hrExKCSHo3nGsxG6l60cY16fzKzXXYvLKM21NEN6ImUg==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 - react-server-dom-turbopack@19.3.0-canary-b546603b-20260121: - resolution: {integrity: sha512-CrW9TgOo0WvcdYnA7q5fx3HRD/ikJLT3IuLcontzcMCNA2eLEHpY/0k1gT/ZOg2x65K3eM4Mcs9pRAQHsexGNg==} + react-server-dom-turbopack@19.3.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-M8c/wt1wNoSSnLNEc9IpVVzl/ik3jODryuYVG793wqN+ahDi9pHr+GU5G0tJHH0xILfCmxD7Wblq1zLqVfaQRw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 - react-server-dom-webpack@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-9IuD4ObcWWYwLov/o3Vt9OK4QTvIV8XgY9X+reGX/RHQncyZvnF6fjrqY4mnWA5LgQgHcNNIsXXW/ME9Rz5Pyg==} + react-server-dom-webpack@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-q2f5vEq6KEKuSTaUT3d7hocoVuuGJiF3YvWGoz/OSdZR5WbDKIxi/EfoRIdiLBZTgvZr4r5gURzvaQT+VvReew==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 webpack: 5.98.0 - react-server-dom-webpack@19.3.0-canary-b546603b-20260121: - resolution: {integrity: sha512-D0PSB68T/YKDKwfjpy6I/60tIfk91jMXEspHFS/8Ykln3FB0g2OVD0zfYURnvyEzER1/iNFo/L4TDUgiqeNbxQ==} + react-server-dom-webpack@19.3.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-lkCV/chVw6IlXVztLr5D2NAk1ZWDIYKPYt3Brdn+6ndd1XLgC1W52yGb7m1wNsNVbtMGWK2cnok05+bidu9Eiw==} engines: {node: '>=0.10.0'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 webpack: 5.98.0 react-shallow-renderer@16.15.0: resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-ssr-prepass@1.0.8: resolution: {integrity: sha512-O0gfRA1SaK+9ITKxqfnXsej2jF+OHGP/+GxD4unROQaM/0/UczGF9fuF+wTboxaQoKdIf4FvS3h/OigWh704VA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-is: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-is: 19.3.0-canary-24d8716e-20260123 react-style-singleton@2.2.1: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -15959,7 +15959,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -15967,26 +15967,26 @@ packages: react-test-renderer@18.2.0: resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-textarea-autosize@8.5.3: resolution: {integrity: sha512-XT1024o2pqCuZSuBt9FwHlaDeNtVrtCXu0Rnz88t1jUGheCLa3PhjE1GH8Ctm2axEtvdCl5SUHYschyQ0L5QHQ==} engines: {node: '>=10'} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-virtualized@9.22.3: resolution: {integrity: sha512-MKovKMxWTcwPSxE1kK1HcheQTWfuCxAuBoSTf2gwyMM21NdX/PXUhnoP8Uc5dRKd+nKm8v41R36OellhdCpkrw==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123 - react@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-4O/RaGAegWvCu1IYGomFSCz9BSqeAmOlnYBs42YdpIeUriJTkKw/iQAMk5Du3wE6CuSfFNkmkS8aM+DbjhslhQ==} + react@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-eOO912CfYicDSQNbUIrDR7D81cHQq2y7cN3nfu6MrGu7PRf3IQmmTPwRIjnK4hDXcdeiVy7sP3fxEZQorxMSyw==} engines: {node: '>=0.10.0'} - react@19.3.0-canary-b546603b-20260121: - resolution: {integrity: sha512-nxOYGo76zHV+IBy6SL7QDwCpEl4b9p0+HorirjqVVrSBP+9Wys1JWOD6wK9Q6rZLrxkHkwRQDr7HZOQMezk64Q==} + react@19.3.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-OhXCecUjSc9CQ62J96xi7XETxKTFNA/6v7/bpCWm6MZO2AGYLlNsCAt+F3FQb7O3AyvPuo3MEsytO0smWu0rEQ==} engines: {node: '>=0.10.0'} react@19.3.0-canary-fd524fe0-20251121: @@ -16593,11 +16593,11 @@ packages: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.0.0-experimental-b546603b-20260121: - resolution: {integrity: sha512-Uo77EXo6vKJpowRkbAL9Z3CIzKHKO4FhdjngfYHgprZnblEz2u6v0Ym6q+dj7J9dzruEsX77h1NB0UdzgXCmAA==} + scheduler@0.0.0-experimental-24d8716e-20260123: + resolution: {integrity: sha512-/27RIPF/wc0+J/HSP5AOxCQYyWsDgyYNhqNWg4TvL8zszUUIkqtZ59UkWP3K6g0TWsjdnltfgAYnqoljyRDtdQ==} - scheduler@0.28.0-canary-b546603b-20260121: - resolution: {integrity: sha512-chXVxWygOICQlnd99zygWLbzU8Jl03crwCKI/PT0V+UmQpBre8kwAkqn0cqfRA09xAIjrd9UPBLkXDfqs/BBzQ==} + scheduler@0.28.0-canary-24d8716e-20260123: + resolution: {integrity: sha512-vPJsommz4TdEI13QCgzNH/qomXO8wPpIJgVvabh0X8qEntHig2avu30zfNUWnU3CO/zOHKjm0WZElxs8xfEW5Q==} schema-utils@2.7.1: resolution: {integrity: sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==} @@ -17282,7 +17282,7 @@ packages: peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@babel/core': optional: true @@ -17369,7 +17369,7 @@ packages: swr@2.2.4: resolution: {integrity: sha512-njiZ/4RiIhoOlAaLYDqwz5qH/KZXVilRLvomrx83HjzCWTfa+InyfAjv05PSFxnmLzZkNO9ZfvgoqzAaEI4sGQ==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 symbol-observable@1.0.1: resolution: {integrity: sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==} @@ -18232,7 +18232,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18242,7 +18242,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18250,13 +18250,13 @@ packages: use-composed-ref@1.3.0: resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 use-isomorphic-layout-effect@1.1.2: resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==} peerDependencies: '@types/react': '*' - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18265,7 +18265,7 @@ packages: resolution: {integrity: sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==} peerDependencies: '@types/react': '*' - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18275,7 +18275,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18285,7 +18285,7 @@ packages: engines: {node: '>=10'} peerDependencies: '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 peerDependenciesMeta: '@types/react': optional: true @@ -18293,7 +18293,7 @@ packages: use-sync-external-store@1.5.0: resolution: {integrity: sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==} peerDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -19908,28 +19908,28 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@base-ui-components/react@1.0.0-beta.2(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@base-ui-components/react@1.0.0-beta.2(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@babel/runtime': 7.27.6 - '@base-ui-components/utils': 0.1.0(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + '@base-ui-components/utils': 0.1.0(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) '@floating-ui/utils': 0.2.10 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) reselect: 5.1.1 tabbable: 6.2.0 - use-sync-external-store: 1.5.0(react@19.3.0-canary-b546603b-20260121) + use-sync-external-store: 1.5.0(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 - '@base-ui-components/utils@0.1.0(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@base-ui-components/utils@0.1.0(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@babel/runtime': 7.27.6 '@floating-ui/utils': 0.2.10 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) reselect: 5.1.1 - use-sync-external-store: 1.5.0(react@19.3.0-canary-b546603b-20260121) + use-sync-external-store: 1.5.0(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 @@ -20102,17 +20102,17 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@emotion/react@11.11.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@babel/runtime': 7.27.0 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 - '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.3.0-canary-b546603b-20260121) + '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@19.3.0-canary-24d8716e-20260123) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 hoist-non-react-statics: 3.3.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 transitivePeerDependencies: @@ -20130,9 +20130,9 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.3.0-canary-b546603b-20260121)': + '@emotion/use-insertion-effect-with-fallbacks@1.0.1(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@emotion/utils@1.2.1': {} @@ -20555,11 +20555,11 @@ snapshots: react: 19.3.0-canary-fd524fe0-20251121 react-dom: 19.3.0-canary-fd524fe0-20251121(react@19.3.0-canary-fd524fe0-20251121) - '@floating-ui/react-dom@2.1.5(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@floating-ui/react-dom@2.1.5(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@floating-ui/dom': 1.7.3 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) '@floating-ui/react@0.26.16(react-dom@19.3.0-canary-fd524fe0-20251121(react@19.3.0-canary-fd524fe0-20251121))(react@19.3.0-canary-fd524fe0-20251121)': dependencies: @@ -21519,11 +21519,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.2.1(react@19.3.0-canary-b546603b-20260121)': + '@mdx-js/react@2.2.1(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@types/mdx': 2.0.13 '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@mdx-js/react@2.2.1(react@19.3.0-canary-fd524fe0-20251121)': dependencies: @@ -21531,11 +21531,11 @@ snapshots: '@types/react': 19.2.2 react: 19.3.0-canary-fd524fe0-20251121 - '@mdx-js/react@3.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@mdx-js/react@3.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@types/mdx': 2.0.13 '@types/react': 19.2.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 '@modelcontextprotocol/sdk@1.18.1': dependencies: @@ -22305,749 +22305,749 @@ snapshots: '@radix-ui/primitive@1.1.3': {} - '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-arrow@1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-arrow@1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-arrow@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-arrow@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-collection@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-collection@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-compose-refs@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-compose-refs@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-compose-refs@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-compose-refs@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-context@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-context@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-context@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-context@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-context@1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-context@1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) aria-hidden: 1.2.6 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-dialog@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-dialog@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-guards': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-scope': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-guards': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-scope': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) aria-hidden: 1.2.6 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-direction@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-direction@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-direction@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-direction@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-dismissable-layer@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-dismissable-layer@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-dismissable-layer@1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-dismissable-layer@1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-focus-guards@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-focus-guards@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-focus-scope@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-focus-scope@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-id@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-id@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-id@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-id@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-navigation-menu@1.2.14(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-navigation-menu@1.2.14(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) aria-hidden: 1.2.6 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-popover@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-popover@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-guards': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-scope': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-popper': 1.2.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-guards': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-scope': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-popper': 1.2.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) aria-hidden: 1.2.6 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-popper@1.2.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-arrow': 1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-rect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-size': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-popper@1.2.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': + dependencies: + '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-arrow': 1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-rect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-size': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) '@radix-ui/rect': 1.1.0 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-popper@1.2.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-arrow': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-rect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-size': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-popper@1.2.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': + dependencies: + '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-arrow': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-rect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-size': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) '@radix-ui/rect': 1.1.0 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': - dependencies: - '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': + dependencies: + '@floating-ui/react-dom': 2.1.5(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) '@radix-ui/rect': 1.1.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-portal@1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-portal@1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-portal@1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-portal@1.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-presence@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-presence@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-presence@1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-presence@1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-primitive@2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-primitive@2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-slot': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-slot': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-primitive@2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-primitive@2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-slot': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-roving-focus@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-roving-focus@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-collection': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-collection': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-select@2.2.6(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-select@2.2.6(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) aria-hidden: 1.2.6 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-slot@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-slot@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-slot@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-slot@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-compose-refs': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-slot@1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-slot@1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-tabs@1.1.13(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-tabs@1.1.13(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-toggle-group@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-toggle-group@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-roving-focus': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-toggle': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-roving-focus': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-toggle': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-toggle@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-toggle@1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.1 - '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-tooltip@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-tooltip@1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dismissable-layer': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-popper': 1.2.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-portal': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-visually-hidden': 1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-compose-refs': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-context': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dismissable-layer': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-popper': 1.2.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-portal': 1.1.2(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.1(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-visually-hidden': 1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-use-callback-ref@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-callback-ref@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-controllable-state@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-layout-effect@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-rect@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-rect@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/rect': 1.1.0 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@radix-ui/rect': 1.1.1 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-size@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-size@1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-size@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-use-size@1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-visually-hidden@1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-visually-hidden@1.1.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) - '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.1(@types/react@19.2.2) @@ -23345,12 +23345,12 @@ snapshots: '@storybook/addon-docs@8.6.0(@types/react@19.2.2)(storybook@8.6.0(prettier@3.6.2))': dependencies: - '@mdx-js/react': 3.1.0(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@storybook/blocks': 8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2)) + '@mdx-js/react': 3.1.0(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@storybook/blocks': 8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2)) '@storybook/csf-plugin': 8.6.0(storybook@8.6.0(prettier@3.6.2)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2)) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2)) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) storybook: 8.6.0(prettier@3.6.2) ts-dedent: 2.2.0 transitivePeerDependencies: @@ -23415,14 +23415,14 @@ snapshots: - '@swc/helpers' - webpack - '@storybook/blocks@8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))': + '@storybook/blocks@8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))': dependencies: - '@storybook/icons': 1.3.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + '@storybook/icons': 1.3.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) storybook: 8.6.0(prettier@3.6.2) ts-dedent: 2.2.0 optionalDependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) '@storybook/builder-webpack5@8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': dependencies: @@ -23501,10 +23501,10 @@ snapshots: '@storybook/global@5.0.0': {} - '@storybook/icons@1.3.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@storybook/icons@1.3.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) '@storybook/instrumenter@8.6.0(storybook@8.6.0(prettier@3.6.2))': dependencies: @@ -23516,17 +23516,17 @@ snapshots: dependencies: storybook: 8.6.0(prettier@3.6.2) - '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': + '@storybook/preset-react-webpack@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': dependencies: '@storybook/core-webpack': 8.6.0(storybook@8.6.0(prettier@3.6.2)) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.9.2)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)) '@types/semver': 7.5.6 find-up: 5.0.0 magic-string: 0.30.19 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-docgen: 7.1.0 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) resolve: 1.22.10 semver: 7.6.3 storybook: 8.6.0(prettier@3.6.2) @@ -23560,19 +23560,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@storybook/react-dom-shim@8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))': + '@storybook/react-dom-shim@8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))': dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) storybook: 8.6.0(prettier@3.6.2) - '@storybook/react-webpack5@8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': + '@storybook/react-webpack5@8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': dependencies: '@storybook/builder-webpack5': 8.6.0(@rspack/core@1.6.7(@swc/helpers@0.5.15))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) - '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) - '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + '@storybook/preset-react-webpack': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) + '@storybook/react': 8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) storybook: 8.6.0(prettier@3.6.2) optionalDependencies: typescript: 5.9.2 @@ -23585,16 +23585,16 @@ snapshots: - uglify-js - webpack-cli - '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': + '@storybook/react@8.6.0(@storybook/test@8.6.0(storybook@8.6.0(prettier@3.6.2)))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2))(typescript@5.9.2)': dependencies: '@storybook/components': 8.6.0(storybook@8.6.0(prettier@3.6.2)) '@storybook/global': 5.0.0 '@storybook/manager-api': 8.6.0(storybook@8.6.0(prettier@3.6.2)) '@storybook/preview-api': 8.6.0(storybook@8.6.0(prettier@3.6.2)) - '@storybook/react-dom-shim': 8.6.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(storybook@8.6.0(prettier@3.6.2)) + '@storybook/react-dom-shim': 8.6.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(storybook@8.6.0(prettier@3.6.2)) '@storybook/theming': 8.6.0(storybook@8.6.0(prettier@3.6.2)) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) storybook: 8.6.0(prettier@3.6.2) optionalDependencies: '@storybook/test': 8.6.0(storybook@8.6.0(prettier@3.6.2)) @@ -23872,13 +23872,13 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/react@15.0.7(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)': + '@testing-library/react@15.0.7(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)': dependencies: '@babel/runtime': 7.27.0 '@testing-library/dom': 10.1.0 '@types/react-dom': 19.2.1(@types/react@19.2.2) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 @@ -26116,14 +26116,14 @@ snapshots: cmd-shim@7.0.0: {} - cmdk@1.0.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + cmdk@1.0.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: - '@radix-ui/react-dialog': 1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - use-sync-external-store: 1.5.0(react@19.3.0-canary-b546603b-20260121) + '@radix-ui/react-dialog': 1.1.4(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + use-sync-external-store: 1.5.0(react@19.3.0-canary-24d8716e-20260123) transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -28157,7 +28157,7 @@ snapshots: - bluebird - supports-color - eslint-plugin-react-hooks@0.0.0-experimental-b546603b-20260121(eslint@9.37.0(jiti@2.5.1)): + eslint-plugin-react-hooks@0.0.0-experimental-24d8716e-20260123(eslint@9.37.0(jiti@2.5.1)): dependencies: '@babel/core': 7.26.10 '@babel/parser': 7.27.0 @@ -29115,7 +29115,7 @@ snapshots: fsevents@2.3.3: optional: true - fumadocs-core@15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + fumadocs-core@15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: '@formatjs/intl-localematcher': 0.6.1 '@orama/orama': 3.1.13 @@ -29127,7 +29127,7 @@ snapshots: image-size: 2.0.2 negotiator: 1.0.0 npm-to-yarn: 3.0.1 - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) remark: 15.0.1 remark-gfm: 4.0.1 remark-rehype: 11.1.2 @@ -29136,20 +29136,20 @@ snapshots: unist-util-visit: 5.0.0 optionalDependencies: '@types/react': 19.2.2 - next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8) - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) transitivePeerDependencies: - supports-color - fumadocs-mdx@11.10.0(fumadocs-core@15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121))(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react@19.3.0-canary-b546603b-20260121): + fumadocs-mdx@11.10.0(fumadocs-core@15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123))(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react@19.3.0-canary-24d8716e-20260123): dependencies: '@mdx-js/mdx': 3.1.1 '@standard-schema/spec': 1.0.0 chokidar: 4.0.3 esbuild: 0.25.9 estree-util-value-to-estree: 3.5.0 - fumadocs-core: 15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + fumadocs-core: 15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) js-yaml: 4.1.0 lru-cache: 11.2.1 picocolors: 1.1.1 @@ -29161,36 +29161,36 @@ snapshots: unist-util-visit: 5.0.0 zod: 4.1.13 optionalDependencies: - next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8) - react: 19.3.0-canary-b546603b-20260121 + next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8) + react: 19.3.0-canary-24d8716e-20260123 transitivePeerDependencies: - supports-color - fumadocs-ui@15.7.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(tailwindcss@4.1.13): - dependencies: - '@radix-ui/react-accordion': 1.2.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-navigation-menu': 1.2.14(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-popover': 1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-scroll-area': 1.2.10(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - '@radix-ui/react-tabs': 1.1.13(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + fumadocs-ui@15.7.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(tailwindcss@4.1.13): + dependencies: + '@radix-ui/react-accordion': 1.2.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-navigation-menu': 1.2.14(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-popover': 1.1.15(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-scroll-area': 1.2.10(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + '@radix-ui/react-tabs': 1.1.13(@types/react-dom@19.2.1(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) class-variance-authority: 0.7.1 - fumadocs-core: 15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8))(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + fumadocs-core: 15.7.12(@types/react@19.2.2)(next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8))(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) lodash.merge: 4.6.2 - next-themes: 0.4.6(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + next-themes: 0.4.6(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) postcss-selector-parser: 7.1.0 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - react-medium-image-zoom: 5.3.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + react-medium-image-zoom: 5.3.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123) scroll-into-view-if-needed: 3.1.0 tailwind-merge: 3.3.1 optionalDependencies: '@types/react': 19.2.2 - next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8) + next: 15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8) tailwindcss: 4.1.13 transitivePeerDependencies: - '@mixedbread/sdk' @@ -29862,7 +29862,7 @@ snapshots: hoist-non-react-statics@3.3.2: dependencies: - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 homedir-polyfill@1.0.3: dependencies: @@ -32135,9 +32135,9 @@ snapshots: dependencies: react: 19.3.0-canary-fd524fe0-20251121 - lucide-react@0.554.0(react@19.3.0-canary-b546603b-20260121): + lucide-react@0.554.0(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 lz-string@1.5.0: {} @@ -33495,22 +33495,22 @@ snapshots: dependencies: inherits: 2.0.4 - next-themes@0.4.6(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + next-themes@0.4.6(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) next-tick@1.0.0: {} - next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8): + next@15.5.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8): dependencies: '@next/env': 15.5.8 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001746 postcss: 8.4.31 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - styled-jsx: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + styled-jsx: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@next/swc-darwin-arm64': 15.5.7 '@next/swc-darwin-x64': 15.5.7 @@ -33529,15 +33529,15 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@16.0.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(sass@1.77.8): + next@16.0.8(@babel/core@7.26.10)(@opentelemetry/api@1.6.0)(@playwright/test@1.51.1)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@0.0.0-experimental-3fde738-20250918)(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(sass@1.77.8): dependencies: '@next/env': 16.0.8 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001746 postcss: 8.4.31 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) - styled-jsx: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) + styled-jsx: 5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@next/swc-darwin-arm64': 16.0.8 '@next/swc-darwin-x64': 16.0.8 @@ -35373,31 +35373,31 @@ snapshots: dependencies: ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 pretty-format@29.5.0: dependencies: '@jest/schemas': 29.4.3 ansi-styles: 5.2.0 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 pretty-format@30.0.0-alpha.6: dependencies: '@jest/schemas': 30.0.0-alpha.6 ansi-styles: 5.2.0 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 pretty-format@30.2.0: dependencies: '@jest/schemas': 30.0.5 ansi-styles: 5.2.0 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 pretty-ms@7.0.0: dependencies: @@ -35461,7 +35461,7 @@ snapshots: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - react-is: 19.3.0-canary-b546603b-20260121 + react-is: 19.3.0-canary-24d8716e-20260123 property-information@5.6.0: dependencies: @@ -35673,31 +35673,31 @@ snapshots: transitivePeerDependencies: - supports-color - react-dom@0.0.0-experimental-b546603b-20260121(react@19.3.0-canary-b546603b-20260121): + react-dom@0.0.0-experimental-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - scheduler: 0.28.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + scheduler: 0.28.0-canary-24d8716e-20260123 - react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121): + react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - scheduler: 0.28.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + scheduler: 0.28.0-canary-24d8716e-20260123 react-dom@19.3.0-canary-fd524fe0-20251121(react@19.3.0-canary-fd524fe0-20251121): dependencies: react: 19.3.0-canary-fd524fe0-20251121 - scheduler: 0.28.0-canary-b546603b-20260121 + scheduler: 0.28.0-canary-24d8716e-20260123 - react-is@19.3.0-canary-b546603b-20260121: {} + react-is@19.3.0-canary-24d8716e-20260123: {} react-is@19.3.0-canary-fd524fe0-20251121: {} react-lifecycles-compat@3.0.4: {} - react-medium-image-zoom@5.3.0(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + react-medium-image-zoom@5.3.0(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) react-number-format@5.4.0(react-dom@19.3.0-canary-fd524fe0-20251121(react@19.3.0-canary-fd524fe0-20251121))(react@19.3.0-canary-fd524fe0-20251121): dependencies: @@ -35715,10 +35715,10 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - react-remove-scroll-bar@2.3.8(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121): + react-remove-scroll-bar@2.3.8(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 @@ -35734,59 +35734,59 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - react-remove-scroll@2.7.1(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121): + react-remove-scroll@2.7.1(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) - use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121) + use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) + use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123) optionalDependencies: '@types/react': 19.2.2 - react-server-dom-turbopack@0.0.0-experimental-b546603b-20260121(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + react-server-dom-turbopack@0.0.0-experimental-24d8716e-20260123(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) - react-server-dom-turbopack@19.3.0-canary-b546603b-20260121(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + react-server-dom-turbopack@19.3.0-canary-24d8716e-20260123(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) - react-server-dom-webpack@0.0.0-experimental-b546603b-20260121(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))): + react-server-dom-webpack@0.0.0-experimental-24d8716e-20260123(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) webpack: 5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-server-dom-webpack@19.3.0-canary-b546603b-20260121(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))): + react-server-dom-webpack@19.3.0-canary-24d8716e-20260123(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123)(webpack@5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))): dependencies: acorn-loose: 8.3.0 neo-async: 2.6.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) webpack: 5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15)) webpack-sources: 3.2.3(patch_hash=jbynf5dc46ambamq3wuyho6hkq) - react-shallow-renderer@16.15.0(react@19.3.0-canary-b546603b-20260121): + react-shallow-renderer@16.15.0(react@19.3.0-canary-24d8716e-20260123): dependencies: object-assign: 4.1.1 - react: 19.3.0-canary-b546603b-20260121 - react-is: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-is: 19.3.0-canary-24d8716e-20260123 - react-ssr-prepass@1.0.8(react-is@19.3.0-canary-fd524fe0-20251121)(react@19.3.0-canary-b546603b-20260121): + react-ssr-prepass@1.0.8(react-is@19.3.0-canary-fd524fe0-20251121)(react@19.3.0-canary-24d8716e-20260123): dependencies: object-is: 1.0.2 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 react-is: 19.3.0-canary-fd524fe0-20251121 react-style-singleton@2.2.1(@types/react@19.2.2)(react@19.3.0-canary-fd524fe0-20251121): @@ -35798,10 +35798,10 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - react-style-singleton@2.2.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121): + react-style-singleton@2.2.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123): dependencies: get-nonce: 1.0.1 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 @@ -35814,12 +35814,12 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - react-test-renderer@18.2.0(react@19.3.0-canary-b546603b-20260121): + react-test-renderer@18.2.0(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 - react-is: 19.3.0-canary-b546603b-20260121 - react-shallow-renderer: 16.15.0(react@19.3.0-canary-b546603b-20260121) - scheduler: 0.28.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 + react-is: 19.3.0-canary-24d8716e-20260123 + react-shallow-renderer: 16.15.0(react@19.3.0-canary-24d8716e-20260123) + scheduler: 0.28.0-canary-24d8716e-20260123 react-textarea-autosize@8.5.3(@types/react@19.2.2)(react@19.3.0-canary-fd524fe0-20251121): dependencies: @@ -35830,20 +35830,20 @@ snapshots: transitivePeerDependencies: - '@types/react' - react-virtualized@9.22.3(react-dom@19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121))(react@19.3.0-canary-b546603b-20260121): + react-virtualized@9.22.3(react-dom@19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123))(react@19.3.0-canary-24d8716e-20260123): dependencies: '@babel/runtime': 7.27.0 clsx: 1.1.1 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 - react: 19.3.0-canary-b546603b-20260121 - react-dom: 19.3.0-canary-b546603b-20260121(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + react-dom: 19.3.0-canary-24d8716e-20260123(react@19.3.0-canary-24d8716e-20260123) react-lifecycles-compat: 3.0.4 - react@0.0.0-experimental-b546603b-20260121: {} + react@0.0.0-experimental-24d8716e-20260123: {} - react@19.3.0-canary-b546603b-20260121: {} + react@19.3.0-canary-24d8716e-20260123: {} react@19.3.0-canary-fd524fe0-20251121: {} @@ -36671,9 +36671,9 @@ snapshots: dependencies: xmlchars: 2.2.0 - scheduler@0.0.0-experimental-b546603b-20260121: {} + scheduler@0.0.0-experimental-24d8716e-20260123: {} - scheduler@0.28.0-canary-b546603b-20260121: {} + scheduler@0.28.0-canary-24d8716e-20260123: {} schema-utils@2.7.1: dependencies: @@ -37566,10 +37566,10 @@ snapshots: postcss: 7.0.32 postcss-load-plugins: 2.3.0 - styled-jsx@5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-b546603b-20260121): + styled-jsx@5.1.6(@babel/core@7.26.10)(babel-plugin-macros@3.1.0)(react@19.3.0-canary-24d8716e-20260123): dependencies: client-only: 0.0.1 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 optionalDependencies: '@babel/core': 7.26.10 babel-plugin-macros: 3.1.0 @@ -37673,11 +37673,11 @@ snapshots: '@swc/counter': 0.1.3 webpack: 5.98.0(@swc/core@1.11.24(@swc/helpers@0.5.15))(esbuild@0.25.9) - swr@2.2.4(react@19.3.0-canary-b546603b-20260121): + swr@2.2.4(react@19.3.0-canary-24d8716e-20260123): dependencies: client-only: 0.0.1 - react: 19.3.0-canary-b546603b-20260121 - use-sync-external-store: 1.5.0(react@19.3.0-canary-b546603b-20260121) + react: 19.3.0-canary-24d8716e-20260123 + use-sync-external-store: 1.5.0(react@19.3.0-canary-24d8716e-20260123) symbol-observable@1.0.1: {} @@ -38533,9 +38533,9 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 - unistore@3.4.1(react@19.3.0-canary-b546603b-20260121): + unistore@3.4.1(react@19.3.0-canary-24d8716e-20260123): optionalDependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 universal-github-app-jwt@1.1.1: dependencies: @@ -38670,9 +38670,9 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - use-callback-ref@1.3.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121): + use-callback-ref@1.3.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 @@ -38702,17 +38702,17 @@ snapshots: optionalDependencies: '@types/react': 19.2.2 - use-sidecar@1.1.3(@types/react@19.2.2)(react@19.3.0-canary-b546603b-20260121): + use-sidecar@1.1.3(@types/react@19.2.2)(react@19.3.0-canary-24d8716e-20260123): dependencies: detect-node-es: 1.1.0 - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 - use-sync-external-store@1.5.0(react@19.3.0-canary-b546603b-20260121): + use-sync-external-store@1.5.0(react@19.3.0-canary-24d8716e-20260123): dependencies: - react: 19.3.0-canary-b546603b-20260121 + react: 19.3.0-canary-24d8716e-20260123 util-deprecate@1.0.2: {} diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 00000000000000..ab0fb902017aa2 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1 @@ +ci-failures/* \ No newline at end of file diff --git a/scripts/ci-failures.js b/scripts/ci-failures.js new file mode 100644 index 00000000000000..6d2cec5ce9b7bb --- /dev/null +++ b/scripts/ci-failures.js @@ -0,0 +1,590 @@ +const { execSync } = require('child_process') +const fs = require('fs/promises') +const path = require('path') + +const OUTPUT_DIR = path.join(__dirname, 'ci-failures') + +// ============================================================================ +// Helper Functions +// ============================================================================ + +function exec(cmd) { + try { + return execSync(cmd, { + encoding: 'utf8', + maxBuffer: 50 * 1024 * 1024, // 50MB for large logs + }).trim() + } catch (error) { + console.error(`Command failed: ${cmd}`) + console.error(error.stderr || error.message) + throw error + } +} + +function execJson(cmd) { + const output = exec(cmd) + return JSON.parse(output) +} + +function formatDuration(startedAt, completedAt) { + if (!startedAt || !completedAt) return 'N/A' + const start = new Date(startedAt) + const end = new Date(completedAt) + + // Validate that both dates are valid (not Invalid Date objects) + if (isNaN(start.getTime()) || isNaN(end.getTime())) return 'N/A' + + const seconds = Math.floor((end - start) / 1000) + + if (seconds < 60) return `${seconds}s` + const minutes = Math.floor(seconds / 60) + const remainingSeconds = seconds % 60 + return `${minutes}m ${remainingSeconds}s` +} + +function sanitizeFilename(name) { + return name + .replace(/[^a-zA-Z0-9._-]/g, '-') + .replace(/-+/g, '-') + .replace(/^-|-$/g, '') + .substring(0, 100) +} + +function escapeMarkdownTableCell(text) { + if (!text) return '' + // Escape pipe characters and newlines for markdown table cells + return String(text) + .replace(/\|/g, '\\|') + .replace(/\n/g, ' ') + .replace(/\r/g, '') +} + +function stripTimestamps(logContent) { + // Remove GitHub Actions timestamp prefixes like "2026-01-23T10:11:12.8077557Z " + return logContent.replace(/^\d{4}-\d{2}-\d{2}T[\d:.]+Z\s/gm, '') +} + +// ============================================================================ +// Data Fetching Functions +// ============================================================================ + +function getBranchInfo() { + try { + const output = exec(`gh pr view --json number,headRefName`) + const data = JSON.parse(output) + if (data.number && data.headRefName) { + return { prNumber: String(data.number), branchName: data.headRefName } + } + } catch { + // Fallback to git if not in PR context + } + const branchName = exec('git rev-parse --abbrev-ref HEAD') + return { prNumber: null, branchName } +} + +function getWorkflowRuns(branch) { + const encodedBranch = encodeURIComponent(branch) + const jqQuery = + '.workflow_runs[] | select(.name == "build-and-test") | {id, run_attempt, status, conclusion}' + const output = exec( + `gh api "repos/vercel/next.js/actions/runs?branch=${encodedBranch}&per_page=10" --jq '${jqQuery}'` + ) + + if (!output.trim()) return [] + + return output + .split('\n') + .filter((line) => line.trim()) + .map((line) => JSON.parse(line)) +} + +function getRunMetadata(runId) { + return execJson( + `gh api "repos/vercel/next.js/actions/runs/${runId}" --jq '{id, name, status, conclusion, run_attempt, html_url, head_sha, created_at, updated_at}'` + ) +} + +function getFailedJobs(runId) { + const failedJobs = [] + let page = 1 + + while (true) { + const jqQuery = '.jobs[] | select(.conclusion == "failure") | {id, name}' + let output + try { + output = exec( + `gh api "repos/vercel/next.js/actions/runs/${runId}/jobs?per_page=100&page=${page}" --jq '${jqQuery}'` + ) + } catch { + break + } + + if (!output.trim()) break + + const jobs = output + .split('\n') + .filter((line) => line.trim()) + .map((line) => JSON.parse(line)) + + failedJobs.push(...jobs) + + if (jobs.length < 100) break + page++ + } + + return failedJobs +} + +function getJobMetadata(jobId) { + return execJson( + `gh api "repos/vercel/next.js/actions/jobs/${jobId}" --jq '{id, name, status, conclusion, started_at, completed_at, html_url}'` + ) +} + +function getJobLogs(jobId) { + try { + return exec(`gh api "repos/vercel/next.js/actions/jobs/${jobId}/logs"`) + } catch { + return 'Logs not available' + } +} + +// ============================================================================ +// Log Parsing Functions +// ============================================================================ + +function extractTestOutputJson(logContent) { + // Extract all --test output start-- {JSON} --test output end-- blocks + const results = [] + const regex = /--test output start--\s*(\{[\s\S]*?\})\s*--test output end--/g + let match = regex.exec(logContent) + + while (match !== null) { + try { + const json = JSON.parse(match[1]) + results.push(json) + } catch { + // Skip invalid JSON + } + match = regex.exec(logContent) + } + + return results +} + +function extractTestCaseGroups(logContent) { + // Extract ##[group]❌ test/... ##[endgroup] blocks + // Combine multiple retries of the same test into one entry + const groupsByPath = new Map() + const regex = + /##\[group\]❌\s*(test\/[^\s]+)\s+output([\s\S]*?)##\[endgroup\]/g + let match = regex.exec(logContent) + + while (match !== null) { + const testPath = match[1] + const content = stripTimestamps(match[2].trim()) + + if (groupsByPath.has(testPath)) { + // Append retry content with a separator + const existing = groupsByPath.get(testPath) + groupsByPath.set(testPath, `${existing}\n\n--- RETRY ---\n\n${content}`) + } else { + groupsByPath.set(testPath, content) + } + match = regex.exec(logContent) + } + + const groups = [] + for (const [testPath, content] of groupsByPath) { + groups.push({ testPath, content }) + } + return groups +} + +function extractSections(logContent) { + // Split the log into sections at ##[group] and ##[endgroup] boundaries + const sections = [] + const lines = logContent.split('\n') + + let currentSection = { name: null, startLine: 0 } + + for (let i = 0; i < lines.length; i++) { + const line = lines[i] + + // Check for group start + const groupMatch = line.match(/##\[group\](.*)/) + if (groupMatch) { + // End current section + const lineCount = i - currentSection.startLine + if (lineCount > 0 || sections.length === 0) { + const rawContent = lines.slice(currentSection.startLine, i).join('\n') + const hasError = rawContent.includes('##[error]') + const content = stripTimestamps(rawContent.trim()) + sections.push({ + name: currentSection.name, + lineCount: lineCount, + content: content, + hasError: hasError, + }) + } + // Start new section with group name + currentSection = { name: groupMatch[1].trim() || null, startLine: i + 1 } + continue + } + + // Check for group end + if (line.includes('##[endgroup]')) { + // End current section + const lineCount = i - currentSection.startLine + const rawContent = lines.slice(currentSection.startLine, i).join('\n') + const hasError = rawContent.includes('##[error]') + const content = stripTimestamps(rawContent.trim()) + sections.push({ + name: currentSection.name, + lineCount: lineCount, + content: content, + hasError: hasError, + }) + // Start new section with no name + currentSection = { name: null, startLine: i + 1 } + continue + } + } + + // Add final section if there are remaining lines + const finalLineCount = lines.length - currentSection.startLine + if (finalLineCount > 0) { + const rawContent = lines.slice(currentSection.startLine).join('\n') + const hasError = rawContent.includes('##[error]') + const content = stripTimestamps(rawContent.trim()) + sections.push({ + name: currentSection.name, + lineCount: finalLineCount, + content: content, + hasError: hasError, + }) + } + + return sections +} + +// ============================================================================ +// Markdown Generation Functions +// ============================================================================ + +function generateIndexMd(branchInfo, runMetadata, failedJobs, jobTestCounts) { + const lines = ['# CI Failures Report', '', `Branch: ${branchInfo.branchName}`] + + if (branchInfo.prNumber) { + lines.push(`PR: #${branchInfo.prNumber}`) + } + + lines.push( + `Run: ${runMetadata.id} (attempt ${runMetadata.run_attempt})`, + `Status: ${runMetadata.conclusion}`, + `Time: ${runMetadata.created_at} - ${runMetadata.updated_at}`, + `URL: ${runMetadata.html_url}`, + '', + `## Failed Jobs (${failedJobs.length})`, + '', + '| Job | Name | Duration | Tests | File |', + '|-----|------|----------|-------|------|' + ) + + for (const job of failedJobs) { + const duration = formatDuration(job.started_at, job.completed_at) + const testCount = jobTestCounts[job.id] + const testsStr = testCount + ? `${testCount.failed}/${testCount.total}` + : 'N/A' + lines.push( + `| ${job.id} | ${escapeMarkdownTableCell(job.name)} | ${duration} | ${testsStr} | [Details](job-${job.id}.md) |` + ) + } + + return lines.join('\n') +} + +function generateJobMd(jobMetadata, testResults, testGroups, sections) { + const duration = formatDuration( + jobMetadata.started_at, + jobMetadata.completed_at + ) + + const lines = [ + `# Job: ${jobMetadata.name}`, + '', + `ID: ${jobMetadata.id}`, + `Status: ${jobMetadata.conclusion}`, + `Started: ${jobMetadata.started_at}`, + `Completed: ${jobMetadata.completed_at}`, + `Duration: ${duration}`, + `URL: ${jobMetadata.html_url}`, + `Full Log: [job-${jobMetadata.id}-full-log.txt](job-${jobMetadata.id}-full-log.txt)`, + '', + ] + + // Add sections list with line counts and links to section files + if (sections.length > 0) { + lines.push('## Sections', '') + + for (let i = 0; i < sections.length; i++) { + const section = sections[i] + const sectionNum = i + 1 + const filename = `job-${jobMetadata.id}-section-${sectionNum}.txt` + const errorPrefix = section.hasError ? '[error] ' : '' + + if (section.name) { + lines.push( + `- ${errorPrefix}[${section.name} (${section.lineCount} lines)](${filename})` + ) + } else { + lines.push(`- ${errorPrefix}[${section.lineCount} lines](${filename})`) + } + } + lines.push('') + } + + // Aggregate test results from all test output JSONs + let totalFailed = 0 + let totalPassed = 0 + let totalTests = 0 + const allFailedTests = [] + + for (const result of testResults) { + totalFailed += result.numFailedTests || 0 + totalPassed += result.numPassedTests || 0 + totalTests += result.numTotalTests || 0 + + if (result.testResults) { + for (const testResult of result.testResults) { + if (testResult.assertionResults) { + for (const assertion of testResult.assertionResults) { + if (assertion.status === 'failed') { + allFailedTests.push({ + testFile: testResult.name, + testName: assertion.fullName || assertion.title, + error: + assertion.failureMessages?.[0]?.substring(0, 100) || + 'Unknown', + }) + } + } + } + } + } + } + + if (totalTests > 0) { + lines.push( + '## Test Results', + '', + `Failed: ${totalFailed}`, + `Passed: ${totalPassed}`, + `Total: ${totalTests}`, + '' + ) + + if (allFailedTests.length > 0) { + lines.push( + '## Failed Tests', + '', + '| Test File | Test Name | Error |', + '|-----------|-----------|-------|' + ) + + for (const test of allFailedTests) { + const shortFile = test.testFile.replace(/.*\/next\.js\/next\.js\//, '') + const shortError = test.error + .replace(/\n/g, ' ') + .substring(0, 60) + .replace(/\|/g, '\\|') + lines.push( + `| ${escapeMarkdownTableCell(shortFile)} | ${escapeMarkdownTableCell(test.testName)} | ${shortError}... |` + ) + } + lines.push('') + } + } + + if (testGroups.length > 0) { + lines.push('## Individual Test Files', '') + const seenPaths = new Set() + for (const group of testGroups) { + if (seenPaths.has(group.testPath)) continue + seenPaths.add(group.testPath) + const sanitizedName = sanitizeFilename(group.testPath) + lines.push( + `- [${group.testPath}](job-${jobMetadata.id}-test-${sanitizedName}.md)` + ) + } + } + + return lines.join('\n') +} + +function generateTestMd(jobMetadata, testPath, content, testResultJson) { + const lines = [ + `# Test: ${testPath}`, + '', + `Job: [${jobMetadata.name}](job-${jobMetadata.id}.md)`, + '', + '## Output', + '', + '```', + content, + '```', + ] + + if (testResultJson) { + lines.push( + '', + '## Test Results JSON', + '', + '```json', + JSON.stringify(testResultJson, null, 2), + '```' + ) + } + + return lines.join('\n') +} + +// ============================================================================ +// Main Function +// ============================================================================ + +async function main() { + // Step 1: Delete and recreate output directory + console.log('Cleaning output directory...') + await fs.rm(OUTPUT_DIR, { recursive: true, force: true }) + await fs.mkdir(OUTPUT_DIR, { recursive: true }) + + // Step 2: Get branch info + console.log('Getting branch info...') + const branchInfo = getBranchInfo() + console.log( + `Branch: ${branchInfo.branchName}, PR: ${branchInfo.prNumber || 'N/A'}` + ) + + // Step 3: Get workflow runs + console.log('Fetching workflow runs...') + const runs = getWorkflowRuns(branchInfo.branchName) + + if (runs.length === 0) { + console.log('No workflow runs found for this branch.') + process.exit(0) + } + + // Find the most recent run (first in list) + const latestRun = runs[0] + console.log( + `Latest run: ${latestRun.id} (${latestRun.status}/${latestRun.conclusion})` + ) + + // Step 4: Get run metadata + console.log('Fetching run metadata...') + const runMetadata = getRunMetadata(latestRun.id) + + // Step 5: Get failed jobs + console.log('Fetching failed jobs...') + const failedJobIds = getFailedJobs(latestRun.id) + console.log(`Found ${failedJobIds.length} failed jobs`) + + if (failedJobIds.length === 0) { + console.log('No failed jobs found.') + await fs.writeFile( + path.join(OUTPUT_DIR, 'index.md'), + generateIndexMd(branchInfo, runMetadata, [], {}) + ) + process.exit(0) + } + + // Step 6: Fetch details for each failed job + const failedJobs = [] + const jobTestCounts = {} + + for (const { id, name } of failedJobIds) { + console.log(`Processing job ${id}: ${name}...`) + + // Get job metadata + const jobMetadata = getJobMetadata(id) + failedJobs.push(jobMetadata) + + // Get job logs + const logs = getJobLogs(id) + + // Write full log + await fs.writeFile(path.join(OUTPUT_DIR, `job-${id}-full-log.txt`), logs) + + // Extract test output JSON + const testResults = extractTestOutputJson(logs) + + // Calculate test counts for index + let failed = 0 + let total = 0 + for (const result of testResults) { + failed += result.numFailedTests || 0 + total += result.numTotalTests || 0 + } + if (total > 0) { + jobTestCounts[id] = { failed, total } + } + + // Extract sections from the log + const sections = extractSections(logs) + + // Write individual section files + for (let i = 0; i < sections.length; i++) { + const section = sections[i] + const sectionNum = i + 1 + await fs.writeFile( + path.join(OUTPUT_DIR, `job-${id}-section-${sectionNum}.txt`), + section.content + ) + } + + // Extract test case groups + const testGroups = extractTestCaseGroups(logs) + + // Write individual test files + for (const group of testGroups) { + const sanitizedName = sanitizeFilename(group.testPath) + // Find matching test result JSON for this test + const matchingResult = testResults.find((r) => + r.testResults?.some((tr) => tr.name?.includes(group.testPath)) + ) + const testMd = generateTestMd( + jobMetadata, + group.testPath, + group.content, + matchingResult + ) + await fs.writeFile( + path.join(OUTPUT_DIR, `job-${id}-test-${sanitizedName}.md`), + testMd + ) + } + + // Generate job markdown + const jobMd = generateJobMd(jobMetadata, testResults, testGroups, sections) + await fs.writeFile(path.join(OUTPUT_DIR, `job-${id}.md`), jobMd) + } + + // Step 7: Generate index.md + console.log('Generating index.md...') + const indexMd = generateIndexMd( + branchInfo, + runMetadata, + failedJobs, + jobTestCounts + ) + await fs.writeFile(path.join(OUTPUT_DIR, 'index.md'), indexMd) + + console.log(`\nDone! Output written to ${OUTPUT_DIR}/index.md`) +} + +main().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/test/e2e/url-deployment-id/app/api/route.js b/test/e2e/url-deployment-id/app/api/route.js new file mode 100644 index 00000000000000..2d4b4ca64c8c22 --- /dev/null +++ b/test/e2e/url-deployment-id/app/api/route.js @@ -0,0 +1,6 @@ +import imported from '../../public/test.png' +const url = new URL('../../public/test.png', import.meta.url).toString() + +export function GET() { + return Response.json({ imported, url }) +} diff --git a/test/e2e/url-deployment-id/app/client/page.js b/test/e2e/url-deployment-id/app/client/page.js new file mode 100644 index 00000000000000..62dc52a20ab4db --- /dev/null +++ b/test/e2e/url-deployment-id/app/client/page.js @@ -0,0 +1,12 @@ +'use client' +import imported from '../../public/test.png' +const url = new URL('../../public/test.png', import.meta.url).toString() + +export default function Page() { + return ( +
+

{imported.src}

+

{url}

+
+ ) +} diff --git a/test/e2e/url-deployment-id/app/dynamic-client/layout.js b/test/e2e/url-deployment-id/app/dynamic-client/layout.js new file mode 100644 index 00000000000000..cb130459e80075 --- /dev/null +++ b/test/e2e/url-deployment-id/app/dynamic-client/layout.js @@ -0,0 +1,7 @@ +import { headers } from 'next/headers' + +export default async function Layout({ children }) { + // Use headers() to opt into dynamic rendering + await headers() + return children +} diff --git a/test/e2e/url-deployment-id/app/dynamic-client/page.js b/test/e2e/url-deployment-id/app/dynamic-client/page.js new file mode 100644 index 00000000000000..62dc52a20ab4db --- /dev/null +++ b/test/e2e/url-deployment-id/app/dynamic-client/page.js @@ -0,0 +1,12 @@ +'use client' +import imported from '../../public/test.png' +const url = new URL('../../public/test.png', import.meta.url).toString() + +export default function Page() { + return ( +
+

{imported.src}

+

{url}

+
+ ) +} diff --git a/test/e2e/url-deployment-id/app/dynamic/page.js b/test/e2e/url-deployment-id/app/dynamic/page.js new file mode 100644 index 00000000000000..2e055ae8bc38ba --- /dev/null +++ b/test/e2e/url-deployment-id/app/dynamic/page.js @@ -0,0 +1,14 @@ +import { headers } from 'next/headers' +import imported from '../../public/test.png' +const url = new URL('../../public/test.png', import.meta.url).toString() + +export default async function Page() { + // Use headers() to opt into dynamic rendering + await headers() + return ( +
+

{imported.src}

+

{url}

+
+ ) +} diff --git a/test/e2e/url-deployment-id/app/layout.js b/test/e2e/url-deployment-id/app/layout.js new file mode 100644 index 00000000000000..803f17d863c8ad --- /dev/null +++ b/test/e2e/url-deployment-id/app/layout.js @@ -0,0 +1,7 @@ +export default function RootLayout({ children }) { + return ( + + {children} + + ) +} diff --git a/test/e2e/url-deployment-id/app/page.js b/test/e2e/url-deployment-id/app/page.js new file mode 100644 index 00000000000000..cc9db13229ee7d --- /dev/null +++ b/test/e2e/url-deployment-id/app/page.js @@ -0,0 +1,11 @@ +import imported from '../public/test.png' +const url = new URL('../public/test.png', import.meta.url).toString() + +export default function Page() { + return ( +
+

{imported.src}

+

{url}

+
+ ) +} diff --git a/test/e2e/url-deployment-id/next.config.js b/test/e2e/url-deployment-id/next.config.js new file mode 100644 index 00000000000000..cc5fdecd511209 --- /dev/null +++ b/test/e2e/url-deployment-id/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +module.exports = { + deploymentId: 'test-deployment-id', +} diff --git a/test/e2e/url-deployment-id/public/test.png b/test/e2e/url-deployment-id/public/test.png new file mode 100644 index 00000000000000..cb137a989e5ffe Binary files /dev/null and b/test/e2e/url-deployment-id/public/test.png differ diff --git a/test/e2e/url-deployment-id/url-deployment-id.test.ts b/test/e2e/url-deployment-id/url-deployment-id.test.ts new file mode 100644 index 00000000000000..2e08954f04ad58 --- /dev/null +++ b/test/e2e/url-deployment-id/url-deployment-id.test.ts @@ -0,0 +1,108 @@ +import { nextTestSetup } from 'e2e-utils' + +// Skip for webpack - dpl suffix in asset URLs is only implemented for Turbopack +;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( + 'URL asset references with deploymentId', + () => { + const { next, skipped } = nextTestSetup({ + files: __dirname, + skipDeployment: true, + }) + + if (skipped) { + return + } + + const deploymentId = 'test-deployment-id' + + describe('import src attribute', () => { + it('should include dpl query in RSC page', async () => { + const $ = await next.render$('/') + const src = $('#imported-src').text() + expect(src).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in client page', async () => { + const $ = await next.render$('/client') + const src = $('#imported-src').text() + expect(src).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in client page (after hydration)', async () => { + const browser = await next.browser('/client') + const url = await browser.elementByCss('#imported-src').text() + expect(url).toContain('dpl=' + deploymentId) + }) + }) + + describe('new URL() pattern', () => { + it('should include dpl query in RSC page', async () => { + const $ = await next.render$('/') + const url = $('#new-url').text() + expect(url).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in client page', async () => { + const $ = await next.render$('/client') + const url = $('#new-url').text() + expect(url).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in client page (after hydration)', async () => { + const browser = await next.browser('/client') + const url = await browser.elementByCss('#new-url').text() + expect(url).toContain('dpl=' + deploymentId) + }) + }) + + describe('dynamic RSC page (headers)', () => { + it('should include dpl query in dynamic RSC page', async () => { + const $ = await next.render$('/dynamic') + const src = $('#imported-src').text() + expect(src).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in new URL pattern', async () => { + const $ = await next.render$('/dynamic') + const url = $('#new-url').text() + expect(url).toContain('dpl=' + deploymentId) + }) + }) + + describe('dynamic client page (headers in layout)', () => { + it('should include dpl query in dynamic client page', async () => { + const $ = await next.render$('/dynamic-client') + const src = $('#imported-src').text() + expect(src).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query in new URL pattern', async () => { + const $ = await next.render$('/dynamic-client') + const url = $('#new-url').text() + expect(url).toContain('dpl=' + deploymentId) + }) + + it('should include dpl query after hydration', async () => { + const browser = await next.browser('/dynamic-client') + const url = await browser.elementByCss('#imported-src').text() + expect(url).toContain('dpl=' + deploymentId) + }) + }) + + describe('API route', () => { + it('should return import src with dpl query', async () => { + const data = await next + .fetch('/api') + .then((res) => res.ok && res.json()) + expect(data.imported.src).toContain('dpl=' + deploymentId) + }) + + it('should return new URL with dpl query', async () => { + const data = await next + .fetch('/api') + .then((res) => res.ok && res.json()) + expect(data.url).not.toContain('dpl=') + }) + }) + } +) diff --git a/test/rspack-build-tests-manifest.json b/test/rspack-build-tests-manifest.json index e58d9b5d5a25c7..4a75d19d3663d0 100644 --- a/test/rspack-build-tests-manifest.json +++ b/test/rspack-build-tests-manifest.json @@ -3556,6 +3556,17 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/mdx-font-preload/mdx-font-preload.test.ts": { + "passed": [ + "mdx-font-preload should apply font class from layout", + "mdx-font-preload should preload font from layout on MDX page", + "mdx-font-preload should render MDX page" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/mdx-no-mdx-components/mdx.test.ts": { "passed": [ "mdx app directory should allow importing client components", @@ -8373,6 +8384,21 @@ "flakey": [], "runtimeError": false }, + "test/e2e/deployment-id-function/deployment-id-function.test.ts": { + "passed": [ + "deploymentId function support should throw error when deploymentId exceeds 32 characters", + "deploymentId function support should throw error when deploymentId function returns non-string", + "deploymentId function support should throw error when deploymentId function returns string exceeding 32 characters", + "deploymentId function support should work with deploymentId as a function returning string", + "deploymentId function support should work with deploymentId as a string", + "deploymentId function support should work with deploymentId function using environment variable", + "deploymentId function support should work with useSkewCookie and deploymentId function" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/deprecation-warnings/deprecation-warnings.test.ts": { "passed": [ "deprecation-warnings with deprecated config options should emit deprecation warnings for explicitly configured deprecated options", @@ -20089,6 +20115,7 @@ "config telemetry production mode emits telemetry for default React Compiler options", "config telemetry production mode emits telemetry for enabled React Compiler", "config telemetry production mode emits telemetry for filesystem cache in build mode", + "config telemetry production mode emits telemetry for filesystem cache in dev mode", "config telemetry production mode emits telemetry for isolatedDevBuild disabled", "config telemetry production mode emits telemetry for isolatedDevBuild enabled by default", "config telemetry production mode emits telemetry for middleware related options", @@ -20103,9 +20130,7 @@ "config telemetry production mode emits telemetry for usage of swc plugins", "config telemetry production mode emits telemetry for useCache directive" ], - "failed": [ - "config telemetry production mode emits telemetry for filesystem cache in dev mode" - ], + "failed": [], "pending": [], "flakey": [], "runtimeError": false @@ -22099,7 +22124,9 @@ }, "test/production/standalone-mode/required-server-files/required-server-files-app.test.ts": { "passed": [ + "required server files app router should de-dupe HTML/RSC requests for ISR pages", "required server files app router should handle optional catchall", + "required server files app router should isolate cache between different ISR request groups", "required server files app router should not fail caching", "required server files app router should not override params with query params", "required server files app router should not send cache tags in minimal mode for SSR", @@ -22161,7 +22188,6 @@ "required server files should bubble error correctly for gip page", "required server files should bubble error correctly for gsp page", "required server files should bubble error correctly for gssp page", - "required server files should cap de-dupe previousCacheItem expires time", "required server files should correctly handle a mismatch in buildIds when normalizing next data", "required server files should de-dupe HTML/data requests", "required server files should favor valid route params over routes-matches", @@ -22245,7 +22271,6 @@ "required server files should bubble error correctly for gip page", "required server files should bubble error correctly for gsp page", "required server files should bubble error correctly for gssp page", - "required server files should cap de-dupe previousCacheItem expires time", "required server files should correctly handle a mismatch in buildIds when normalizing next data", "required server files should de-dupe HTML/data requests", "required server files should favor valid route params over routes-matches", diff --git a/test/rspack-dev-tests-manifest.json b/test/rspack-dev-tests-manifest.json index a6f20476b4d3cf..6a724455f305b8 100644 --- a/test/rspack-dev-tests-manifest.json +++ b/test/rspack-dev-tests-manifest.json @@ -522,6 +522,33 @@ "flakey": [], "runtimeError": false }, + "test/development/app-dir/browser-log-forwarding/fixtures/error-level/error-level.test.ts": { + "passed": [ + "browser-log-forwarding error level should only forward error logs to terminal" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, + "test/development/app-dir/browser-log-forwarding/fixtures/verbose-level/verbose-level.test.ts": { + "passed": [ + "browser-log-forwarding verbose level should forward all logs to terminal" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, + "test/development/app-dir/browser-log-forwarding/fixtures/warn-level/warn-level.test.ts": { + "passed": [ + "browser-log-forwarding warn level should forward warn and error logs to terminal" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/development/app-dir/build-error-logs/build-error-logs.test.ts": { "passed": ["build-error-logs should only log error a single time"], "failed": [], @@ -911,9 +938,23 @@ "flakey": [], "runtimeError": false }, + "test/development/app-dir/isolated-dev-build-strict-route-types/isolated-dev-build-strict-route-types.test.ts": { + "passed": [ + "isolated-dev-build with strictRouteTypes should create entry file that re-exports strict route type files", + "isolated-dev-build with strictRouteTypes should create strict route type files in .next/dev/types/", + "isolated-dev-build with strictRouteTypes should use fixed path in next-env.d.ts with strictRouteTypes enabled" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/development/app-dir/isolated-dev-build/isolated-dev-build.test.ts": { "passed": [ + "isolated-dev-build should create actual type files in .next/dev/types/", "isolated-dev-build should create dev artifacts in .next/dev/ directory", + "isolated-dev-build should create entry file at .next/types/routes.d.ts that references dev types", + "isolated-dev-build should use fixed path in next-env.d.ts regardless of isolatedDevBuild", "isolated-dev-build should work with HMR" ], "failed": [], @@ -1825,7 +1866,6 @@ "Terminal Logging (Webpack) App Router - Edge Runtime should handle edge runtime errors with source mapping", "Terminal Logging (Webpack) App Router - Server Components should not re-log server component logs", "Terminal Logging (Webpack) App Router - Server Components should show source-mapped errors for server components", - "Terminal Logging (Webpack) Configuration Options showSourceLocation disabled should omit source location when disabled", "Terminal Logging (Webpack) Pages Router should forward client component logs", "Terminal Logging (Webpack) Pages Router should handle circular references safely", "Terminal Logging (Webpack) Pages Router should respect default depth limit", @@ -4310,6 +4350,7 @@ "Cache Components Errors Dev Error Attribution with Sync IO Guarded RSC with unguarded Client sync IO should show a collapsed redbox error", "Cache Components Errors Dev Error Attribution with Sync IO Unguarded RSC with guarded Client sync IO should show a collapsed redbox error", "Cache Components Errors Dev Error Attribution with Sync IO unguarded RSC with unguarded Client sync IO should show a collapsed redbox error", + "Cache Components Errors Dev IO accessed in Client Components should show a collapsed redbox error", "Cache Components Errors Dev Inside `use cache` cacheLife with expire < 5 minutes microtasky cache should show a redbox error", "Cache Components Errors Dev Inside `use cache` cacheLife with expire < 5 minutes slow cache should show a redbox error", "Cache Components Errors Dev Inside `use cache` cacheLife with revalidate: 0 microtasky cache should show a redbox error", @@ -4624,6 +4665,15 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/client-reference-chunking/client-reference-chunking.test.ts": { + "passed": [ + "client-reference-chunking should use the same chunks for client references across routes" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/concurrent-navigations/mismatching-prefetch.test.ts": { "passed": ["mismatching prefetch disabled in development"], "failed": [], @@ -5385,6 +5435,15 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/gesture-transitions/gesture-transitions.test.ts": { + "passed": [ + "gesture-transitions shows optimistic state during gesture, then canonical state after" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/global-error/basic/index.test.ts": { "passed": [ "app dir - global-error should catch metadata error in error boundary if presented", @@ -5877,6 +5936,17 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/mdx-font-preload/mdx-font-preload.test.ts": { + "passed": [ + "mdx-font-preload should apply font class from layout", + "mdx-font-preload should preload font from layout on MDX page", + "mdx-font-preload should render MDX page" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/mdx-no-mdx-components/mdx.test.ts": { "passed": [ "mdx app directory should allow importing client components", @@ -6239,6 +6309,7 @@ "app dir - metadata missing metadataBase should not show warning in vercel deployment output in default build output mode", "app dir - metadata missing metadataBase should not warn for viewport properties during manually merging metadata", "app dir - metadata missing metadataBase should not warn metadataBase is missing and a relative URL is used", + "app dir - metadata missing metadataBase should warn for deprecated fields in other property", "app dir - metadata missing metadataBase should warn for unsupported metadata properties" ], "failed": [], @@ -8110,6 +8181,15 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/ppr-root-param-fallback/ppr-root-param-fallback.test.ts": { + "passed": [ + "ppr-root-param-fallback should have use-cache content in fallback shells for all pregenerated locales" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/ppr-unstable-cache/ppr-unstable-cache.test.ts": { "passed": [], "failed": [], @@ -8341,6 +8421,16 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/revalidate-path-with-rewrites/revalidate-path-with-rewrites.test.ts": { + "passed": [ + "revalidatePath with rewrites dynamic page should revalidate a dynamic page that was rewritten", + "revalidatePath with rewrites static page should revalidate a static page that was rewritten" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/revalidatetag-rsc/revalidatetag-rsc.test.ts": { "passed": [ "revalidateTag-rsc should error if revalidateTag is called during render", @@ -9240,6 +9330,24 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/server-action-logging/server-action-logging.test.ts": { + "passed": [ + "server-action-logging should log error action", + "server-action-logging should log inline action", + "server-action-logging should log notFound action", + "server-action-logging should log redirect action", + "server-action-logging should log server action with array argument (truncated)", + "server-action-logging should log server action with multiple arguments", + "server-action-logging should log server action with object argument", + "server-action-logging should log server action with promise argument", + "server-action-logging should log successful server action", + "server-action-logging should show relative file path in log" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/server-actions-redirect-middleware-rewrite/server-actions-redirect-middleware-rewrite.test.ts": { "passed": [ "app-dir - server-actions-redirect-middleware-rewrite.test should redirect correctly in edge runtime with middleware rewrite", @@ -9376,6 +9484,18 @@ "flakey": [], "runtimeError": false }, + "test/e2e/app-dir/static-siblings/static-siblings.test.ts": { + "passed": [ + "static-siblings cross-route-group siblings should navigate to static sibling after visiting dynamic route", + "static-siblings deeply nested siblings should navigate to static sibling after visiting dynamic route", + "static-siblings parallel route siblings should navigate to static sibling after visiting dynamic route", + "static-siblings same-directory siblings should navigate to static sibling after visiting dynamic route" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/app-dir/sub-shell-generation-middleware/sub-shell-generation-middleware.test.ts": { "passed": [], "failed": [], @@ -9464,7 +9584,9 @@ "app-dir trailingSlash handling should redirect route when clicking link", "app-dir trailingSlash handling should redirect route when requesting it directly", "app-dir trailingSlash handling should redirect route when requesting it directly by browser", - "app-dir trailingSlash handling should render link with trailing slash" + "app-dir trailingSlash handling should render link with trailing slash", + "app-dir trailingSlash handling should revalidate a page with generated static params (withSlash=false)", + "app-dir trailingSlash handling should revalidate a page with generated static params (withSlash=true)" ], "failed": [], "pending": [], @@ -9864,8 +9986,12 @@ "flakey": [], "runtimeError": false }, - "test/e2e/app-dir/webpack-loader-resource-query/turbopack-loader-resource-query.test.ts": { - "passed": ["webpack-loader-resource-query should pass query to loader"], + "test/e2e/app-dir/webpack-loader-resource-query/webpack-loader-resource-query.test.js": { + "passed": [ + "webpack-loader-resource-query should apply loader based on resourceQuery", + "webpack-loader-resource-query should apply loader based on resourceQuery regex", + "webpack-loader-resource-query should pass query to loader" + ], "failed": [], "pending": [], "flakey": [], @@ -9907,8 +10033,11 @@ }, "test/e2e/app-dir/worker/worker.test.ts": { "passed": [ + "app dir - workers should have access to NEXT_DEPLOYMENT_ID in web worker", "app dir - workers should not bundle web workers with string specifiers", + "app dir - workers should support loading WASM files in workers", "app dir - workers should support module web workers with dynamic imports", + "app dir - workers should support shared workers", "app dir - workers should support web workers with dynamic imports" ], "failed": [], @@ -10342,6 +10471,21 @@ "flakey": [], "runtimeError": false }, + "test/e2e/deployment-id-function/deployment-id-function.test.ts": { + "passed": [ + "deploymentId function support should throw error when deploymentId exceeds 32 characters", + "deploymentId function support should throw error when deploymentId function returns non-string", + "deploymentId function support should throw error when deploymentId function returns string exceeding 32 characters", + "deploymentId function support should work with deploymentId as a function returning string", + "deploymentId function support should work with deploymentId as a string", + "deploymentId function support should work with deploymentId function using environment variable", + "deploymentId function support should work with useSkewCookie and deploymentId function" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/e2e/deprecation-warnings/deprecation-warnings.test.ts": { "passed": [ "deprecation-warnings with deprecated config options should emit deprecation warnings for explicitly configured deprecated options", @@ -13389,15 +13533,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/app-config-asset-prefix/test/index.test.ts": { - "passed": [ - "App assetPrefix config should render correctly with assetPrefix: \"/\"" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/app-document-add-hmr/test/index.test.ts": { "passed": [], "failed": [], @@ -13564,15 +13699,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/broken-webpack-plugin/test/index.test.ts": { - "passed": [ - "Handles a broken webpack plugin (precompile) should render error correctly" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/build-output/test/index.test.ts": { "passed": [], "failed": [], @@ -13714,6 +13840,7 @@ "CLI Usage production mode build should not throw UnhandledPromiseRejectionWarning", "CLI Usage production mode build should warn when unknown argument provided", "CLI Usage production mode start --help", + "CLI Usage production mode start --inspect", "CLI Usage production mode start --keepAliveTimeout Infinity", "CLI Usage production mode start --keepAliveTimeout happy path", "CLI Usage production mode start --keepAliveTimeout negative number", @@ -13825,31 +13952,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/config-output-export/test/index.test.ts": { - "passed": [ - "config-output-export should error with \"i18n\" config", - "config-output-export should error with api routes function", - "config-output-export should error with getServerSideProps without fallback", - "config-output-export should error with getStaticPaths and fallback blocking", - "config-output-export should error with getStaticPaths and fallback true", - "config-output-export should error with getStaticProps and revalidate 10 seconds (ISR)", - "config-output-export should error with middleware function", - "config-output-export should work with getStaticPaths and fallback false", - "config-output-export should work with getStaticProps and revalidate false", - "config-output-export should work with getStaticProps and without revalidate", - "config-output-export should work with static homepage", - "config-output-export when hasNextSupport = false should error with \"headers\" config", - "config-output-export when hasNextSupport = false should error with \"redirects\" config", - "config-output-export when hasNextSupport = false should error with \"rewrites\" config", - "config-output-export when hasNextSupport = true should error with \"headers\" config", - "config-output-export when hasNextSupport = true should error with \"redirects\" config", - "config-output-export when hasNextSupport = true should error with \"rewrites\" config" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/config-promise-error/test/index.test.ts": { "passed": [], "failed": [], @@ -14010,6 +14112,8 @@ }, "test/integration/create-next-app/package-manager/pnpm.test.ts": { "passed": [ + "create-next-app with package manager pnpm should NOT create pnpm-workspace.yaml for pnpm v9", + "create-next-app with package manager pnpm should create pnpm-workspace.yaml for pnpm v10+", "create-next-app with package manager pnpm should use pnpm for --use-pnpm flag", "create-next-app with package manager pnpm should use pnpm for --use-pnpm flag with example", "create-next-app with package manager pnpm should use pnpm when user-agent is pnpm", @@ -14020,18 +14124,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/create-next-app/package-manager/yarn.test.ts": { - "passed": [ - "create-next-app with package manager yarn should use yarn for --use-yarn flag", - "create-next-app with package manager yarn should use yarn for --use-yarn flag with example", - "create-next-app with package manager yarn should use yarn when user-agent is yarn", - "create-next-app with package manager yarn should use yarn when user-agent is yarn with example" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/create-next-app/prompts.test.ts": { "passed": [ "create-next-app prompts should not prompt user for choice and use defaults if --yes is defined", @@ -14324,28 +14416,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/css/test/css-compilation.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "CSS Property Ordering production mode useLightnincsss(false) should have the border width (property ordering)", - "CSS Property Ordering production mode useLightnincsss(true) should have the border width (property ordering)", - "CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should've compiled and prefixed", - "CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should've compiled and prefixed", - "CSS Support production mode Good CSS Import from node_modules useLightnincsss(false) should've emitted a single CSS file", - "CSS Support production mode Good CSS Import from node_modules useLightnincsss(true) should've emitted a single CSS file", - "CSS Support production mode Good Nested CSS Import from node_modules useLightnincsss(false) should've emitted a single CSS file", - "CSS Support production mode Good Nested CSS Import from node_modules useLightnincsss(true) should've emitted a single CSS file", - "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(false) should have CSS for page", - "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(false) should've preloaded the CSS file and injected it in ", - "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(true) should have CSS for page", - "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(true) should've preloaded the CSS file and injected it in ", - "CSS Support production mode React Lifecyce Order (production) useLightnincsss(false) should have the correct color on mount after navigation", - "CSS Support production mode React Lifecyce Order (production) useLightnincsss(true) should have the correct color on mount after navigation" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/css/test/css-modules.test.ts": { "passed": [ "Basic CSS Modules Ordering useLightnincsss(false) Development Mode should have correct color on index page (on hover)", @@ -14840,13 +14910,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/development-hmr-refresh/test/index.test.ts": { - "passed": ["page should not reload when the file is not changed"], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/disable-js/test/index.test.ts": { "passed": [ "disabled runtime JS development mode should have a script for each preload link", @@ -15439,31 +15502,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/edge-runtime-module-errors/test/module-imports.test.ts": { - "passed": [ - "Edge runtime code with imports Edge API dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", - "Edge runtime code with imports Edge API importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", - "Edge runtime code with imports Edge API importing unused node.js module does not throw in dev at runtime", - "Edge runtime code with imports Edge API statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line", - "Edge runtime code with imports Middleware dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", - "Edge runtime code with imports Middleware importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", - "Edge runtime code with imports Middleware importing unused node.js module does not throw in dev at runtime", - "Edge runtime code with imports Middleware statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line" - ], - "failed": [], - "pending": [ - "Edge runtime code with imports Edge API dynamically importing 3rd party module production mode does not build and reports module not found error", - "Edge runtime code with imports Edge API importing unused 3rd party module production mode does not build and reports module not found error", - "Edge runtime code with imports Edge API importing unused node.js module production mode does not throw in production at runtime", - "Edge runtime code with imports Edge API statically importing node.js module production mode throws unsupported module error in production at runtime and prints error on logs", - "Edge runtime code with imports Middleware dynamically importing 3rd party module production mode does not build and reports module not found error", - "Edge runtime code with imports Middleware importing unused 3rd party module production mode does not build and reports module not found error", - "Edge runtime code with imports Middleware importing unused node.js module production mode does not throw in production at runtime", - "Edge runtime code with imports Middleware statically importing node.js module production mode throws unsupported module error in production at runtime and prints error on logs" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/edge-runtime-response-error/test/index.test.ts": { "passed": [ "Edge runtime code with imports test error if response is not Response type Edge API dev test Response", @@ -15721,15 +15759,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/export-image-default/test/index.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "Export with default loader next/image component production mode should error during next build" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/export-image-loader-legacy/test/index.test.ts": { "passed": [], "failed": [], @@ -17241,16 +17270,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/firebase-grpc/test/index.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "Building Firebase production mode Throws an error when building with firebase dependency with worker_threads", - "Building Firebase production mode Throws no error when building with firebase dependency without worker_threads" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/future/test/index.test.ts": { "passed": [], "failed": [], @@ -17532,191 +17551,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/i18n-support-base-path/test/index.test.ts": { - "passed": [ - "i18n Support basePath development mode should 404 for GSP pages that returned notFound", - "i18n Support basePath development mode should 404 for GSP that returned notFound on client-transition", - "i18n Support basePath development mode should 404 for locale prefixed public folder files", - "i18n Support basePath development mode should 404 for locale prefixed static assets correctly", - "i18n Support basePath development mode should apply headers correctly", - "i18n Support basePath development mode should apply redirects correctly", - "i18n Support basePath development mode should apply rewrites correctly", - "i18n Support basePath development mode should apply trailingSlash redirect correctly", - "i18n Support basePath development mode should generate auto-export page with all locales", - "i18n Support basePath development mode should generate fallbacks with all locales", - "i18n Support basePath development mode should generate non-dynamic GSP page with all locales", - "i18n Support basePath development mode should handle basePath like pathname", - "i18n Support basePath development mode should handle locales with domain for domain example.com should handle locale do-BE", - "i18n Support basePath development mode should handle locales with domain for domain example.com should handle locale go-BE", - "i18n Support basePath development mode should handle locales with domain for domain example.do should handle locale do-BE", - "i18n Support basePath development mode should handle locales with domain for domain example.do should handle locale go-BE", - "i18n Support basePath development mode should handle navigating back to different casing of locale", - "i18n Support basePath development mode should have correct initial query values for fallback", - "i18n Support basePath development mode should have correct values for non-prefixed path", - "i18n Support basePath development mode should have domainLocales available on useRouter", - "i18n Support basePath development mode should load dynamic getServerSideProps page correctly SSR", - "i18n Support basePath development mode should load getServerSideProps page correctly SSR", - "i18n Support basePath development mode should load getServerSideProps page correctly SSR (default locale no prefix)", - "i18n Support basePath development mode should load getStaticProps fallback non-prerender page another locale correctly", - "i18n Support basePath development mode should load getStaticProps fallback non-prerender page correctly", - "i18n Support basePath development mode should load getStaticProps fallback non-prerender page correctly (default locale no prefix", - "i18n Support basePath development mode should load getStaticProps fallback prerender page correctly SSR", - "i18n Support basePath development mode should load getStaticProps fallback prerender page correctly SSR (default locale no prefix)", - "i18n Support basePath development mode should load getStaticProps non-fallback correctly", - "i18n Support basePath development mode should load getStaticProps non-fallback correctly another locale", - "i18n Support basePath development mode should load getStaticProps non-fallback correctly another locale via cookie", - "i18n Support basePath development mode should load getStaticProps page correctly SSR", - "i18n Support basePath development mode should load getStaticProps page correctly SSR (default locale no prefix)", - "i18n Support basePath development mode should navigate client side for default locale with no prefix", - "i18n Support basePath development mode should navigate through history with query correctly", - "i18n Support basePath development mode should navigate to another page and back correctly with locale", - "i18n Support basePath development mode should navigate to auto-export dynamic page", - "i18n Support basePath development mode should navigate to getStaticProps page and back correctly with locale", - "i18n Support basePath development mode should navigate to page with same name as development buildId", - "i18n Support basePath development mode should navigate with locale false correctly", - "i18n Support basePath development mode should navigate with locale false correctly GSP", - "i18n Support basePath development mode should navigate with locale prop correctly", - "i18n Support basePath development mode should navigate with locale prop correctly GSP", - "i18n Support basePath development mode should not add duplicate locale key when navigating back to root path with hash", - "i18n Support basePath development mode should not add duplicate locale key when navigating back to root path with query params", - "i18n Support basePath development mode should not error with similar named cookie to locale cookie", - "i18n Support basePath development mode should not have hydration mis-match from hash", - "i18n Support basePath development mode should not redirect to accept-lang preferred locale with locale cookie", - "i18n Support basePath development mode should not remove locale prefix for default locale", - "i18n Support basePath development mode should not strip locale prefix for default locale with locale domains", - "i18n Support basePath development mode should prerender with the correct href for locale domain", - "i18n Support basePath development mode should provide defaultLocale correctly for locale domain", - "i18n Support basePath development mode should redirect external domain correctly", - "i18n Support basePath development mode should redirect to correct locale domain", - "i18n Support basePath development mode should redirect to locale prefixed route for /", - "i18n Support basePath development mode should render 404 for blocking fallback page that returned 404", - "i18n Support basePath development mode should render 404 for blocking fallback page that returned 404 on client transition", - "i18n Support basePath development mode should render 404 for fallback page that returned 404", - "i18n Support basePath development mode should render 404 for fallback page that returned 404 on client transition", - "i18n Support basePath development mode should render the correct href with locale domains but not on a locale domain", - "i18n Support basePath development mode should resolve auto-export dynamic route correctly", - "i18n Support basePath development mode should resolve href correctly when dynamic route matches locale prefixed", - "i18n Support basePath development mode should rewrite to API route correctly for do locale", - "i18n Support basePath development mode should rewrite to API route correctly for do-BE locale", - "i18n Support basePath development mode should rewrite to API route correctly for en locale", - "i18n Support basePath development mode should rewrite to API route correctly for en-US locale", - "i18n Support basePath development mode should rewrite to API route correctly for fr locale", - "i18n Support basePath development mode should rewrite to API route correctly for fr-BE locale", - "i18n Support basePath development mode should rewrite to API route correctly for go locale", - "i18n Support basePath development mode should rewrite to API route correctly for go-BE locale", - "i18n Support basePath development mode should rewrite to API route correctly for nl locale", - "i18n Support basePath development mode should rewrite to API route correctly for nl-BE locale", - "i18n Support basePath development mode should rewrite to API route correctly for nl-NL locale", - "i18n Support basePath development mode should serve public file on locale domain", - "i18n Support basePath development mode should show error for redirect and notFound returned at same time", - "i18n Support basePath development mode should transition on client properly for page that starts with locale", - "i18n Support basePath development mode should update asPath on the client correctly", - "i18n Support basePath development mode should use correct default locale for locale domains", - "i18n Support basePath development mode should use default locale for / without accept-language", - "i18n Support basePath development mode should use default locale when no locale is in href with locale false", - "i18n Support basePath development mode should visit API route directly correctly", - "i18n Support basePath development mode should visit dynamic API route directly correctly" - ], - "failed": [], - "pending": [ - "i18n Support basePath development mode should redirect to locale domain correctly client-side", - "i18n Support basePath development mode should render the correct href for locale domain", - "i18n Support basePath production mode should 404 for GSP pages that returned notFound", - "i18n Support basePath production mode should 404 for GSP that returned notFound on client-transition", - "i18n Support basePath production mode should 404 for locale prefixed public folder files", - "i18n Support basePath production mode should 404 for locale prefixed static assets correctly", - "i18n Support basePath production mode should add i18n config to routes-manifest", - "i18n Support basePath production mode should apply headers correctly", - "i18n Support basePath production mode should apply redirects correctly", - "i18n Support basePath production mode should apply rewrites correctly", - "i18n Support basePath production mode should apply trailingSlash redirect correctly", - "i18n Support basePath production mode should generate auto-export page with all locales", - "i18n Support basePath production mode should generate fallbacks with all locales", - "i18n Support basePath production mode should generate non-dynamic GSP page with all locales", - "i18n Support basePath production mode should handle basePath like pathname", - "i18n Support basePath production mode should handle fallback correctly after generating", - "i18n Support basePath production mode should handle locales with domain for domain example.com should handle locale do-BE", - "i18n Support basePath production mode should handle locales with domain for domain example.com should handle locale go-BE", - "i18n Support basePath production mode should handle locales with domain for domain example.do should handle locale do-BE", - "i18n Support basePath production mode should handle locales with domain for domain example.do should handle locale go-BE", - "i18n Support basePath production mode should handle navigating back to different casing of locale", - "i18n Support basePath production mode should have correct initial query values for fallback", - "i18n Support basePath production mode should have correct values for non-prefixed path", - "i18n Support basePath production mode should have domainLocales available on useRouter", - "i18n Support basePath production mode should load dynamic getServerSideProps page correctly SSR", - "i18n Support basePath production mode should load getServerSideProps page correctly SSR", - "i18n Support basePath production mode should load getServerSideProps page correctly SSR (default locale no prefix)", - "i18n Support basePath production mode should load getStaticProps fallback non-prerender page another locale correctly", - "i18n Support basePath production mode should load getStaticProps fallback non-prerender page correctly", - "i18n Support basePath production mode should load getStaticProps fallback non-prerender page correctly (default locale no prefix", - "i18n Support basePath production mode should load getStaticProps fallback prerender page correctly SSR", - "i18n Support basePath production mode should load getStaticProps fallback prerender page correctly SSR (default locale no prefix)", - "i18n Support basePath production mode should load getStaticProps non-fallback correctly", - "i18n Support basePath production mode should load getStaticProps non-fallback correctly another locale", - "i18n Support basePath production mode should load getStaticProps non-fallback correctly another locale via cookie", - "i18n Support basePath production mode should load getStaticProps page correctly SSR", - "i18n Support basePath production mode should load getStaticProps page correctly SSR (default locale no prefix)", - "i18n Support basePath production mode should navigate client side for default locale with no prefix", - "i18n Support basePath production mode should navigate through history with query correctly", - "i18n Support basePath production mode should navigate to another page and back correctly with locale", - "i18n Support basePath production mode should navigate to auto-export dynamic page", - "i18n Support basePath production mode should navigate to getStaticProps page and back correctly with locale", - "i18n Support basePath production mode should navigate to page with same name as development buildId", - "i18n Support basePath production mode should navigate with locale false correctly", - "i18n Support basePath production mode should navigate with locale false correctly GSP", - "i18n Support basePath production mode should navigate with locale prop correctly", - "i18n Support basePath production mode should navigate with locale prop correctly GSP", - "i18n Support basePath production mode should not add duplicate locale key when navigating back to root path with hash", - "i18n Support basePath production mode should not add duplicate locale key when navigating back to root path with query params", - "i18n Support basePath production mode should not contain backslashes in pages-manifest", - "i18n Support basePath production mode should not error with similar named cookie to locale cookie", - "i18n Support basePath production mode should not have hydration mis-match from hash", - "i18n Support basePath production mode should not output GSP pages that returned notFound", - "i18n Support basePath production mode should not redirect to accept-lang preferred locale with locale cookie", - "i18n Support basePath production mode should not remove locale prefix for default locale", - "i18n Support basePath production mode should not strip locale prefix for default locale with locale domains", - "i18n Support basePath production mode should output correct prerender-manifest", - "i18n Support basePath production mode should preload all locales data correctly", - "i18n Support basePath production mode should prerender with the correct href for locale domain", - "i18n Support basePath production mode should provide defaultLocale correctly for locale domain", - "i18n Support basePath production mode should redirect external domain correctly", - "i18n Support basePath production mode should redirect to correct locale domain", - "i18n Support basePath production mode should redirect to locale domain correctly client-side", - "i18n Support basePath production mode should redirect to locale prefixed route for /", - "i18n Support basePath production mode should render 404 for blocking fallback page that returned 404", - "i18n Support basePath production mode should render 404 for blocking fallback page that returned 404 on client transition", - "i18n Support basePath production mode should render 404 for fallback page that returned 404", - "i18n Support basePath production mode should render 404 for fallback page that returned 404 on client transition", - "i18n Support basePath production mode should render the correct href for locale domain", - "i18n Support basePath production mode should render the correct href with locale domains but not on a locale domain", - "i18n Support basePath production mode should resolve auto-export dynamic route correctly", - "i18n Support basePath production mode should resolve href correctly when dynamic route matches locale prefixed", - "i18n Support basePath production mode should rewrite to API route correctly for do locale", - "i18n Support basePath production mode should rewrite to API route correctly for do-BE locale", - "i18n Support basePath production mode should rewrite to API route correctly for en locale", - "i18n Support basePath production mode should rewrite to API route correctly for en-US locale", - "i18n Support basePath production mode should rewrite to API route correctly for fr locale", - "i18n Support basePath production mode should rewrite to API route correctly for fr-BE locale", - "i18n Support basePath production mode should rewrite to API route correctly for go locale", - "i18n Support basePath production mode should rewrite to API route correctly for go-BE locale", - "i18n Support basePath production mode should rewrite to API route correctly for nl locale", - "i18n Support basePath production mode should rewrite to API route correctly for nl-BE locale", - "i18n Support basePath production mode should rewrite to API route correctly for nl-NL locale", - "i18n Support basePath production mode should serve public file on locale domain", - "i18n Support basePath production mode should transition on client properly for page that starts with locale", - "i18n Support basePath production mode should update asPath on the client correctly", - "i18n Support basePath production mode should use correct default locale for locale domains", - "i18n Support basePath production mode should use default locale for / without accept-language", - "i18n Support basePath production mode should use default locale when no locale is in href with locale false", - "i18n Support basePath production mode should visit API route directly correctly", - "i18n Support basePath production mode should visit dynamic API route directly correctly", - "i18n Support basePath with localeDetection disabled production mode should have localeDetection in routes-manifest", - "i18n Support basePath with localeDetection disabled production mode should not detect locale from accept-language", - "i18n Support basePath with localeDetection disabled production mode should set locale from detected path" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/i18n-support-catchall/test/index.test.ts": { "passed": [ "i18n Support Root Catch-all development mode should load the index route correctly CSR", @@ -19180,299 +19014,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/image-optimizer/test/sharp.test.ts": { - "passed": [ - "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with absolute next image url", - "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with encoded relative image url", - "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", - "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with relative next image url", - "with latest sharp dev support w/o next.config.js should downlevel avif format to jpeg for old Safari", - "with latest sharp dev support w/o next.config.js should downlevel webp format to jpeg for old Safari", - "with latest sharp dev support w/o next.config.js should emit blur svg when width is 8 in dev but not prod", - "with latest sharp dev support w/o next.config.js should emit blur svg when width is less than 8 in dev but not prod", - "with latest sharp dev support w/o next.config.js should error if the image file does not exist", - "with latest sharp dev support w/o next.config.js should error if the resource isn't a valid image", - "with latest sharp dev support w/o next.config.js should fail when domain is not defined in next.config.js", - "with latest sharp dev support w/o next.config.js should fail when internal url is not an image", - "with latest sharp dev support w/o next.config.js should fail when q is greater than 100", - "with latest sharp dev support w/o next.config.js should fail when q is less than 1", - "with latest sharp dev support w/o next.config.js should fail when q is missing", - "with latest sharp dev support w/o next.config.js should fail when q is not a number", - "with latest sharp dev support w/o next.config.js should fail when q is not an integer", - "with latest sharp dev support w/o next.config.js should fail when url has file protocol", - "with latest sharp dev support w/o next.config.js should fail when url has ftp protocol", - "with latest sharp dev support w/o next.config.js should fail when url is missing", - "with latest sharp dev support w/o next.config.js should fail when url is protocol relative", - "with latest sharp dev support w/o next.config.js should fail when url is too long", - "with latest sharp dev support w/o next.config.js should fail when w is 0", - "with latest sharp dev support w/o next.config.js should fail when w is less than 0", - "with latest sharp dev support w/o next.config.js should fail when w is missing", - "with latest sharp dev support w/o next.config.js should fail when w is not a number", - "with latest sharp dev support w/o next.config.js should fail when w is not an integer", - "with latest sharp dev support w/o next.config.js should fail when width is not in next.config.js", - "with latest sharp dev support w/o next.config.js should handle non-ascii characters in image url", - "with latest sharp dev support w/o next.config.js should maintain animated gif", - "with latest sharp dev support w/o next.config.js should maintain animated png", - "with latest sharp dev support w/o next.config.js should maintain animated png 2", - "with latest sharp dev support w/o next.config.js should maintain animated webp", - "with latest sharp dev support w/o next.config.js should maintain bmp", - "with latest sharp dev support w/o next.config.js should maintain heic", - "with latest sharp dev support w/o next.config.js should maintain icns", - "with latest sharp dev support w/o next.config.js should maintain ico format", - "with latest sharp dev support w/o next.config.js should maintain jp2", - "with latest sharp dev support w/o next.config.js should maintain jpg format for old Safari", - "with latest sharp dev support w/o next.config.js should maintain jxl", - "with latest sharp dev support w/o next.config.js should maintain png format for old Safari", - "with latest sharp dev support w/o next.config.js should not allow pdf format", - "with latest sharp dev support w/o next.config.js should not allow svg with application header", - "with latest sharp dev support w/o next.config.js should not allow svg with comma header", - "with latest sharp dev support w/o next.config.js should not allow svg with uppercase header", - "with latest sharp dev support w/o next.config.js should not allow svg with wrong header", - "with latest sharp dev support w/o next.config.js should not allow vector svg", - "with latest sharp dev support w/o next.config.js should not forward cookie header", - "with latest sharp dev support w/o next.config.js should not resize if requested width is larger than original source image", - "with latest sharp dev support w/o next.config.js should resize avif", - "with latest sharp dev support w/o next.config.js should resize gif (not animated)", - "with latest sharp dev support w/o next.config.js should resize relative url and old Chrome accept header as webp", - "with latest sharp dev support w/o next.config.js should resize relative url and png accept header", - "with latest sharp dev support w/o next.config.js should resize relative url and webp Firefox accept header", - "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as gif", - "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as png", - "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as tiff", - "with latest sharp dev support w/o next.config.js should resize tiff", - "with latest sharp dev support w/o next.config.js should return home page", - "with latest sharp dev support w/o next.config.js should set 304 status without body when etag matches if-none-match", - "with latest sharp dev support w/o next.config.js should set cache-control to immutable for static images", - "with latest sharp dev support w/o next.config.js should use cache and stale-while-revalidate when query is the same for internal image", - "with latest sharp dev support w/o next.config.js should use cached image file when parameters are the same for animated gif", - "with latest sharp dev support with next.config.js recursive url is not allowed should fail with encoded relative image url", - "with latest sharp dev support with next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", - "with latest sharp dev support with next.config.js recursive url is not allowed should fail with relative next image url", - "with latest sharp dev support with next.config.js recursive url is not allowed should pass with absolute next image url", - "with latest sharp dev support with next.config.js should automatically detect image type when content-type is octet-stream", - "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=100", - "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=50", - "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=75", - "with latest sharp dev support with next.config.js should downlevel avif format to jpeg for old Safari", - "with latest sharp dev support with next.config.js should downlevel webp format to jpeg for old Safari", - "with latest sharp dev support with next.config.js should emit blur svg when width is 8 in dev but not prod", - "with latest sharp dev support with next.config.js should emit blur svg when width is less than 8 in dev but not prod", - "with latest sharp dev support with next.config.js should error if the image file does not exist", - "with latest sharp dev support with next.config.js should error if the resource isn't a valid image", - "with latest sharp dev support with next.config.js should fail when domain is not defined in next.config.js", - "with latest sharp dev support with next.config.js should fail when internal url is not an image", - "with latest sharp dev support with next.config.js should fail when q is greater than 100", - "with latest sharp dev support with next.config.js should fail when q is less than 1", - "with latest sharp dev support with next.config.js should fail when q is missing", - "with latest sharp dev support with next.config.js should fail when q is not a number", - "with latest sharp dev support with next.config.js should fail when q is not an integer", - "with latest sharp dev support with next.config.js should fail when q is not in config", - "with latest sharp dev support with next.config.js should fail when url fails to load an image", - "with latest sharp dev support with next.config.js should fail when url has file protocol", - "with latest sharp dev support with next.config.js should fail when url has ftp protocol", - "with latest sharp dev support with next.config.js should fail when url is missing", - "with latest sharp dev support with next.config.js should fail when url is protocol relative", - "with latest sharp dev support with next.config.js should fail when url is too long", - "with latest sharp dev support with next.config.js should fail when w is 0", - "with latest sharp dev support with next.config.js should fail when w is less than 0", - "with latest sharp dev support with next.config.js should fail when w is missing", - "with latest sharp dev support with next.config.js should fail when w is not a number", - "with latest sharp dev support with next.config.js should fail when w is not an integer", - "with latest sharp dev support with next.config.js should fail when width is not in next.config.js", - "with latest sharp dev support with next.config.js should follow redirect from http to https when maximumRedirects > 0", - "with latest sharp dev support with next.config.js should follow redirect when dangerouslyAllowLocalIP enabled", - "with latest sharp dev support with next.config.js should handle concurrent requests", - "with latest sharp dev support with next.config.js should handle non-ascii characters in image url", - "with latest sharp dev support with next.config.js should maintain animated gif", - "with latest sharp dev support with next.config.js should maintain animated png", - "with latest sharp dev support with next.config.js should maintain animated png 2", - "with latest sharp dev support with next.config.js should maintain animated webp", - "with latest sharp dev support with next.config.js should maintain bmp", - "with latest sharp dev support with next.config.js should maintain heic", - "with latest sharp dev support with next.config.js should maintain icns", - "with latest sharp dev support with next.config.js should maintain ico format", - "with latest sharp dev support with next.config.js should maintain jp2", - "with latest sharp dev support with next.config.js should maintain jpg format for old Safari", - "with latest sharp dev support with next.config.js should maintain jxl", - "with latest sharp dev support with next.config.js should maintain png format for old Safari", - "with latest sharp dev support with next.config.js should normalize invalid status codes", - "with latest sharp dev support with next.config.js should not allow pdf format", - "with latest sharp dev support with next.config.js should not allow svg with application header", - "with latest sharp dev support with next.config.js should not allow svg with comma header", - "with latest sharp dev support with next.config.js should not allow svg with uppercase header", - "with latest sharp dev support with next.config.js should not allow svg with wrong header", - "with latest sharp dev support with next.config.js should not allow vector svg", - "with latest sharp dev support with next.config.js should not forward cookie header", - "with latest sharp dev support with next.config.js should not resize if requested width is larger than original source image", - "with latest sharp dev support with next.config.js should resize absolute url from localhost", - "with latest sharp dev support with next.config.js should resize avif", - "with latest sharp dev support with next.config.js should resize avif and maintain format", - "with latest sharp dev support with next.config.js should resize gif (not animated)", - "with latest sharp dev support with next.config.js should resize relative url and new Chrome accept header as avif", - "with latest sharp dev support with next.config.js should resize relative url and old Chrome accept header as webp", - "with latest sharp dev support with next.config.js should resize relative url and png accept header", - "with latest sharp dev support with next.config.js should resize relative url and webp Firefox accept header", - "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as gif", - "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as png", - "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as tiff", - "with latest sharp dev support with next.config.js should resize tiff", - "with latest sharp dev support with next.config.js should return 508 after redirecting too many times", - "with latest sharp dev support with next.config.js should return home page", - "with latest sharp dev support with next.config.js should set 304 status without body when etag matches if-none-match", - "with latest sharp dev support with next.config.js should set cache-control to immutable for static images", - "with latest sharp dev support with next.config.js should timeout for upstream image exceeding 7 seconds", - "with latest sharp dev support with next.config.js should use cache and stale-while-revalidate when query is the same for external image", - "with latest sharp dev support with next.config.js should use cache and stale-while-revalidate when query is the same for internal image", - "with latest sharp dev support with next.config.js should use cached image file when parameters are the same for animated gif" - ], - "failed": [], - "pending": [ - "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with absolute next image url", - "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with encoded relative image url", - "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", - "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with relative next image url", - "with latest sharp Production Mode Server support w/o next.config.js should downlevel avif format to jpeg for old Safari", - "with latest sharp Production Mode Server support w/o next.config.js should downlevel webp format to jpeg for old Safari", - "with latest sharp Production Mode Server support w/o next.config.js should emit blur svg when width is 8 in dev but not prod", - "with latest sharp Production Mode Server support w/o next.config.js should emit blur svg when width is less than 8 in dev but not prod", - "with latest sharp Production Mode Server support w/o next.config.js should error if the image file does not exist", - "with latest sharp Production Mode Server support w/o next.config.js should error if the resource isn't a valid image", - "with latest sharp Production Mode Server support w/o next.config.js should fail when domain is not defined in next.config.js", - "with latest sharp Production Mode Server support w/o next.config.js should fail when internal url is not an image", - "with latest sharp Production Mode Server support w/o next.config.js should fail when q is greater than 100", - "with latest sharp Production Mode Server support w/o next.config.js should fail when q is less than 1", - "with latest sharp Production Mode Server support w/o next.config.js should fail when q is missing", - "with latest sharp Production Mode Server support w/o next.config.js should fail when q is not a number", - "with latest sharp Production Mode Server support w/o next.config.js should fail when q is not an integer", - "with latest sharp Production Mode Server support w/o next.config.js should fail when url has file protocol", - "with latest sharp Production Mode Server support w/o next.config.js should fail when url has ftp protocol", - "with latest sharp Production Mode Server support w/o next.config.js should fail when url is missing", - "with latest sharp Production Mode Server support w/o next.config.js should fail when url is protocol relative", - "with latest sharp Production Mode Server support w/o next.config.js should fail when url is too long", - "with latest sharp Production Mode Server support w/o next.config.js should fail when w is 0", - "with latest sharp Production Mode Server support w/o next.config.js should fail when w is less than 0", - "with latest sharp Production Mode Server support w/o next.config.js should fail when w is missing", - "with latest sharp Production Mode Server support w/o next.config.js should fail when w is not a number", - "with latest sharp Production Mode Server support w/o next.config.js should fail when w is not an integer", - "with latest sharp Production Mode Server support w/o next.config.js should fail when width is not in next.config.js", - "with latest sharp Production Mode Server support w/o next.config.js should handle non-ascii characters in image url", - "with latest sharp Production Mode Server support w/o next.config.js should maintain animated gif", - "with latest sharp Production Mode Server support w/o next.config.js should maintain animated png", - "with latest sharp Production Mode Server support w/o next.config.js should maintain animated png 2", - "with latest sharp Production Mode Server support w/o next.config.js should maintain animated webp", - "with latest sharp Production Mode Server support w/o next.config.js should maintain bmp", - "with latest sharp Production Mode Server support w/o next.config.js should maintain heic", - "with latest sharp Production Mode Server support w/o next.config.js should maintain icns", - "with latest sharp Production Mode Server support w/o next.config.js should maintain ico format", - "with latest sharp Production Mode Server support w/o next.config.js should maintain jp2", - "with latest sharp Production Mode Server support w/o next.config.js should maintain jpg format for old Safari", - "with latest sharp Production Mode Server support w/o next.config.js should maintain jxl", - "with latest sharp Production Mode Server support w/o next.config.js should maintain png format for old Safari", - "with latest sharp Production Mode Server support w/o next.config.js should not allow pdf format", - "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with application header", - "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with comma header", - "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with uppercase header", - "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with wrong header", - "with latest sharp Production Mode Server support w/o next.config.js should not allow vector svg", - "with latest sharp Production Mode Server support w/o next.config.js should not forward cookie header", - "with latest sharp Production Mode Server support w/o next.config.js should not resize if requested width is larger than original source image", - "with latest sharp Production Mode Server support w/o next.config.js should resize avif", - "with latest sharp Production Mode Server support w/o next.config.js should resize gif (not animated)", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and old Chrome accept header as webp", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and png accept header", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and webp Firefox accept header", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as gif", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as png", - "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as tiff", - "with latest sharp Production Mode Server support w/o next.config.js should resize tiff", - "with latest sharp Production Mode Server support w/o next.config.js should return home page", - "with latest sharp Production Mode Server support w/o next.config.js should set 304 status without body when etag matches if-none-match", - "with latest sharp Production Mode Server support w/o next.config.js should set cache-control to immutable for static images", - "with latest sharp Production Mode Server support w/o next.config.js should use cache and stale-while-revalidate when query is the same for internal image", - "with latest sharp Production Mode Server support w/o next.config.js should use cached image file when parameters are the same for animated gif", - "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with encoded relative image url", - "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", - "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with relative next image url", - "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should pass with absolute next image url", - "with latest sharp Production Mode Server support with next.config.js should automatically detect image type when content-type is octet-stream", - "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=100", - "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=50", - "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=75", - "with latest sharp Production Mode Server support with next.config.js should downlevel avif format to jpeg for old Safari", - "with latest sharp Production Mode Server support with next.config.js should downlevel webp format to jpeg for old Safari", - "with latest sharp Production Mode Server support with next.config.js should emit blur svg when width is 8 in dev but not prod", - "with latest sharp Production Mode Server support with next.config.js should emit blur svg when width is less than 8 in dev but not prod", - "with latest sharp Production Mode Server support with next.config.js should error if the image file does not exist", - "with latest sharp Production Mode Server support with next.config.js should error if the resource isn't a valid image", - "with latest sharp Production Mode Server support with next.config.js should fail when domain is not defined in next.config.js", - "with latest sharp Production Mode Server support with next.config.js should fail when internal url is not an image", - "with latest sharp Production Mode Server support with next.config.js should fail when q is greater than 100", - "with latest sharp Production Mode Server support with next.config.js should fail when q is less than 1", - "with latest sharp Production Mode Server support with next.config.js should fail when q is missing", - "with latest sharp Production Mode Server support with next.config.js should fail when q is not a number", - "with latest sharp Production Mode Server support with next.config.js should fail when q is not an integer", - "with latest sharp Production Mode Server support with next.config.js should fail when q is not in config", - "with latest sharp Production Mode Server support with next.config.js should fail when url fails to load an image", - "with latest sharp Production Mode Server support with next.config.js should fail when url has file protocol", - "with latest sharp Production Mode Server support with next.config.js should fail when url has ftp protocol", - "with latest sharp Production Mode Server support with next.config.js should fail when url is missing", - "with latest sharp Production Mode Server support with next.config.js should fail when url is protocol relative", - "with latest sharp Production Mode Server support with next.config.js should fail when url is too long", - "with latest sharp Production Mode Server support with next.config.js should fail when w is 0", - "with latest sharp Production Mode Server support with next.config.js should fail when w is less than 0", - "with latest sharp Production Mode Server support with next.config.js should fail when w is missing", - "with latest sharp Production Mode Server support with next.config.js should fail when w is not a number", - "with latest sharp Production Mode Server support with next.config.js should fail when w is not an integer", - "with latest sharp Production Mode Server support with next.config.js should fail when width is not in next.config.js", - "with latest sharp Production Mode Server support with next.config.js should follow redirect from http to https when maximumRedirects > 0", - "with latest sharp Production Mode Server support with next.config.js should follow redirect when dangerouslyAllowLocalIP enabled", - "with latest sharp Production Mode Server support with next.config.js should handle concurrent requests", - "with latest sharp Production Mode Server support with next.config.js should handle non-ascii characters in image url", - "with latest sharp Production Mode Server support with next.config.js should maintain animated gif", - "with latest sharp Production Mode Server support with next.config.js should maintain animated png", - "with latest sharp Production Mode Server support with next.config.js should maintain animated png 2", - "with latest sharp Production Mode Server support with next.config.js should maintain animated webp", - "with latest sharp Production Mode Server support with next.config.js should maintain bmp", - "with latest sharp Production Mode Server support with next.config.js should maintain heic", - "with latest sharp Production Mode Server support with next.config.js should maintain icns", - "with latest sharp Production Mode Server support with next.config.js should maintain ico format", - "with latest sharp Production Mode Server support with next.config.js should maintain jp2", - "with latest sharp Production Mode Server support with next.config.js should maintain jpg format for old Safari", - "with latest sharp Production Mode Server support with next.config.js should maintain jxl", - "with latest sharp Production Mode Server support with next.config.js should maintain png format for old Safari", - "with latest sharp Production Mode Server support with next.config.js should normalize invalid status codes", - "with latest sharp Production Mode Server support with next.config.js should not allow pdf format", - "with latest sharp Production Mode Server support with next.config.js should not allow svg with application header", - "with latest sharp Production Mode Server support with next.config.js should not allow svg with comma header", - "with latest sharp Production Mode Server support with next.config.js should not allow svg with uppercase header", - "with latest sharp Production Mode Server support with next.config.js should not allow svg with wrong header", - "with latest sharp Production Mode Server support with next.config.js should not allow vector svg", - "with latest sharp Production Mode Server support with next.config.js should not forward cookie header", - "with latest sharp Production Mode Server support with next.config.js should not resize if requested width is larger than original source image", - "with latest sharp Production Mode Server support with next.config.js should resize absolute url from localhost", - "with latest sharp Production Mode Server support with next.config.js should resize avif", - "with latest sharp Production Mode Server support with next.config.js should resize avif and maintain format", - "with latest sharp Production Mode Server support with next.config.js should resize gif (not animated)", - "with latest sharp Production Mode Server support with next.config.js should resize relative url and new Chrome accept header as avif", - "with latest sharp Production Mode Server support with next.config.js should resize relative url and old Chrome accept header as webp", - "with latest sharp Production Mode Server support with next.config.js should resize relative url and png accept header", - "with latest sharp Production Mode Server support with next.config.js should resize relative url and webp Firefox accept header", - "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as gif", - "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as png", - "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as tiff", - "with latest sharp Production Mode Server support with next.config.js should resize tiff", - "with latest sharp Production Mode Server support with next.config.js should return 508 after redirecting too many times", - "with latest sharp Production Mode Server support with next.config.js should return home page", - "with latest sharp Production Mode Server support with next.config.js should set 304 status without body when etag matches if-none-match", - "with latest sharp Production Mode Server support with next.config.js should set cache-control to immutable for static images", - "with latest sharp Production Mode Server support with next.config.js should timeout for upstream image exceeding 7 seconds", - "with latest sharp Production Mode Server support with next.config.js should use cache and stale-while-revalidate when query is the same for external image", - "with latest sharp Production Mode Server support with next.config.js should use cache and stale-while-revalidate when query is the same for internal image", - "with latest sharp Production Mode Server support with next.config.js should use cached image file when parameters are the same for animated gif" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/import-assertion/test/index.test.ts": { "passed": ["import-assertion dev should handle json assertions"], "failed": [], @@ -19700,16 +19241,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/jsconfig-paths-wildcard/test/index.test.ts": { - "passed": [ - "jsconfig paths wildcard default behavior should resolve a wildcard alias", - "jsconfig paths without baseurl wildcard default behavior should resolve a wildcard alias" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/jsconfig-paths/test/index.test.ts": { "passed": [ "jsconfig paths default behavior should alias components", @@ -19918,18 +19449,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/mixed-ssg-serverprops-error/test/index.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "Mixed getStaticProps and getServerSideProps error production mode should error when exporting both getStaticPaths and getServerSideProps", - "Mixed getStaticProps and getServerSideProps error production mode should error when exporting both getStaticProps and getServerSideProps", - "Mixed getStaticProps and getServerSideProps error production mode should error when exporting getStaticPaths on a non-dynamic page", - "Mixed getStaticProps and getServerSideProps error production mode should error with getStaticProps but no default export" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/module-ids/test/index.test.ts": { "passed": [], "failed": [], @@ -20269,15 +19788,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/next-image-legacy/react-virtualized/test/index.test.ts": { - "passed": [], - "failed": [], - "pending": [ - "react-virtualized wrapping next/legacy/image production mode should not cancel requests for images" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/next-image-legacy/trailing-slash/test/index.test.ts": { "passed": [ "Image Component Trailing Slash Tests development mode should include trailing slash when trailingSlash is set on config file during next dev" @@ -20761,15 +20271,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/next-image-new/export-config/test/index.test.ts": { - "passed": [ - "next/image with output export config development mode should error" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/next-image-new/image-from-node-modules/test/index.test.ts": { "passed": [ "Image Component from node_modules development mode should apply image config for node_modules", @@ -20967,23 +20468,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/node-fetch-keep-alive/test/index.test.ts": { - "passed": [ - "node-fetch-keep-alive dev should send keep-alive for getServerSideProps", - "node-fetch-keep-alive dev should send keep-alive for getStaticPaths", - "node-fetch-keep-alive dev should send keep-alive for getStaticProps", - "node-fetch-keep-alive dev should send keep-alive for json API" - ], - "failed": [], - "pending": [ - "node-fetch-keep-alive production mode should send keep-alive for getServerSideProps", - "node-fetch-keep-alive production mode should send keep-alive for getStaticPaths", - "node-fetch-keep-alive production mode should send keep-alive for getStaticProps", - "node-fetch-keep-alive production mode should send keep-alive for json API" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/non-next-dist-exclude/test/index.test.ts": { "passed": [], "failed": [], @@ -21177,27 +20661,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/prerender-fallback-encoding/test/index.test.ts": { - "passed": [ - "Fallback path encoding development mode should navigate client-side correctly with interpolating", - "Fallback path encoding development mode should navigate client-side correctly with string href", - "Fallback path encoding development mode should render correctly in the browser for prerender paths", - "Fallback path encoding development mode should respond with the prerendered data correctly", - "Fallback path encoding development mode should respond with the prerendered pages correctly" - ], - "failed": [], - "pending": [ - "Fallback path encoding production mode should handle non-prerendered paths correctly", - "Fallback path encoding production mode should navigate client-side correctly with interpolating", - "Fallback path encoding production mode should navigate client-side correctly with string href", - "Fallback path encoding production mode should output paths correctly", - "Fallback path encoding production mode should render correctly in the browser for prerender paths", - "Fallback path encoding production mode should respond with the prerendered data correctly", - "Fallback path encoding production mode should respond with the prerendered pages correctly" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/prerender-invalid-catchall-params/test/index.test.ts": { "passed": [], "failed": [], @@ -21436,17 +20899,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/read-only-source-hmr/test/index.test.ts": { - "passed": [ - "Read-only source HMR should detect a new page", - "Read-only source HMR should detect changes to a page", - "Read-only source HMR should handle page deletion and subsequent recreation" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/relay-graphql-swc-multi-project/test/index.test.ts": { "passed": [ "Relay Compiler Transform - Multi Project Config development mode project-a should resolve index page correctly", @@ -21691,47 +21143,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/route-indexes/test/index.test.ts": { - "passed": [ - "Route indexes handling development mode should handle / correctly", - "Route indexes handling development mode should handle /api/sub correctly", - "Route indexes handling development mode should handle /api/sub/another correctly", - "Route indexes handling development mode should handle /api/sub/another/index correctly", - "Route indexes handling development mode should handle /api/sub/index correctly", - "Route indexes handling development mode should handle /api/sub/index/index correctly", - "Route indexes handling development mode should handle /index correctly", - "Route indexes handling development mode should handle /index/index correctly", - "Route indexes handling development mode should handle /nested-index correctly", - "Route indexes handling development mode should handle /nested-index/index correctly", - "Route indexes handling development mode should handle /nested-index/index/index correctly", - "Route indexes handling development mode should handle /sub correctly", - "Route indexes handling development mode should handle /sub/another correctly", - "Route indexes handling development mode should handle /sub/another/index correctly", - "Route indexes handling development mode should handle /sub/index correctly", - "Route indexes handling development mode should handle /sub/index/index correctly" - ], - "failed": [], - "pending": [ - "Route indexes handling production mode should handle / correctly", - "Route indexes handling production mode should handle /api/sub correctly", - "Route indexes handling production mode should handle /api/sub/another correctly", - "Route indexes handling production mode should handle /api/sub/another/index correctly", - "Route indexes handling production mode should handle /api/sub/index correctly", - "Route indexes handling production mode should handle /api/sub/index/index correctly", - "Route indexes handling production mode should handle /index correctly", - "Route indexes handling production mode should handle /index/index correctly", - "Route indexes handling production mode should handle /nested-index correctly", - "Route indexes handling production mode should handle /nested-index/index correctly", - "Route indexes handling production mode should handle /nested-index/index/index correctly", - "Route indexes handling production mode should handle /sub correctly", - "Route indexes handling production mode should handle /sub/another correctly", - "Route indexes handling production mode should handle /sub/another/index correctly", - "Route indexes handling production mode should handle /sub/index correctly", - "Route indexes handling production mode should handle /sub/index/index correctly" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/route-load-cancel-css/test/index.test.ts": { "passed": [], "failed": [], @@ -21963,17 +21374,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/ssg-data-404/test/index.test.ts": { - "passed": [ - "SSG data 404 development mode should hard navigate when a new deployment occurs" - ], - "failed": [], - "pending": [ - "SSG data 404 production mode should hard navigate when a new deployment occurs" - ], - "flakey": [], - "runtimeError": false - }, "test/integration/ssg-dynamic-routes-404-page/test/index.test.ts": { "passed": [ "Custom 404 Page for static site generation with dynamic routes development mode should respond to a not existing page with 404" @@ -22199,17 +21599,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/typescript-app-type-declarations/test/index.test.ts": { - "passed": [ - "TypeScript App Type Declarations should not touch an existing correct next-env.d.ts", - "TypeScript App Type Declarations should overwrite next-env.d.ts if an incorrect one exists", - "TypeScript App Type Declarations should write a new next-env.d.ts if none exist" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/typescript-baseurl/test/index.test.ts": { "passed": ["TypeScript Features default behavior should render the page"], "failed": [], @@ -22384,15 +21773,6 @@ "flakey": [], "runtimeError": false }, - "test/integration/with-electron/test/index.test.ts": { - "passed": [ - "Should skip testing electron without process.env.TEST_ELECTRON set" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/integration/worker-webpack5/test/index.test.ts": { "passed": [ "Web Workers with webpack 5 development mode should pass on both client and worker" diff --git a/turbopack/crates/turbopack-browser/src/chunking_context.rs b/turbopack/crates/turbopack-browser/src/chunking_context.rs index 0ca2d454fc918c..28a67e1cd55fd8 100644 --- a/turbopack/crates/turbopack-browser/src/chunking_context.rs +++ b/turbopack/crates/turbopack-browser/src/chunking_context.rs @@ -11,9 +11,10 @@ use turbo_tasks_hash::{DeterministicHash, hash_xxh3_hash64}; use turbopack_core::{ asset::{Asset, AssetContent}, chunk::{ - Chunk, ChunkGroupResult, ChunkItem, ChunkType, ChunkableModule, ChunkingConfig, - ChunkingConfigs, ChunkingContext, EntryChunkGroupResult, EvaluatableAsset, + AssetSuffix, Chunk, ChunkGroupResult, ChunkItem, ChunkType, ChunkableModule, + ChunkingConfig, ChunkingConfigs, ChunkingContext, EntryChunkGroupResult, EvaluatableAsset, EvaluatableAssets, MinifyType, SourceMapSourceType, SourceMapsType, UnusedReferences, + UrlBehavior, availability_info::AvailabilityInfo, chunk_group::{MakeChunkGroupResult, make_chunk_group}, chunk_id_strategy::ModuleIdStrategy, @@ -34,7 +35,7 @@ use turbopack_ecmascript::{ chunk::EcmascriptChunk, manifest::{chunk_asset::ManifestAsyncModule, loader_item::ManifestLoaderChunkItem}, }; -use turbopack_ecmascript_runtime::{ChunkSuffix, RuntimeType}; +use turbopack_ecmascript_runtime::RuntimeType; use crate::ecmascript::{ chunk::EcmascriptBrowserChunk, @@ -132,8 +133,8 @@ impl BrowserChunkingContextBuilder { self } - pub fn chunk_suffix(mut self, chunk_suffix: ResolvedVc) -> Self { - self.chunking_context.chunk_suffix = Some(chunk_suffix); + pub fn asset_suffix(mut self, asset_suffix: ResolvedVc) -> Self { + self.chunking_context.asset_suffix = Some(asset_suffix); self } @@ -206,6 +207,16 @@ impl BrowserChunkingContextBuilder { self } + pub fn url_behavior_override(mut self, tag: RcStr, behavior: UrlBehavior) -> Self { + self.chunking_context.url_behaviors.insert(tag, behavior); + self + } + + pub fn default_url_behavior(mut self, behavior: UrlBehavior) -> Self { + self.chunking_context.default_url_behavior = Some(behavior); + self + } + pub fn chunking_config(mut self, ty: ResolvedVc, chunking_config: ChunkingConfig) -> Self where T: Upcast>, @@ -261,7 +272,7 @@ pub struct BrowserChunkingContext { chunk_base_path: Option, /// Suffix that will be appended to all chunk URLs when loading them. /// This path will not appear in chunk paths or chunk data. - chunk_suffix: Option>, + asset_suffix: Option>, /// URL prefix that will be prepended to all static asset URLs when loading /// them. asset_base_path: Option, @@ -269,6 +280,11 @@ pub struct BrowserChunkingContext { /// them. #[bincode(with = "turbo_bincode::indexmap")] asset_base_paths: FxIndexMap, + /// URL behavior overrides for different tags. + #[bincode(with = "turbo_bincode::indexmap")] + url_behaviors: FxIndexMap, + /// Default URL behavior when no tag-specific override is found. + default_url_behavior: Option, /// Enable HMR for this chunking enable_hot_module_replacement: bool, /// Enable tracing for this chunking @@ -331,9 +347,11 @@ impl BrowserChunkingContext { asset_root_path, asset_root_paths: Default::default(), chunk_base_path: None, - chunk_suffix: None, + asset_suffix: None, asset_base_path: None, asset_base_paths: Default::default(), + url_behaviors: Default::default(), + default_url_behavior: None, enable_hot_module_replacement: false, enable_tracing: false, enable_nested_async_availability: false, @@ -435,11 +453,11 @@ impl BrowserChunkingContext { /// Returns the asset suffix path. #[turbo_tasks::function] - pub fn chunk_suffix(&self) -> Vc { - if let Some(chunk_suffix) = self.chunk_suffix { - *chunk_suffix + pub fn asset_suffix(&self) -> Vc { + if let Some(asset_suffix) = self.asset_suffix { + *asset_suffix } else { - ChunkSuffix::None.cell() + AssetSuffix::None.cell() } } @@ -626,6 +644,18 @@ impl ChunkingContext for BrowserChunkingContext { Ok(asset_root_path.join(&asset_path)?.cell()) } + #[turbo_tasks::function] + fn url_behavior(&self, tag: Option) -> Vc { + tag.as_ref() + .and_then(|tag| self.url_behaviors.get(tag)) + .cloned() + .or_else(|| self.default_url_behavior.clone()) + .unwrap_or(UrlBehavior { + suffix: AssetSuffix::Inferred, + }) + .cell() + } + #[turbo_tasks::function] fn is_hot_module_replacement_enabled(&self) -> Vc { Vc::cell(self.enable_hot_module_replacement) diff --git a/turbopack/crates/turbopack-browser/src/ecmascript/evaluate/chunk.rs b/turbopack/crates/turbopack-browser/src/ecmascript/evaluate/chunk.rs index c76f9a60a5bcd5..d484cf2870e33d 100644 --- a/turbopack/crates/turbopack-browser/src/ecmascript/evaluate/chunk.rs +++ b/turbopack/crates/turbopack-browser/src/ecmascript/evaluate/chunk.rs @@ -173,7 +173,7 @@ impl EcmascriptBrowserEvaluateChunk { let runtime_code = turbopack_ecmascript_runtime::get_browser_runtime_code( environment, this.chunking_context.chunk_base_path(), - this.chunking_context.chunk_suffix(), + this.chunking_context.asset_suffix(), runtime_type, output_root_to_root_path, source_maps, diff --git a/turbopack/crates/turbopack-browser/src/lib.rs b/turbopack/crates/turbopack-browser/src/lib.rs index 8e95c3965f4d65..0604839560af1f 100644 --- a/turbopack/crates/turbopack-browser/src/lib.rs +++ b/turbopack/crates/turbopack-browser/src/lib.rs @@ -10,4 +10,3 @@ pub mod react_refresh; pub use chunking_context::{ BrowserChunkingContext, BrowserChunkingContextBuilder, ContentHashing, CurrentChunkMethod, }; -pub use turbopack_ecmascript_runtime::ChunkSuffix; diff --git a/turbopack/crates/turbopack-core/src/chunk/chunking_context.rs b/turbopack/crates/turbopack-core/src/chunk/chunking_context.rs index 1849276b252a04..9c72453978a009 100644 --- a/turbopack/crates/turbopack-core/src/chunk/chunking_context.rs +++ b/turbopack/crates/turbopack-core/src/chunk/chunking_context.rs @@ -78,6 +78,29 @@ pub enum SourceMapsType { None, } +/// Suffix to append to asset URLs. +#[turbo_tasks::value(shared)] +#[derive(Debug, Clone)] +pub enum AssetSuffix { + /// No suffix. + None, + /// A constant suffix to append to URLs. + Constant(RcStr), + /// Infer the suffix at runtime from the script src attribute. + /// Only valid in browser runtime for chunk loading, not for static asset URL generation. + Inferred, + /// Read the suffix from a global variable at runtime. + /// Used for server-side rendering where the suffix is set via `globalThis.{global_name}`. + FromGlobal(RcStr), +} + +/// URL behavior configuration for static assets. +#[turbo_tasks::value(shared)] +#[derive(Debug, Clone)] +pub struct UrlBehavior { + pub suffix: AssetSuffix, +} + #[derive( Debug, TaskInput, @@ -330,6 +353,16 @@ pub trait ChunkingContext { tag: Option, ) -> Vc; + /// Returns the URL behavior for a given tag. + /// This determines how asset URLs are suffixed (e.g., for deployment IDs). + #[turbo_tasks::function] + fn url_behavior(self: Vc, _tag: Option) -> Vc { + UrlBehavior { + suffix: AssetSuffix::Inferred, + } + .cell() + } + #[turbo_tasks::function] fn is_hot_module_replacement_enabled(self: Vc) -> Vc { Vc::cell(false) diff --git a/turbopack/crates/turbopack-core/src/chunk/mod.rs b/turbopack/crates/turbopack-core/src/chunk/mod.rs index 473f1c57cc6774..28d533d35058fd 100644 --- a/turbopack/crates/turbopack-core/src/chunk/mod.rs +++ b/turbopack/crates/turbopack-core/src/chunk/mod.rs @@ -27,9 +27,9 @@ pub use crate::chunk::{ ChunkItemOrBatchWithAsyncModuleInfo, batch_info, }, chunking_context::{ - ChunkGroupResult, ChunkGroupType, ChunkingConfig, ChunkingConfigs, ChunkingContext, - ChunkingContextExt, EntryChunkGroupResult, MangleType, MinifyType, SourceMapSourceType, - SourceMapsType, UnusedReferences, + AssetSuffix, ChunkGroupResult, ChunkGroupType, ChunkingConfig, ChunkingConfigs, + ChunkingContext, ChunkingContextExt, EntryChunkGroupResult, MangleType, MinifyType, + SourceMapSourceType, SourceMapsType, UnusedReferences, UrlBehavior, }, data::{ChunkData, ChunkDataOption, ChunksData}, evaluate::{EvaluatableAsset, EvaluatableAssetExt, EvaluatableAssets}, diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts index 84d1bfafd9b5e3..0a053ded8320fa 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts @@ -12,7 +12,7 @@ /// // Used in WebWorkers to tell the runtime about the chunk suffix -declare var TURBOPACK_CHUNK_SUFFIX: string +declare var TURBOPACK_ASSET_SUFFIX: string // Used in WebWorkers to tell the runtime about the current chunk url since it // can't be detected via `document.currentScript`. Note it's stored in reversed // order to use `push` and `pop` @@ -20,7 +20,7 @@ declare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined // Injected by rust code declare var CHUNK_BASE_PATH: string -declare var CHUNK_SUFFIX: string +declare var ASSET_SUFFIX: string interface TurbopackBrowserBaseContext extends TurbopackBaseContext { R: ResolvePathFromModule @@ -313,6 +313,18 @@ function resolveAbsolutePath(modulePath?: string): string { } browserContextPrototype.P = resolveAbsolutePath +/** + * Exports a URL with the static suffix appended. + */ +function exportUrl( + this: TurbopackBrowserBaseContext, + url: string, + id: ModuleId | undefined +) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id) +} +browserContextPrototype.q = exportUrl + /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -330,7 +342,7 @@ function getWorkerURL( const url = new URL(getChunkRelativeUrl(entrypoint), location.origin) const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: (globalThis as any).NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)), } @@ -361,7 +373,7 @@ function getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl { return `${CHUNK_BASE_PATH}${chunkPath .split('/') .map((p) => encodeURIComponent(p)) - .join('/')}${CHUNK_SUFFIX}` as ChunkUrl + .join('/')}${ASSET_SUFFIX}` as ChunkUrl } /** diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/worker-entrypoint.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/worker-entrypoint.ts index c7651f7f753e8c..5c8435fab3a5ea 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/worker-entrypoint.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/worker-entrypoint.ts @@ -3,7 +3,7 @@ */ interface WorkerBootstrapConfig { - // TURBOPACK_CHUNK_SUFFIX + // TURBOPACK_ASSET_SUFFIX S?: string // NEXT_DEPLOYMENT_ID N?: string @@ -42,7 +42,7 @@ interface WorkerBootstrapConfig { // types and ensure that the next chunk URLs are same-origin. const config: WorkerBootstrapConfig = JSON.parse(paramsString) - const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : '' + const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : '' const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : '' // In a normal browser context, the runtime can figure out which chunk is // currently executing via `document.currentScript`. Workers don't have that @@ -55,7 +55,7 @@ interface WorkerBootstrapConfig { const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : [] Object.assign(self, { - TURBOPACK_CHUNK_SUFFIX, + TURBOPACK_ASSET_SUFFIX, TURBOPACK_NEXT_CHUNK_URLS, NEXT_DEPLOYMENT_ID, }) diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/dev-backend-dom.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/dev-backend-dom.ts index e5daa8a6663f30..263c4450158a30 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/dev-backend-dom.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/dev-backend-dom.ts @@ -111,7 +111,7 @@ let DEV_BACKEND: DevRuntimeBackend function _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory { code += `\n\n//# sourceURL=${encodeURI( - location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX + location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX )}` if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa( diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/runtime-backend-dom.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/runtime-backend-dom.ts index d56b876b42ffb7..e6e650f0082028 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/runtime-backend-dom.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/dom/runtime-backend-dom.ts @@ -9,10 +9,10 @@ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers return ( - (self.TURBOPACK_CHUNK_SUFFIX ?? + (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript ?.getAttribute?.('src') ?.replace(/^(.*(?=\?)|^.*$)/, '')) || diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/nodejs/runtime.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/nodejs/runtime.ts index 119b8a9ed92fbd..3148f01810b7f4 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/nodejs/runtime.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/nodejs/runtime.ts @@ -27,6 +27,7 @@ interface TurbopackNodeBuildContext extends TurbopackBaseContext { R: ResolvePathFromModule x: ExternalRequire y: ExternalImport + q: ExportUrl } const nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext @@ -63,6 +64,18 @@ function resolvePathFromModule( } nodeContextPrototype.R = resolvePathFromModule +/** + * Exports a URL value. No suffix is added in Node.js runtime. + */ +function exportUrl( + this: TurbopackBaseContext, + urlValue: string, + id: ModuleId | undefined +) { + exportValue.call(this, urlValue, id) +} +nodeContextPrototype.q = exportUrl + function loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void { if (typeof chunkData === 'string') { loadRuntimeChunkPath(sourcePath, chunkData) diff --git a/turbopack/crates/turbopack-ecmascript-runtime/js/src/shared/runtime-types.d.ts b/turbopack/crates/turbopack-ecmascript-runtime/js/src/shared/runtime-types.d.ts index 375136faf31d8f..6ffe4c89d80887 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/js/src/shared/runtime-types.d.ts +++ b/turbopack/crates/turbopack-ecmascript-runtime/js/src/shared/runtime-types.d.ts @@ -46,6 +46,7 @@ type EsmExport = ( id: ModuleId | undefined ) => void type ExportValue = (value: any, id: ModuleId | undefined) => void +type ExportUrl = (url: string, id: ModuleId | undefined) => void type ExportNamespace = (namespace: any, id: ModuleId | undefined) => void type DynamicExport = ( object: Record, @@ -127,6 +128,7 @@ interface TurbopackBaseContext { s: EsmExport j: DynamicExport v: ExportValue + q: ExportUrl n: ExportNamespace m: Module c: ModuleCache diff --git a/turbopack/crates/turbopack-ecmascript-runtime/src/browser_runtime.rs b/turbopack/crates/turbopack-ecmascript-runtime/src/browser_runtime.rs index 4f5d357b16f418..5fba0b79c08afc 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/src/browser_runtime.rs +++ b/turbopack/crates/turbopack-ecmascript-runtime/src/browser_runtime.rs @@ -5,22 +5,21 @@ use indoc::writedoc; use turbo_rcstr::{RcStr, rcstr}; use turbo_tasks::{ResolvedVc, Vc}; use turbopack_core::{ + chunk::AssetSuffix, code_builder::{Code, CodeBuilder}, context::AssetContext, environment::{ChunkLoading, Environment}, }; use turbopack_ecmascript::utils::StringifyJs; -use crate::{ - ChunkSuffix, RuntimeType, asset_context::get_runtime_asset_context, embed_js::embed_static_code, -}; +use crate::{RuntimeType, asset_context::get_runtime_asset_context, embed_js::embed_static_code}; /// Returns the code for the ECMAScript runtime. #[turbo_tasks::function] pub async fn get_browser_runtime_code( environment: ResolvedVc, chunk_base_path: Vc>, - chunk_suffix: Vc, + asset_suffix: Vc, runtime_type: RuntimeType, output_root_to_root_path: RcStr, generate_source_map: bool, @@ -82,7 +81,7 @@ pub async fn get_browser_runtime_code( let relative_root_path = output_root_to_root_path; let chunk_base_path = chunk_base_path.await?; let chunk_base_path = chunk_base_path.as_ref().map_or_else(|| "", |f| f.as_str()); - let chunk_suffix = chunk_suffix.await?; + let asset_suffix = asset_suffix.await?; writedoc!( code, @@ -101,35 +100,44 @@ pub async fn get_browser_runtime_code( StringifyJs(chunk_base_path), )?; - match &*chunk_suffix { - ChunkSuffix::None => { + match &*asset_suffix { + AssetSuffix::None => { writedoc!( code, r#" - const CHUNK_SUFFIX = ""; + const ASSET_SUFFIX = ""; "# )?; } - ChunkSuffix::Constant(suffix) => { + AssetSuffix::Constant(suffix) => { writedoc!( code, r#" - const CHUNK_SUFFIX = {}; + const ASSET_SUFFIX = {}; "#, StringifyJs(suffix.as_str()) )?; } - ChunkSuffix::FromScriptSrc => { + AssetSuffix::Inferred => { if chunk_loading == &ChunkLoading::Edge { - panic!("ChunkSuffix::FromScriptSrc is not supported in Edge runtimes"); + panic!("AssetSuffix::Inferred is not supported in Edge runtimes"); } writedoc!( code, r#" - const CHUNK_SUFFIX = getChunkSuffixFromScriptSrc(); + const ASSET_SUFFIX = getAssetSuffixFromScriptSrc(); "# )?; } + AssetSuffix::FromGlobal(global_name) => { + writedoc!( + code, + r#" + const ASSET_SUFFIX = globalThis[{}] || ""; + "#, + StringifyJs(global_name) + )?; + } } code.push_code(&*shared_runtime_utils_code.await?); diff --git a/turbopack/crates/turbopack-ecmascript-runtime/src/chunk_suffix.rs b/turbopack/crates/turbopack-ecmascript-runtime/src/chunk_suffix.rs deleted file mode 100644 index 1f80c451ba5ea6..00000000000000 --- a/turbopack/crates/turbopack-ecmascript-runtime/src/chunk_suffix.rs +++ /dev/null @@ -1,12 +0,0 @@ -use turbo_rcstr::RcStr; - -#[turbo_tasks::value(shared)] -pub enum ChunkSuffix { - /// No suffix. - None, - /// A constant suffix to append to chunk URLs. - Constant(RcStr), - /// Use the query string of the `src` attribute of the current script tag as a suffix for chunk - /// loading. - FromScriptSrc, -} diff --git a/turbopack/crates/turbopack-ecmascript-runtime/src/lib.rs b/turbopack/crates/turbopack-ecmascript-runtime/src/lib.rs index 1611111edf0717..364037d1d065ef 100644 --- a/turbopack/crates/turbopack-ecmascript-runtime/src/lib.rs +++ b/turbopack/crates/turbopack-ecmascript-runtime/src/lib.rs @@ -3,7 +3,6 @@ pub(crate) mod asset_context; pub(crate) mod browser_runtime; -pub(crate) mod chunk_suffix; #[cfg(feature = "test")] pub(crate) mod dummy_runtime; pub(crate) mod embed_js; @@ -11,7 +10,6 @@ pub(crate) mod nodejs_runtime; pub(crate) mod runtime_type; pub use browser_runtime::{get_browser_runtime_code, get_worker_runtime_code}; -pub use chunk_suffix::ChunkSuffix; #[cfg(feature = "test")] pub use dummy_runtime::get_dummy_runtime_code; pub use embed_js::{embed_file, embed_file_path, embed_fs}; diff --git a/turbopack/crates/turbopack-ecmascript/src/runtime_functions.rs b/turbopack/crates/turbopack-ecmascript/src/runtime_functions.rs index 4c7f508d596e20..f09c1688b4d0d5 100644 --- a/turbopack/crates/turbopack-ecmascript/src/runtime_functions.rs +++ b/turbopack/crates/turbopack-ecmascript/src/runtime_functions.rs @@ -72,6 +72,7 @@ pub const TURBOPACK_MODULE_CONTEXT: &TurbopackRuntimeFunctionShortcut = make_sho pub const TURBOPACK_IMPORT: &TurbopackRuntimeFunctionShortcut = make_shortcut!("i"); pub const TURBOPACK_ESM: &TurbopackRuntimeFunctionShortcut = make_shortcut!("s"); pub const TURBOPACK_EXPORT_VALUE: &TurbopackRuntimeFunctionShortcut = make_shortcut!("v"); +pub const TURBOPACK_EXPORT_URL: &TurbopackRuntimeFunctionShortcut = make_shortcut!("q"); pub const TURBOPACK_EXPORT_NAMESPACE: &TurbopackRuntimeFunctionShortcut = make_shortcut!("n"); pub const TURBOPACK_CACHE: &TurbopackRuntimeFunctionShortcut = make_shortcut!("c"); pub const TURBOPACK_MODULES: &TurbopackRuntimeFunctionShortcut = make_shortcut!("M"); @@ -95,11 +96,12 @@ pub const TURBOPACK_GLOBAL: &TurbopackRuntimeFunctionShortcut = make_shortcut!(" /// Adding an entry to this list will automatically ensure that `__turbopack_XXX__` can be called /// from user code (by inserting a replacement into free_var_references) -pub const TURBOPACK_RUNTIME_FUNCTION_SHORTCUTS: [(&str, &TurbopackRuntimeFunctionShortcut); 22] = [ +pub const TURBOPACK_RUNTIME_FUNCTION_SHORTCUTS: [(&str, &TurbopackRuntimeFunctionShortcut); 23] = [ ("__turbopack_require__", TURBOPACK_REQUIRE), ("__turbopack_module_context__", TURBOPACK_MODULE_CONTEXT), ("__turbopack_import__", TURBOPACK_IMPORT), ("__turbopack_export_value__", TURBOPACK_EXPORT_VALUE), + ("__turbopack_export_url__", TURBOPACK_EXPORT_URL), ("__turbopack_export_namespace__", TURBOPACK_EXPORT_NAMESPACE), ("__turbopack_cache__", TURBOPACK_CACHE), ("__turbopack_modules__", TURBOPACK_MODULES), diff --git a/turbopack/crates/turbopack-nodejs/src/chunking_context.rs b/turbopack/crates/turbopack-nodejs/src/chunking_context.rs index 856219a50535e8..9c2a872090754a 100644 --- a/turbopack/crates/turbopack-nodejs/src/chunking_context.rs +++ b/turbopack/crates/turbopack-nodejs/src/chunking_context.rs @@ -6,9 +6,9 @@ use turbo_tasks_fs::FileSystemPath; use turbopack_core::{ asset::Asset, chunk::{ - Chunk, ChunkGroupResult, ChunkItem, ChunkType, ChunkableModule, ChunkingConfig, - ChunkingConfigs, ChunkingContext, EntryChunkGroupResult, EvaluatableAssets, MinifyType, - SourceMapSourceType, SourceMapsType, UnusedReferences, + AssetSuffix, Chunk, ChunkGroupResult, ChunkItem, ChunkType, ChunkableModule, + ChunkingConfig, ChunkingConfigs, ChunkingContext, EntryChunkGroupResult, EvaluatableAssets, + MinifyType, SourceMapSourceType, SourceMapsType, UnusedReferences, UrlBehavior, availability_info::AvailabilityInfo, chunk_group::{MakeChunkGroupResult, make_chunk_group}, chunk_id_strategy::ModuleIdStrategy, @@ -60,6 +60,16 @@ impl NodeJsChunkingContextBuilder { self } + pub fn url_behavior_override(mut self, tag: RcStr, behavior: UrlBehavior) -> Self { + self.chunking_context.url_behaviors.insert(tag, behavior); + self + } + + pub fn default_url_behavior(mut self, behavior: UrlBehavior) -> Self { + self.chunking_context.default_url_behavior = Some(behavior); + self + } + pub fn minify_type(mut self, minify_type: MinifyType) -> Self { self.chunking_context.minify_type = minify_type; self @@ -172,6 +182,11 @@ pub struct NodeJsChunkingContext { /// Static assets requested from this url base #[bincode(with = "turbo_bincode::indexmap")] asset_prefixes: FxIndexMap, + /// URL behavior overrides for different tags. + #[bincode(with = "turbo_bincode::indexmap")] + url_behaviors: FxIndexMap, + /// Default URL behavior when no tag-specific override is found. + default_url_behavior: Option, /// The environment chunks will be evaluated in. environment: ResolvedVc, /// The kind of runtime to include in the output. @@ -228,6 +243,8 @@ impl NodeJsChunkingContext { asset_root_paths: Default::default(), asset_prefix: None, asset_prefixes: Default::default(), + url_behaviors: Default::default(), + default_url_behavior: None, enable_file_tracing: false, enable_nested_async_availability: false, enable_module_merging: false, @@ -448,6 +465,18 @@ impl ChunkingContext for NodeJsChunkingContext { Ok(asset_root_path.join(&asset_path)?.cell()) } + #[turbo_tasks::function] + fn url_behavior(&self, tag: Option) -> Vc { + tag.as_ref() + .and_then(|tag| self.url_behaviors.get(tag)) + .cloned() + .or_else(|| self.default_url_behavior.clone()) + .unwrap_or(UrlBehavior { + suffix: AssetSuffix::Inferred, + }) + .cell() + } + #[turbo_tasks::function] async fn chunk_group( self: ResolvedVc, diff --git a/turbopack/crates/turbopack-static/src/ecma.rs b/turbopack/crates/turbopack-static/src/ecma.rs index d867459a6887ac..5921b5d05abb98 100644 --- a/turbopack/crates/turbopack-static/src/ecma.rs +++ b/turbopack/crates/turbopack-static/src/ecma.rs @@ -3,7 +3,7 @@ use turbo_rcstr::{RcStr, rcstr}; use turbo_tasks::{ResolvedVc, Vc}; use turbopack_core::{ asset::{Asset, AssetContent}, - chunk::{ChunkItem, ChunkType, ChunkableModule, ChunkingContext}, + chunk::{AssetSuffix, ChunkItem, ChunkType, ChunkableModule, ChunkingContext}, ident::AssetIdent, module::{Module, ModuleSideEffects}, module_graph::ModuleGraph, @@ -15,7 +15,7 @@ use turbopack_ecmascript::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptExports, }, - runtime_functions::TURBOPACK_EXPORT_VALUE, + runtime_functions::{TURBOPACK_EXPORT_URL, TURBOPACK_EXPORT_VALUE}, utils::StringifyJs, }; @@ -154,17 +154,45 @@ impl ChunkItem for StaticUrlJsChunkItem { impl EcmascriptChunkItem for StaticUrlJsChunkItem { #[turbo_tasks::function] async fn content(&self) -> Result> { - Ok(EcmascriptChunkItemContent { - inner_code: format!( - "{TURBOPACK_EXPORT_VALUE}({path});", - path = StringifyJs( - &self - .chunking_context - .asset_url(self.static_asset.path().owned().await?, self.tag.clone()) - .await? + let url = self + .chunking_context + .asset_url(self.static_asset.path().owned().await?, self.tag.clone()) + .await?; + + let url_behavior = self.chunking_context.url_behavior(self.tag.clone()).await?; + + let inner_code = match &url_behavior.suffix { + AssetSuffix::None => { + // No suffix, export as-is + format!( + "{TURBOPACK_EXPORT_VALUE}({path});", + path = StringifyJs(&url) + ) + } + AssetSuffix::Constant(suffix) => { + // Append constant suffix + format!( + "{TURBOPACK_EXPORT_VALUE}({path} + {suffix});", + path = StringifyJs(&url), + suffix = StringifyJs(suffix.as_str()) + ) + } + AssetSuffix::Inferred => { + // The runtime logic will infer the suffix + format!("{TURBOPACK_EXPORT_URL}({path});", path = StringifyJs(&url)) + } + AssetSuffix::FromGlobal(global_name) => { + // Read suffix from global at runtime + format!( + "{TURBOPACK_EXPORT_VALUE}({path} + (globalThis[{global}] || ''));", + path = StringifyJs(&url), + global = StringifyJs(global_name) ) - ) - .into(), + } + }; + + Ok(EcmascriptChunkItemContent { + inner_code: inner_code.into(), ..Default::default() } .cell()) diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js.map index 5d8079009569e2..d9af4e729ccce2 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js.map @@ -1,11 +1,11 @@ { "version": 3, "sources": [], - "debugId": "2edabdcd-1a50-190d-01a5-132504146b5c", + "debugId": "aaeb9570-a56b-3d14-e7e3-4dfbc2550f68", "sections": [ {"offset": {"line": 14, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,0FAA0F;QAC1F,4DAA4D;QAC5DA,SAASmB,mBAAmBD;QAC5BD,WAAW,CAACC,GAAG,GAAGlB;IACpB;IACA,OAAOA;AACT;AAEA;;CAEC,GAC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AAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 515, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wB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SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 748, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;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9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1602, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,M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AAO,GAAG;wBACbzD,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, - {"offset": {"line": 1767, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"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,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 515, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CA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tE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 754, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oD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wK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1608, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;gBAClB;YACF;Y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,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1773, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED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":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/ba425_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/ba425_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js index b2849067dc4c66..281a31767f6490 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/ba425_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/output/ba425_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js @@ -1,4 +1,4 @@ -;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="2edabdcd-1a50-190d-01a5-132504146b5c")}catch(e){}}(); +;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="aaeb9570-a56b-3d14-e7e3-4dfbc2550f68")}catch(e){}}(); (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([ "output/ba425_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js", {"otherChunks":["output/aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0b8736b3.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/browser/input/index.js [test] (ecmascript)"]} @@ -11,7 +11,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -683,6 +683,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -694,7 +700,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -715,7 +721,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1606,9 +1612,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1849,7 +1855,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 @@ -1867,5 +1873,5 @@ chunkListsToRegister.forEach(registerChunkList); })(); -//# debugId=2edabdcd-1a50-190d-01a5-132504146b5c +//# debugId=aaeb9570-a56b-3d14-e7e3-4dfbc2550f68 //# sourceMappingURL=aaf3a_crates_turbopack-tests_tests_snapshot_debug-ids_browser_input_index_0151fefb.js.map \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js index e57476f4287657..531cee7d55f6b1 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js @@ -621,6 +621,12 @@ nodeContextPrototype.c = moduleCache; return url.pathToFileURL(resolved).href; } nodeContextPrototype.R = resolvePathFromModule; +/** + * Exports a URL value. No suffix is added in Node.js runtime. + */ function exportUrl(urlValue, id) { + exportValue.call(this, urlValue, id); +} +nodeContextPrototype.q = exportUrl; function loadRuntimeChunk(sourcePath, chunkData) { if (typeof chunkData === 'string') { loadRuntimeChunkPath(sourcePath, chunkData); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js.map index 437e87e489e4ff..02d3d85ffb0b22 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/debug-ids/node/output/[turbopack]_runtime.js.map @@ -6,5 +6,5 @@ {"offset": {"line": 504, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/// \n\n/// A 'base' utilities to support runtime can have externals.\n/// Currently this is for node.js / edge runtime both.\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\n\nasync function externalImport(id: DependencySpecifier) {\n let raw\n try {\n raw = await import(id)\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\n return interopEsm(raw.default, createNS(raw), true)\n }\n\n return raw\n}\ncontextPrototype.y = externalImport\n\nfunction externalRequire(\n id: ModuleId,\n thunk: () => any,\n esm: boolean = false\n): Exports | EsmNamespaceObject {\n let raw\n try {\n raw = thunk()\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (!esm || raw.__esModule) {\n return raw\n }\n\n return interopEsm(raw, createNS(raw), true)\n}\n\nexternalRequire.resolve = (\n id: string,\n options?: {\n paths?: string[]\n }\n) => {\n return require.resolve(id, options)\n}\ncontextPrototype.x = externalRequire\n"],"names":["externalImport","id","raw","err","Error","__esModule","default","interopEsm","createNS","contextPrototype","y","externalRequire","thunk","esm","resolve","options","require","x"],"mappings":"AAAA,mDAAmD;AAEnD,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAeA,eAAeC,EAAuB;IACnD,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAM,MAAM,CAACD;IACrB,EAAE,OAAOE,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAID,OAAOA,IAAIG,UAAU,IAAIH,IAAII,OAAO,IAAI,aAAaJ,IAAII,OAAO,EAAE;QACpE,OAAOC,WAAWL,IAAII,OAAO,EAAEE,SAASN,MAAM;IAChD;IAEA,OAAOA;AACT;AACAO,iBAAiBC,CAAC,GAAGV;AAErB,SAASW,gBACPV,EAAY,EACZW,KAAgB,EAChBC,MAAe,KAAK;IAEpB,IAAIX;IACJ,IAAI;QACFA,MAAMU;IACR,EAAE,OAAOT,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAI,CAACU,OAAOX,IAAIG,UAAU,EAAE;QAC1B,OAAOH;IACT;IAEA,OAAOK,WAAWL,KAAKM,SAASN,MAAM;AACxC;AAEAS,gBAAgBG,OAAO,GAAG,CACxBb,IACAc;IAIA,OAAOC,QAAQF,OAAO,CAACb,IAAIc;AAC7B;AACAN,iBAAiBQ,CAAC,GAAGN","ignoreList":[0]}}, {"offset": {"line": 545, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ","ignoreList":[0]}}, {"offset": {"line": 566, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-wasm-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\nfunction readWebAssemblyAsResponse(path: string) {\n const { createReadStream } = require('fs') as typeof import('fs')\n const { Readable } = require('stream') as typeof import('stream')\n\n const stream = createReadStream(path)\n\n // @ts-ignore unfortunately there's a slight type mismatch with the stream.\n return new Response(Readable.toWeb(stream), {\n headers: {\n 'content-type': 'application/wasm',\n },\n })\n}\n\nasync function compileWebAssemblyFromPath(\n path: string\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n return await WebAssembly.compileStreaming(response)\n}\n\nasync function instantiateWebAssemblyFromPath(\n path: string,\n importsObj: WebAssembly.Imports\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n response,\n importsObj\n )\n\n return instance.exports\n}\n"],"names":["readWebAssemblyAsResponse","path","createReadStream","require","Readable","stream","Response","toWeb","headers","compileWebAssemblyFromPath","response","WebAssembly","compileStreaming","instantiateWebAssemblyFromPath","importsObj","instance","instantiateStreaming","exports"],"mappings":"AAAA,oDAAoD,GAEpD,mDAAmD;AAEnD,SAASA,0BAA0BC,IAAY;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD,QAAQ;IAE7B,MAAME,SAASH,iBAAiBD;IAEhC,2EAA2E;IAC3E,OAAO,IAAIK,SAASF,SAASG,KAAK,CAACF,SAAS;QAC1CG,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,eAAeC,2BACbR,IAAY;IAEZ,MAAMS,WAAWV,0BAA0BC;IAE3C,OAAO,MAAMU,YAAYC,gBAAgB,CAACF;AAC5C;AAEA,eAAeG,+BACbZ,IAAY,EACZa,UAA+B;IAE/B,MAAMJ,WAAWV,0BAA0BC;IAE3C,MAAM,EAAEc,QAAQ,EAAE,GAAG,MAAMJ,YAAYK,oBAAoB,CACzDN,UACAI;IAGF,OAAOC,SAASE,OAAO;AACzB","ignoreList":[0]}}, - {"offset": {"line": 587, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n}\n\ntype SourceData = ChunkPath | ModuleId\n\nprocess.env.TURBOPACK = '1'\n\ninterface TurbopackNodeBuildContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackNodeBuildContext\n) => unknown\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nnodeContextPrototype.M = moduleFactories\nconst moduleCache: ModuleCache = Object.create(null)\nnodeContextPrototype.c = moduleCache\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\nnodeContextPrototype.R = resolvePathFromModule\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl(\n this: TurbopackBaseContext,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\nfunction getWorkerURL(\n _entrypoint: ChunkPath,\n _moduleChunks: ChunkPath[],\n _shared: boolean\n): URL {\n throw new Error('Worker urls are not implemented yet for Node.js')\n}\n\nnodeContextPrototype.b = getWorkerURL\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n throw new Error(\n `Module ${id} was instantiated ${instantiationReason}, but the module factory is not available.`\n )\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n moduleCache[id] = module\n\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n module.loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: Module\n): Module {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["SourceType","process","env","TURBOPACK","nodeContextPrototype","Context","prototype","url","require","moduleFactories","Map","M","moduleCache","Object","create","c","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","R","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","id","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","call","L","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","getWorkerURL","_entrypoint","_moduleChunks","_shared","b","instantiateModule","sourceType","sourceData","moduleFactory","instantiationReason","invariant","module1","createModuleObject","exports","context","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","instantiateRuntimeModule","getOrInstantiateRuntimeModule","regexJsUrl","chunkUrlOrPath","test","module"],"mappings":"AAAA,oDAAoD,GAEpD,mDAAmD;AACnD,+DAA+D;AAC/D,+DAA+D;AAC/D,0DAA0D;AAE1D,IAAA,AAAKA,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;WAVEA;EAAAA;AAgBLC,QAAQC,GAAG,CAACC,SAAS,GAAG;AAQxB,MAAMC,uBAAuBC,QAAQC,SAAS;AAO9C,MAAMC,MAAMC,QAAQ;AAEpB,MAAMC,kBAAmC,IAAIC;AAC7CN,qBAAqBO,CAAC,GAAGF;AACzB,MAAMG,cAAmCC,OAAOC,MAAM,CAAC;AACvDV,qBAAqBW,CAAC,GAAGH;AAEzB;;CAEC,GACD,SAASI,sBAEPC,QAAgB;IAEhB,MAAMC,WAAW,IAAI,CAACC,CAAC,CAACF;IACxB,MAAMG,eAAeF,UAAUG,WAAWH;IAC1C,IAAI,OAAOE,iBAAiB,UAAU;QACpC,OAAOF;IACT;IAEA,MAAMI,sBAAsBF,aAAaG,KAAK,CAACC,aAAaC,MAAM;IAClE,MAAMC,WAAWC,KAAKC,OAAO,CAACC,cAAcP;IAE5C,OAAOf,IAAIuB,aAAa,CAACJ,UAAUK,IAAI;AACzC;AACA3B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wD,8BACPxD,SAAoB,EACpB7B,QAAkB;IAElB,MAAM2E,UAAShF,WAAW,CAACK,SAAS;IACpC,IAAI2E,SAAQ;QACV,IAAIA,QAAOtC,KAAK,EAAE;YAChB,MAAMsC,QAAOtC,KAAK;QACpB;QACA,OAAOsC;IACT;IAEA,OAAOS,yBAAyBvD,WAAW7B;AAC7C;AAEA,MAAMsF,aAAa;AACnB;;CAEC,GACD,SAASxD,KAAKyD,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB;AAEAE,OAAOZ,OAAO,GAAG,CAAC5D,aAA0B,CAAC;QAC3C0B,GAAG,CAACC,KAAiByC,8BAA8BpE,YAAY2B;QAC/D9C,GAAG,CAACoB,YAAyBF,iBAAiBC,YAAYC;IAC5D,CAAC","ignoreList":[0]}}] + {"offset": {"line": 587, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n}\n\ntype SourceData = ChunkPath | ModuleId\n\nprocess.env.TURBOPACK = '1'\n\ninterface TurbopackNodeBuildContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n q: ExportUrl\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackNodeBuildContext\n) => unknown\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nnodeContextPrototype.M = moduleFactories\nconst moduleCache: ModuleCache = Object.create(null)\nnodeContextPrototype.c = moduleCache\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\nnodeContextPrototype.R = resolvePathFromModule\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\nnodeContextPrototype.q = exportUrl\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl(\n this: TurbopackBaseContext,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\nfunction getWorkerURL(\n _entrypoint: ChunkPath,\n _moduleChunks: ChunkPath[],\n _shared: boolean\n): URL {\n throw new Error('Worker urls are not implemented yet for Node.js')\n}\n\nnodeContextPrototype.b = getWorkerURL\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n throw new Error(\n `Module ${id} was instantiated ${instantiationReason}, but the module factory is not available.`\n )\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n moduleCache[id] = module\n\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n module.loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: Module\n): Module {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["SourceType","process","env","TURBOPACK","nodeContextPrototype","Context","prototype","url","require","moduleFactories","Map","M","moduleCache","Object","create","c","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","R","exportUrl","urlValue","id","exportValue","call","q","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","L","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","getWorkerURL","_entrypoint","_moduleChunks","_shared","b","instantiateModule","sourceType","sourceData","moduleFactory","instantiationReason","invariant","module1","createModuleObject","exports","context","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","instantiateRuntimeModule","getOrInstantiateRuntimeModule","regexJsUrl","chunkUrlOrPath","test","module"],"mappings":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1D,aAA0B,CAAC;QAC3C0B,GAAG,CAAC/B,KAAiBuE,8BAA8BlE,YAAYL;QAC/DpB,GAAG,CAAC0B,YAAyBF,iBAAiBC,YAAYC;IAC5D,CAAC","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_3fece31c._.js b/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_3fece31c._.js index b0e8936da634eb..29e0f144b9aa6d 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_3fece31c._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_3fece31c._.js @@ -1,7 +1,7 @@ (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_import-meta_url_input_3fece31c._.js", "[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/asset.txt (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/asset.a5b1faf2.txt");}), +__turbopack_context__.q("/static/asset.a5b1faf2.txt");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/import-meta/url/input/mod.mjs [test] (ecmascript)", ((__turbopack_context__) => { "use strict"; diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/6642e_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/6642e_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js index 090f4d2a32ce21..d0898eaf954eec 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/6642e_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/6642e_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js @@ -23,7 +23,7 @@ // this code as a module. We still don't fully trust it, so we'll validate the // types and ensure that the next chunk URLs are same-origin. const config = JSON.parse(paramsString); - const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''; + const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''; const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''; // In a normal browser context, the runtime can figure out which chunk is // currently executing via `document.currentScript`. Workers don't have that @@ -35,7 +35,7 @@ // its own URL at the front. const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []; Object.assign(self, { - TURBOPACK_CHUNK_SUFFIX, + TURBOPACK_ASSET_SUFFIX, TURBOPACK_NEXT_CHUNK_URLS, NEXT_DEPLOYMENT_ID }); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_1f8151c3._.js b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_1f8151c3._.js index f2eefc0b01d081..c49a3d76b7b07c 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_1f8151c3._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_input_1f8151c3._.js @@ -5,14 +5,14 @@ module.exports = 'turbopack'; }), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/vercel.242d4ff2.cjs");}), +__turbopack_context__.q("/static/vercel.242d4ff2.cjs");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/vercel.cjs [test] (ecmascript, worker loader)", ((__turbopack_context__) => { __turbopack_context__.v(__turbopack_context__.b("output/6642e_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js", ["output/bf321_tests_snapshot_imports_ignore-comments_input_vercel_cjs_422a38f6._.js","output/ad3e4_tests_snapshot_imports_ignore-comments_input_vercel_cjs_6f11dd5d._.js"], false)); }), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/ignore-worker.cjs (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/ignore-worker.481250f3.cjs");}), +__turbopack_context__.q("/static/ignore-worker.481250f3.cjs");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/input/index.js [test] (ecmascript)", ((__turbopack_context__) => { "use strict"; diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js.map index 0470b96a8e80b4..bef44d569bd3c0 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/imports/ignore-comments/output/aaf3a_crates_turbopack-tests_tests_snapshot_imports_ignore-comments_output_2867ca5f._.js.map @@ -1 +1 @@ -{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_CHUNK_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_CHUNK_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_CHUNK_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAAMC,OAAe;QAC5BC,QAAQC,KAAK,CAACF;QACd,MAAM,IAAIG,MAAMH;IAClB;IAEA,2EAA2E;IAC3E,6EAA6E;IAC7E,gEAAgE;IAChE,IACE,OAAO,AAACI,IAAY,CAAC,oBAAoB,KAAK,eAC9C,CAAC,CAACA,gBAAgB,AAACA,IAAY,CAAC,oBAAoB,GACpD;QACAL,MAAM;IACR;IAEA,MAAMM,MAAM,IAAIC,IAAIC,SAASC,IAAI;IAEjC,mEAAmE;IACnE,IAAIC,eAAeJ,IAAIK,YAAY,CAACC,GAAG,CAAC;IACxC,IAAI,CAACF,gBAAgBJ,IAAIO,IAAI,CAACC,UAAU,CAAC,aAAa;QACpDJ,eAAeK,mBAAmBT,IAAIO,IAAI,CAACG,KAAK,CAAC,WAAWC,MAAM;IACpE;IAEA,IAAI,CAACP,cAAcV,MAAM;IAEzB,2EAA2E;IAC3E,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAMkB,SAAgCC,KAAKC,KAAK,CAACV;IAEjD,MAAMW,yBAAyB,OAAOH,OAAOI,CAAC,KAAK,WAAWJ,OAAOI,CAAC,GAAG;IACzE,MAAMC,qBAAqB,OAAOL,OAAOM,CAAC,KAAK,WAAWN,OAAOM,CAAC,GAAG;IACrE,yEAAyE;IACzE,4EAA4E;IAC5E,mEAAmE;IACnE,wBAAwB;IACxB,EAAE;IACF,8EAA8E;IAC9E,8EAA8E;IAC9E,4BAA4B;IAC5B,MAAMC,4BAA4BC,MAAMC,OAAO,CAACT,OAAOU,EAAE,IAAIV,OAAOU,EAAE,GAAG,EAAE;IAE3EC,OAAOC,MAAM,CAACzB,MAAM;QAClBgB;QACAI;QACAF;IACF;IAEA,IAAIE,0BAA0BR,MAAM,GAAG,GAAG;QACxC,MAAMc,gBAA0B,EAAE;QAClC,KAAK,MAAMC,SAASP,0BAA2B;YAC7C,qCAAqC;YACrC,MAAMQ,WAAW,IAAI1B,IAAIyB,OAAOxB,SAAS0B,MAAM;YAC/C,uEAAuE;YACvE,qEAAqE;YACrE,mEAAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file +{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_ASSET_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_ASSET_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_ASSET_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAAMC,OAAe;QAC5BC,QAAQC,KAAK,CAACF;QACd,MAAM,IAAIG,MAAMH;IAClB;IAEA,2EAA2E;IAC3E,6EAA6E;IAC7E,gEAAgE;IAChE,IACE,OAAO,AAACI,IAAY,CAAC,oBAAoB,KAAK,eAC9C,CAAC,CAACA,gBAAgB,AAACA,IAAY,CAAC,oBAAoB,GACpD;QACAL,MAAM;IACR;IAEA,MAAMM,MAAM,IAAIC,IAAIC,SAASC,IAAI;IAEjC,mEAAmE;IACnE,IAAIC,eAAeJ,IAAIK,YAAY,CAACC,GAAG,CAAC;IACxC,IAAI,CAACF,gBAAgBJ,IAAIO,IAAI,CAACC,UAAU,CAAC,aAAa;QACpDJ,eAAeK,mBAAmBT,IAAIO,IAAI,CAACG,KAAK,CAAC,WAAWC,MAAM;IACpE;IAEA,IAAI,CAACP,cAAcV,MAAM;IAEzB,2EAA2E;IAC3E,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAMkB,SAAgCC,KAAKC,KAAK,CAACV;IAEjD,MAAMW,yBAAyB,OAAOH,OAAOI,CAAC,KAAK,WAAWJ,OAAOI,CAAC,GAAG;IACzE,MAAMC,qBAAqB,OAAOL,OAAOM,CAAC,KAAK,WAAWN,OAAOM,CAAC,GAAG;IACrE,yEAAyE;IACzE,4EAA4E;IAC5E,mEAAmE;IACnE,wBAAwB;IACxB,EAAE;IACF,8EAA8E;IAC9E,8EAA8E;IAC9E,4BAA4B;IAC5B,MAAMC,4BAA4BC,MAAMC,OAAO,CAACT,OAAOU,EAAE,IAAIV,OAAOU,EAAE,GAAG,EAAE;IAE3EC,OAAOC,MAAM,CAACzB,MAAM;QAClBgB;QACAI;QACAF;IACF;IAEA,IAAIE,0BAA0BR,MAAM,GAAG,GAAG;QACxC,MAAMc,gBAA0B,EAAE;QAClC,KAAK,MAAMC,SAASP,0BAA2B;YAC7C,qCAAqC;YACrC,MAAMQ,WAAW,IAAI1B,IAAIyB,OAAOxB,SAAS0B,MAAM;YAC/C,uEAAuE;YACvE,qEAAqE;YACrE,mEAAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_fb142aa8._.js b/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_fb142aa8._.js index baf39f75a2597b..801e7c0c024ca8 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_fb142aa8._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_fb142aa8._.js @@ -1,7 +1,7 @@ (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_imports_static_input_fb142aa8._.js", "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/input/vercel.svg (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/vercel.ede1923f.svg");}), +__turbopack_context__.q("/static/vercel.ede1923f.svg");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/static/input/index.js [test] (ecmascript)", ((__turbopack_context__) => { "use strict"; diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js index e57476f4287657..531cee7d55f6b1 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js @@ -621,6 +621,12 @@ nodeContextPrototype.c = moduleCache; return url.pathToFileURL(resolved).href; } nodeContextPrototype.R = resolvePathFromModule; +/** + * Exports a URL value. No suffix is added in Node.js runtime. + */ function exportUrl(urlValue, id) { + exportValue.call(this, urlValue, id); +} +nodeContextPrototype.q = exportUrl; function loadRuntimeChunk(sourcePath, chunkData) { if (typeof chunkData === 'string') { loadRuntimeChunkPath(sourcePath, chunkData); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js.map index 437e87e489e4ff..02d3d85ffb0b22 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_build_runtime/output/[turbopack]_runtime.js.map @@ -6,5 +6,5 @@ {"offset": {"line": 504, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/// \n\n/// A 'base' utilities to support runtime can have externals.\n/// Currently this is for node.js / edge runtime both.\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\n\nasync function externalImport(id: DependencySpecifier) {\n let raw\n try {\n raw = await import(id)\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\n return interopEsm(raw.default, createNS(raw), true)\n }\n\n return raw\n}\ncontextPrototype.y = externalImport\n\nfunction externalRequire(\n id: ModuleId,\n thunk: () => any,\n esm: boolean = false\n): Exports | EsmNamespaceObject {\n let raw\n try {\n raw = thunk()\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (!esm || raw.__esModule) {\n return raw\n }\n\n return interopEsm(raw, createNS(raw), true)\n}\n\nexternalRequire.resolve = (\n id: string,\n options?: {\n paths?: string[]\n }\n) => {\n return require.resolve(id, options)\n}\ncontextPrototype.x = externalRequire\n"],"names":["externalImport","id","raw","err","Error","__esModule","default","interopEsm","createNS","contextPrototype","y","externalRequire","thunk","esm","resolve","options","require","x"],"mappings":"AAAA,mDAAmD;AAEnD,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAeA,eAAeC,EAAuB;IACnD,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAM,MAAM,CAACD;IACrB,EAAE,OAAOE,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAID,OAAOA,IAAIG,UAAU,IAAIH,IAAII,OAAO,IAAI,aAAaJ,IAAII,OAAO,EAAE;QACpE,OAAOC,WAAWL,IAAII,OAAO,EAAEE,SAASN,MAAM;IAChD;IAEA,OAAOA;AACT;AACAO,iBAAiBC,CAAC,GAAGV;AAErB,SAASW,gBACPV,EAAY,EACZW,KAAgB,EAChBC,MAAe,KAAK;IAEpB,IAAIX;IACJ,IAAI;QACFA,MAAMU;IACR,EAAE,OAAOT,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAI,CAACU,OAAOX,IAAIG,UAAU,EAAE;QAC1B,OAAOH;IACT;IAEA,OAAOK,WAAWL,KAAKM,SAASN,MAAM;AACxC;AAEAS,gBAAgBG,OAAO,GAAG,CACxBb,IACAc;IAIA,OAAOC,QAAQF,OAAO,CAACb,IAAIc;AAC7B;AACAN,iBAAiBQ,CAAC,GAAGN","ignoreList":[0]}}, {"offset": {"line": 545, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ","ignoreList":[0]}}, {"offset": {"line": 566, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-wasm-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\nfunction readWebAssemblyAsResponse(path: string) {\n const { createReadStream } = require('fs') as typeof import('fs')\n const { Readable } = require('stream') as typeof import('stream')\n\n const stream = createReadStream(path)\n\n // @ts-ignore unfortunately there's a slight type mismatch with the stream.\n return new Response(Readable.toWeb(stream), {\n headers: {\n 'content-type': 'application/wasm',\n },\n })\n}\n\nasync function compileWebAssemblyFromPath(\n path: string\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n return await WebAssembly.compileStreaming(response)\n}\n\nasync function instantiateWebAssemblyFromPath(\n path: string,\n importsObj: WebAssembly.Imports\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n response,\n importsObj\n )\n\n return instance.exports\n}\n"],"names":["readWebAssemblyAsResponse","path","createReadStream","require","Readable","stream","Response","toWeb","headers","compileWebAssemblyFromPath","response","WebAssembly","compileStreaming","instantiateWebAssemblyFromPath","importsObj","instance","instantiateStreaming","exports"],"mappings":"AAAA,oDAAoD,GAEpD,mDAAmD;AAEnD,SAASA,0BAA0BC,IAAY;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD,QAAQ;IAE7B,MAAME,SAASH,iBAAiBD;IAEhC,2EAA2E;IAC3E,OAAO,IAAIK,SAASF,SAASG,KAAK,CAACF,SAAS;QAC1CG,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,eAAeC,2BACbR,IAAY;IAEZ,MAAMS,WAAWV,0BAA0BC;IAE3C,OAAO,MAAMU,YAAYC,gBAAgB,CAACF;AAC5C;AAEA,eAAeG,+BACbZ,IAAY,EACZa,UAA+B;IAE/B,MAAMJ,WAAWV,0BAA0BC;IAE3C,MAAM,EAAEc,QAAQ,EAAE,GAAG,MAAMJ,YAAYK,oBAAoB,CACzDN,UACAI;IAGF,OAAOC,SAASE,OAAO;AACzB","ignoreList":[0]}}, - {"offset": {"line": 587, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n}\n\ntype SourceData = ChunkPath | ModuleId\n\nprocess.env.TURBOPACK = '1'\n\ninterface TurbopackNodeBuildContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackNodeBuildContext\n) => unknown\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nnodeContextPrototype.M = moduleFactories\nconst moduleCache: ModuleCache = Object.create(null)\nnodeContextPrototype.c = moduleCache\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\nnodeContextPrototype.R = resolvePathFromModule\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl(\n this: TurbopackBaseContext,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\nfunction getWorkerURL(\n _entrypoint: ChunkPath,\n _moduleChunks: ChunkPath[],\n _shared: boolean\n): URL {\n throw new Error('Worker urls are not implemented yet for Node.js')\n}\n\nnodeContextPrototype.b = getWorkerURL\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n throw new Error(\n `Module ${id} was instantiated ${instantiationReason}, but the module factory is not available.`\n )\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n moduleCache[id] = module\n\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n module.loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: Module\n): Module {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["SourceType","process","env","TURBOPACK","nodeContextPrototype","Context","prototype","url","require","moduleFactories","Map","M","moduleCache","Object","create","c","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","R","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","id","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","call","L","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","getWorkerURL","_entrypoint","_moduleChunks","_shared","b","instantiateModule","sourceType","sourceData","moduleFactory","instantiationReason","invariant","module1","createModuleObject","exports","context","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","instantiateRunt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F,iBAAiBC,YAAYC;IAC5D,CAAC","ignoreList":[0]}}] + {"offset": {"line": 587, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n}\n\ntype SourceData = ChunkPath | ModuleId\n\nprocess.env.TURBOPACK = '1'\n\ninterface TurbopackNodeBuildContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n q: ExportUrl\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackNodeBuildContext\n) => unknown\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nnodeContextPrototype.M = moduleFactories\nconst moduleCache: ModuleCache = Object.create(null)\nnodeContextPrototype.c = moduleCache\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\nnodeContextPrototype.R = resolvePathFromModule\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\nnodeContextPrototype.q = exportUrl\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl(\n this: TurbopackBaseContext,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\nfunction getWorkerURL(\n _entrypoint: ChunkPath,\n _moduleChunks: ChunkPath[],\n _shared: boolean\n): URL {\n throw new Error('Worker urls are not implemented yet for Node.js')\n}\n\nnodeContextPrototype.b = getWorkerURL\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n throw new Error(\n `Module ${id} was instantiated ${instantiationReason}, but the module factory is not available.`\n )\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n moduleCache[id] = module\n\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n module.loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: Module\n): Module {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["SourceType","process","env","TURBOPACK","nodeContextPrototype","Context","prototype","url","require","moduleFactories","Map","M","moduleCache","Object","create","c","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","R","exportUrl","urlValue","id","exportValue","call","q","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","L","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","getWorkerURL","_entrypoint","_moduleChunks","_shared","b","instantiateModule","sourceType","sourceData","moduleFactory","instantiationReason","invariant","module1","createModuleObject","exports","context","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","instantiateRuntimeModule","getOrInstantiateRuntimeModule","regexJsUrl","chunkUrlOrPath","test","module"],"mappings":"AAAA,oDAAoD,GAEpD,mDAAmD;AACnD,+DAA+D;AAC/D,+DAA+D;AAC/D,0DAA0D;AAE1D,IAAA,AAAKA,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;WAVEA;EAAAA;AAgBLC,QAAQC,GAAG,CAACC,SAAS,GAAG;AASxB,MAAMC,uBAAuBC,QAAQC,SAAS;AAO9C,MAAMC,MAAMC,QAAQ;AAEpB,MAAMC,kBAAmC,IAAIC;AAC7CN,qBAAqBO,CAAC,GAAGF;AACzB,MAAMG,cAAmCC,OAAOC,MAAM,CAAC;AACvDV,qBAAqBW,CAAC,GAAGH;AAEzB;;CAEC,GACD,SAASI,sBAEPC,QAAgB;IAEhB,MAAMC,WAAW,IA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eAAe;IACnD;IAEA,OAAOL;AACT;AAEA;;CAEC,GACD,aAAa;AACb,SAASO,iCACPpE,EAAY,EACZqE,YAAoB;IAEpB,MAAMR,UAASpF,WAAW,CAACuB,GAAG;IAE9B,IAAI6D,SAAQ;QACV,IAAIA,QAAOpC,KAAK,EAAE;YAChB,MAAMoC,QAAOpC,KAAK;QACpB;QAEA,OAAOoC;IACT;IAEA,OAAON,kBAAkBvD,OAAuBqE,aAAarE,EAAE;AACjE;AAEA;;CAEC,GACD,SAASsE,yBACPrD,SAAoB,EACpBnC,QAAkB;IAElB,OAAOyE,kBAAkBzE,aAA8BmC;AACzD;AAEA;;CAEC,GACD,oFAAoF;AACpF,SAASsD,8BACPtD,SAAoB,EACpBnC,QAAkB;IAElB,MAAM+E,UAASpF,WAAW,CAACK,SAAS;IACpC,IAAI+E,SAAQ;QACV,IAAIA,QAAOpC,KAAK,EAAE;YAChB,MAAMoC,QAAOpC,KAAK;QACpB;QACA,OAAOoC;IACT;IAEA,OAAOS,yBAAyBrD,WAAWnC;AAC7C;AAEA,MAAM0F,aAAa;AACnB;;CAEC,GACD,SAAStD,KAAKuD,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB;AAEAE,OAAOZ,OAAO,GAAG,CAAC1D,aAA0B,CAAC;QAC3C0B,GAAG,CAAC/B,KAAiBuE,8BAA8BlE,YAAYL;QAC/DpB,GAAG,CAAC0B,YAAyBF,iBAAiBC,YAAYC;IAC5D,CAAC","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/5c1d0_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/5c1d0_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js index 47dd092ecababb..7a9453e31f8d14 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/5c1d0_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/5c1d0_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -682,6 +682,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -693,7 +699,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -714,7 +720,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1605,9 +1611,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1848,7 +1854,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/780ce_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/780ce_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js.map index 2092500cff64fb..620994969d6457 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/780ce_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/runtime/default_dev_runtime/output/780ce_turbopack-tests_tests_snapshot_runtime_default_dev_runtime_input_index_c0f7e0b0.js.map @@ -3,8 +3,8 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB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;QAC/BnB,YAAY;QACZ0I,cAAc;QACd/I,OAAOsI,MAAM,CAAC9G,IAAI;IACpB;AACJ;AACA0G,YAAYvJ,SAAS,GAAG0J,IAAI1J,SAAS;AACrCD,iBAAiBsK,CAAC,GAAGd;AAErB;;CAEC,GACD,SAASe,UAAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA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Z,gBAAgBzE,MAAM,IAChCiF;IACJ,OAAOhE;AACT;AAEA,MAAMqE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oDAAoD,GAEpD,MAAMC,iBAAyCC,OAAOC,MAAM,CAAC;AAC7DL,oBAAoBM,CAAC,GAAGH;AAgCxB,MAAMI,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAEA;;CAEC,GACD,MAAME,iBAAgC,IAAIC;AAE1C;;;;;;CAMC,GACD,MAAMC,kBAAiD,IAAIC;AAC3D;;CAEC,GACD,MAAMC,kBAAiD,IAAID;AAC3D;;;;CAIC,GACD,MAAME,oBAAwC,IAAIJ;AAClD;;CAEC,GACD,MAAMK,qBAAyD,IAAIH;AACnE;;CAEC,GACD,MAAMI,qBAAyD,IAAIJ;AAEnE;;;CAGC,GACD,MAAMK,gBAAwC,IAAIL;AAClD;;CAEC,GACD,MAAMM,iBAAwC,IAAIN;AAClD;;CAEC,GACD,MAAMO,2BAA0C,IAAIT;AAEpD;;CAEC,GACD,aAAa;AACb,SAASU,8BACPC,SAAoB,EACpBC,QAAkB;IAElB,MAAMC,SAASvB,cAAc,CAACsB,SAAS;IACvC,IAAIC,QAAQ;QACV,IAAIA,OAAOC,KAAK,EAAE;YAChB,MAAMD,OAAOC,KAAK;QACpB;QACA,OAAOD;IACT;IAEA,aAAa;IACb,OAAOE,kBAAkBH,UAAUI,WAAWC,OAAO,EAAEN;AACzD;AAEA;;CAEC,GACD,2CAA2C;AAC3C,MAAMO,mCAEF,CAACC,IAAIC;IACP,IAAI,CAACA,aAAaC,GAAG,CAACC,MAAM,EAAE;QAC5BC,QAAQC,IAAI,CACV,C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G,CAACC;IAChD3M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1601, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAM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C","ignoreList":[0]}}, - {"offset": {"line": 1766, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEE,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,KAAK,MAAMY,UAAUL,MAAMC,IAAI,CAACG,SAAU;oBACxCC,OAAOH,MAAM;gBACf;YACF,OAAO;gBACL,MAAM,IAAII,MAAM,CAAC,mCAAmC,EAAEf,UAAU;YAClE;QACF;QAEAgB,aAAYhB,QAAQ;YAClB,OAAO,IAAIiB,QAAc,CAACC,SAASC;gBACjC,IAAI,CAACf,MAAMJ,WAAW;oBACpBmB,OAAO,IAAIJ,MAAM;oBACjB;gBACF;gBAEA,MAAMb,kBAAkBC,UAAUH;gBAClC,MAAMoB,gBAA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M,GAAGC,kBAAkBJ,MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,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7E,MAAM,IAChCqF;IACJ,OAAOpE;AACT;AAEA,MAAMyE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 753, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chun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M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;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{"offset": {"line": 1772, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEE,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,KAAK,MAAMY,UAAUL,MAAMC,IAAI,CAACG,SAAU;oBACxCC,OAAOH,MAAM;gBACf;YACF,OAAO;gBACL,MAAM,IAAII,MAAM,CAAC,mCAAmC,EAAEf,UAAU;YAClE;QACF;QAEAgB,aAAYhB,QAAQ;YAClB,OAAO,IAAIiB,QAAc,CAACC,SAASC;gBACjC,IAAI,CAACf,MAAMJ,WAAW;oBACpBmB,OAAO,IAAIJ,MAAM;oBACjB;gBACF;gBAEA,MAAMb,kBAAkBC,UAAUH;gBAClC,MAAMoB,gBAAgBd,SAASC,gBAAgB,C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MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js b/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js index 906ba9a7199062..eab590a0d796ee 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -1180,6 +1180,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath !== null && modulePath !== void 0 ? modulePath : ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -1191,7 +1197,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { var url = new URL(getChunkRelativeUrl(entrypoint), location.origin); var params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map(function(chunk) { return getChunkRelativeUrl(chunk); @@ -1216,7 +1222,7 @@ browserContextPrototype.b = getWorkerURL; */ function getChunkRelativeUrl(chunkPath) { return `${CHUNK_BASE_PATH}${chunkPath.split('/').map(function(p) { return encodeURIComponent(p); - }).join('/')}${CHUNK_SUFFIX}`; + }).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1452,11 +1458,11 @@ function _ts_generator(thisArg, body) { * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - var _self_TURBOPACK_CHUNK_SUFFIX; +function getAssetSuffixFromScriptSrc() { + var _self_TURBOPACK_ASSET_SUFFIX; var _document_currentScript_getAttribute, _document_currentScript_getAttribute1, _document_currentScript, _document; - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return ((_self_TURBOPACK_CHUNK_SUFFIX = self.TURBOPACK_CHUNK_SUFFIX) !== null && _self_TURBOPACK_CHUNK_SUFFIX !== void 0 ? _self_TURBOPACK_CHUNK_SUFFIX : (_document = document) === null || _document === void 0 ? void 0 : (_document_currentScript = _document.currentScript) === null || _document_currentScript === void 0 ? void 0 : (_document_currentScript_getAttribute1 = _document_currentScript.getAttribute) === null || _document_currentScript_getAttribute1 === void 0 ? void 0 : (_document_currentScript_getAttribute = _document_currentScript_getAttribute1.call(_document_currentScript, 'src')) === null || _document_currentScript_getAttribute === void 0 ? void 0 : _document_currentScript_getAttribute.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; + // TURBOPACK_ASSET_SUFFIX is set in web workers + return ((_self_TURBOPACK_ASSET_SUFFIX = self.TURBOPACK_ASSET_SUFFIX) !== null && _self_TURBOPACK_ASSET_SUFFIX !== void 0 ? _self_TURBOPACK_ASSET_SUFFIX : (_document = document) === null || _document === void 0 ? void 0 : (_document_currentScript = _document.currentScript) === null || _document_currentScript === void 0 ? void 0 : (_document_currentScript_getAttribute1 = _document_currentScript.getAttribute) === null || _document_currentScript_getAttribute1 === void 0 ? void 0 : (_document_currentScript_getAttribute = _document_currentScript_getAttribute1.call(_document_currentScript, 'src')) === null || _document_currentScript_getAttribute === void 0 ? void 0 : _document_currentScript_getAttribute.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } var BACKEND; /** diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map index 1e002b14541a46..3e7a02aa7ee0cf 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map @@ -3,7 +3,7 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","_iteratorError","ownKeys","keys","_iteratorError1","key","includes","push","dynamicExport","object","_type_of","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","_key","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","_obj","err","_obj1","asyncModule","body","hasAwait","depQueues","Set","_createPromise","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","key1","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU7C,IAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,IAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,IAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,IAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,0FAA0F;QAC1F,4DAA4D;QAC5DA,SAASmB,mBAAmBD;QAC5BD,WAAW,CAACC,GAAG,GAAGlB;IACpB;IACA,OAAOA;AACT;AAEA;;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AEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAItJ,MAAM;AAClB;AACA7B,iBAAiBoL,CAAC,GAAGF;AAErB,kGAAkG;AAClGlL,iBAAiBqL,CAAC,GAAGC;AAMrB,SAASxD,uBAAuByD,OAAiB;IAC/C,+DAA+D;IAC/DpL,OAAOQ,cAAc,CAAC4K,SAAS,QAAQ;QACrCjK,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 762, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","includedList","modulesPromises","includedModuleChunksList","moduleChunksPromises","promise","moduleChunksToLoad","_iteratorError","moduleChunk","_iteratorError1","moduleChunkToLoad","promise1","_iteratorError2","includedModuleChunk","_iteratorError3","included","loadChunkPath","map","has","get","length","every","p","Promise","all","moduleChunks","filter","Set","add","set","push","path","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAehE,IAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,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WACA0G,YACAC;AAEJ;AACA5H,iBAAiB6H,CAAC,GAAGH;AAErB,SAASI,sBAEP7G,SAAoB,EACpB0G,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAACjH,CAAC,CAACC,EAAE,EACTG,WACA0G;AAEJ;AACA3H,iBAAiB+H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 1249, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/build-base.ts"],"sourcesContent":["/// \n/// \n\nconst moduleCache: ModuleCache = {}\ncontextPrototype.c = moduleCache\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// Used by the backend\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n Module\n> = (id, sourceModule) => {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData))\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n\n moduleCache[id] = module\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories\n )\n }\n\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n"],"names":["moduleCache","contextPrototype","c","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","Parent","sourceType","sourceData","moduleFactory","moduleFactories","get","Error","factoryNotAvailableMessage","createModuleObject","exports","context","Context","namespaceObject","interopEsm","registerChunk","registration","getPathFromScript","runtimeParams","length","undefined","installCompressedModuleFactories","BACKEND"],"mappings":"AAAA,0CAA0C;AAC1C,mCAAmC;AAEnC,IAAMA,cAAmC,CAAC;AAC1CC,iBAAiBC,CAAC,GAAGF;AAErB;;CAEC,GACD,aAAa;AACb,6DAA6D;AAC7D,SAASG,8BACPC,SAAoB,EACpBC,QAAkB;IAElB,IAAMC,SAASN,WAAW,CAACK,SAAS;IACpC,IAAIC,QAAQ;QACV,IAAIA,OAAOC,KAAK,EAAE;YAChB,MAAMD,OAAOC,KAAK;QACpB;QACA,OAAOD;IACT;IAEA,OAAOE,kBAAkBH,UAAUI,WAAWC,OAAO,EAAEN;AACzD;AAEA;;CAEC,GACD,sBAAsB;AACtB,aAAa;AACb,6DAA6D;AAC7D,IAAMO,m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reList":[0]}}, - {"offset": {"line": 1320, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","_self_TURBOPACK_CHUNK_SUFFIX","_document_currentScript_getAttribute","TURBOPACK_CHUNK_SUFFIX","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","resolver","_iteratorError","otherChunkData","otherChunkPath","otherChunkUrl","_iteratorError1","moduleId","getChunkRelativeUrl","getOrCreateResolver","resolve","otherChunks","getChunkPath","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","instance","fetchWebAssembly","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","self","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","document","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","Array","from","script","addEventListener","script1","src","fetch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;QAGJC;QACCC,sCAAAA,uCAAAA,yBAAAA;IAHJ,+CAA+C;IAC/C,OACE,CAAA,CAACD,+BAAAA,KAAKE,sBAAsB,AAGS,cAHpCF,0CAAAA,gCACCC,YAAAA,sBAAAA,iCAAAA,0BAAAA,UAAUE,aAAa,cAAvBF,+CAAAA,wCAAAA,wBACIG,YAAY,cADhBH,6DAAAA,uCAAAA,2CAAAA,yBACmB,oBADnBA,2DAAAA,qCAEII,OAAO,CAAC,oBAAoB,QAClC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,G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,qCAA3BjE,SAAAA,6BAAAA,QAAAA,yBAAAA,iCAA6C;4BAA7CA,IAAMoE,SAANpE;4BACHoE,OAAOC,gBAAgB,CAAC,SAAS;gCAC/BtE,SAASqC,MAAM;4BACjB;wBACF;;wBAJKpC;wBAAAA;;;iCAAAA,6BAAAA;gCAAAA;;;gCAAAA;sCAAAA;;;;gBAKP,OAAO;oBACL,IAAMsE,UAASf,SAASG,aAAa,CAAC;oBACtCY,QAAOC,GAAG,GAAGzE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfwE,QAAOT,OAAO,GAAG;wBACf9D,SAASqC,MAAM;oBACjB;oBACA,kDAAkD;oBAClDmB,SAASQ,IAAI,CAACC,WAAW,CAACM;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAInB,MAAM,CAAC,mCAAmC,EAAErD,UAAU;YAClE;QACF;QAEAC,SAAS0C,cAAc,GAAG;QAC1B,OAAO1C,SAASsC,OAAO;IACzB;IAEA,SAASR,iBAAiBL,aAAwB;QAChD,OAAOgD,MAAMlE,oBAAoBkB;IACnC;AACF,CAAC","ignoreList":[0]}}] + {"offset": {"line": 762, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","includedList","modulesPromises","includedModuleChunksList","moduleChunksPromises","promise","moduleChunksToLoad","_iteratorError","moduleChunk","_iteratorError1","moduleChunkToLoad","promise1","_iteratorError2","includedModuleChunk","_iteratorError3","included","loadChunkPath","map","has","get","length","every","p","Promise","all","moduleChunks","filter","Set","add","set","push","path","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAehE,IAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,IAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,IAAMI,mBAAuD,IAAIH;AAEjE,IAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEC,UACEH,YACA,SAACA;uBAAe,CAAC,qBAAqB,EAAEA,YAAY;;IAE1D;IACA,OAAO,CAAC,OAAO,EAAED,SAAS,kBAAkB,EAAEG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA,SAASE,UAEPC,SAAoB;IAEpB,OAAOC,qBAAqC,IAAI,CAACC,CAAC,CAACC,EAAE,EAAEH;AACzD;AACAjB,wBAAwBqB,CAAC,GAAGL;AAE5B,SAASM,iBAAiBC,SAAoB,EAAEN,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AAC,SAACK;eAAMgE,mBAAmBhE;OAC9BsE,IAAI,CAAC,OAAO1B,cAAc;AAC/B;AASA,SAAS2B,kBACPC,WAAsE;IAEtE,IAAI,OAAOA,gBAAgB,UAAU;QACnC,OAAOA;IACT;IACA,IAAMxD,WACJ,OAAOyD,8BAA8B,cACjCA,0BAA0BC,GAAG,KAC7BF,YAAYG,YAAY,CAAC;IAC/B,IAAMC,MAAMC,mBAAmB7D,SAAS8D,OAAO,CAAC,WAAW;IAC3D,IAAMrE,OAAOmE,IAAIG,UAAU,CAACX,mBACxBQ,IAAII,KAAK,CAACZ,gBAAgBtE,MAAM,IAChC8E;IACJ,OAAOnE;AACT;AAEA,IAAMwE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,IAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEP7G,SAAoB,EACpB8G,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAACjH,CAAC,CAACC,EAAE,EACTG,WACA8G,YACAC;AAEJ;AACAhI,iBAAiBiI,CAAC,GAAGH;AAErB,SAASI,sBAEPjH,SAAoB,EACpB8G,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAACrH,CAAC,CAACC,EAAE,EACTG,WACA8G;AAEJ;AACA/H,iBAAiBmI,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 1255, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/build-base.ts"],"sourcesContent":["/// \n/// \n\nconst moduleCache: ModuleCache = {}\ncontextPrototype.c = moduleCache\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = moduleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// Used by the backend\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n Module\n> = (id, sourceModule) => {\n const module = moduleCache[id]\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData))\n }\n\n const module: Module = createModuleObject(id)\n const exports = module.exports\n\n moduleCache[id] = module\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n const context = new (Context as any as ContextConstructor)(\n module,\n exports\n )\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories\n )\n }\n\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n"],"names":["moduleCache","contextPrototype","c","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","Parent","sourceType","sourceData","moduleFactory","moduleFactories","get","Error","factoryNotAvailableMessage","createModuleObject","exports","context","Context","namespaceObject","interopEsm","registerChunk","registration","getPathFromScript","runtimeParams","length","undefined","installCompressedModuleFactories","BACKEND"],"mappings":"AAAA,0CAA0C;AAC1C,mCAAmC;AAEnC,IAAMA,cAAmC,CAAC;AAC1CC,iBAAiBC,CAAC,GAAGF;AAErB;;CAEC,GACD,aAAa;AACb,6DAA6D;AAC7D,SAASG,8BACPC,SAAoB,EACpBC,QAAkB;IAElB,IAAMC,SAASN,WAAW,CAACK,SAAS;IACpC,IAAIC,QAAQ;QACV,IAAIA,OAAOC,KAAK,EAAE;YAChB,MAAMD,OAAOC,KAAK;QACpB;QACA,OAAOD;IACT;IAEA,OAAOE,kBAAkBH,UAAUI,WAAWC,OAAO,EAAEN;AACzD;AAEA;;CAEC,GACD,sBAAsB;AACtB,aAAa;AACb,6DAA6D;AAC7D,IAAMO,mCAEF,SAACC,IAAIC;IACP,IAAMP,SAASN,WAAW,CAACY,GAAG;IAE9B,IAAIN,QAAQ;QACV,IAAIA,OAAOC,KAAK,EAAE;YAChB,MAAMD,OAAOC,KAAK;QACpB;QACA,OAAOD;IACT;IAEA,OAAOE,kBAAkBI,IAAIH,WAAWK,MAAM,EAAED,aAAaD,EAAE;AACjE;AAEA,SAASJ,kBACPI,EAAY,EACZG,UAAsB,EACtBC,UAAsB;IAEtB,IAAMC,gBAAgBC,gBAAgBC,GAAG,CAACP;IAC1C,IAAI,OAAOK,kBAAkB,YAAY;QACvC,sEAAsE;QACtE,0EAA0E;QAC1E,mDAAmD;QACnD,MAAM,IAAIG,MAAMC,2BAA2BT,IAAIG,YAAYC;IAC7D;IAEA,IAAMV,SAAiBgB,mBAAmBV;IAC1C,IAAMW,UAAUjB,OAAOiB,OAAO;IAE9BvB,WAAW,CAACY,GAAG,GAAGN;IAElB,4EAA4E;IAC5E,IAAMkB,UAAU,IAAKC,QACnBnB,QACAiB;IAEF,IAAI;QACFN,cAAcO,SAASlB,QAAQiB;IACjC,EAAE,OAAOhB,OAAO;QACdD,OAAOC,KAAK,GAAGA;QACf,MAAMA;IACR;IAEA,IAAID,OAAOoB,eAAe,IAAIpB,OAAOiB,OAAO,KAAKjB,OAAOoB,eAAe,EAAE;QACvE,yDAAyD;QACzDC,WAAWrB,OAAOiB,OAAO,EAAEjB,OAAOoB,eAAe;IACnD;IAEA,OAAOpB;AACT;AAEA,6DAA6D;AAC7D,SAASsB,cAAcC,YAA+B;IACpD,IAAMzB,YAAY0B,kBAAkBD,YAAY,CAAC,EAAE;IACnD,IAAIE;IACJ,8GAA8G;IAC9G,IAAIF,aAAaG,MAAM,KAAK,GAAG;QAC7BD,gBAAgBF,YAAY,CAAC,EAAE;IACjC,OAAO;QACLE,gBAAgBE;QAChBC,iCACEL,cACA,WAAW,GAAG,GACdX;IAEJ;IAEA,OAAOiB,QAAQP,aAAa,CAACxB,WAAW2B;AAC1C","ignoreList":[0]}}, + {"offset": {"line": 1326, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","_self_TURBOPACK_ASSET_SUFFIX","_document_currentScript_getAttribute","TURBOPACK_ASSET_SUFFIX","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","resolver","_iteratorError","otherChunkData","otherChunkPath","otherChunkUrl","_iteratorError1","moduleId","getChunkRelativeUrl","getOrCreateResolver","resolve","otherChunks","getChunkPath","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","instance","fetchWebAssembly","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","self","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","document","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","Array","from","script","addEventListener","script1","src","fetch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;QAGJC;QACCC,sCAAAA,uCAAAA,yBAAAA;IAHJ,+CAA+C;IAC/C,OACE,CAAA,CAACD,+BAAAA,KAAKE,sBAAsB,AAGS,cAHpCF,0CAAAA,gCACCC,YAAAA,sBAAAA,iCAAAA,0BAAAA,UAAUE,aAAa,cAAvBF,+CAAAA,wCAAAA,wBACIG,YAAY,cADhBH,6DAAAA,uCAAAA,2CAAAA,yBACmB,oBADnBA,2DAAAA,qCAEII,OAAO,CAAC,oBAAoB,QAClC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,IAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACFG,eAAN,SAAMA,cAAcC,SAAS,EAAEC,MAAM;;oBAC7BC,UAEAC,UAODC,2BAAAA,mBAAAA,gBAAAA,WAAAA,OAAMC,gBACHC,gBACAC,eAcDC,4BAAAA,oBAAAA,iBAAAA,YAAAA,QAAMC;;;;4BAzBPP,WAAWQ,oBAAoBV;4BAE/BG,WAAWQ,oBAAoBT;4BACrCC,SAASS,OAAO;4BAEhB,IAAIX,UAAU,MAAM;gCAClB;;;4BACF;4BAEKG,kCAAAA,2BAAAA;;gCAAL,IAAKA,YAAwBH,OAAOY,WAAW,uBAA1CT,6BAAAA,QAAAA,yBAAAA,iCAA4C;oCAAtCC,iBAAND;oCACGE,iBAAiBQ,aAA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,IAAInB,MAAM,CAAC,mCAAmC,EAAErD,UAAU;YAClE;QACF;QAEAC,SAAS0C,cAAc,GAAG;QAC1B,OAAO1C,SAASsC,OAAO;IACzB;IAEA,SAASR,iBAAiBL,aAAwB;QAChD,OAAOgD,MAAMlE,oBAAoBkB;IACnC;AACF,CAAC","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/6642e_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/6642e_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js index 3979b9ac22a124..7bd76a30e082c0 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/6642e_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/6642e_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js @@ -23,7 +23,7 @@ // this code as a module. We still don't fully trust it, so we'll validate the // types and ensure that the next chunk URLs are same-origin. const config = JSON.parse(paramsString); - const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''; + const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''; const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''; // In a normal browser context, the runtime can figure out which chunk is // currently executing via `document.currentScript`. Workers don't have that @@ -35,7 +35,7 @@ // its own URL at the front. const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []; Object.assign(self, { - TURBOPACK_CHUNK_SUFFIX, + TURBOPACK_ASSET_SUFFIX, TURBOPACK_NEXT_CHUNK_URLS, NEXT_DEPLOYMENT_ID }); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js.map index 2092500cff64fb..620994969d6457 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js.map @@ -3,8 +3,8 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IA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C,IAAK,MAAM9G,OAAO4G,QAASE,MAAM,CAAC9G,IAAI,GAAG,AAAC4G,OAAe,CAAC5G,IAAI;IAC9D8G,OAAOC,IAAI,GAAGJ;IACdG,OAAOE,QAAQ,GAAGL,SAASM,OAAO,CAAC,UAAU;IAC7CH,OAAOI,MAAM,GAAGJ,OAAOK,QAAQ,GAAG;IAClCL,OAAOM,QAAQ,GAAGN,OAAOO,MAAM,GAAG,CAAC,GAAGC,QAAsBX;IAC5D,IAAK,MAAM3G,OAAO8G,OAChBzJ,OAAOQ,cAAc,CAAC,IAAI,EAAEmC,KAAK;QAC/BnB,YAAY;QACZ0I,cAAc;QACd/I,OAAOsI,MAAM,CAAC9G,IAAI;IACpB;AACJ;AACA0G,YAAYvJ,SAAS,GAAG0J,IAAI1J,SAAS;AACrCD,iBAAiBsK,CAAC,GAAGd;AAErB;;CAEC,GACD,SAASe,UAAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEC,UACEH,YACA,CAACA,aAAe,CAAC,qBAAqB,EAAEA,YAAY;IAE1D;IACA,OAAO,CAAC,OAAO,EAAED,SAAS,kBAAkB,EAAEG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA,SAASE,UAEPC,SAAoB;IAEpB,OAAOC,qBAAqC,IAAI,CAACC,CAAC,CAACC,EAAE,EAAEH;AACzD;AACAjB,wBAAwBqB,CAAC,GAAGL;AAE5B,SAASM,iBAAiBC,SAAoB,EAAEN,SAAoB;IAClE,OAAOC,qBAAsCK,WAAWN;AAC1D;AAEA,eAAeC,kBACbN,UAAsB,EACtBC,UAAsB,EACtBI,SAAoB;IAEpB,IAAI,OAAOA,cAAc,UAAU;QACjC,OAA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,CAAC,CAACK,IAAMmE,mBAAmBnE,IAC9ByE,IAAI,CAAC,OAAOjB,cAAc;AAC/B;AASA,SAASkB,kBACPC,WAAsE;IAEtE,IAAI,OAAOA,gBAAgB,UAAU;QACnC,OAAOA;IACT;IACA,MAAMpD,WACJ,OAAOqD,8BAA8B,cACjCA,0BAA0BC,GAAG,KAC7BF,YAAYG,YAAY,CAAC;IAC/B,MAAMC,MAAMC,mBAAmBzD,SAAS0D,OAAO,CAAC,WAAW;IAC3D,MAAMlE,OAAOgE,IAAIG,UAAU,CAACX,mBACxBQ,IAAII,KAAK,CAACZ,gBAAgBzE,MAAM,IAChCiF;IACJ,OAAOhE;AACT;AAEA,MAAMqE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oDAAoD,GAEpD,MAAMC,iBAAyCC,OAAOC,MAAM,CAAC;AAC7DL,oBAAoBM,CAAC,GAAGH;AAgCxB,MAAMI,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAEA;;CAEC,GACD,MAAME,iBAAgC,IAAIC;AAE1C;;;;;;CAMC,GACD,MAAMC,kBAAiD,IAAIC;AAC3D;;CAEC,GACD,MAAMC,kBAAiD,IAAID;AAC3D;;;;CAIC,GACD,MAAME,oBAAwC,IAAIJ;AAClD;;CAEC,GACD,MAAMK,qBAAyD,IAAIH;AACnE;;CAEC,GACD,MAAMI,qBAAyD,IAAIJ;AAEnE;;;CAGC,GACD,MAAMK,gBAAwC,IAAIL;AAClD;;CAEC,GACD,MAAMM,iBAAwC,IAAIN;AAClD;;CAEC,GACD,MAAMO,2BAA0C,IAAIT;AAEpD;;CAEC,GACD,aAAa;AACb,SAASU,8BACP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QAAQ0D,aAAa,CAACxL,WAAW2L;AAC1C;AAEA;;CAEC,GACD,SAASG,kBAAkBC,SAAoB;IAC7C,MAAMC,kBAAkBD,UAAUE,MAAM;IACxC,MAAMpC,gBAAgB6B,kBAAkBM;IACxC,sEAAsE;IACtElE,QAAQ0D,aAAa,CAAC3B;IACtB1G,WAAW+I,gCAAgC,CAAElL,IAAI,CAAC;QAChD6I;QACAD,YAAYuC,IAAI,CAAC,MAAMtC;KACxB;IAED,+CAA+C;IAC/C,MAAMqB,aAAa,IAAI7L,IAAI0M,UAAUrE,MAAM,CAAC0E,GAAG,CAACC;IAChD3M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1601, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;gBAClB;YACF;YAEA,KAAK,MAAMM,kBAAkBN,OAAOO,WAAW,CAAE;gBAC/C,MAAMC,iBAAiBC,aAAaH;gBACpC,MAAMI,gBAAgBR,oBAAoBM;gBAE1C,iFAAiF;gBACjFJ,oBAAoBM;YACtB;YAEA,kFAAkF;YAClF,MAAMC,QAAQC,GAAG,CACfZ,OAAOO,WAAW,CAACM,GAAG,CAAC,CAACP,iBACtBQ,iBAAiBf,WAAWO;YAIhC,IAAIN,OAAOe,gBAAgB,CAACC,MAAM,GAAG,GAAG;gBACtC,KAAK,MAAMC,YAAYjB,OAAOe,gBAAgB,CAAE;oBAC9CG,8BAA8BnB,WAAWkB;gBAC3C;YACF;QACF;QAEA;;;KAGC,GACDE,iBAAgBC,UAAsB,EAAEnB,QAAkB;YACxD,OAAOoB,YAAYD,YAAYnB;QACjC;QAEA,MAAMqB,iBACJC,WAAuB,EACvBC,WAAuB,EACvBC,aAAwB,EACxBC,WAAqC,EACrCC,UAA+B;YAE/B,MAAMC,MAAMC,iBAAiBJ;YAE7B,MAAM,EAAEK,QAAQ,EAAE,GA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EAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, - {"offset": {"line": 1766, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEE,gBAAgB,gBAAgB,EAAE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xE,4BAA4B;gBAC5BE,aAAa,CAAC,EAAE,CAACa,aAAa,CAAEC,YAAY,CAC1C1B,MACAY,aAAa,CAAC,EAAE,CAACe,WAAW;YAEhC;QACF;QAEAC,SAAS,IAAMC,KAAKC,QAAQ,CAACC,MAAM;IACrC;IAEA,SAAStC,eAAeD,QAAkB;QACxCwC,eAAeC,MAAM,CAACzC;IACxB;AACF,CAAC;AAED,SAAS0C,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAyB;IACtDF,QAAQ,CAAC,kBAAkB,EAAEG,UAC3BR,SAASS,MAAM,GAAGC,kBAAkBJ,MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEC,UACEH,YACA,CAACA,aAAe,CAAC,qBAAqB,EAAEA,YAAY;IAE1D;IACA,OAAO,CAAC,OAAO,EAAED,SAAS,kBAAkB,EAAEG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA,SAASE,UAEPC,SAAoB;IAEpB,OAAOC,qBAAqC,IAAI,CAACC,CAAC,CAACC,EAAE,EAAEH;AACzD;AACAjB,wBAAwBqB,CAAC,GAAGL;AAE5B,SAASM,iBAAiBC,SAAoB,EAAEN,SAAoB;IAClE,OAAOC,qBAAsCK,WAAWN;AAC1D;AAEA,eAAeC,kBACbN,UAAsB,EACtBC,UAAsB,EACtBI,SAAoB;IAEpB,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOO,cAAcZ,YAAYC,YAAYI;IAC/C;IAEA,MAAMQ,eAAeR,UAAUS,QAAQ,IAAI,EAAE;IAC7C,MAAMC,kBAAkBF,aAAaG,GAAG,CAAC,CAACF;QACxC,IAAItB,gBAAgByB,GAAG,CAACH,WAAW,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,IAAMuE,mBAAmBvE,IAC9B6E,IAAI,CAAC,OAAO1B,cAAc;AAC/B;AASA,SAAS2B,kBACPC,WAAsE;IAEtE,IAAI,OAAOA,gBAAgB,UAAU;QACnC,OAAOA;IACT;IACA,MAAMxD,WACJ,OAAOyD,8BAA8B,cACjCA,0BAA0BC,GAAG,KAC7BF,YAAYG,YAAY,CAAC;IAC/B,MAAMC,MAAMC,mBAAmB7D,SAAS8D,OAAO,CAAC,WAAW;IAC3D,MAAMtE,OAAOoE,IAAIG,UAAU,CAACX,mBACxBQ,IAAII,KAAK,CAACZ,gBAAgB7E,MAAM,IAChCqF;IACJ,OAAOpE;AACT;AAEA,MAAMyE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 753, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oDAAoD,GAEpD,MAAMC,iBAAyCC,OAAOC,MAAM,CAAC;AAC7DL,oBAAoBM,CAAC,GAAGH;AAgCxB,MAAMI,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAEA;;CAEC,GACD,MAAME,iBAAgC,IAAIC;AAE1C;;;;;;CAMC,GACD,MAAMC,kBAAiD,IAAIC;AAC3D;;CAEC,GACD,MAAMC,kBAAiD,IAAID;AAC3D;;;;CAIC,GACD,MAAME,oBAAwC,IAAIJ;AAClD;;CAEC,GACD,MAAMK,qBAAyD,IAAIH;AACnE;;CAEC,GACD,MAAMI,qBAAyD,IAAIJ;AAEnE;;;CAGC,GACD,MAAMK,gBAAwC,IAAIL;AAClD;;CAEC,GACD,MAAMM,iBAAwC,IAAIN;AAClD;;CAEC,GACD,MAAMO,2BAA0C,IAAIT;AAEpD;;CAEC,GACD,aAAa;AACb,SAASU,8BACPC,SAAoB,EACpB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,CAACxL,WAAW2L;AAC1C;AAEA;;CAEC,GACD,SAASG,kBAAkBC,SAAoB;IAC7C,MAAMC,kBAAkBD,UAAUE,MAAM;IACxC,MAAMpC,gBAAgB6B,kBAAkBM;IACxC,sEAAsE;IACtElE,QAAQ0D,aAAa,CAAC3B;IACtB1G,WAAW+I,gCAAgC,CAAElL,IAAI,CAAC;QAChD6I;QACAD,YAAYuC,IAAI,CAAC,MAAMtC;KACxB;IAED,+CAA+C;IAC/C,MAAMqB,aAAa,IAAI7L,IAAI0M,UAAUrE,MAAM,CAAC0E,GAAG,CAACC;IAChD3M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;gBAClB;YACF;YAEA,KAAK,MAAMM,kBAAkBN,OAAOO,WAAW,CAAE;gBAC/C,MAAMC,iBAAiBC,aAAaH;gBACpC,MAAMI,gBAAgBR,oBAAoBM;gBAE1C,iFAAiF;gBACjFJ,oBAAoBM;YACtB;YAEA,kFAAkF;YAClF,MAAMC,QAAQC,GAAG,CACfZ,OAAOO,WAAW,CAACM,GAAG,CAAC,CAACP,iBACtBQ,iBAAiBf,WAAWO;YAIhC,IAAIN,OAAOe,gBAAgB,CAACC,MAAM,GAAG,GAAG;gBACtC,KAAK,MAAMC,YAAYjB,OAAOe,gBAAgB,CAAE;oBAC9CG,8BAA8BnB,WAAWkB;gBAC3C;YACF;QACF;QAEA;;;KAGC,GACDE,iBAAgBC,UAAsB,EAAEnB,QAAkB;YACxD,OAAOoB,YAAYD,YAAYnB;QACjC;QAEA,MAAMqB,iBACJC,WAAuB,EACvBC,WAAuB,EACvBC,aAAwB,EACxBC,WAAqC,EACrCC,UAA+B;YAE/B,MAAMC,MAAMC,iBAAiBJ;YAE7B,MAAM,EAAEK,QAAQ,EAAE,GAAG,MAAMC,YAAYC,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AwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1772, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEE,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAA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,aAAa,CAAC,EAAE,CAACa,aAAa,CAAEC,YAAY,CAC1C1B,MACAY,aAAa,CAAC,EAAE,CAACe,WAAW;YAEhC;QACF;QAEAC,SAAS,IAAMC,KAAKC,QAAQ,CAACC,MAAM;IACrC;IAEA,SAAStC,eAAeD,QAAkB;QACxCwC,eAAeC,MAAM,CAACzC;IACxB;AACF,CAAC;AAED,SAAS0C,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAyB;IACtDF,QAAQ,CAAC,kBAAkB,EAAEG,UAC3BR,SAASS,MAAM,GAAGC,kBAAkBJ,MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js.map index 2092500cff64fb..620994969d6457 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js.map @@ -3,8 +3,8 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,0FAA0F;QAC1F,4DAA4D;QAC5DA,SAASmB,mBAAmBD;QAC5BD,WAAW,CAACC,GAAG,GAAGlB;IACpB;IACA,OAAOA;AACT;AAE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GACD,SAASe,UAAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEj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;CAEC,GACD,SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;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BAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1601, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IA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uD,KAAKI,OAAO,GAAG;wBACbzD,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, - {"offset": {"line": 1766, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SUFFIX","btoa","unescape","encodeURIComponent","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IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC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,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 753, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;C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,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;g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AAG;wBACbzD,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1772, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;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;AACd","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js index dc21694a21662c..8f63fb49dd901a 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_index_96b0ffc6.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -682,6 +682,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -693,7 +699,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -714,7 +720,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1605,9 +1611,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1848,7 +1854,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js index 12f2b4da8ef49f..5e94d209989b98 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -682,6 +682,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -693,7 +699,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -714,7 +720,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1605,9 +1611,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1848,7 +1854,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_input_73fc86c5._.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_input_73fc86c5._.js index 45878e1ade87a8..85c78abe7697c3 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_input_73fc86c5._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_input_73fc86c5._.js @@ -1,7 +1,7 @@ (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_input_73fc86c5._.js", "[project]/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/input/worker.js (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/worker.60655f93.js");}), +__turbopack_context__.q("/static/worker.60655f93.js");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/input/worker.js [test] (ecmascript, worker loader)", ((__turbopack_context__) => { __turbopack_context__.v(__turbopack_context__.b("output/6642e_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js", ["output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_841f9693.js","output/ba425_crates_turbopack-tests_tests_snapshot_workers_basic_input_worker_01a12aa6.js"], false)); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js.map index 0470b96a8e80b4..bef44d569bd3c0 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/basic/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_basic_output_2867ca5f._.js.map @@ -1 +1 @@ -{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_CHUNK_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_CHUNK_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_CHUNK_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAAMC,OAAe;QAC5BC,QAAQC,KAAK,CAACF;QACd,MAAM,IAAIG,MAAMH;IAClB;IAEA,2EAA2E;IAC3E,6EAA6E;IAC7E,gEAAgE;IAChE,IACE,OAAO,AAACI,IAAY,CAAC,oBAAoB,KAAK,eAC9C,CAAC,CAACA,gBAAgB,AAACA,IAAY,CAAC,oBAAoB,GACpD;QACAL,MAAM;IACR;IAEA,MAAMM,MAAM,IAAIC,IAAIC,SAASC,IAAI;IAEjC,mEAAmE;IACnE,IAAIC,eAAeJ,IAAIK,YAAY,CAACC,GAAG,CAAC;IACxC,IAAI,CAACF,gBAAgBJ,IAAIO,IAAI,CAACC,UAAU,CAAC,aAAa;QACpDJ,eAAeK,mBAAmBT,IAAIO,IAAI,CAACG,KAAK,CAAC,WAAWC,MAAM;IACpE;IAEA,IAAI,CAACP,cAAcV,MAAM;IAEzB,2EAA2E;IAC3E,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAMkB,SAAgCC,KAAKC,KAAK,CAACV;IAEjD,MAAMW,yBAAyB,OAAOH,OAAOI,CAAC,KAAK,WAAWJ,OAAOI,CAAC,GAAG;IACzE,MAAMC,qBAAqB,OAAOL,OAAOM,CAAC,KAAK,WAAWN,OAAOM,CAAC,GAAG;IACrE,yEAAyE;IACzE,4EAA4E;IAC5E,mEAAmE;IACnE,wBAAwB;IACxB,EAAE;IACF,8EAA8E;IAC9E,8EAA8E;IAC9E,4BAA4B;IAC5B,MAAMC,4BAA4BC,MAAMC,OAAO,CAACT,OAAOU,EAAE,IAAIV,OAAOU,EAAE,GAAG,EAAE;IAE3EC,OAAOC,MAAM,CAACzB,MAAM;QAClBgB;QACAI;QACAF;IACF;IAEA,IAAIE,0BAA0BR,MAAM,GAAG,GAAG;QACxC,MAAMc,gBAA0B,EAAE;QAClC,KAAK,MAAMC,SAASP,0BAA2B;YAC7C,qCAAqC;YACrC,MAAMQ,WAAW,IAAI1B,IAAIyB,OAAOxB,SAAS0B,MAAM;YAC/C,uEAAuE;YACvE,qEAAqE;YACrE,mEAAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file +{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_ASSET_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_ASSET_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_ASSET_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAA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E,qEAAqE;YACrE,mEAAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/6642e_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/6642e_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js index 5f159495eab1ea..c530545f443bd5 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/6642e_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/6642e_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js @@ -23,7 +23,7 @@ // this code as a module. We still don't fully trust it, so we'll validate the // types and ensure that the next chunk URLs are same-origin. const config = JSON.parse(paramsString); - const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''; + const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''; const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''; // In a normal browser context, the runtime can figure out which chunk is // currently executing via `document.currentScript`. Workers don't have that @@ -35,7 +35,7 @@ // its own URL at the front. const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []; Object.assign(self, { - TURBOPACK_CHUNK_SUFFIX, + TURBOPACK_ASSET_SUFFIX, TURBOPACK_NEXT_CHUNK_URLS, NEXT_DEPLOYMENT_ID }); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js.map index 2092500cff64fb..620994969d6457 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js.map @@ -3,8 +3,8 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAs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AIF,UAAU;IAClC,MAAMG,SAA8B,CAAC;IACrC,IAAK,MAAM9G,OAAO4G,QAASE,MAAM,CAAC9G,IAAI,GAAG,AAAC4G,OAAe,CAAC5G,IAAI;IAC9D8G,OAAOC,IAAI,GAAGJ;IACdG,OAAOE,QAAQ,GAAGL,SAASM,OAAO,CAAC,UAAU;IAC7CH,OAAOI,MAAM,GAAGJ,OAAOK,QAAQ,GAAG;IAClCL,OAAOM,QAAQ,GAAGN,OAAOO,MAAM,GAAG,CAAC,GAAGC,QAAsBX;IAC5D,IAAK,MAAM3G,OAAO8G,OAChBzJ,OAAOQ,cAAc,CAAC,IAAI,EAAEmC,KAAK;QAC/BnB,YAAY;QACZ0I,cAAc;QACd/I,OAAOsI,MAAM,CAAC9G,IAAI;IACpB;AACJ;AACA0G,YAAYvJ,SAAS,GAAG0J,IAAI1J,SAAS;AACrCD,iBAAiBsK,CAAC,GAAGd;AAErB;;CAEC,GACD,SAASe,UAAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEC,UACEH,YACA,CAACA,aAAe,CAAC,qBAAqB,EAAEA,YAAY;IAE1D;IACA,OAAO,CAAC,OAAO,EAAED,SAAS,kBAAkB,EAAEG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA,SAASE,UAEPC,SAAoB;IAEpB,OAAOC,qBAAqC,IAAI,CAACC,CAAC,CAACC,EAAE,EAAEH;AACzD;AACAjB,wBAAwBqB,CAAC,GAAGL;AAE5B,SAASM,iBAAiBC,SAAoB,EAAEN,SAAoB;IAClE,OAAOC,qBAAsCK,WAAWN;AAC1D;AAEA,eAAeC,kBACbN,UAAsB,EACtBC,UAAsB,EACtBI,SAAoB;I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AAkBjF,UACzBkF,KAAK,CAAC,KACN7E,GAAG,CAAC,CAACK,IAAMmE,mBAAmBnE,IAC9ByE,IAAI,CAAC,OAAOjB,cAAc;AAC/B;AASA,SAASkB,kBACPC,WAAsE;IAEtE,IAAI,OAAOA,gBAAgB,UAAU;QACnC,OAAOA;IACT;IACA,MAAMpD,WACJ,OAAOqD,8BAA8B,cACjCA,0BAA0BC,GAAG,KAC7BF,YAAYG,YAAY,CAAC;IAC/B,MAAMC,MAAMC,mBAAmBzD,SAAS0D,OAAO,CAAC,WAAW;IAC3D,MAAMlE,OAAOgE,IAAIG,UAAU,CAACX,mBACxBQ,IAAII,KAAK,CAACZ,gBAAgBzE,MAAM,IAChCiF;IACJ,OAAOhE;AACT;AAEA,MAAMqE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oDAAoD,GAEpD,MAAMC,iBAAyCC,OAAOC,MAAM,CAAC;AAC7DL,oBAAoBM,CAAC,GAAGH;AAgCxB,MAAMI,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAEA;;CAEC,GACD,MAAME,iBAAgC,IAAIC;AAE1C;;;;;;CAMC,GACD,MAAMC,kBAAiD,IAAIC;AAC3D;;CAEC,GACD,MAAMC,kBAAiD,IAAID;AAC3D;;;;CAIC,GACD,MAAME,oBAAwC,IAAIJ;AAClD;;CAEC,GACD,MAAMK,qBAAyD,IAAIH;AACnE;;CAEC,GACD,MAAMI,qBAAyD,IAAIJ;AAEnE;;;CAGC,GACD,MAAMK,gBAAwC,IAAIL;AAClD;;CAEC,GACD,MAAMM,iBAAwC,IAAIN;AAClD;;CAEC,GACD,MAAMO,2BAA0C,IAAIT;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F,iBAAiBvF,IAAIR;IAE3C;IACA,OAAO8H,QAAQ0D,aAAa,CAACxL,WAAW2L;AAC1C;AAEA;;CAEC,GACD,SAASG,kBAAkBC,SAAoB;IAC7C,MAAMC,kBAAkBD,UAAUE,MAAM;IACxC,MAAMpC,gBAAgB6B,kBAAkBM;IACxC,sEAAsE;IACtElE,QAAQ0D,aAAa,CAAC3B;IACtB1G,WAAW+I,gCAAgC,CAAElL,IAAI,CAAC;QAChD6I;QACAD,YAAYuC,IAAI,CAAC,MAAMtC;KACxB;IAED,+CAA+C;IAC/C,MAAMqB,aAAa,IAAI7L,IAAI0M,UAAUrE,MAAM,CAAC0E,GAAG,CAACC;IAChD3M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1601, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;gBAClB;YACF;YAEA,KAAK,MAAMM,kBAAkBN,OAAOO,WAAW,CAAE;gBAC/C,MAAMC,iBAAiBC,aAAaH;gBACpC,MAAMI,gBAAgBR,oBAAoBM;gBAE1C,iFAAiF;gBACjFJ,oBAAoBM;YACtB;YAEA,kFAAkF;YAClF,MAAMC,QAAQC,GAAG,CACfZ,OAAOO,WAAW,CAACM,GAAG,CAAC,CAACP,iBACtBQ,iBAAiBf,WAAWO;YAIhC,IAAIN,OAAOe,gBAAgB,CAACC,MAAM,GAAG,GAAG;gBACtC,KAAK,MAAMC,YAAYjB,OAAOe,gBAAgB,CAAE;oBAC9CG,8BAA8BnB,WAAWkB;gBAC3C;YACF;QACF;QAEA;;;KAGC,GACDE,iBAAgBC,UAAsB,EAAEnB,QAAkB;YACxD,OAAOoB,YAAYD,YAAYnB;QACjC;QAEA,MAAMqB,iBACJC,WAAuB,EACvBC,WAAuB,EACvBC,aAAwB,EACxBC,WAAqC,EACrCC,UAA+B;YAE/B,MAAMC,MAAMC,iBAAi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C;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, - {"offset": {"line": 1766, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SA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BAAoB;oBACpBO;gBACF;gBAEA,wEAAwE;gBACxE,4BAA4B;gBAC5BE,aAAa,CAAC,EAAE,CAACa,aAAa,CAAEC,YAAY,CAC1C1B,MACAY,aAAa,CAAC,EAAE,CAACe,WAAW;YAEhC;QACF;QAEAC,SAAS,IAAMC,KAAKC,QAAQ,CAACC,MAAM;IACrC;IAEA,SAAStC,eAAeD,QAAkB;QACxCwC,eAAeC,MAAM,CAACzC;IACxB;AACF,CAAC;AAED,SAAS0C,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAyB;IACtDF,QAAQ,CAAC,kBAAkB,EAAEG,UAC3BR,SAASS,MAAM,GAAGC,kBAAkBJ,MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,EAAED,YAAY;YACjE;QACF;YACEC,sBAAsB,CAAC,oCAAoC,EAAED,YAAY;YACzE;QACF;YACEC,sBAAsB;YACtB;QACF;YACEC,UACEH,YACA,CAACA,aAAe,CAAC,qBAAqB,EAAEA,YAAY;IAE1D;IACA,OAAO,CAAC,OAAO,EAAED,SAAS,kBAAkB,EAAEG,oBAAoB,0CAA0C,CAAC;AAC/G;AAEA,SAASE,UAEPC,SAAoB;IAEpB,OAAOC,qBAAqC,IAAI,CAACC,CAAC,CAACC,EAAE,EAAEH;AACzD;AACAjB,wBAAwBqB,CAAC,GAAGL;AAE5B,SAASM,iBAAiBC,SAAoB,EAAEN,SAAoB;IAClE,OAAOC,qBAAsCK,WAAWN;AAC1D;AAEA,eAAeC,kBACbN,UAAsB,EACtBC,UAAsB,EACtBI,SAAoB;IAEpB,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOO,cAAcZ,YAAYC,YAAYI;IAC/C;IAEA,MAAMQ,eAAeR,UAAUS,QAAQ,IAAI,EAAE;IAC7C,MAAMC,kBAAkBF,aAAaG,GAAG,CAAC,CAACF;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BsF,KAAK,CAAC,KACNjF,GAAG,CAAC,CAACK,IAAMuE,mBAAmBvE,IAC9B6E,IAAI,CAAC,OAAO1B,cAAc;AAC/B;AASA,SAAS2B,kBACPC,WAAsE;IAEtE,IAAI,OAAOA,gBAAgB,UAAU;QACnC,OAAOA;IACT;IACA,MAAMxD,WACJ,OAAOyD,8BAA8B,cACjCA,0BAA0BC,GAAG,KAC7BF,YAAYG,YAAY,CAAC;IAC/B,MAAMC,MAAMC,mBAAmB7D,SAAS8D,OAAO,CAAC,WAAW;IAC3D,MAAMtE,OAAOoE,IAAIG,UAAU,CAACX,mBACxBQ,IAAII,KAAK,CAACZ,gBAAgB7E,MAAM,IAChCqF;IACJ,OAAOpE;AACT;AAEA,MAAMyE,aAAa;AACnB;;CAEC,GACD,SAASC,KAAKC,cAAoC;IAChD,OAAOF,WAAWG,IAAI,CAACD;AACzB;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 753, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,QAAQC,SAAS;AAE7C;;;;;;CAMC,GAED,oDAAoD,GAEpD,MAAMC,iBAAyCC,OAAOC,MAAM,CAAC;AAC7DL,oBAAoBM,CAAC,GAAGH;AAgCxB,MAAMI,yBAAyBC;IAC7BC,OAAO,mBAAkB;IAEzBC,gBAA2B;IAE3BH,YAAYI,OAAe,EAAED,eAA2B,CAAE;QACxD,KAAK,CAACC;QACN,IAAI,CAACD,eAAe,GAAGA;IACzB;AACF;AAEA;;CAEC,GACD,MAAME,iBAAgC,IAAIC;AAE1C;;;;;;CAMC,GACD,MAAMC,kBAAiD,IAAIC;AAC3D;;CAEC,GACD,MAAMC,kBAAiD,IAAID;AAC3D;;;;CAIC,GACD,MAAME,oBAAwC,IAAIJ;AAClD;;CAEC,GACD,MAAMK,qBAAyD,IAAIH;AACnE;;CAEC,GACD,MAAMI,qBAAyD,IAAIJ;AAEnE;;;CAGC,GACD,MAAMK,gBAAwC,IAAIL;AAClD;;CAEC,GACD,MAAMM,iBAAwC,IAAIN;AAClD;;CAEC,GACD,MAAMO,2BAA0C,IAAIT;AAEpD;;CAEC,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AAIR;IAE3C;IACA,OAAO8H,QAAQ0D,aAAa,CAACxL,WAAW2L;AAC1C;AAEA;;CAEC,GACD,SAASG,kBAAkBC,SAAoB;IAC7C,MAAMC,kBAAkBD,UAAUE,MAAM;IACxC,MAAMpC,gBAAgB6B,kBAAkBM;IACxC,sEAAsE;IACtElE,QAAQ0D,aAAa,CAAC3B;IACtB1G,WAAW+I,gCAAgC,CAAElL,IAAI,CAAC;QAChD6I;QACAD,YAAYuC,IAAI,CAAC,MAAMtC;KACxB;IAED,+CAA+C;IAC/C,MAAMqB,aAAa,IAAI7L,IAAI0M,UAAUrE,MAAM,CAAC0E,GAAG,CAACC;IAChD3M,mBAAmB2C,GAAG,CAACwH,eAAeqB;IACtC,KAAK,MAAMlL,aAAakL,WAAY;QAClC,IAAIC,kBAAkBxL,mBAAmBiC,GAAG,CAAC5B;QAC7C,IAAI,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;YAEhB,IAAIL,UAAU,MAAM;gBAClB;YACF;YAEA,KAAK,MAAMM,kBAAkBN,OAAOO,WAAW,CAAE;gBAC/C,MAAMC,iBAAiBC,aAAaH;gBACpC,MAAMI,gBAAgBR,oBAAoBM;gBAE1C,iFAAiF;gBACjFJ,oBAAoBM;YACtB;YAEA,kFAAkF;YAClF,MAAMC,QAAQC,GAAG,CACfZ,OAAOO,WAAW,CAACM,GAAG,CAAC,CAACP,iBACtBQ,iBAAiBf,WAAWO;YAIhC,IAAIN,OAAOe,gBAAgB,CAACC,MAAM,GAAG,GAAG;gBACtC,KAAK,MAAMC,YAAYjB,OAAOe,gBAAgB,CAAE;oBAC9CG,8BAA8BnB,WAAWkB;gBAC3C;YACF;QACF;QAEA;;;KAGC,GACDE,iBAAgBC,UAAsB,EAAEnB,QAAkB;YACxD,OAAOoB,YAAYD,YAAYnB;QACjC;QAEA,MAAMqB,iBACJC,WAAuB,EACvBC,WAAuB,EACvBC,aAAwB,EACxBC,WAAqC,EACrCC,UAA+B;YAE/B,MAAMC,MAAMC,iBAAiBJ;YAE7B,MAAM,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,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1772, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeURIComponent","eval"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,gDAAgD;AAChD,4CAA4C;AAC5C,iDAAiD;AACjD,0DAA0D;AAE1D,IAAIA;AACH,CAAC;IACAA,cAAc;QACZC,aAAYC,QAAQ;YAClBC,eAAeD;YAEf,gFAAgF;YAChF,MAAME,kBAAkBC,UAAUH;YAElC,IAAII,MAAMJ,WAAW;gBACnB,MAAMK,QAAQC,SAASC,gBAAgB,CACrC,CAAC,WAAW,EAAEP,SAAS,eAAe,EAAEA,SAAS,eAAe,EAAEE,gBAAgB,eAAe,EAAEA,gBAAgB,GAAG,CAAC;gBAEzH,KAAK,MAAMM,QAAQC,MAAMC,IAAI,CAACL,OAAQ;oBACpCG,KAAKG,MAAM;gBACb;YACF,OAAO,IAAIC,KAAKZ,WAAW;gBACzB,mEAAmE;gBACnE,0BAA0B;gBAC1B,uEAAuE;gBACvE,4DAA4D;gBAC5D,MAAMa,UAAUP,SAASC,gBAAgB,CACvC,CAAC,YAAY,EAAEP,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEE,g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;gBAEA,wEAAwE;gBACxE,4BAA4B;gBAC5BE,aAAa,CAAC,EAAE,CAACa,aAAa,CAAEC,YAAY,CAC1C1B,MACAY,aAAa,CAAC,EAAE,CAACe,WAAW;YAEhC;QACF;QAEAC,SAAS,IAAMC,KAAKC,QAAQ,CAACC,MAAM;IACrC;IAEA,SAAStC,eAAeD,QAAkB;QACxCwC,eAAeC,MAAM,CAACzC;IACxB;AACF,CAAC;AAED,SAAS0C,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,GAAG,EAAyB;IACtDF,QAAQ,CAAC,kBAAkB,EAAEG,UAC3BR,SAASS,MAAM,GAAGC,kBAAkBJ,MAAMK,eACzC;IACH,IAAIJ,KAAK;QACPF,QAAQ,CAAC,kEAAkE,EAAEO,KAC3E,0EAA0E;QAC1E,2CAA2C;QAC3CC,SAASC,mBAAmBP,QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js.map index 2092500cff64fb..620994969d6457 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js.map @@ -3,8 +3,8 @@ "sources": [], "sections": [ {"offset": {"line": 13, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n // This is invoked when a module is merged into another module, thus it wasn't invoked via\n // instantiateModule and the cache entry wasn't created yet.\n module = createModuleObject(id)\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let moduleId = chunkModules[i] as ModuleId\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already\n // present we know all the additional ids are also present, so we don't need to check.\n if (!moduleFactories.has(moduleId)) {\n const moduleFactoryFn = chunkModules[end] as Function\n applyModuleFactoryName(moduleFactoryFn)\n newModuleId?.(moduleId)\n for (; i < end; i++) {\n moduleId = chunkModules[i] as ModuleId\n moduleFactories.set(moduleId, moduleFactoryFn)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleObject","error","undefined","namespaceObject","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","has","moduleFactoryFn","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAU7C,MAAMA,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,0FAA0F;QAC1F,4DAA4D;QAC5DA,SAASmB,mBAAmBD;QAC5BD,WAAW,CAACC,GAAG,GAAGlB;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CAAC,GAAGd;AAErB;;CAEC,GACD,SAASe,UAAUC,KAAY,EAAEC,cAAoC;IACnE,MAAM,IAAI5I,MAAM,CAAC,WAAW,EAAE4I,eAAeD,QAAQ;AACvD;AAEA;;CAEC,GACD,SAASE,YAAYC,SAAmB;IACtC,MAAM,IAAI9I,MAAM;AAClB;AACA7B,iBAAiB4K,CAAC,GAAGF;AAErB,kGAAkG;AAClG1K,iBAAiB6K,CAAC,GAAGC;AAMrB,SAASpD,uBAAuBqD,OAAiB;IAC/C,+DAA+D;IAC/D5K,OAAOQ,cAAc,CAACoK,SAAS,QAAQ;QACrCzJ,OAAO;IACT;AACF","ignoreList":[0]}}, - {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_CHUNK_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var CHUNK_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: CHUNK_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${CHUNK_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","CHUNK_SUFFIX","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,M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B;AAEA,MAAME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMlE,QAAkB;IAC/B,OAAOiE,YAAYD,IAAI,CAAChE;AAC1B;AAEA,SAASmE,gBAEPpG,SAAoB,EACpBqG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOjE,QAAQ+D,eAAe,IAE5B,IAAI,CAACxG,CAAC,CAACC,EAAE,EACTG,WACAqG,YACAC;AAEJ;AACAvH,iBAAiBwH,CAAC,GAAGH;AAErB,SAASI,sBAEPxG,SAAoB,EACpBqG,UAAoC;IAEpC,OAAOhE,QAAQmE,qBAAqB,IAElC,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAqG;AAEJ;AACAtH,iBAAiB0H,CAAC,GAAGD","ignoreList":[0]}}, - {"offset": {"line": 747, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAA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I,CAACmL,iBAAiB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, - {"offset": {"line": 1601, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getChunkSuffixFromScriptSrc() {\n // TURBOPACK_CHUNK_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_CHUNK_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getChunkSuffixFromScriptSrc","self","TURBOPACK_CHUNK_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YAC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KAAKG,IAAI,GAAG1D;oBACZuD,KAAKI,OAAO,GAAG;wBACbzD,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, - {"offset": {"line": 1766, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","CHUNK_SU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QAC3B;IACL;IAEA,mCAAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] + {"offset": {"line": 514, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/runtime-base.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *browser* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\n// Used in WebWorkers to tell the runtime about the chunk suffix\ndeclare var TURBOPACK_ASSET_SUFFIX: string\n// Used in WebWorkers to tell the runtime about the current chunk url since it\n// can't be detected via `document.currentScript`. Note it's stored in reversed\n// order to use `push` and `pop`\ndeclare var TURBOPACK_NEXT_CHUNK_URLS: ChunkUrl[] | undefined\n\n// Injected by rust code\ndeclare var CHUNK_BASE_PATH: string\ndeclare var ASSET_SUFFIX: string\n\ninterface TurbopackBrowserBaseContext extends TurbopackBaseContext {\n R: ResolvePathFromModule\n}\n\nconst browserContextPrototype =\n Context.prototype as TurbopackBrowserBaseContext\n\n// Provided by build or dev base\ndeclare function instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module\n\ntype RuntimeParams = {\n otherChunks: ChunkData[]\n runtimeModuleIds: ModuleId[]\n}\n\ntype ChunkRegistration = [\n chunkPath: ChunkScript,\n ...([RuntimeParams] | CompressedModuleFactories),\n]\n\ntype ChunkList = {\n script: ChunkListScript\n chunks: ChunkData[]\n source: 'entry' | 'dynamic'\n}\n\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\ninterface RuntimeBackend {\n registerChunk: (chunkPath: ChunkPath, params?: RuntimeParams) => void\n /**\n * Returns the same Promise for the same chunk URL.\n */\n loadChunkCached: (sourceType: SourceType, chunkUrl: ChunkUrl) => Promise\n loadWebAssembly: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ) => Promise\n loadWebAssemblyModule: (\n sourceType: SourceType,\n sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n ) => Promise\n}\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nconst moduleFactories: ModuleFactories = new Map()\ncontextPrototype.M = moduleFactories\n\nconst availableModules: Map | true> = new Map()\n\nconst availableModuleChunks: Map | true> = new Map()\n\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\nfunction loadChunk(\n this: TurbopackBrowserBaseContext,\n chunkData: ChunkData\n): Promise {\n return loadChunkInternal(SourceType.Parent, this.m.id, chunkData)\n}\nbrowserContextPrototype.l = loadChunk\n\nfunction loadInitialChunk(chunkPath: ChunkPath, chunkData: ChunkData) {\n return loadChunkInternal(SourceType.Runtime, chunkPath, chunkData)\n}\n\nasync function loadChunkInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkData: ChunkData\n): Promise {\n if (typeof chunkData === 'string') {\n return loadChunkPath(sourceType, sourceData, chunkData)\n }\n\n const includedList = chunkData.included || []\n const modulesPromises = includedList.map((included) => {\n if (moduleFactories.has(included)) return true\n return availableModules.get(included)\n })\n if (modulesPromises.length > 0 && modulesPromises.every((p) => p)) {\n // When all included items are already loaded or loading, we can skip loading ourselves\n await Promise.all(modulesPromises)\n return\n }\n\n const includedModuleChunksList = chunkData.moduleChunks || []\n const moduleChunksPromises = includedModuleChunksList\n .map((included) => {\n // TODO(alexkirsz) Do we need this check?\n // if (moduleFactories[included]) return true;\n return availableModuleChunks.get(included)\n })\n .filter((p) => p)\n\n let promise: Promise\n if (moduleChunksPromises.length > 0) {\n // Some module chunks are already loaded or loading.\n\n if (moduleChunksPromises.length === includedModuleChunksList.length) {\n // When all included module chunks are already loaded or loading, we can skip loading ourselves\n await Promise.all(moduleChunksPromises)\n return\n }\n\n const moduleChunksToLoad: Set = new Set()\n for (const moduleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(moduleChunk)) {\n moduleChunksToLoad.add(moduleChunk)\n }\n }\n\n for (const moduleChunkToLoad of moduleChunksToLoad) {\n const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad)\n\n availableModuleChunks.set(moduleChunkToLoad, promise)\n\n moduleChunksPromises.push(promise)\n }\n\n promise = Promise.all(moduleChunksPromises)\n } else {\n promise = loadChunkPath(sourceType, sourceData, chunkData.path)\n\n // Mark all included module chunks as loading if they are not already loaded or loading.\n for (const includedModuleChunk of includedModuleChunksList) {\n if (!availableModuleChunks.has(includedModuleChunk)) {\n availableModuleChunks.set(includedModuleChunk, promise)\n }\n }\n }\n\n for (const included of includedList) {\n if (!availableModules.has(included)) {\n // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.\n // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.\n availableModules.set(included, promise)\n }\n }\n\n await promise\n}\n\nconst loadedChunk = Promise.resolve(undefined)\nconst instrumentedBackendLoadChunks = new WeakMap<\n Promise,\n Promise | typeof loadedChunk\n>()\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrl(\n this: TurbopackBrowserBaseContext,\n chunkUrl: ChunkUrl\n) {\n return loadChunkByUrlInternal(SourceType.Parent, this.m.id, chunkUrl)\n}\nbrowserContextPrototype.L = loadChunkByUrl\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkByUrlInternal(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkUrl: ChunkUrl\n): Promise {\n const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl)\n let entry = instrumentedBackendLoadChunks.get(thenable)\n if (entry === undefined) {\n const resolve = instrumentedBackendLoadChunks.set.bind(\n instrumentedBackendLoadChunks,\n thenable,\n loadedChunk\n )\n entry = thenable.then(resolve).catch((cause) => {\n let loadReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n loadReason = `as a runtime dependency of chunk ${sourceData}`\n break\n case SourceType.Parent:\n loadReason = `from module ${sourceData}`\n break\n case SourceType.Update:\n loadReason = 'from an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n let error = new Error(\n `Failed to load chunk ${chunkUrl} ${loadReason}${\n cause ? `: ${cause}` : ''\n }`,\n cause ? { cause } : undefined\n )\n error.name = 'ChunkLoadError'\n throw error\n })\n instrumentedBackendLoadChunks.set(thenable, entry)\n }\n\n return entry\n}\n\n// Do not make this async. React relies on referential equality of the returned Promise.\nfunction loadChunkPath(\n sourceType: SourceType,\n sourceData: SourceData,\n chunkPath: ChunkPath\n): Promise {\n const url = getChunkRelativeUrl(chunkPath)\n return loadChunkByUrlInternal(sourceType, sourceData, url)\n}\n\n/**\n * Returns an absolute url to an asset.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n return exported?.default ?? exported\n}\nbrowserContextPrototype.R = resolvePathFromModule\n\n/**\n * no-op for browser\n * @param modulePath\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n return `/ROOT/${modulePath ?? ''}`\n}\nbrowserContextPrototype.P = resolveAbsolutePath\n\n/**\n * Exports a URL with the static suffix appended.\n */\nfunction exportUrl(\n this: TurbopackBrowserBaseContext,\n url: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, `${url}${ASSET_SUFFIX}`, id)\n}\nbrowserContextPrototype.q = exportUrl\n\n/**\n * Returns a URL for the worker.\n * The entrypoint is a pre-compiled worker runtime file. The params configure\n * which module chunks to load and which module to run as the entry point.\n *\n * @param entrypoint URL path to the worker entrypoint chunk\n * @param moduleChunks list of module chunk paths to load\n * @param shared whether this is a SharedWorker (uses querystring for URL identity)\n */\nfunction getWorkerURL(\n entrypoint: ChunkPath,\n moduleChunks: ChunkPath[],\n shared: boolean\n): URL {\n const url = new URL(getChunkRelativeUrl(entrypoint), location.origin)\n\n const params = {\n S: ASSET_SUFFIX,\n N: (globalThis as any).NEXT_DEPLOYMENT_ID,\n NC: moduleChunks.map((chunk) => getChunkRelativeUrl(chunk)),\n }\n\n const paramsJson = JSON.stringify(params)\n if (shared) {\n url.searchParams.set('params', paramsJson)\n } else {\n url.hash = '#params=' + encodeURIComponent(paramsJson)\n }\n return url\n}\nbrowserContextPrototype.b = getWorkerURL\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): Module {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n/**\n * Returns the URL relative to the origin where a chunk can be fetched from.\n */\nfunction getChunkRelativeUrl(chunkPath: ChunkPath | ChunkListPath): ChunkUrl {\n return `${CHUNK_BASE_PATH}${chunkPath\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')}${ASSET_SUFFIX}` as ChunkUrl\n}\n\n/**\n * Return the ChunkPath from a ChunkScript.\n */\nfunction getPathFromScript(chunkScript: ChunkPath | ChunkScript): ChunkPath\nfunction getPathFromScript(\n chunkScript: ChunkListPath | ChunkListScript\n): ChunkListPath\nfunction getPathFromScript(\n chunkScript: ChunkPath | ChunkListPath | ChunkScript | ChunkListScript\n): ChunkPath | ChunkListPath {\n if (typeof chunkScript === 'string') {\n return chunkScript as ChunkPath | ChunkListPath\n }\n const chunkUrl =\n typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined'\n ? TURBOPACK_NEXT_CHUNK_URLS.pop()!\n : chunkScript.getAttribute('src')!\n const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))\n const path = src.startsWith(CHUNK_BASE_PATH)\n ? src.slice(CHUNK_BASE_PATH.length)\n : src\n return path as ChunkPath | ChunkListPath\n}\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n\nconst regexCssUrl = /\\.css(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.\n */\nfunction isCss(chunkUrl: ChunkUrl): boolean {\n return regexCssUrl.test(chunkUrl)\n}\n\nfunction loadWebAssembly(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n): Promise {\n return BACKEND.loadWebAssembly(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule,\n importsObj\n )\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n this: TurbopackBaseContext,\n chunkPath: ChunkPath,\n edgeModule: () => WebAssembly.Module\n): Promise {\n return BACKEND.loadWebAssemblyModule(\n SourceType.Parent,\n this.m.id,\n chunkPath,\n edgeModule\n )\n}\ncontextPrototype.u = loadWebAssemblyModule\n"],"names":["browserContextPrototype","Context","prototype","SourceType","moduleFactories","Map","contextPrototype","M","availableModules","availableModuleChunks","factoryNotAvailableMessage","moduleId","sourceType","sourceData","instantiationReason","invariant","loadChunk","chunkData","loadChunkInternal","m","id","l","loadInitialChunk","chunkPath","loadChunkPath","includedList","included","modulesPromises","map","has","get","length","every","p","Promise","all","includedModuleChunksList","moduleChunks","moduleChunksPromises","filter","promise","moduleChunksToLoad","Set","moduleChunk","add","moduleChunkToLoad","set","push","path","includedModuleChunk","loadedChunk","resolve","undefined","instrumentedBackendLoadChunks","WeakMap","loadChunkByUrl","chunkUrl","loadChunkByUrlInternal","L","thenable","BACKEND","loadChunkCached","entry","bind","then","catch","cause","loadReason","error","Error","name","url","getChunkRelativeUrl","resolvePathFromModule","exported","r","default","R","resolveAbsolutePath","modulePath","P","exportUrl","exportValue","call","ASSET_SUFFIX","q","getWorkerURL","entrypoint","shared","URL","location","origin","params","S","N","globalThis","NEXT_DEPLOYMENT_ID","NC","chunk","paramsJson","JSON","stringify","searchParams","hash","encodeURIComponent","b","instantiateRuntimeModule","instantiateModule","CHUNK_BASE_PATH","split","join","getPathFromScript","chunkScript","TURBOPACK_NEXT_CHUNK_URLS","pop","getAttribute","src","decodeURIComponent","replace","startsWith","slice","regexJsUrl","isJs","chunkUrlOrPath","test","regexCssUrl","isCss","loadWebAssembly","edgeModule","importsObj","w","loadWebAssemblyModule","u"],"mappings":"AAAA;;;;;;CAMC,GAED,oDAAoD,GAEpD,6CAA6C;AAC7C,yDAAyD;AAEzD,gEAAgE;AAehE,MAAMA,0BACJC,QAAQC,SAAS;AAyBnB,IAAA,AAAKC,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AAgDL,MAAMC,kBAAmC,IAAIC;AAC7CC,iBAAiBC,CAAC,GAAGH;AAErB,MAAMI,mBAAuD,IAAIH;AAEjE,MAAMI,wBAA6D,IAAIJ;AAEvE,SAASK,2BACPC,QAAkB,EAClBC,UAAsB,EACtBC,UAAsB;IAEtB,IAAIC;IACJ,OAAQF;QACN;YACEE,sBAAsB,CAAC,4BAA4B,E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AME,cAAc;AACpB;;CAEC,GACD,SAASC,MAAMtE,QAAkB;IAC/B,OAAOqE,YAAYD,IAAI,CAACpE;AAC1B;AAEA,SAASuE,gBAEPxG,SAAoB,EACpByG,UAAoC,EACpCC,UAA+B;IAE/B,OAAOrE,QAAQmE,eAAe,IAE5B,IAAI,CAAC5G,CAAC,CAACC,EAAE,EACTG,WACAyG,YACAC;AAEJ;AACA3H,iBAAiB4H,CAAC,GAAGH;AAErB,SAASI,sBAEP5G,SAAoB,EACpByG,UAAoC;IAEpC,OAAOpE,QAAQuE,qBAAqB,IAElC,IAAI,CAAChH,CAAC,CAACC,EAAE,EACTG,WACAyG;AAEJ;AACA1H,iBAAiB8H,CAAC,GAAGD","ignoreList":[0]}}, + {"offset": {"line": 753, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/dev-base.ts"],"sourcesContent":["/// \n/// \n/// \n\ninterface TurbopackDevContext extends TurbopackBrowserBaseContext {\n k: RefreshContext\n}\n\nconst devContextPrototype = Context.prototype as TurbopackDevContext\n\n/**\n * This file contains runtime types and functions that are shared between all\n * Turbopack *development* ECMAScript runtimes.\n *\n * It will be appended to the runtime code of each runtime right after the\n * shared runtime utils.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nconst devModuleCache: ModuleCache = Object.create(null)\ndevContextPrototype.c = devModuleCache\n\n// This file must not use `import` and `export` statements. Otherwise, it\n// becomes impossible to augment interfaces declared in ``d files\n// (e.g. `Module`). Hence, the need for `import()` here.\ntype RefreshRuntimeGlobals =\n import('@next/react-refresh-utils/dist/runtime').RefreshRuntimeGlobals\n\ndeclare var $RefreshHelpers$: RefreshRuntimeGlobals['$RefreshHelpers$']\ndeclare var $RefreshReg$: RefreshRuntimeGlobals['$RefreshReg$']\ndeclare var $RefreshSig$: RefreshRuntimeGlobals['$RefreshSig$']\ndeclare var $RefreshInterceptModuleExecution$: RefreshRuntimeGlobals['$RefreshInterceptModuleExecution$']\n\ntype RefreshContext = {\n register: RefreshRuntimeGlobals['$RefreshReg$']\n signature: RefreshRuntimeGlobals['$RefreshSig$']\n registerExports: typeof registerExportsAndSetupBoundaryForReactRefresh\n}\n\ntype RefreshHelpers = RefreshRuntimeGlobals['$RefreshHelpers$']\n\ntype ModuleFactory = (\n this: Module['exports'],\n context: TurbopackDevContext\n) => unknown\n\ninterface DevRuntimeBackend {\n reloadChunk?: (chunkUrl: ChunkUrl) => Promise\n unloadChunk?: (chunkUrl: ChunkUrl) => void\n restart: () => void\n}\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nconst runtimeModules: Set = new Set()\n\n/**\n * Map from module ID to the chunks that contain this module.\n *\n * In HMR, we need to keep track of which modules are contained in which so\n * chunks. This is so we don't eagerly dispose of a module when it is removed\n * from chunk A, but still exists in chunk B.\n */\nconst moduleChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to all modules it contains.\n */\nconst chunkModulesMap: Map> = new Map()\n/**\n * Chunk lists that contain a runtime. When these chunk lists receive an update\n * that can't be reconciled with the current state of the page, we need to\n * reload the runtime entirely.\n */\nconst runtimeChunkLists: Set = new Set()\n/**\n * Map from a chunk list to the chunk paths it contains.\n */\nconst chunkListChunksMap: Map> = new Map()\n/**\n * Map from a chunk path to the chunk lists it belongs to.\n */\nconst chunkChunkListsMap: Map> = new Map()\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = new Map()\n/**\n * Maps module instances to their hot module state.\n */\nconst moduleHotState: Map = new Map()\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = new Set()\n\n/**\n * Gets or instantiates a runtime module.\n */\n// @ts-ignore\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module {\n const module = devModuleCache[moduleId]\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n // @ts-ignore\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore Defined in `runtime-utils.ts`\nconst getOrInstantiateModuleFromParent: GetOrInstantiateModuleFromParent<\n HotModule\n> = (id, sourceModule) => {\n if (!sourceModule.hot.active) {\n console.warn(\n `Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`\n )\n }\n\n const module = devModuleCache[id]\n\n if (sourceModule.children.indexOf(id) === -1) {\n sourceModule.children.push(id)\n }\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n if (module.parents.indexOf(sourceModule.id) === -1) {\n module.parents.push(sourceModule.id)\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\nfunction DevContext(\n this: TurbopackDevContext,\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n) {\n Context.call(this, module, exports)\n this.k = refresh\n}\nDevContext.prototype = Context.prototype\n\ntype DevContextConstructor = {\n new (\n module: HotModule,\n exports: Exports,\n refresh: RefreshContext\n ): TurbopackDevContext\n}\n\nfunction instantiateModule(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): Module {\n // We are in development, this is always a string.\n let id = moduleId as string\n\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(\n factoryNotAvailableMessage(id, sourceType, sourceData) +\n ' It might have been deleted in an HMR update.'\n )\n }\n\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n // No need to add this module as a child of the parent module here, this\n // has already been taken care of in `getOrInstantiateModuleFromParent`.\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n\n const module: HotModule = createModuleObject(id) as HotModule\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache[id] = module\n moduleHotState.set(module, hotState)\n\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n runModuleExecutionHooks(module, (refresh) => {\n const context = new (DevContext as any as DevContextConstructor)(\n module,\n exports,\n refresh\n )\n moduleFactory(context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\nconst DUMMY_REFRESH_CONTEXT = {\n register: (_type: unknown, _id: unknown) => {},\n signature: () => (_type: unknown) => {},\n registerExports: (_module: unknown, _helpers: unknown) => {},\n}\n\n/**\n * NOTE(alexkirsz) Webpack has a \"module execution\" interception hook that\n * Next.js' React Refresh runtime hooks into to add module context to the\n * refresh registry.\n */\nfunction runModuleExecutionHooks(\n module: HotModule,\n executeModule: (ctx: RefreshContext) => void\n) {\n if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {\n const cleanupReactRefreshIntercept =\n globalThis.$RefreshInterceptModuleExecution$(module.id)\n try {\n executeModule({\n register: globalThis.$RefreshReg$,\n signature: globalThis.$RefreshSig$,\n registerExports: registerExportsAndSetupBoundaryForReactRefresh,\n })\n } finally {\n // Always cleanup the intercept, even if module execution failed.\n cleanupReactRefreshIntercept()\n }\n } else {\n // If the react refresh hooks are not installed we need to bind dummy functions.\n // This is expected when running in a Web Worker. It is also common in some of\n // our test environments.\n executeModule(DUMMY_REFRESH_CONTEXT)\n }\n}\n\n/**\n * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts\n */\nfunction registerExportsAndSetupBoundaryForReactRefresh(\n module: HotModule,\n helpers: RefreshHelpers\n) {\n const currentExports = module.exports\n const prevExports = module.hot.data.prevExports ?? null\n\n helpers.registerExportsForReactRefresh(currentExports, module.id)\n\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (helpers.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update, so we can compare the boundary\n // signatures.\n module.hot.dispose((data) => {\n data.prevExports = currentExports\n })\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n module.hot.accept()\n\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (\n helpers.shouldInvalidateReactRefreshBoundary(\n helpers.getRefreshBoundarySignature(prevExports),\n helpers.getRefreshBoundarySignature(currentExports)\n )\n ) {\n module.hot.invalidate()\n } else {\n helpers.scheduleUpdate()\n }\n }\n } else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n const isNoLongerABoundary = prevExports !== null\n if (isNoLongerABoundary) {\n module.hot.invalidate()\n }\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\nfunction computeOutdatedModules(\n added: Map,\n modified: Map\n): {\n outdatedModules: Set\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\n\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n }\n\n const outdatedModules = computedInvalidatedModules(modified.keys())\n\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, _eval(entry))\n }\n\n return { outdatedModules, newModuleFactories }\n}\n\nfunction computedInvalidatedModules(\n invalidated: Iterable\n): Set {\n const outdatedModules = new Set()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n break\n // TODO(alexkirsz) Dependencies: handle dependencies effects.\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return outdatedModules\n}\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n if (module && hotState.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Adds, deletes, and moves modules between chunks. This must happen before the\n * dispose phase as it needs to know which modules were removed from all chunks,\n * which we can only compute *after* taking care of added and moved modules.\n */\nfunction updateChunksPhase(\n chunksAddedModules: Map>,\n chunksDeletedModules: Map>\n): { disposedModules: Set } {\n for (const [chunkPath, addedModuleIds] of chunksAddedModules) {\n for (const moduleId of addedModuleIds) {\n addModuleToChunk(moduleId, chunkPath)\n }\n }\n\n const disposedModules: Set = new Set()\n for (const [chunkPath, addedModuleIds] of chunksDeletedModules) {\n for (const moduleId of addedModuleIds) {\n if (removeModuleFromChunk(moduleId, chunkPath)) {\n disposedModules.add(moduleId)\n }\n }\n }\n\n return { disposedModules }\n}\n\nfunction disposePhase(\n outdatedModules: Iterable,\n disposedModules: Iterable\n): { outdatedModuleParents: Map> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[moduleId]\n }\n\n // TODO(alexkirsz) Dependencies: remove outdated dependency from module\n // children.\n\n return { outdatedModuleParents }\n}\n\n/**\n * Disposes of an instance of a module.\n *\n * Returns the persistent hot data that should be kept for the next module\n * instance.\n *\n * NOTE: mode = \"replace\" will not remove modules from the devModuleCache\n * This must be done in a separate step afterwards.\n * This is important because all modules need to be disposed to update the\n * parent/child relationships before they are actually removed from the devModuleCache.\n * If this was done in this method, the following disposeModule calls won't find\n * the module from the module id in the cache.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache[moduleId]\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)!\n const data = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n module.hot.active = false\n\n moduleHotState.delete(module)\n\n // TODO(alexkirsz) Dependencies: delete the module from outdated deps.\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache[childId]\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n delete devModuleCache[module.id]\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map,\n outdatedModuleParents: Map>,\n reportError: (err: any) => void\n) {\n // Update module factories.\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryName(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.\n\n // Re-instantiate all outdated self-accepted modules.\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModule(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache[moduleId] })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\nfunction applyUpdate(update: PartialUpdate) {\n switch (update.type) {\n case 'ChunkListUpdate':\n applyChunkListUpdate(update)\n break\n default:\n invariant(update, (update) => `Unknown update type: ${update.type}`)\n }\n}\n\nfunction applyChunkListUpdate(update: ChunkListUpdate) {\n if (update.merged != null) {\n for (const merged of update.merged) {\n switch (merged.type) {\n case 'EcmascriptMergedUpdate':\n applyEcmascriptMergedUpdate(merged)\n break\n default:\n invariant(merged, (merged) => `Unknown merged type: ${merged.type}`)\n }\n }\n }\n\n if (update.chunks != null) {\n for (const [chunkPath, chunkUpdate] of Object.entries(\n update.chunks\n ) as Array<[ChunkPath, ChunkUpdate]>) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n switch (chunkUpdate.type) {\n case 'added':\n BACKEND.loadChunkCached(SourceType.Update, chunkUrl)\n break\n case 'total':\n DEV_BACKEND.reloadChunk?.(chunkUrl)\n break\n case 'deleted':\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n break\n case 'partial':\n invariant(\n chunkUpdate.instruction,\n (instruction) =>\n `Unknown partial instruction: ${JSON.stringify(instruction)}.`\n )\n break\n default:\n invariant(\n chunkUpdate,\n (chunkUpdate) => `Unknown chunk update type: ${chunkUpdate.type}`\n )\n }\n }\n }\n}\n\nfunction applyEcmascriptMergedUpdate(update: EcmascriptMergedUpdate) {\n const { entries = {}, chunks = {} } = update\n const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(\n entries,\n chunks\n )\n const { outdatedModules, newModuleFactories } = computeOutdatedModules(\n added,\n modified\n )\n const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted)\n\n applyInternal(outdatedModules, disposedModules, newModuleFactories)\n}\n\nfunction applyInvalidatedModules(outdatedModules: Set) {\n if (queuedInvalidatedModules.size > 0) {\n computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId) => {\n outdatedModules.add(moduleId)\n })\n\n queuedInvalidatedModules.clear()\n }\n\n return outdatedModules\n}\n\nfunction applyInternal(\n outdatedModules: Set,\n disposedModules: Iterable,\n newModuleFactories: Map\n) {\n outdatedModules = applyInvalidatedModules(outdatedModules)\n\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules\n )\n\n // we want to continue on error and only throw the error after we tried applying all updates\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(new Set(), [], new Map())\n }\n}\n\nfunction computeChangedModules(\n entries: Record,\n updates: Record\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n // We could also use `mergedChunkUpdate.modules` here.\n const updateDeleted = new Set(chunkModulesMap.get(chunkPath))\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n invariant(\n mergedChunkUpdate,\n (mergedChunkUpdate) =>\n `Unknown merged chunk update type: ${mergedChunkUpdate.type}`\n )\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId\n outdatedModules: Set\n }\n\nfunction getAffectedModuleEffects(moduleId: ModuleId): ModuleEffect {\n const outdatedModules: Set = new Set()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache[moduleId]\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache[parentId]\n\n if (!parent) {\n // TODO(alexkirsz) Is this even possible?\n continue\n }\n\n // TODO(alexkirsz) Dependencies: check accepted and declined\n // dependencies here.\n\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n }\n}\n\nfunction handleApply(chunkListPath: ChunkListPath, update: ServerMessage) {\n switch (update.type) {\n case 'partial': {\n // This indicates that the update is can be applied to the current state of the application.\n applyUpdate(update.instruction)\n break\n }\n case 'restart': {\n // This indicates that there is no way to apply the update to the\n // current state of the application, and that the application must be\n // restarted.\n DEV_BACKEND.restart()\n break\n }\n case 'notFound': {\n // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,\n // or the page itself was deleted.\n // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.\n // If it is a runtime chunk list, we restart the application.\n if (runtimeChunkLists.has(chunkListPath)) {\n DEV_BACKEND.restart()\n } else {\n disposeChunkList(chunkListPath)\n }\n break\n }\n default:\n throw new Error(`Unknown update type: ${update.type}`)\n }\n}\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n _callback?: AcceptCallback,\n _errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else {\n throw new Error('unsupported `accept` signature')\n }\n },\n\n decline: (dep) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else {\n throw new Error('unsupported `decline` signature')\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Removes a module from a chunk.\n * Returns `true` if there are no remaining chunks including this module.\n */\nfunction removeModuleFromChunk(\n moduleId: ModuleId,\n chunkPath: ChunkPath\n): boolean {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const chunkModules = chunkModulesMap.get(chunkPath)!\n chunkModules.delete(moduleId)\n\n const noRemainingModules = chunkModules.size === 0\n if (noRemainingModules) {\n chunkModulesMap.delete(chunkPath)\n }\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n }\n\n return noRemainingChunks\n}\n\n/**\n * Disposes of a chunk list and its corresponding exclusive chunks.\n */\nfunction disposeChunkList(chunkListPath: ChunkListPath): boolean {\n const chunkPaths = chunkListChunksMap.get(chunkListPath)\n if (chunkPaths == null) {\n return false\n }\n chunkListChunksMap.delete(chunkListPath)\n\n for (const chunkPath of chunkPaths) {\n const chunkChunkLists = chunkChunkListsMap.get(chunkPath)!\n chunkChunkLists.delete(chunkListPath)\n\n if (chunkChunkLists.size === 0) {\n chunkChunkListsMap.delete(chunkPath)\n disposeChunk(chunkPath)\n }\n }\n\n // We must also dispose of the chunk list's chunk itself to ensure it may\n // be reloaded properly in the future.\n const chunkListUrl = getChunkRelativeUrl(chunkListPath)\n\n DEV_BACKEND.unloadChunk?.(chunkListUrl)\n\n return true\n}\n\n/**\n * Disposes of a chunk and its corresponding exclusive modules.\n *\n * @returns Whether the chunk was disposed of.\n */\nfunction disposeChunk(chunkPath: ChunkPath): boolean {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n // This should happen whether the chunk has any modules in it or not.\n // For instance, CSS chunks have no modules in them, but they still need to be unloaded.\n DEV_BACKEND.unloadChunk?.(chunkUrl)\n\n const chunkModules = chunkModulesMap.get(chunkPath)\n if (chunkModules == null) {\n return false\n }\n chunkModules.delete(chunkPath)\n\n for (const moduleId of chunkModules) {\n const moduleChunks = moduleChunksMap.get(moduleId)!\n moduleChunks.delete(chunkPath)\n\n const noRemainingChunks = moduleChunks.size === 0\n if (noRemainingChunks) {\n moduleChunksMap.delete(moduleId)\n disposeModule(moduleId, 'clear')\n availableModules.delete(moduleId)\n }\n }\n\n return true\n}\n\n/**\n * Adds a module to a chunk.\n */\nfunction addModuleToChunk(moduleId: ModuleId, chunkPath: ChunkPath) {\n let moduleChunks = moduleChunksMap.get(moduleId)\n if (!moduleChunks) {\n moduleChunks = new Set([chunkPath])\n moduleChunksMap.set(moduleId, moduleChunks)\n } else {\n moduleChunks.add(chunkPath)\n }\n\n let chunkModules = chunkModulesMap.get(chunkPath)\n if (!chunkModules) {\n chunkModules = new Set([moduleId])\n chunkModulesMap.set(chunkPath, chunkModules)\n } else {\n chunkModules.add(moduleId)\n }\n}\n\n/**\n * Marks a chunk list as a runtime chunk list. There can be more than one\n * runtime chunk list. For instance, integration tests can have multiple chunk\n * groups loaded at runtime, each with its own chunk list.\n */\nfunction markChunkListAsRuntime(chunkListPath: ChunkListPath) {\n runtimeChunkLists.add(chunkListPath)\n}\n\nfunction registerChunk(registration: ChunkRegistration) {\n const chunkPath = getPathFromScript(registration[0])\n let runtimeParams: RuntimeParams | undefined\n // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length\n if (registration.length === 2) {\n runtimeParams = registration[1] as RuntimeParams\n } else {\n runtimeParams = undefined\n installCompressedModuleFactories(\n registration as CompressedModuleFactories,\n /* offset= */ 1,\n moduleFactories,\n (id: ModuleId) => addModuleToChunk(id, chunkPath)\n )\n }\n return BACKEND.registerChunk(chunkPath, runtimeParams)\n}\n\n/**\n * Subscribes to chunk list updates from the update server and applies them.\n */\nfunction registerChunkList(chunkList: ChunkList) {\n const chunkListScript = chunkList.script\n const chunkListPath = getPathFromScript(chunkListScript)\n // The \"chunk\" is also registered to finish the loading in the backend\n BACKEND.registerChunk(chunkListPath as string as ChunkPath)\n globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS!.push([\n chunkListPath,\n handleApply.bind(null, chunkListPath),\n ])\n\n // Adding chunks to chunk lists and vice versa.\n const chunkPaths = new Set(chunkList.chunks.map(getChunkPath))\n chunkListChunksMap.set(chunkListPath, chunkPaths)\n for (const chunkPath of chunkPaths) {\n let chunkChunkLists = chunkChunkListsMap.get(chunkPath)\n if (!chunkChunkLists) {\n chunkChunkLists = new Set([chunkListPath])\n chunkChunkListsMap.set(chunkPath, chunkChunkLists)\n } else {\n chunkChunkLists.add(chunkListPath)\n }\n }\n\n if (chunkList.source === 'entry') {\n markChunkListAsRuntime(chunkListPath)\n }\n}\n\nglobalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []\n"],"names":["devContextPrototype","Context","prototype","devModuleCache","Object","create","c","UpdateApplyError","Error","name","dependencyChain","message","runtimeModules","Set","moduleChunksMap","Map","chunkModulesMap","runtimeChunkLists","chunkListChunksMap","chunkChunkListsMap","moduleHotData","moduleHotState","queuedInvalidatedModules","getOrInstantiateRuntimeModule","chunkPath","moduleId","module","error","instantiateModule","SourceType","Runtime","getOrInstantiateModuleFromParent","id","sourceModule","hot","active","console","warn","children","indexOf","push","parents","Parent","DevContext","exports","refresh","call","k","sourceType","sourceData","moduleFactory","moduleFactories","get","factoryNotAvailableMessage","hotData","hotState","createModuleHot","add","Update","invariant","createModuleObject","set","runModuleExecutionHooks","context","namespaceObject","interopEsm","DUMMY_REFRESH_CONTEXT","register","_type","_id","signature","registerExports","_module","_helpers","executeModule","globalThis","$RefreshInterceptModuleExecution$","cleanupReactRefreshIntercept","$RefreshReg$","$RefreshSig$","registerExportsAndSetupBoundaryForReactRefresh","helpers","currentExports","prevExports","data","registerExportsForReactRefresh","isReactRefreshBoundary","dispose","accept","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","invalidate","scheduleUpdate","isNoLongerABoundary","formatDependencyChain","join","computeOutdatedModules","added","modified","newModuleFactories","entry","_eval","outdatedModules","computedInvalidatedModules","keys","invalidated","effect","getAffectedModuleEffects","type","outdatedModuleId","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","selfAccepted","selfInvalidated","errorHandler","updateChunksPhase","chunksAddedModules","chunksDeletedModules","addedModuleIds","addModuleToChunk","disposedModules","removeModuleFromChunk","disposePhase","disposeModule","outdatedModuleParents","oldModule","mode","disposeHandler","disposeHandlers","delete","childId","child","idx","splice","applyPhase","reportError","factory","entries","applyModuleFactoryName","err","err2","applyUpdate","update","applyChunkListUpdate","merged","applyEcmascriptMergedUpdate","chunks","chunkUpdate","chunkUrl","getChunkRelativeUrl","BACKEND","loadChunkCached","DEV_BACKEND","reloadChunk","unloadChunk","instruction","JSON","stringify","chunksAdded","chunksDeleted","computeChangedModules","applyInternal","applyInvalidatedModules","size","forEach","clear","updates","deleted","mergedChunkUpdate","updateAdded","modules","updateDeleted","has","queue","nextItem","shift","undefined","selfDeclined","parentId","parent","handleApply","chunkListPath","restart","disposeChunkList","_callback","_errorHandler","decline","dep","callback","addDisposeHandler","removeDisposeHandler","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","moduleChunks","chunkModules","noRemainingModules","noRemainingChunks","chunkPaths","chunkChunkLists","disposeChunk","chunkListUrl","availableModules","markChunkListAsRuntime","registerChunk","registration","getPathFromScript","runtimeParams","length","installCompressedModuleFactories","registerChunkList","chunkList","chunkListScript","script","TURBOPACK_CHUNK_UPDATE_LISTENERS","bind","map","getChunkPath","source"],"mappings":"AAAA,2CAA2C;AAC3C,4CAA4C;AAC5C,4CAA4C;AAM5C,MAAMA,sBAAsBC,Q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iB;YACpBA,kBAAkB,IAAI9L,IAAI;gBAACwK;aAAc;YACzClK,mBAAmB0C,GAAG,CAACrC,WAAWmL;QACpC,OAAO;YACLA,gBAAgBlJ,GAAG,CAAC4H;QACtB;IACF;IAEA,IAAIkC,UAAUO,MAAM,KAAK,SAAS;QAChCf,uBAAuB1B;IACzB;AACF;AAEA1G,WAAW+I,gCAAgC,KAAK,EAAE","ignoreList":[0]}}, + {"offset": {"line": 1607, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/runtime-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack ECMAScript DOM runtime.\n *\n * It will be appended to the base runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n\nfunction getAssetSuffixFromScriptSrc() {\n // TURBOPACK_ASSET_SUFFIX is set in web workers\n return (\n (self.TURBOPACK_ASSET_SUFFIX ??\n document?.currentScript\n ?.getAttribute?.('src')\n ?.replace(/^(.*(?=\\?)|^.*$)/, '')) ||\n ''\n )\n}\n\ntype ChunkResolver = {\n resolved: boolean\n loadingStarted: boolean\n resolve: () => void\n reject: (error?: Error) => void\n promise: Promise\n}\n\nlet BACKEND: RuntimeBackend\n\n/**\n * Maps chunk paths to the corresponding resolver.\n */\nconst chunkResolvers: Map = new Map()\n\n;(() => {\n BACKEND = {\n async registerChunk(chunkPath, params) {\n const chunkUrl = getChunkRelativeUrl(chunkPath)\n\n const resolver = getOrCreateResolver(chunkUrl)\n resolver.resolve()\n\n if (params == null) {\n return\n }\n\n for (const otherChunkData of params.otherChunks) {\n const otherChunkPath = getChunkPath(otherChunkData)\n const otherChunkUrl = getChunkRelativeUrl(otherChunkPath)\n\n // Chunk might have started loading, so we want to avoid triggering another load.\n getOrCreateResolver(otherChunkUrl)\n }\n\n // This waits for chunks to be loaded, but also marks included items as available.\n await Promise.all(\n params.otherChunks.map((otherChunkData) =>\n loadInitialChunk(chunkPath, otherChunkData)\n )\n )\n\n if (params.runtimeModuleIds.length > 0) {\n for (const moduleId of params.runtimeModuleIds) {\n getOrInstantiateRuntimeModule(chunkPath, moduleId)\n }\n }\n },\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n loadChunkCached(sourceType: SourceType, chunkUrl: ChunkUrl) {\n return doLoadChunk(sourceType, chunkUrl)\n },\n\n async loadWebAssembly(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n importsObj: WebAssembly.Imports\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n req,\n importsObj\n )\n\n return instance.exports\n },\n\n async loadWebAssemblyModule(\n _sourceType: SourceType,\n _sourceData: SourceData,\n wasmChunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n ): Promise {\n const req = fetchWebAssembly(wasmChunkPath)\n\n return await WebAssembly.compileStreaming(req)\n },\n }\n\n function getOrCreateResolver(chunkUrl: ChunkUrl): ChunkResolver {\n let resolver = chunkResolvers.get(chunkUrl)\n if (!resolver) {\n let resolve: () => void\n let reject: (error?: Error) => void\n const promise = new Promise((innerResolve, innerReject) => {\n resolve = innerResolve\n reject = innerReject\n })\n resolver = {\n resolved: false,\n loadingStarted: false,\n promise,\n resolve: () => {\n resolver!.resolved = true\n resolve()\n },\n reject: reject!,\n }\n chunkResolvers.set(chunkUrl, resolver)\n }\n return resolver\n }\n\n /**\n * Loads the given chunk, and returns a promise that resolves once the chunk\n * has been loaded.\n */\n function doLoadChunk(sourceType: SourceType, chunkUrl: ChunkUrl) {\n const resolver = getOrCreateResolver(chunkUrl)\n if (resolver.loadingStarted) {\n return resolver.promise\n }\n\n if (sourceType === SourceType.Runtime) {\n // We don't need to load chunks references from runtime code, as they're already\n // present in the DOM.\n resolver.loadingStarted = true\n\n if (isCss(chunkUrl)) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n\n // We need to wait for JS chunks to register themselves within `registerChunk`\n // before we can start instantiating runtime modules, hence the absence of\n // `resolver.resolve()` in this branch.\n\n return resolver.promise\n }\n\n if (typeof importScripts === 'function') {\n // We're in a web worker\n if (isCss(chunkUrl)) {\n // ignore\n } else if (isJs(chunkUrl)) {\n self.TURBOPACK_NEXT_CHUNK_URLS!.push(chunkUrl)\n importScripts(chunkUrl)\n } else {\n throw new Error(\n `can't infer type of chunk from URL ${chunkUrl} in worker`\n )\n }\n } else {\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n if (previousLinks.length > 0) {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n } else {\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = chunkUrl\n link.onerror = () => {\n resolver.reject()\n }\n link.onload = () => {\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolver.resolve()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(link)\n }\n } else if (isJs(chunkUrl)) {\n const previousScripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n if (previousScripts.length > 0) {\n // There is this edge where the script already failed loading, but we\n // can't detect that. The Promise will never resolve in this case.\n for (const script of Array.from(previousScripts)) {\n script.addEventListener('error', () => {\n resolver.reject()\n })\n }\n } else {\n const script = document.createElement('script')\n script.src = chunkUrl\n // We'll only mark the chunk as loaded once the script has been executed,\n // which happens in `registerChunk`. Hence the absence of `resolve()` in\n // this branch.\n script.onerror = () => {\n resolver.reject()\n }\n // Append to the `head` for webpack compatibility.\n document.head.appendChild(script)\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n }\n\n resolver.loadingStarted = true\n return resolver.promise\n }\n\n function fetchWebAssembly(wasmChunkPath: ChunkPath) {\n return fetch(getChunkRelativeUrl(wasmChunkPath))\n }\n})()\n"],"names":["getAssetSuffixFromScriptSrc","self","TURBOPACK_ASSET_SUFFIX","document","currentScript","getAttribute","replace","BACKEND","chunkResolvers","Map","registerChunk","chunkPath","params","chunkUrl","getChunkRelativeUrl","resolver","getOrCreateResolver","resolve","otherChunkData","otherChunks","otherChunkPath","getChunkPath","otherChunkUrl","Promise","all","map","loadInitialChunk","runtimeModuleIds","length","moduleId","getOrInstantiateRuntimeModule","loadChunkCached","sourceType","doLoadChunk","loadWebAssembly","_sourceType","_sourceData","wasmChunkPath","_edgeModule","importsObj","req","fetchWebAssembly","instance","WebAssembly","instantiateStreaming","exports","loadWebAssemblyModule","compileStreaming","get","reject","promise","innerResolve","innerReject","resolved","loadingStarted","set","SourceType","Runtime","isCss","importScripts","isJs","TURBOPACK_NEXT_CHUNK_URLS","push","Error","decodedChunkUrl","decodeURI","previousLinks","querySelectorAll","link","createElement","rel","href","onerror","onload","head","appendChild","previousScripts","script","Array","from","addEventListener","src","fetch"],"mappings":"AAAA;;;;CAIC,GAED,oDAAoD,GAEpD,sEAAsE;AACtE,2DAA2D;AAE3D,SAASA;IACP,+CAA+C;IAC/C,OACE,CAACC,KAAKC,sBAAsB,IAC1BC,UAAUC,eACNC,eAAe,QACfC,QAAQ,oBAAoB,GAAG,KACrC;AAEJ;AAUA,IAAIC;AAEJ;;CAEC,GACD,MAAMC,iBAA+C,IAAIC;AAExD,CAAC;IACAF,UAAU;QACR,MAAMG,eAAcC,SAAS,EAAEC,MAAM;YACnC,MAAMC,WAAWC,oBAAoBH;YAErC,MAAMI,WAAWC,oBAAoBH;YACrCE,SAASE,OAAO;Y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1D;oBACZuD,KAAKI,OAAO,GAAG;wBACbzD,SAASkC,MAAM;oBACjB;oBACAmB,KAAKK,MAAM,GAAG;wBACZ,uEAAuE;wBACvE,oBAAoB;wBACpB1D,SAASE,OAAO;oBAClB;oBACA,kDAAkD;oBAClDd,SAASuE,IAAI,CAACC,WAAW,CAACP;gBAC5B;YACF,OAAO,IAAIR,KAAK/C,WAAW;gBACzB,MAAM+D,kBAAkBzE,SAASgE,gBAAgB,CAC/C,CAAC,YAAY,EAAEtD,SAAS,gBAAgB,EAAEA,SAAS,gBAAgB,EAAEmD,gBAAgB,gBAAgB,EAAEA,gBAAgB,GAAG,CAAC;gBAE7H,IAAIY,gBAAgBhD,MAAM,GAAG,GAAG;oBAC9B,qEAAqE;oBACrE,kEAAkE;oBAClE,KAAK,MAAMiD,UAAUC,MAAMC,IAAI,CAACH,iBAAkB;wBAChDC,OAAOG,gBAAgB,CAAC,SAAS;4BAC/BjE,SAASkC,MAAM;wBACjB;oBACF;gBACF,OAAO;oBACL,MAAM4B,SAAS1E,SAASkE,aAAa,CAAC;oBACtCQ,OAAOI,GAAG,GAAGpE;oBACb,yEAAyE;oBACzE,wEAAwE;oBACxE,eAAe;oBACfgE,OAAOL,OAAO,GAAG;wBACfzD,SAASkC,MAAM;oBACjB;oBACA,kDAAkD;oBAClD9C,SAASuE,IAAI,CAACC,WAAW,CAACE;gBAC5B;YACF,OAAO;gBACL,MAAM,IAAId,MAAM,CAAC,mCAAmC,EAAElD,UAAU;YAClE;QACF;QAEAE,SAASuC,cAAc,GAAG;QAC1B,OAAOvC,SAASmC,OAAO;IACzB;IAEA,SAAST,iBAAiBJ,aAAwB;QAChD,OAAO6C,MAAMpE,oBAAoBuB;IACnC;AACF,CAAC","ignoreList":[0]}}, + {"offset": {"line": 1772, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/dom/dev-backend-dom.ts"],"sourcesContent":["/**\n * This file contains the runtime code specific to the Turbopack development\n * ECMAScript DOM runtime.\n *\n * It will be appended to the base development runtime code.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n\nlet DEV_BACKEND: DevRuntimeBackend\n;(() => {\n DEV_BACKEND = {\n unloadChunk(chunkUrl) {\n deleteResolver(chunkUrl)\n\n // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.\n const decodedChunkUrl = decodeURI(chunkUrl)\n\n if (isCss(chunkUrl)) {\n const links = document.querySelectorAll(\n `link[href=\"${chunkUrl}\"],link[href^=\"${chunkUrl}?\"],link[href=\"${decodedChunkUrl}\"],link[href^=\"${decodedChunkUrl}?\"]`\n )\n for (const link of Array.from(links)) {\n link.remove()\n }\n } else if (isJs(chunkUrl)) {\n // Unloading a JS chunk would have no effect, as it lives in the JS\n // runtime once evaluated.\n // However, we still want to remove the script tag from the DOM to keep\n // the HTML somewhat consistent from the user's perspective.\n const scripts = document.querySelectorAll(\n `script[src=\"${chunkUrl}\"],script[src^=\"${chunkUrl}?\"],script[src=\"${decodedChunkUrl}\"],script[src^=\"${decodedChunkUrl}?\"]`\n )\n for (const script of Array.from(scripts)) {\n script.remove()\n }\n } else {\n throw new Error(`can't infer type of chunk from URL ${chunkUrl}`)\n }\n },\n\n reloadChunk(chunkUrl) {\n return new Promise((resolve, reject) => {\n if (!isCss(chunkUrl)) {\n reject(new Error('The DOM backend can only reload CSS chunks'))\n return\n }\n\n const decodedChunkUrl = decodeURI(chunkUrl)\n const previousLinks = document.querySelectorAll(\n `link[rel=stylesheet][href=\"${chunkUrl}\"],link[rel=stylesheet][href^=\"${chunkUrl}?\"],link[rel=stylesheet][href=\"${decodedChunkUrl}\"],link[rel=stylesheet][href^=\"${decodedChunkUrl}?\"]`\n )\n\n if (previousLinks.length === 0) {\n reject(new Error(`No link element found for chunk ${chunkUrl}`))\n return\n }\n\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n\n if (navigator.userAgent.includes('Firefox')) {\n // Firefox won't reload CSS files that were previously loaded on the current page,\n // we need to add a query param to make sure CSS is actually reloaded from the server.\n //\n // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506\n //\n // Safari has a similar issue, but only if you have a `` tag\n // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726\n link.href = `${chunkUrl}?ts=${Date.now()}`\n } else {\n link.href = chunkUrl\n }\n\n link.onerror = () => {\n reject()\n }\n link.onload = () => {\n // First load the new CSS, then remove the old ones. This prevents visible\n // flickering that would happen in-between removing the previous CSS and\n // loading the new one.\n for (const previousLink of Array.from(previousLinks))\n previousLink.remove()\n\n // CSS chunks do not register themselves, and as such must be marked as\n // loaded instantly.\n resolve()\n }\n\n // Make sure to insert the new CSS right after the previous one, so that\n // its precedence is higher.\n previousLinks[0].parentElement!.insertBefore(\n link,\n previousLinks[0].nextSibling\n )\n })\n },\n\n restart: () => self.location.reload(),\n }\n\n function deleteResolver(chunkUrl: ChunkUrl) {\n chunkResolvers.delete(chunkUrl)\n }\n})()\n\nfunction _eval({ code, url, map }: EcmascriptModuleEntry): ModuleFactory {\n code += `\\n\\n//# sourceURL=${encodeURI(\n location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX\n )}`\n if (map) {\n code += `\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(\n // btoa doesn't handle nonlatin characters, so escape them as \\x sequences\n // See https://stackoverflow.com/a/26603875\n unescape(encodeURIComponent(map))\n )}`\n }\n\n // eslint-disable-next-line no-eval\n return eval(code)\n}\n"],"names":["DEV_BACKEND","unloadChunk","chunkUrl","deleteResolver","decodedChunkUrl","decodeURI","isCss","links","document","querySelectorAll","link","Array","from","remove","isJs","scripts","script","Error","reloadChunk","Promise","resolve","reject","previousLinks","length","createElement","rel","navigator","userAgent","includes","href","Date","now","onerror","onload","previousLink","parentElement","insertBefore","nextSibling","restart","self","location","reload","chunkResolvers","delete","_eval","code","url","map","encodeURI","origin","CHUNK_BASE_PATH","ASSET_SUFFIX","btoa","unescape","encodeUR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AAmC;IACnC,OAAOQ,KAAKV;AACd","ignoreList":[0]}}] } \ No newline at end of file diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js index a8172d560c6463..821951e89c1da2 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_index_818b7886.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -682,6 +682,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -693,7 +699,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -714,7 +720,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1605,9 +1611,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1848,7 +1854,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js index af7ede5d0069fb..ac41a09fbd2c41 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js @@ -10,7 +10,7 @@ if (!Array.isArray(globalThis.TURBOPACK)) { const CHUNK_BASE_PATH = ""; const RELATIVE_ROOT_PATH = "../../../../../../.."; const RUNTIME_PUBLIC_PATH = ""; -const CHUNK_SUFFIX = ""; +const ASSET_SUFFIX = ""; /** * This file contains runtime types and functions that are shared between all * TurboPack ECMAScript runtimes. @@ -682,6 +682,12 @@ browserContextPrototype.R = resolvePathFromModule; return `/ROOT/${modulePath ?? ''}`; } browserContextPrototype.P = resolveAbsolutePath; +/** + * Exports a URL with the static suffix appended. + */ function exportUrl(url, id) { + exportValue.call(this, `${url}${ASSET_SUFFIX}`, id); +} +browserContextPrototype.q = exportUrl; /** * Returns a URL for the worker. * The entrypoint is a pre-compiled worker runtime file. The params configure @@ -693,7 +699,7 @@ browserContextPrototype.P = resolveAbsolutePath; */ function getWorkerURL(entrypoint, moduleChunks, shared) { const url = new URL(getChunkRelativeUrl(entrypoint), location.origin); const params = { - S: CHUNK_SUFFIX, + S: ASSET_SUFFIX, N: globalThis.NEXT_DEPLOYMENT_ID, NC: moduleChunks.map((chunk)=>getChunkRelativeUrl(chunk)) }; @@ -714,7 +720,7 @@ browserContextPrototype.b = getWorkerURL; /** * Returns the URL relative to the origin where a chunk can be fetched from. */ function getChunkRelativeUrl(chunkPath) { - return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX}`; + return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${ASSET_SUFFIX}`; } function getPathFromScript(chunkScript) { if (typeof chunkScript === 'string') { @@ -1605,9 +1611,9 @@ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= []; * It will be appended to the base runtime code. */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// /// -function getChunkSuffixFromScriptSrc() { - // TURBOPACK_CHUNK_SUFFIX is set in web workers - return (self.TURBOPACK_CHUNK_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; +function getAssetSuffixFromScriptSrc() { + // TURBOPACK_ASSET_SUFFIX is set in web workers + return (self.TURBOPACK_ASSET_SUFFIX ?? document?.currentScript?.getAttribute?.('src')?.replace(/^(.*(?=\?)|^.*$)/, '')) || ''; } let BACKEND; /** @@ -1848,7 +1854,7 @@ let DEV_BACKEND; } })(); function _eval({ code, url, map }) { - code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX)}`; + code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + ASSET_SUFFIX)}`; if (map) { code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences // See https://stackoverflow.com/a/26603875 diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_input_3845375a._.js b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_input_3845375a._.js index 5139e99238b511..4f054282058f4d 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_input_3845375a._.js +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_input_3845375a._.js @@ -1,7 +1,7 @@ (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push(["output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_input_3845375a._.js", "[project]/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/input/worker.js (static in ecmascript)", ((__turbopack_context__) => { -__turbopack_context__.v("/static/worker.35b5336b.js");}), +__turbopack_context__.q("/static/worker.35b5336b.js");}), "[project]/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/input/worker.js [test] (ecmascript, worker loader)", ((__turbopack_context__) => { __turbopack_context__.v(__turbopack_context__.b("output/6642e_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js", ["output/aaf3a_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_e14430d8.js","output/ba425_crates_turbopack-tests_tests_snapshot_workers_shared_input_worker_87533493.js"], true)); diff --git a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js.map b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js.map index 0470b96a8e80b4..bef44d569bd3c0 100644 --- a/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js.map +++ b/turbopack/crates/turbopack-tests/tests/snapshot/workers/shared/output/turbopack_crates_turbopack-tests_tests_snapshot_workers_shared_output_2867ca5f._.js.map @@ -1 +1 @@ -{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_CHUNK_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_CHUNK_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_CHUNK_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_CHUNK_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAAMC,OAAe;QAC5BC,QAAQC,KAAK,CAACF;QACd,MAAM,IAAIG,MAAMH;IAClB;IAEA,2EAA2E;IAC3E,6EAA6E;IAC7E,gEAAgE;IAChE,IACE,OAAO,AAACI,IAAY,CAAC,oBAAoB,KAAK,eAC9C,CAAC,CAACA,gBAAgB,AAACA,IAAY,CAAC,oBAAoB,GACpD;QACAL,MAAM;IACR;IAEA,MAAMM,MAAM,IAAIC,IAAIC,SAASC,IAAI;IAEjC,mEAAmE;IACnE,IAAIC,eAAeJ,IAAIK,YAAY,CAACC,GAAG,CAAC;IACxC,IAAI,CAACF,gBAAgBJ,IAAIO,IAAI,CAACC,UAAU,CAAC,aAAa;QACpDJ,eAAeK,mBAAmBT,IAAIO,IAAI,CAACG,KAAK,CAAC,WAAWC,MAAM;IACpE;IAEA,IAAI,CAACP,cAAcV,MAAM;IAEzB,2EAA2E;IAC3E,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAMkB,SAAgCC,KAAKC,KAAK,CAACV;IAEjD,MAAMW,yBAAyB,OAAOH,OAAOI,CAAC,KAAK,WAAWJ,OAAOI,CAAC,GAAG;IACzE,MAAMC,qBAAqB,OAAOL,OAAOM,CAAC,KAAK,WAAWN,OAAOM,CAAC,GAAG;IACrE,yEAAyE;IACzE,4EAA4E;IAC5E,mEAAmE;IACnE,wBAAwB;IACxB,EAAE;IACF,8EAA8E;IAC9E,8EAA8E;IAC9E,4BAA4B;IAC5B,MAAMC,4BAA4BC,MAAMC,OAAO,CAACT,OAAOU,EAAE,IAAIV,OAAOU,EAAE,GAAG,EAAE;IAE3EC,OAAOC,MAAM,CAACzB,MAAM;QAClBgB;QACAI;QACAF;IACF;IAEA,IAAIE,0BAA0BR,MAAM,GAAG,GAAG;QACxC,MAAMc,gBAA0B,EAAE;QAClC,KAAK,MAAMC,SAASP,0BAA2B;YAC7C,qCAAqC;YACrC,MAAMQ,WAAW,IAAI1B,IAAIyB,OAAOxB,SAAS0B,MAAM;YAC/C,uEAAuE;YACvE,qEAAqE;YACrE,mEAAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file +{"version":3,"sources":["turbopack:///[turbopack]/browser/runtime/base/worker-entrypoint.ts"],"sourcesContent":["/**\n * Worker entrypoint bootstrap.\n */\n\ninterface WorkerBootstrapConfig {\n // TURBOPACK_ASSET_SUFFIX\n S?: string\n // NEXT_DEPLOYMENT_ID\n N?: string\n // TURBOPACK_NEXT_CHUNK_URLS\n NC?: string[]\n}\n\n;(() => {\n function abort(message: string): never {\n console.error(message)\n throw new Error(message)\n }\n\n // Security: Ensure this code is running in a worker environment to prevent\n // the worker entrypoint being used as an XSS gadget. If this is a worker, we\n // know that the origin of the caller is the same as our origin.\n if (\n typeof (self as any)['WorkerGlobalScope'] === 'undefined' ||\n !(self instanceof (self as any)['WorkerGlobalScope'])\n ) {\n abort('Worker entrypoint must be loaded in a worker context')\n }\n\n const url = new URL(location.href)\n\n // Try querystring first (SharedWorker), then hash (regular Worker)\n let paramsString = url.searchParams.get('params')\n if (!paramsString && url.hash.startsWith('#params=')) {\n paramsString = decodeURIComponent(url.hash.slice('#params='.length))\n }\n\n if (!paramsString) abort('Missing worker bootstrap config')\n\n // Safety: this string requires that a script on the same origin has loaded\n // this code as a module. We still don't fully trust it, so we'll validate the\n // types and ensure that the next chunk URLs are same-origin.\n const config: WorkerBootstrapConfig = JSON.parse(paramsString)\n\n const TURBOPACK_ASSET_SUFFIX = typeof config.S === 'string' ? config.S : ''\n const NEXT_DEPLOYMENT_ID = typeof config.N === 'string' ? config.N : ''\n // In a normal browser context, the runtime can figure out which chunk is\n // currently executing via `document.currentScript`. Workers don't have that\n // luxury, so we use `TURBOPACK_NEXT_CHUNK_URLS` as a stack instead\n // (`reverse()`d below).\n //\n // Each chunk pops its URL off the front of the array when it runs, so we need\n // to store them in reverse order to make sure the first chunk to execute sees\n // its own URL at the front.\n const TURBOPACK_NEXT_CHUNK_URLS = Array.isArray(config.NC) ? config.NC : []\n\n Object.assign(self, {\n TURBOPACK_ASSET_SUFFIX,\n TURBOPACK_NEXT_CHUNK_URLS,\n NEXT_DEPLOYMENT_ID,\n })\n\n if (TURBOPACK_NEXT_CHUNK_URLS.length > 0) {\n const scriptsToLoad: string[] = []\n for (const chunk of TURBOPACK_NEXT_CHUNK_URLS) {\n // Chunks are relative to the origin.\n const chunkUrl = new URL(chunk, location.origin)\n // Security: Only load scripts from the same origin. This prevents this\n // worker entrypoint from being used as a gadget to load scripts from\n // foreign origins if someone happens to find a separate XSS vector\n // elsewhere on this origin.\n if (chunkUrl.origin !== location.origin) {\n abort(`Refusing to load script from foreign origin: ${chunkUrl.origin}`)\n }\n scriptsToLoad.push(chunkUrl.toString())\n }\n\n TURBOPACK_NEXT_CHUNK_URLS.reverse()\n importScripts(...scriptsToLoad)\n }\n})()\n"],"names":["abort","message","console","error","Error","self","url","URL","location","href","paramsString","searchParams","get","hash","startsWith","decodeURIComponent","slice","length","config","JSON","parse","TURBOPACK_ASSET_SUFFIX","S","NEXT_DEPLOYMENT_ID","N","TURBOPACK_NEXT_CHUNK_URLS","Array","isArray","NC","Object","assign","scriptsToLoad","chunk","chunkUrl","origin","push","toString","reverse","importScripts"],"mappings":"AAAA;;CAEC;AAWA,CAAC;IACA,SAASA,MAAMC,OAAe;QAC5BC,Q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AAmE;YACnE,4BAA4B;YAC5B,IAAID,SAASC,MAAM,KAAK1B,SAAS0B,MAAM,EAAE;gBACvClC,MAAM,CAAC,6CAA6C,EAAEiC,SAASC,MAAM,EAAE;YACzE;YACAH,cAAcI,IAAI,CAACF,SAASG,QAAQ;QACtC;QAEAX,0BAA0BY,OAAO;QACjCC,iBAAiBP;IACnB;AACF,CAAC","ignoreList":[0]} \ No newline at end of file diff --git a/turbopack/crates/turbopack-wasm/src/raw.rs b/turbopack/crates/turbopack-wasm/src/raw.rs index 1d2fa1ab9bad72..3365e7b2ec4fd7 100644 --- a/turbopack/crates/turbopack-wasm/src/raw.rs +++ b/turbopack/crates/turbopack-wasm/src/raw.rs @@ -16,7 +16,7 @@ use turbopack_ecmascript::{ EcmascriptChunkItem, EcmascriptChunkItemContent, EcmascriptChunkPlaceable, EcmascriptChunkType, EcmascriptExports, }, - runtime_functions::TURBOPACK_EXPORT_VALUE, + runtime_functions::TURBOPACK_EXPORT_URL, utils::StringifyJs, }; @@ -159,11 +159,7 @@ impl EcmascriptChunkItem for RawModuleChunkItem { }; Ok(EcmascriptChunkItemContent { - inner_code: format!( - "{TURBOPACK_EXPORT_VALUE}({path});", - path = StringifyJs(path) - ) - .into(), + inner_code: format!("{TURBOPACK_EXPORT_URL}({path});", path = StringifyJs(path)).into(), ..Default::default() } .cell()) diff --git a/turbopack/crates/turbopack/src/evaluate_context.rs b/turbopack/crates/turbopack/src/evaluate_context.rs index 44435196337be0..b699b3ed869a5b 100644 --- a/turbopack/crates/turbopack/src/evaluate_context.rs +++ b/turbopack/crates/turbopack/src/evaluate_context.rs @@ -12,7 +12,7 @@ use turbopack_core::{ ident::Layer, resolve::options::{ImportMap, ImportMapping}, }; -use turbopack_ecmascript::TreeShakingMode; +use turbopack_ecmascript::{TreeShakingMode, references::esm::UrlRewriteBehavior}; use turbopack_node::execution_context::ExecutionContext; use turbopack_resolve::resolve_options_context::ResolveOptionsContext; @@ -105,6 +105,7 @@ pub async fn node_evaluate_asset_context( ModuleOptionsContext { tree_shaking_mode: Some(TreeShakingMode::ReexportsOnly), ecmascript: EcmascriptOptionsContext { + esm_url_rewrite_behavior: Some(UrlRewriteBehavior::Full), enable_typescript_transform: Some( TypescriptTransformOptions::default().resolved_cell(), ), diff --git a/turbopack/crates/turbopack/src/module_options/mod.rs b/turbopack/crates/turbopack/src/module_options/mod.rs index fa23e84a0aa911..74016dc524b837 100644 --- a/turbopack/crates/turbopack/src/module_options/mod.rs +++ b/turbopack/crates/turbopack/src/module_options/mod.rs @@ -236,6 +236,7 @@ impl ModuleOptions { ref module_css_condition, .. }, + ref static_url_tag, ref enable_postcss_transform, ref enable_webpack_loaders, environment, @@ -454,13 +455,13 @@ impl ModuleOptions { RuleCondition::ResourcePathEndsWith(".woff2".to_string()), ]), vec![ModuleRuleEffect::ModuleType(ModuleType::StaticUrlJs { - tag: None, + tag: static_url_tag.clone(), })], ), ModuleRule::new( RuleCondition::ReferenceType(ReferenceType::Url(UrlReferenceSubType::Undefined)), vec![ModuleRuleEffect::ModuleType(ModuleType::StaticUrlJs { - tag: None, + tag: static_url_tag.clone(), })], ), ModuleRule::new( @@ -468,13 +469,13 @@ impl ModuleOptions { UrlReferenceSubType::EcmaScriptNewUrl, )), vec![ModuleRuleEffect::ModuleType(ModuleType::StaticUrlJs { - tag: None, + tag: static_url_tag.clone(), })], ), ModuleRule::new( RuleCondition::ReferenceType(ReferenceType::Url(UrlReferenceSubType::CssUrl)), vec![ModuleRuleEffect::ModuleType(ModuleType::StaticUrlCss { - tag: None, + tag: static_url_tag.clone(), })], ), ]; diff --git a/turbopack/crates/turbopack/src/module_options/module_options_context.rs b/turbopack/crates/turbopack/src/module_options/module_options_context.rs index 7af1c9f76b6768..aa4ea71e027234 100644 --- a/turbopack/crates/turbopack/src/module_options/module_options_context.rs +++ b/turbopack/crates/turbopack/src/module_options/module_options_context.rs @@ -202,6 +202,8 @@ pub struct ModuleOptionsContext { pub side_effect_free_packages: Option>, pub tree_shaking_mode: Option, + pub static_url_tag: Option, + /// Generate (non-emitted) output assets for static assets and externals, to facilitate /// generating a list of all non-bundled files that will be required at runtime. pub enable_externals_tracing: Option>,