qalita 2.5.4__py3-none-any.whl → 2.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. qalita/_frontend/.next/static/_0oyfpC7N2IGDMa04TT9R/_clientMiddlewareManifest.json +6 -0
  2. qalita/_frontend/.next/static/chunks/236f7e5abd6f09ff.js +4 -0
  3. qalita/_frontend/.next/static/chunks/30ea11065999f7ac.js +1 -0
  4. qalita/_frontend/.next/static/chunks/4dd28bc3f722184a.js +2 -0
  5. qalita/_frontend/.next/static/chunks/711d597b816a80c1.js +1 -0
  6. qalita/_frontend/.next/static/chunks/7340adf74ff47ec0.js +1 -0
  7. qalita/_frontend/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
  8. qalita/_frontend/.next/static/chunks/{e393fec0d8ba175d.js → ecf559101be0ae12.js} +3 -3
  9. qalita/_frontend/.next/static/chunks/turbopack-25186fc8e1264445.js +4 -0
  10. qalita/_frontend/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
  11. qalita/_frontend/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
  12. qalita/_frontend/node_modules/@next/env/package.json +4 -4
  13. qalita/_frontend/node_modules/next/dist/build/analyze/index.js +242 -0
  14. qalita/_frontend/node_modules/next/dist/build/define-env.js +22 -13
  15. qalita/_frontend/node_modules/next/dist/build/entries.js +5 -5
  16. qalita/_frontend/node_modules/next/dist/build/generate-routes-manifest.js +91 -0
  17. qalita/_frontend/node_modules/next/dist/build/index.js +172 -223
  18. qalita/_frontend/node_modules/next/dist/build/output/log.js +4 -7
  19. qalita/_frontend/node_modules/next/dist/build/segment-config/app/app-segments.js +23 -99
  20. qalita/_frontend/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +3 -3
  21. qalita/_frontend/node_modules/next/dist/build/spinner.js +3 -3
  22. qalita/_frontend/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
  23. qalita/_frontend/node_modules/next/dist/build/static-paths/app.js +69 -210
  24. qalita/_frontend/node_modules/next/dist/build/static-paths/utils.js +83 -11
  25. qalita/_frontend/node_modules/next/dist/build/swc/index.js +10 -6
  26. qalita/_frontend/node_modules/next/dist/build/templates/app-page.js +21 -14
  27. qalita/_frontend/node_modules/next/dist/build/templates/app-route.js +8 -10
  28. qalita/_frontend/node_modules/next/dist/build/templates/edge-app-route.js +7 -10
  29. qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr-app.js +16 -20
  30. qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr.js +20 -14
  31. qalita/_frontend/node_modules/next/dist/build/templates/edge-wrapper.js +24 -0
  32. qalita/_frontend/node_modules/next/dist/build/templates/middleware.js +7 -6
  33. qalita/_frontend/node_modules/next/dist/build/templates/pages-edge-api.js +3 -2
  34. qalita/_frontend/node_modules/next/dist/build/turbopack-analyze/index.js +116 -0
  35. qalita/_frontend/node_modules/next/dist/build/turbopack-build/impl.js +2 -1
  36. qalita/_frontend/node_modules/next/dist/build/type-check.js +7 -8
  37. qalita/_frontend/node_modules/next/dist/build/utils.js +45 -4
  38. qalita/_frontend/node_modules/next/dist/build/validate-app-paths.js +242 -0
  39. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js +20 -2
  40. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js +2 -5
  41. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js +4 -11
  42. qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-root-params-loader.js +1 -1
  43. qalita/_frontend/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +1 -1
  44. qalita/_frontend/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +3 -0
  45. qalita/_frontend/node_modules/next/dist/build/webpack-build/impl.js +1 -0
  46. qalita/_frontend/node_modules/next/dist/build/webpack-config.js +35 -3
  47. qalita/_frontend/node_modules/next/dist/cli/next-test.js +3 -5
  48. qalita/_frontend/node_modules/next/dist/client/components/app-router-headers.js +5 -0
  49. qalita/_frontend/node_modules/next/dist/client/components/app-router-instance.js +3 -11
  50. qalita/_frontend/node_modules/next/dist/client/components/app-router.js +8 -28
  51. qalita/_frontend/node_modules/next/dist/client/components/navigation-devtools.js +5 -7
  52. qalita/_frontend/node_modules/next/dist/client/components/navigation.js +4 -3
  53. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +3 -22
  54. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +6 -18
  55. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +844 -590
  56. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +4 -76
  57. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +21 -18
  58. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +48 -85
  59. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +25 -10
  60. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +126 -113
  61. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +30 -39
  62. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -1
  63. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -2
  64. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache-map.js +13 -18
  65. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache.js +27 -14
  66. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/lru.js +3 -1
  67. qalita/_frontend/node_modules/next/dist/client/components/segment-cache/navigation.js +176 -133
  68. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +12 -12
  69. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +12 -12
  70. qalita/_frontend/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
  71. qalita/_frontend/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
  72. qalita/_frontend/node_modules/next/dist/compiled/react-is/package.json +1 -1
  73. qalita/_frontend/node_modules/next/dist/lib/build-custom-route.js +4 -4
  74. qalita/_frontend/node_modules/next/dist/lib/constants.js +0 -5
  75. qalita/_frontend/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  76. qalita/_frontend/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +0 -1
  77. qalita/_frontend/node_modules/next/dist/lib/helpers/get-npx-command.js +3 -3
  78. qalita/_frontend/node_modules/next/dist/lib/inline-static-env.js +1 -1
  79. qalita/_frontend/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  80. qalita/_frontend/node_modules/next/dist/lib/metadata/metadata.js +17 -11
  81. qalita/_frontend/node_modules/next/dist/lib/needs-experimental-react.js +2 -2
  82. qalita/_frontend/node_modules/next/dist/lib/resolve-build-paths.js +44 -76
  83. qalita/_frontend/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  84. qalita/_frontend/node_modules/next/dist/lib/static-env.js +6 -6
  85. qalita/_frontend/node_modules/next/dist/lib/turbopack-warning.js +3 -5
  86. qalita/_frontend/node_modules/next/dist/lib/typescript/runTypeCheck.js +61 -5
  87. qalita/_frontend/node_modules/next/dist/lib/typescript/type-paths.js +56 -0
  88. qalita/_frontend/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +6 -17
  89. qalita/_frontend/node_modules/next/dist/lib/verify-typescript-setup.js +10 -2
  90. qalita/_frontend/node_modules/next/dist/lib/worker.js +17 -9
  91. qalita/_frontend/node_modules/next/dist/server/app-render/action-handler.js +113 -77
  92. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +36 -15
  93. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-render-utils.js +36 -15
  94. qalita/_frontend/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
  95. qalita/_frontend/node_modules/next/dist/server/app-render/app-render.js +804 -748
  96. qalita/_frontend/node_modules/next/dist/server/app-render/collect-segment-data.js +8 -2
  97. qalita/_frontend/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +1 -1
  98. qalita/_frontend/node_modules/next/dist/server/app-render/create-error-handler.js +42 -75
  99. qalita/_frontend/node_modules/next/dist/server/app-render/dynamic-rendering.js +127 -14
  100. qalita/_frontend/node_modules/next/dist/server/app-render/encryption-utils.js +3 -108
  101. qalita/_frontend/node_modules/next/dist/server/app-render/encryption.js +4 -3
  102. qalita/_frontend/node_modules/next/dist/server/app-render/flight-render-result.js +3 -2
  103. qalita/_frontend/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +9 -8
  104. qalita/_frontend/node_modules/next/dist/server/app-render/get-layer-assets.js +1 -1
  105. qalita/_frontend/node_modules/next/dist/server/app-render/manifests-singleton.js +257 -0
  106. qalita/_frontend/node_modules/next/dist/server/app-render/prospective-render-utils.js +25 -8
  107. qalita/_frontend/node_modules/next/dist/server/app-render/staged-rendering.js +161 -15
  108. qalita/_frontend/node_modules/next/dist/server/app-render/use-flight-response.js +67 -20
  109. qalita/_frontend/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +2 -2
  110. qalita/_frontend/node_modules/next/dist/server/async-storage/work-store.js +2 -1
  111. qalita/_frontend/node_modules/next/dist/server/base-server.js +32 -23
  112. qalita/_frontend/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  113. qalita/_frontend/node_modules/next/dist/server/config-schema.js +8 -1
  114. qalita/_frontend/node_modules/next/dist/server/config-shared.js +83 -2
  115. qalita/_frontend/node_modules/next/dist/server/config.js +24 -17
  116. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  117. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +37 -25
  118. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-types.js +1 -0
  119. qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-webpack.js +62 -57
  120. qalita/_frontend/node_modules/next/dist/server/dev/log-requests.js +11 -3
  121. qalita/_frontend/node_modules/next/dist/server/dev/messages.js +10 -0
  122. qalita/_frontend/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
  123. qalita/_frontend/node_modules/next/dist/server/dev/static-paths-worker.js +10 -0
  124. qalita/_frontend/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  125. qalita/_frontend/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +2 -2
  126. qalita/_frontend/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -10
  127. qalita/_frontend/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +4 -4
  128. qalita/_frontend/node_modules/next/dist/server/lib/lazy-result.js +1 -1
  129. qalita/_frontend/node_modules/next/dist/server/lib/patch-fetch.js +9 -9
  130. qalita/_frontend/node_modules/next/dist/server/lib/router-server.js +43 -29
  131. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +0 -21
  132. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/filesystem.js +2 -7
  133. qalita/_frontend/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +8 -4
  134. qalita/_frontend/node_modules/next/dist/server/lib/start-server.js +3 -3
  135. qalita/_frontend/node_modules/next/dist/server/lib/trace/tracer.js +4 -0
  136. qalita/_frontend/node_modules/next/dist/server/load-components.js +3 -9
  137. qalita/_frontend/node_modules/next/dist/server/next-server.js +19 -18
  138. qalita/_frontend/node_modules/next/dist/server/next.js +1 -1
  139. qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +570 -0
  140. qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/utils.js +60 -3
  141. qalita/_frontend/node_modules/next/dist/server/node-environment.js +1 -0
  142. qalita/_frontend/node_modules/next/dist/server/patch-error-inspect.js +7 -4
  143. qalita/_frontend/node_modules/next/dist/server/request/fallback-params.js +23 -66
  144. qalita/_frontend/node_modules/next/dist/server/route-modules/app-route/module.js +2 -2
  145. qalita/_frontend/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -3
  146. qalita/_frontend/node_modules/next/dist/server/route-modules/route-module.js +79 -18
  147. qalita/_frontend/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +28 -4
  148. qalita/_frontend/node_modules/next/dist/server/typescript/rules/config.js +50 -6
  149. qalita/_frontend/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +68 -23
  150. qalita/_frontend/node_modules/next/dist/server/web/edge-route-module-wrapper.js +7 -5
  151. qalita/_frontend/node_modules/next/dist/server/web/sandbox/context.js +8 -9
  152. qalita/_frontend/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +2 -1
  153. qalita/_frontend/node_modules/next/dist/server/web/spec-extension/revalidate.js +7 -3
  154. qalita/_frontend/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  155. qalita/_frontend/node_modules/next/dist/shared/lib/constants.js +6 -1
  156. qalita/_frontend/node_modules/next/dist/shared/lib/deployment-id.js +36 -0
  157. qalita/_frontend/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  158. qalita/_frontend/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +5 -0
  159. qalita/_frontend/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
  160. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +20 -49
  161. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +6 -6
  162. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  163. qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
  164. qalita/_frontend/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js +3 -24
  165. qalita/_frontend/node_modules/next/dist/shared/lib/segment.js +5 -0
  166. qalita/_frontend/node_modules/next/dist/shared/lib/turbopack/utils.js +6 -5
  167. qalita/_frontend/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  168. qalita/_frontend/node_modules/next/dist/telemetry/events/build.js +11 -0
  169. qalita/_frontend/node_modules/next/dist/telemetry/events/version.js +2 -2
  170. qalita/_frontend/node_modules/next/package.json +20 -18
  171. qalita/_frontend/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
  172. qalita/_frontend/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
  173. qalita/_frontend/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
  174. qalita/_frontend/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
  175. qalita/_frontend/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
  176. qalita/_frontend/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
  177. qalita/_frontend/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
  178. qalita/_frontend/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
  179. qalita/_frontend/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
  180. qalita/_frontend/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
  181. qalita/_frontend/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
  182. qalita/_frontend/node_modules/typescript/lib/typesMap.json +497 -0
  183. qalita/_frontend/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
  184. qalita/_frontend/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
  185. qalita/_frontend/package.json +3 -3
  186. qalita/_frontend/server.js +1 -1
  187. qalita/commands/pack.py +3 -3
  188. qalita/commands/source.py +1 -1
  189. qalita/internal/utils.py +11 -7
  190. qalita/web/app.py +20 -4
  191. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/METADATA +1 -1
  192. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/RECORD +197 -168
  193. qalita/_frontend/.next/static/chunks/023d923a37d494fc.js +0 -1
  194. qalita/_frontend/.next/static/chunks/247eb132b7f7b574.js +0 -1
  195. qalita/_frontend/.next/static/chunks/bba035711c7e37a2.js +0 -4
  196. qalita/_frontend/.next/static/chunks/c903f9580a4b6572.js +0 -2
  197. qalita/_frontend/.next/static/chunks/cbd55ab9639e1e66.js +0 -1
  198. qalita/_frontend/.next/static/chunks/turbopack-1ad58da399056f41.js +0 -3
  199. qalita/_frontend/node_modules/next/dist/build/deployment-id.js +0 -18
  200. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js +0 -53
  201. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js +0 -105
  202. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js +0 -110
  203. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js +0 -131
  204. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js +0 -25
  205. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js +0 -32
  206. qalita/_frontend/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js +0 -104
  207. qalita/_frontend/node_modules/next/dist/server/app-render/action-utils.js +0 -90
  208. qalita/_frontend/node_modules/next/dist/server/normalizers/request/prefetch-rsc.js +0 -31
  209. /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_buildManifest.js +0 -0
  210. /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_ssgManifest.js +0 -0
  211. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/WHEEL +0 -0
  212. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/entry_points.txt +0 -0
  213. {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -14,7 +14,7 @@ const _static = require("react-server-dom-webpack/static");
14
14
  const _workasyncstorageexternal = require("../app-render/work-async-storage.external");
15
15
  const _workunitasyncstorageexternal = require("../app-render/work-unit-async-storage.external");
16
16
  const _dynamicrenderingutils = require("../dynamic-rendering-utils");
17
- const _encryptionutils = require("../app-render/encryption-utils");
17
+ const _manifestssingleton = require("../app-render/manifests-singleton");
18
18
  const _encryption = require("../app-render/encryption");
19
19
  const _invarianterror = require("../../shared/lib/invariant-error");
20
20
  const _createerrorhandler = require("../app-render/create-error-handler");
@@ -25,8 +25,49 @@ const _dynamicrendering = require("../app-render/dynamic-rendering");
25
25
  const _searchparams = require("../request/search-params");
26
26
  const _lazyresult = require("../lib/lazy-result");
27
27
  const _dynamicaccessasyncstorageexternal = require("../app-render/dynamic-access-async-storage.external");
28
- const _reactlargeshellerror = require("../app-render/react-large-shell-error");
29
28
  const _stagedrendering = require("../app-render/staged-rendering");
29
+ const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../build/output/log"));
30
+ function _getRequireWildcardCache(nodeInterop) {
31
+ if (typeof WeakMap !== "function") return null;
32
+ var cacheBabelInterop = new WeakMap();
33
+ var cacheNodeInterop = new WeakMap();
34
+ return (_getRequireWildcardCache = function(nodeInterop) {
35
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
36
+ })(nodeInterop);
37
+ }
38
+ function _interop_require_wildcard(obj, nodeInterop) {
39
+ if (!nodeInterop && obj && obj.__esModule) {
40
+ return obj;
41
+ }
42
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
43
+ return {
44
+ default: obj
45
+ };
46
+ }
47
+ var cache = _getRequireWildcardCache(nodeInterop);
48
+ if (cache && cache.has(obj)) {
49
+ return cache.get(obj);
50
+ }
51
+ var newObj = {
52
+ __proto__: null
53
+ };
54
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
55
+ for(var key in obj){
56
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
57
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
58
+ if (desc && (desc.get || desc.set)) {
59
+ Object.defineProperty(newObj, key, desc);
60
+ } else {
61
+ newObj[key] = obj[key];
62
+ }
63
+ }
64
+ }
65
+ newObj.default = obj;
66
+ if (cache) {
67
+ cache.set(obj, newObj);
68
+ }
69
+ return newObj;
70
+ }
30
71
  const isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge';
31
72
  const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console, 'use-cache:') : undefined;
32
73
  const filterStackFrame = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').filterStackFrameDEV : undefined;
@@ -279,7 +320,7 @@ async function collectResult(savedStream, workStore, cacheContext, innerCacheSto
279
320
  async function generateCacheEntryImpl(workStore, cacheContext, innerCacheStore, clientReferenceManifest, encodedArguments, fn, timeoutError) {
280
321
  const temporaryReferences = (0, _server.createTemporaryReferenceSet)();
281
322
  const outerWorkUnitStore = cacheContext.outerWorkUnitStore;
282
- const [, , args] = typeof encodedArguments === 'string' ? await (0, _server.decodeReply)(encodedArguments, (0, _encryptionutils.getServerModuleMap)(), {
323
+ const [, , args] = typeof encodedArguments === 'string' ? await (0, _server.decodeReply)(encodedArguments, (0, _manifestssingleton.getServerModuleMap)(), {
283
324
  temporaryReferences
284
325
  }) : await (0, _server.decodeReplyFromAsyncIterable)({
285
326
  async *[Symbol.asyncIterator] () {
@@ -317,7 +358,7 @@ async function generateCacheEntryImpl(workStore, cacheContext, innerCacheStore,
317
358
  }
318
359
  }
319
360
  }
320
- }, (0, _encryptionutils.getServerModuleMap)(), {
361
+ }, (0, _manifestssingleton.getServerModuleMap)(), {
321
362
  temporaryReferences
322
363
  });
323
364
  // Track the timestamp when we started computing the result.
@@ -332,24 +373,17 @@ async function generateCacheEntryImpl(workStore, cacheContext, innerCacheStore,
332
373
  // digests are handled correctly. Error formatting and reporting is not
333
374
  // necessary here; the errors are encoded in the stream, and will be reported
334
375
  // in the "Server" environment.
335
- const handleError = (error)=>{
336
- const digest = (0, _createerrorhandler.getDigestForWellKnownError)(error);
337
- if (digest) {
338
- return digest;
339
- }
340
- if ((0, _reactlargeshellerror.isReactLargeShellError)(error)) {
341
- // TODO: Aggregate
342
- console.error(error);
343
- return undefined;
344
- }
345
- if (process.env.NODE_ENV !== 'development') {
346
- // TODO: For now we're also reporting the error here, because in
347
- // production, the "Server" environment will only get the obfuscated
348
- // error (created by the Flight Client in the cache wrapper).
349
- console.error(error);
376
+ const handleError = (0, _createerrorhandler.createReactServerErrorHandler)(workStore.dev, workStore.isBuildTimePrerendering ?? false, workStore.reactServerErrorsByDigest, (error)=>{
377
+ // In production, we log the original error here. It gets a digest that
378
+ // can be used to associate the error with the obfuscated error that might
379
+ // be logged if the error is caught. In development, we prefer logging the
380
+ // transported error in the server environment. It's not obfuscated and
381
+ // also includes the (dev-only) environment name.
382
+ if (process.env.NODE_ENV === 'production') {
383
+ _log.error(error);
350
384
  }
351
385
  errors.push(error);
352
- };
386
+ });
353
387
  let stream;
354
388
  switch(outerWorkUnitStore == null ? void 0 : outerWorkUnitStore.type){
355
389
  case 'prerender-runtime':
@@ -410,9 +444,20 @@ async function generateCacheEntryImpl(workStore, cacheContext, innerCacheStore,
410
444
  stream = prelude;
411
445
  }
412
446
  break;
447
+ case 'request':
448
+ // If we're filling caches for a staged render, make sure that
449
+ // it takes at least a task, so we'll always notice a cache miss between stages.
450
+ //
451
+ // TODO(restart-on-cache-miss): This is suboptimal.
452
+ // Ideally we wouldn't need to restart for microtasky caches,
453
+ // but the current logic for omitting short-lived caches only works correctly
454
+ // if we do a second render, so that's the best we can do until we refactor that.
455
+ if (process.env.NODE_ENV === 'development' && outerWorkUnitStore.cacheSignal) {
456
+ await new Promise((resolve)=>setTimeout(resolve));
457
+ }
458
+ // fallthrough
413
459
  case 'prerender-ppr':
414
460
  case 'prerender-legacy':
415
- case 'request':
416
461
  case 'cache':
417
462
  case 'private-cache':
418
463
  case 'unstable-cache':
@@ -636,7 +681,7 @@ async function cache(kind, id, boundArgsLength, originalFn, argsObj) {
636
681
  }
637
682
  // Get the clientReferenceManifest while we're still in the outer Context.
638
683
  // In case getClientReferenceManifestSingleton is implemented using AsyncLocalStorage.
639
- const clientReferenceManifest = (0, _encryptionutils.getClientReferenceManifestForRsc)();
684
+ const clientReferenceManifest = (0, _manifestssingleton.getClientReferenceManifest)();
640
685
  // Because the Action ID is not yet unique per implementation of that Action we can't
641
686
  // safely reuse the results across builds yet. In the meantime we add the buildId to the
642
687
  // arguments as a seed to ensure they're not reused. Remove this once Action IDs hash
@@ -1181,7 +1226,7 @@ async function cache(kind, id, boundArgsLength, originalFn, argsObj) {
1181
1226
  // which themselves will handle the preloading.
1182
1227
  moduleLoading: null,
1183
1228
  moduleMap: isEdgeRuntime ? clientReferenceManifest.edgeRscModuleMapping : clientReferenceManifest.rscModuleMapping,
1184
- serverModuleMap: (0, _encryptionutils.getServerModuleMap)()
1229
+ serverModuleMap: (0, _manifestssingleton.getServerModuleMap)()
1185
1230
  };
1186
1231
  return (0, _client.createFromReadableStream)(stream, {
1187
1232
  findSourceMapURL,
@@ -17,15 +17,15 @@ const _serverutils = require("../server-utils");
17
17
  const _querystring = require("../../shared/lib/router/utils/querystring");
18
18
  const _webonclose = require("./web-on-close");
19
19
  const _getedgepreviewprops = require("./get-edge-preview-props");
20
+ const _web = require("../../server/base-http/web");
20
21
  class EdgeRouteModuleWrapper {
21
22
  /**
22
23
  * The constructor is wrapped with private to ensure that it can only be
23
24
  * constructed by the static wrap method.
24
25
  *
25
26
  * @param routeModule the route module to wrap
26
- */ constructor(routeModule, nextConfig){
27
+ */ constructor(routeModule){
27
28
  this.routeModule = routeModule;
28
- this.nextConfig = nextConfig;
29
29
  // TODO: (wyattjoh) possibly allow the module to define it's own matcher
30
30
  this.matcher = new _routematcher.RouteMatcher(routeModule.definition);
31
31
  }
@@ -39,14 +39,15 @@ class EdgeRouteModuleWrapper {
39
39
  * @returns a function that can be used as a handler for the edge runtime
40
40
  */ static wrap(routeModule, options) {
41
41
  // Create the module wrapper.
42
- const wrapper = new EdgeRouteModuleWrapper(routeModule, options.nextConfig);
42
+ const wrapper = new EdgeRouteModuleWrapper(routeModule);
43
43
  // Return the wrapping function.
44
44
  return (opts)=>{
45
45
  return (0, _adapter.adapter)({
46
46
  ...opts,
47
47
  IncrementalCache: _incrementalcache.IncrementalCache,
48
48
  // Bind the handler method to the wrapper so it still has context.
49
- handler: wrapper.handler.bind(wrapper)
49
+ handler: wrapper.handler.bind(wrapper),
50
+ page: options.page
50
51
  });
51
52
  };
52
53
  }
@@ -60,6 +61,7 @@ class EdgeRouteModuleWrapper {
60
61
  // only used for rewrites, so setting an arbitrary default value here
61
62
  caseSensitive: false
62
63
  });
64
+ const { nextConfig } = this.routeModule.getNextConfigEdge(new _web.WebNextRequest(request));
63
65
  const { params } = utils.normalizeDynamicRouteParams((0, _querystring.searchParamsToUrlQuery)(request.nextUrl.searchParams), false);
64
66
  const waitUntil = evt.waitUntil.bind(evt);
65
67
  const closeController = new _webonclose.CloseController();
@@ -84,7 +86,7 @@ class EdgeRouteModuleWrapper {
84
86
  experimental: {
85
87
  authInterrupts: !!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS
86
88
  },
87
- cacheLifeProfiles: this.nextConfig.cacheLife
89
+ cacheLifeProfiles: nextConfig.cacheLife
88
90
  },
89
91
  sharedContext: {
90
92
  buildId: ''
@@ -99,15 +99,14 @@ async function loadWasm(wasm) {
99
99
  return modules;
100
100
  }
101
101
  function buildEnvironmentVariablesFrom(injectedEnvironments) {
102
- const pairs = Object.keys(process.env).map((key)=>[
103
- key,
104
- process.env[key]
105
- ]);
106
- const env = Object.fromEntries(pairs);
107
- for (const key of Object.keys(injectedEnvironments)){
108
- env[key] = injectedEnvironments[key];
109
- }
110
- env.NEXT_RUNTIME = 'edge';
102
+ let env = Object.fromEntries([
103
+ ...Object.entries(process.env),
104
+ ...Object.entries(injectedEnvironments),
105
+ [
106
+ 'NEXT_RUNTIME',
107
+ 'edge'
108
+ ]
109
+ ]);
111
110
  return env;
112
111
  }
113
112
  function throwUnsupportedAPIError(name) {
@@ -47,6 +47,7 @@ _export(exports, {
47
47
  const _cookies = require("../cookies");
48
48
  const _reflect = require("./reflect");
49
49
  const _workasyncstorageexternal = require("../../../app-render/work-async-storage.external");
50
+ const _actionrevalidationkind = require("../../../../shared/lib/action-revalidation-kind");
50
51
  class ReadonlyRequestCookiesError extends Error {
51
52
  constructor(){
52
53
  super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options');
@@ -111,7 +112,7 @@ class MutableRequestCookiesAdapter {
111
112
  // TODO-APP: change method of getting workStore
112
113
  const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
113
114
  if (workStore) {
114
- workStore.pathWasRevalidated = true;
115
+ workStore.pathWasRevalidated = _actionrevalidationkind.ActionDidRevalidateStaticAndDynamic;
115
116
  }
116
117
  const allCookies = responseCookies.getAll();
117
118
  modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));
@@ -35,6 +35,7 @@ const _workasyncstorageexternal = require("../../app-render/work-async-storage.e
35
35
  const _workunitasyncstorageexternal = require("../../app-render/work-unit-async-storage.external");
36
36
  const _hooksservercontext = require("../../../client/components/hooks-server-context");
37
37
  const _invarianterror = require("../../../shared/lib/invariant-error");
38
+ const _actionrevalidationkind = require("../../../shared/lib/action-revalidation-kind");
38
39
  function revalidateTag(tag, profile) {
39
40
  if (!profile) {
40
41
  console.warn('"revalidateTag" without the second argument is now deprecated, add second argument of "max" or use "updateTag". See more info here: https://nextjs.org/docs/messages/revalidate-tag-single-arg');
@@ -70,8 +71,9 @@ function refresh() {
70
71
  });
71
72
  }
72
73
  if (workStore) {
73
- // TODO: break this to it's own field
74
- workStore.pathWasRevalidated = true;
74
+ // The Server Action version of refresh() only revalidates the dynamic data
75
+ // on the client. It doesn't affect cached data.
76
+ workStore.pathWasRevalidated = _actionrevalidationkind.ActionDidRevalidateDynamicOnly;
75
77
  }
76
78
  }
77
79
  function revalidatePath(originalPath, type) {
@@ -161,6 +163,8 @@ function revalidate(tags, expression, profile) {
161
163
  // status being flipped when revalidating a static page with a server
162
164
  // action.
163
165
  workUnitStore.usedDynamic = true;
166
+ // TODO(restart-on-cache-miss): we should do a sync IO error here in dev
167
+ // to match prerender behavior
164
168
  }
165
169
  break;
166
170
  default:
@@ -195,7 +199,7 @@ function revalidate(tags, expression, profile) {
195
199
  const cacheLife = profile && typeof profile === 'object' ? profile : profile && typeof profile === 'string' && (store == null ? void 0 : (_store_cacheLifeProfiles = store.cacheLifeProfiles) == null ? void 0 : _store_cacheLifeProfiles[profile]) ? store.cacheLifeProfiles[profile] : undefined;
196
200
  if (!profile || (cacheLife == null ? void 0 : cacheLife.expire) === 0) {
197
201
  // TODO: only revalidate if the path matches
198
- store.pathWasRevalidated = true;
202
+ store.pathWasRevalidated = _actionrevalidationkind.ActionDidRevalidateStaticAndDynamic;
199
203
  }
200
204
  }
201
205
 
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ ActionDidNotRevalidate: null,
7
+ ActionDidRevalidateDynamicOnly: null,
8
+ ActionDidRevalidateStaticAndDynamic: null
9
+ });
10
+ function _export(target, all) {
11
+ for(var name in all)Object.defineProperty(target, name, {
12
+ enumerable: true,
13
+ get: all[name]
14
+ });
15
+ }
16
+ _export(exports, {
17
+ ActionDidNotRevalidate: function() {
18
+ return ActionDidNotRevalidate;
19
+ },
20
+ ActionDidRevalidateDynamicOnly: function() {
21
+ return ActionDidRevalidateDynamicOnly;
22
+ },
23
+ ActionDidRevalidateStaticAndDynamic: function() {
24
+ return ActionDidRevalidateStaticAndDynamic;
25
+ }
26
+ });
27
+ const ActionDidNotRevalidate = 0;
28
+ const ActionDidRevalidateStaticAndDynamic = 1;
29
+ const ActionDidRevalidateDynamicOnly = 2;
30
+
31
+ //# sourceMappingURL=action-revalidation-kind.js.map
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "__esModule", {
43
43
  NEXT_BUILTIN_DOCUMENT: null,
44
44
  NEXT_FONT_MANIFEST: null,
45
45
  PAGES_MANIFEST: null,
46
+ PHASE_ANALYZE: null,
46
47
  PHASE_DEVELOPMENT_SERVER: null,
47
48
  PHASE_EXPORT: null,
48
49
  PHASE_INFO: null,
@@ -199,6 +200,9 @@ _export(exports, {
199
200
  PAGES_MANIFEST: function() {
200
201
  return PAGES_MANIFEST;
201
202
  },
203
+ PHASE_ANALYZE: function() {
204
+ return PHASE_ANALYZE;
205
+ },
202
206
  PHASE_DEVELOPMENT_SERVER: function() {
203
207
  return PHASE_DEVELOPMENT_SERVER;
204
208
  },
@@ -325,6 +329,7 @@ var AdapterOutputType = /*#__PURE__*/ function(AdapterOutputType) {
325
329
  return AdapterOutputType;
326
330
  }({});
327
331
  const PHASE_EXPORT = 'phase-export';
332
+ const PHASE_ANALYZE = 'phase-analyze';
328
333
  const PHASE_PRODUCTION_BUILD = 'phase-production-build';
329
334
  const PHASE_PRODUCTION_SERVER = 'phase-production-server';
330
335
  const PHASE_DEVELOPMENT_SERVER = 'phase-development-server';
@@ -343,7 +348,7 @@ const EXPORT_DETAIL = 'export-detail.json';
343
348
  const PRERENDER_MANIFEST = 'prerender-manifest.json';
344
349
  const ROUTES_MANIFEST = 'routes-manifest.json';
345
350
  const IMAGES_MANIFEST = 'images-manifest.json';
346
- const SERVER_FILES_MANIFEST = 'required-server-files.json';
351
+ const SERVER_FILES_MANIFEST = 'required-server-files';
347
352
  const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json';
348
353
  const MIDDLEWARE_MANIFEST = 'middleware-manifest.json';
349
354
  const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST = '_clientMiddlewareManifest.json';
@@ -0,0 +1,36 @@
1
+ // This could also be a variable instead of a function, but some unit tests want to change the ID at
2
+ // runtime. Even though that would never happen in a real deployment.
3
+ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ 0 && (module.exports = {
8
+ getDeploymentId: null,
9
+ getDeploymentIdQueryOrEmptyString: null
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: all[name]
15
+ });
16
+ }
17
+ _export(exports, {
18
+ getDeploymentId: function() {
19
+ return getDeploymentId;
20
+ },
21
+ getDeploymentIdQueryOrEmptyString: function() {
22
+ return getDeploymentIdQueryOrEmptyString;
23
+ }
24
+ });
25
+ function getDeploymentId() {
26
+ return process.env.NEXT_DEPLOYMENT_ID;
27
+ }
28
+ function getDeploymentIdQueryOrEmptyString() {
29
+ let deploymentId = getDeploymentId();
30
+ if (deploymentId) {
31
+ return `?dpl=${deploymentId}`;
32
+ }
33
+ return '';
34
+ }
35
+
36
+ //# sourceMappingURL=deployment-id.js.map
@@ -21,7 +21,7 @@ _export(exports, {
21
21
  }
22
22
  });
23
23
  function isStableBuild() {
24
- return !"16.0.10"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
24
+ return !"16.1.1"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
25
25
  }
26
26
  class CanaryOnlyConfigError extends Error {
27
27
  constructor(arg){
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  NavigationPromisesContext: null,
8
8
  PathParamsContext: null,
9
9
  PathnameContext: null,
10
+ ReadonlyURLSearchParams: null,
10
11
  SearchParamsContext: null,
11
12
  createDevToolsInstrumentedPromise: null
12
13
  });
@@ -26,6 +27,9 @@ _export(exports, {
26
27
  PathnameContext: function() {
27
28
  return PathnameContext;
28
29
  },
30
+ ReadonlyURLSearchParams: function() {
31
+ return _readonlyurlsearchparams.ReadonlyURLSearchParams;
32
+ },
29
33
  SearchParamsContext: function() {
30
34
  return SearchParamsContext;
31
35
  },
@@ -34,6 +38,7 @@ _export(exports, {
34
38
  }
35
39
  });
36
40
  const _react = require("react");
41
+ const _readonlyurlsearchparams = require("../../client/components/readonly-url-search-params");
37
42
  const SearchParamsContext = (0, _react.createContext)(null);
38
43
  const PathnameContext = (0, _react.createContext)(null);
39
44
  const PathParamsContext = (0, _react.createContext)(null);
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ isInterceptionAppRoute: null,
7
+ isNormalizedAppRoute: null,
8
+ parseAppRoute: null,
9
+ parseAppRouteSegment: null
10
+ });
11
+ function _export(target, all) {
12
+ for(var name in all)Object.defineProperty(target, name, {
13
+ enumerable: true,
14
+ get: all[name]
15
+ });
16
+ }
17
+ _export(exports, {
18
+ isInterceptionAppRoute: function() {
19
+ return isInterceptionAppRoute;
20
+ },
21
+ isNormalizedAppRoute: function() {
22
+ return isNormalizedAppRoute;
23
+ },
24
+ parseAppRoute: function() {
25
+ return parseAppRoute;
26
+ },
27
+ parseAppRouteSegment: function() {
28
+ return parseAppRouteSegment;
29
+ }
30
+ });
31
+ const _invarianterror = require("../../invariant-error");
32
+ const _getsegmentparam = require("../utils/get-segment-param");
33
+ const _interceptionroutes = require("../utils/interception-routes");
34
+ function parseAppRouteSegment(segment) {
35
+ if (segment === '') {
36
+ return null;
37
+ }
38
+ // Check if the segment starts with an interception marker
39
+ const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
40
+ const param = (0, _getsegmentparam.getSegmentParam)(segment);
41
+ if (param) {
42
+ return {
43
+ type: 'dynamic',
44
+ name: segment,
45
+ param,
46
+ interceptionMarker
47
+ };
48
+ } else if (segment.startsWith('(') && segment.endsWith(')')) {
49
+ return {
50
+ type: 'route-group',
51
+ name: segment,
52
+ interceptionMarker
53
+ };
54
+ } else if (segment.startsWith('@')) {
55
+ return {
56
+ type: 'parallel-route',
57
+ name: segment,
58
+ interceptionMarker
59
+ };
60
+ } else {
61
+ return {
62
+ type: 'static',
63
+ name: segment,
64
+ interceptionMarker
65
+ };
66
+ }
67
+ }
68
+ function isNormalizedAppRoute(route) {
69
+ return route.normalized;
70
+ }
71
+ function isInterceptionAppRoute(route) {
72
+ return route.interceptionMarker !== undefined && route.interceptingRoute !== undefined && route.interceptedRoute !== undefined;
73
+ }
74
+ function parseAppRoute(pathname, normalized) {
75
+ const pathnameSegments = pathname.split('/').filter(Boolean);
76
+ // Build segments array with static and dynamic segments
77
+ const segments = [];
78
+ // Parse if this is an interception route.
79
+ let interceptionMarker;
80
+ let interceptingRoute;
81
+ let interceptedRoute;
82
+ for (const segment of pathnameSegments){
83
+ // Parse the segment into an AppSegment.
84
+ const appSegment = parseAppRouteSegment(segment);
85
+ if (!appSegment) {
86
+ continue;
87
+ }
88
+ if (normalized && (appSegment.type === 'route-group' || appSegment.type === 'parallel-route')) {
89
+ throw Object.defineProperty(new _invarianterror.InvariantError(`${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`), "__NEXT_ERROR_CODE", {
90
+ value: "E923",
91
+ enumerable: false,
92
+ configurable: true
93
+ });
94
+ }
95
+ segments.push(appSegment);
96
+ if (appSegment.interceptionMarker) {
97
+ const parts = pathname.split(appSegment.interceptionMarker);
98
+ if (parts.length !== 2) {
99
+ throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), "__NEXT_ERROR_CODE", {
100
+ value: "E924",
101
+ enumerable: false,
102
+ configurable: true
103
+ });
104
+ }
105
+ interceptingRoute = normalized ? parseAppRoute(parts[0], true) : parseAppRoute(parts[0], false);
106
+ interceptedRoute = normalized ? parseAppRoute(parts[1], true) : parseAppRoute(parts[1], false);
107
+ interceptionMarker = appSegment.interceptionMarker;
108
+ }
109
+ }
110
+ const dynamicSegments = segments.filter((segment)=>segment.type === 'dynamic');
111
+ return {
112
+ normalized,
113
+ pathname,
114
+ segments,
115
+ dynamicSegments,
116
+ interceptionMarker,
117
+ interceptingRoute,
118
+ interceptedRoute
119
+ };
120
+ }
121
+
122
+ //# sourceMappingURL=app.js.map
@@ -34,7 +34,8 @@ _export(exports, {
34
34
  });
35
35
  const _invarianterror = require("../../invariant-error");
36
36
  const _parseloadertree = require("./parse-loader-tree");
37
- const _getsegmentparam = require("./get-segment-param");
37
+ const _app = require("../routes/app");
38
+ const _resolveparamvalue = require("./resolve-param-value");
38
39
  /**
39
40
  * Gets the value of a param from the params object. This correctly handles the
40
41
  * case where the param is a fallback route param and encodes the resulting
@@ -67,66 +68,36 @@ function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRo
67
68
  depth: 0
68
69
  }
69
70
  ];
70
- // Derive value from pagePath based on depth and parameter type
71
- const pathSegments = pagePath.split('/').slice(1) // Remove first empty string
72
- ;
71
+ // Parse the route from the provided page path.
72
+ const route = (0, _app.parseAppRoute)(pagePath, true);
73
73
  while(stack.length > 0){
74
74
  const { tree, depth } = stack.pop();
75
75
  const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
76
- // Check if current segment contains a parameter
77
- const segmentParam = (0, _getsegmentparam.getSegmentParam)(segment);
78
- if (segmentParam && !interpolated.hasOwnProperty(segmentParam.param) && // If the param is in the fallback route params, we don't need to
76
+ const appSegment = (0, _app.parseAppRouteSegment)(segment);
77
+ if (appSegment?.type === 'dynamic' && !interpolated.hasOwnProperty(appSegment.param.paramName) && // If the param is in the fallback route params, we don't need to
79
78
  // interpolate it because it's already marked as being unknown.
80
- !fallbackRouteParams?.has(segmentParam.param)) {
81
- switch(segmentParam.type){
82
- case 'catchall':
83
- case 'optional-catchall':
84
- case 'catchall-intercepted-(..)(..)':
85
- case 'catchall-intercepted-(.)':
86
- case 'catchall-intercepted-(..)':
87
- case 'catchall-intercepted-(...)':
88
- // For catchall parameters, take all remaining segments from this depth
89
- const remainingSegments = pathSegments.slice(depth);
90
- // Process each segment to handle any dynamic params
91
- const processedSegments = remainingSegments.flatMap((pathSegment)=>{
92
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
93
- // If the segment matches a param, return the param value otherwise,
94
- // it's a static segment, so just return that. We don't use the
95
- // `getParamValue` function here because we don't want the values to
96
- // be encoded, that's handled on get by the `getDynamicParam`
97
- // function.
98
- return param ? interpolated[param.param] : pathSegment;
99
- }).filter((s)=>s !== undefined);
100
- if (processedSegments.length > 0) {
101
- interpolated[segmentParam.param] = processedSegments;
102
- }
103
- break;
104
- case 'dynamic':
105
- case 'dynamic-intercepted-(..)(..)':
106
- case 'dynamic-intercepted-(.)':
107
- case 'dynamic-intercepted-(..)':
108
- case 'dynamic-intercepted-(...)':
109
- // For regular dynamic parameters, take the segment at this depth
110
- if (depth < pathSegments.length) {
111
- const pathSegment = pathSegments[depth];
112
- const param = (0, _getsegmentparam.getSegmentParam)(pathSegment);
113
- interpolated[segmentParam.param] = param ? interpolated[param.param] : pathSegment;
114
- }
115
- break;
116
- default:
117
- segmentParam.type;
79
+ !fallbackRouteParams?.has(appSegment.param.paramName)) {
80
+ const { paramName, paramType } = appSegment.param;
81
+ const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, interpolated);
82
+ if (paramValue !== undefined) {
83
+ interpolated[paramName] = paramValue;
84
+ } else if (paramType !== 'optional-catchall') {
85
+ throw Object.defineProperty(new _invarianterror.InvariantError(`Could not resolve param value for segment: ${paramName}`), "__NEXT_ERROR_CODE", {
86
+ value: "E932",
87
+ enumerable: false,
88
+ configurable: true
89
+ });
118
90
  }
119
91
  }
120
92
  // Calculate next depth - increment if this is not a route group and not empty
121
93
  let nextDepth = depth;
122
- const isRouteGroup = segment.startsWith('(') && segment.endsWith(')');
123
- if (!isRouteGroup && segment !== '') {
94
+ if (appSegment && appSegment.type !== 'route-group' && appSegment.type !== 'parallel-route') {
124
95
  nextDepth++;
125
96
  }
126
97
  // Add all parallel routes to the stack for processing
127
- for (const route of Object.values(parallelRoutes)){
98
+ for (const parallelRoute of Object.values(parallelRoutes)){
128
99
  stack.push({
129
- tree: route,
100
+ tree: parallelRoute,
130
101
  depth: nextDepth
131
102
  });
132
103
  }