agmon 0.1.1 → 0.1.3

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 (233) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +7 -0
  3. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
  4. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
  5. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +190 -0
  6. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
  7. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
  8. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
  9. package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
  10. package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
  11. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7314 -0
  12. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
  13. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
  14. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
  15. package/.next/build/package.json +1 -0
  16. package/.next/build-manifest.json +54 -0
  17. package/.next/export-marker.json +6 -0
  18. package/.next/fallback-build-manifest.json +15 -0
  19. package/.next/images-manifest.json +68 -0
  20. package/.next/next-minimal-server.js.nft.json +1 -0
  21. package/.next/next-server.js.nft.json +1 -0
  22. package/.next/package.json +1 -0
  23. package/.next/prerender-manifest.json +97 -0
  24. package/.next/required-server-files.js +366 -0
  25. package/.next/required-server-files.json +366 -0
  26. package/.next/routes-manifest.json +75 -0
  27. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  28. package/.next/server/app/_global-error/page/build-manifest.json +21 -0
  29. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  30. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  31. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  32. package/.next/server/app/_global-error/page.js +10 -0
  33. package/.next/server/app/_global-error/page.js.map +5 -0
  34. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  35. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  36. package/.next/server/app/_global-error.html +1 -0
  37. package/.next/server/app/_global-error.meta +30 -0
  38. package/.next/server/app/_global-error.rsc +18 -0
  39. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  40. package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  41. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  42. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  43. package/.next/server/app/_not-found/page/build-manifest.json +21 -0
  44. package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  45. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  46. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  47. package/.next/server/app/_not-found/page.js +12 -0
  48. package/.next/server/app/_not-found/page.js.map +5 -0
  49. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  50. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  51. package/.next/server/app/_not-found.html +1 -0
  52. package/.next/server/app/_not-found.meta +35 -0
  53. package/.next/server/app/_not-found.rsc +22 -0
  54. package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
  55. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
  56. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  57. package/.next/server/app/api/traces/stream/route/app-paths-manifest.json +3 -0
  58. package/.next/server/app/api/traces/stream/route/build-manifest.json +12 -0
  59. package/.next/server/app/api/traces/stream/route/server-reference-manifest.json +4 -0
  60. package/.next/server/app/api/traces/stream/route.js +7 -0
  61. package/.next/server/app/api/traces/stream/route.js.map +5 -0
  62. package/.next/server/app/api/traces/stream/route.js.nft.json +1 -0
  63. package/.next/server/app/api/traces/stream/route_client-reference-manifest.js +3 -0
  64. package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
  65. package/.next/server/app/api/version/route/build-manifest.json +12 -0
  66. package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
  67. package/.next/server/app/api/version/route.js +7 -0
  68. package/.next/server/app/api/version/route.js.map +5 -0
  69. package/.next/server/app/api/version/route.js.nft.json +1 -0
  70. package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
  71. package/.next/server/app/index.html +1 -0
  72. package/.next/server/app/index.meta +29 -0
  73. package/.next/server/app/index.rsc +29 -0
  74. package/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -0
  75. package/.next/server/app/index.segments/_full.segment.rsc +29 -0
  76. package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
  77. package/.next/server/app/page/app-paths-manifest.json +3 -0
  78. package/.next/server/app/page/build-manifest.json +21 -0
  79. package/.next/server/app/page/next-font-manifest.json +6 -0
  80. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  81. package/.next/server/app/page/server-reference-manifest.json +4 -0
  82. package/.next/server/app/page.js +13 -0
  83. package/.next/server/app/page.js.map +5 -0
  84. package/.next/server/app/page.js.nft.json +1 -0
  85. package/.next/server/app/page_client-reference-manifest.js +3 -0
  86. package/.next/server/app-paths-manifest.json +7 -0
  87. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
  88. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js.map +1 -0
  89. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
  90. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
  91. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js +5 -0
  92. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js.map +1 -0
  93. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js +5 -0
  94. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js.map +1 -0
  95. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js +320 -0
  96. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js.map +1 -0
  97. package/.next/server/chunks/[turbopack]_runtime.js +937 -0
  98. package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
  99. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js +3 -0
  100. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js.map +1 -0
  101. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js +3 -0
  102. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js.map +1 -0
  103. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js +3 -0
  104. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js.map +1 -0
  105. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js +76 -0
  106. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js.map +1 -0
  107. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js +3 -0
  108. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js.map +1 -0
  109. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js +3 -0
  110. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js.map +1 -0
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js +3 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js.map +1 -0
  113. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js +3 -0
  114. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js.map +1 -0
  115. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
  116. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
  117. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
  118. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
  119. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js +3 -0
  120. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js.map +1 -0
  121. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js +3 -0
  122. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js.map +1 -0
  123. package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
  124. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
  125. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
  126. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
  127. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
  128. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
  129. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
  130. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
  131. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
  132. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js.map +1 -0
  133. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js +23 -0
  134. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js.map +1 -0
  135. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  136. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
  137. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  138. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
  139. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
  140. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js.map +1 -0
  141. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  142. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
  143. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
  144. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
  145. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
  146. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
  147. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
  148. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
  149. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js +3 -0
  150. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js.map +1 -0
  151. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  152. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js.map +1 -0
  153. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js +3 -0
  154. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js.map +1 -0
  155. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js +3 -0
  156. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js.map +1 -0
  157. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js +3 -0
  158. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js.map +1 -0
  159. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js +3 -0
  160. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js.map +1 -0
  161. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js +5 -0
  162. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js.map +1 -0
  163. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js +5 -0
  164. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js.map +1 -0
  165. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js +208 -0
  166. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js.map +1 -0
  167. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js +3 -0
  168. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map +1 -0
  169. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js +16 -0
  170. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map +1 -0
  171. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js +3 -0
  172. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js.map +1 -0
  173. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js +3 -0
  174. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js.map +1 -0
  175. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js +196 -0
  176. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js.map +1 -0
  177. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js +196 -0
  178. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js.map +1 -0
  179. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js +3 -0
  180. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js.map +1 -0
  181. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js +153 -0
  182. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js.map +1 -0
  183. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js +3 -0
  184. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js.map +1 -0
  185. package/.next/server/functions-config-manifest.json +4 -0
  186. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  187. package/.next/server/middleware-build-manifest.js +54 -0
  188. package/.next/server/middleware-manifest.json +6 -0
  189. package/.next/server/next-font-manifest.js +1 -0
  190. package/.next/server/next-font-manifest.json +6 -0
  191. package/.next/server/pages/404.html +1 -0
  192. package/.next/server/pages/500.html +1 -0
  193. package/.next/server/pages-manifest.json +4 -0
  194. package/.next/server/prefetch-hints.json +34 -0
  195. package/.next/server/preview-props.json +5 -0
  196. package/.next/server/server-reference-manifest.js +1 -0
  197. package/.next/server/server-reference-manifest.json +5 -0
  198. package/.next/static/chunks/0_9x2udu0iodw.js +1 -0
  199. package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  200. package/.next/static/chunks/0umf92h1sb77c.js +1 -0
  201. package/.next/static/chunks/10om7oix6wjze.js +1 -0
  202. package/.next/static/chunks/1780fh11o7pze.js +1 -0
  203. package/.next/static/chunks/1cldmiyw3ya18.js +21 -0
  204. package/.next/static/chunks/1unuqfq-vfqtp.js +1 -0
  205. package/.next/static/chunks/2-vsu_pt58kse.js +3 -0
  206. package/.next/static/chunks/2drjv1ti9t4pg.js +1 -0
  207. package/.next/static/chunks/2hgsvrrwu57--.css +1 -0
  208. package/.next/static/chunks/2ogvir8krwwhf.js +1 -0
  209. package/.next/static/chunks/2tc54fmsk8v8q.js +1 -0
  210. package/.next/static/chunks/304ue7hvto0o0.js +206 -0
  211. package/.next/static/chunks/31gve42sn75--.js +1 -0
  212. package/.next/static/chunks/32kizm_7q94vd.js +194 -0
  213. package/.next/static/chunks/33bap0u4zwgab.js +74 -0
  214. package/.next/static/chunks/3c4xol65z2da2.js +22 -0
  215. package/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
  216. package/.next/static/chunks/3d6xc1eemxy82.js +1 -0
  217. package/.next/static/chunks/3ycr8gfnsg-xv.js +151 -0
  218. package/.next/static/chunks/3ytt3vrdhke9u.js +14 -0
  219. package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  220. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_buildManifest.js +11 -0
  221. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_clientMiddlewareManifest.js +1 -0
  222. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_ssgManifest.js +1 -0
  223. package/.next/trace +1 -0
  224. package/.next/trace-build +1 -0
  225. package/.next/types/cache-life.d.ts +114 -0
  226. package/.next/types/root-params.d.ts +3 -0
  227. package/.next/types/routes.d.ts +74 -0
  228. package/.next/types/validator.ts +17 -0
  229. package/bin/cli.js +24 -6
  230. package/package.json +6 -6
  231. package/src/app/api/traces/stream/route.js +2 -2
  232. package/src/app/layout.js +1 -1
  233. package/src/app/page.js +6 -19
@@ -0,0 +1,937 @@
1
+ var RUNTIME_PUBLIC_PATH = "server/chunks/[turbopack]_runtime.js";
2
+ var RELATIVE_ROOT_PATH = "..";
3
+ var ASSET_PREFIX = "/";
4
+ // Apply forwarded globals from workerData if running in a worker thread
5
+ if (typeof require !== 'undefined') {
6
+ try {
7
+ var { workerData } = require('worker_threads');
8
+ if (workerData?.__turbopack_globals__) {
9
+ Object.assign(globalThis, workerData.__turbopack_globals__);
10
+ // Remove internal data so it's not visible to user code
11
+ delete workerData.__turbopack_globals__;
12
+ }
13
+ } catch (_) {
14
+ // Not in a worker thread context, ignore
15
+ }
16
+ }
17
+ /**
18
+ * This file contains runtime types and functions that are shared between all
19
+ * TurboPack ECMAScript runtimes.
20
+ *
21
+ * It will be prepended to the runtime code of each runtime.
22
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-types.d.ts" />
23
+ /// <reference path="./async-module.ts" />
24
+ /**
25
+ * Describes why a module was instantiated.
26
+ * Shared between browser and Node.js runtimes.
27
+ */ var SourceType = /*#__PURE__*/ function(SourceType) {
28
+ /**
29
+ * The module was instantiated because it was included in an evaluated chunk's
30
+ * runtime.
31
+ * SourceData is a ChunkPath.
32
+ */ SourceType[SourceType["Runtime"] = 0] = "Runtime";
33
+ /**
34
+ * The module was instantiated because a parent module imported it.
35
+ * SourceData is a ModuleId.
36
+ */ SourceType[SourceType["Parent"] = 1] = "Parent";
37
+ /**
38
+ * The module was instantiated because it was included in a chunk's hot module
39
+ * update.
40
+ * SourceData is an array of ModuleIds or undefined.
41
+ */ SourceType[SourceType["Update"] = 2] = "Update";
42
+ return SourceType;
43
+ }(SourceType || {});
44
+ /**
45
+ * Flag indicating which module object type to create when a module is merged. Set to `true`
46
+ * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
47
+ * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
48
+ * uses plain Module objects.
49
+ */ let createModuleWithDirectionFlag = false;
50
+ const REEXPORTED_OBJECTS = new WeakMap();
51
+ /**
52
+ * Constructs the `__turbopack_context__` object for a module.
53
+ */ function Context(module, exports) {
54
+ this.m = module;
55
+ // We need to store this here instead of accessing it from the module object to:
56
+ // 1. Make it available to factories directly, since we rewrite `this` to
57
+ // `__turbopack_context__.e` in CJS modules.
58
+ // 2. Support async modules which rewrite `module.exports` to a promise, so we
59
+ // can still access the original exports object from functions like
60
+ // `esmExport`
61
+ // Ideally we could find a new approach for async modules and drop this property altogether.
62
+ this.e = exports;
63
+ }
64
+ const contextPrototype = Context.prototype;
65
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
66
+ const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
67
+ function defineProp(obj, name, options) {
68
+ if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
69
+ }
70
+ function getOverwrittenModule(moduleCache, id) {
71
+ let module = moduleCache.get(id);
72
+ if (module === undefined) {
73
+ if (createModuleWithDirectionFlag) {
74
+ // set in development modes for hmr support
75
+ module = createModuleWithDirection(id);
76
+ } else {
77
+ module = createModuleObject(id);
78
+ }
79
+ moduleCache.set(id, module);
80
+ }
81
+ return module;
82
+ }
83
+ /**
84
+ * Creates the module object. Only done here to ensure all module objects have the same shape.
85
+ */ function createModuleObject(id) {
86
+ return {
87
+ exports: {},
88
+ error: undefined,
89
+ id,
90
+ namespaceObject: undefined
91
+ };
92
+ }
93
+ function createModuleWithDirection(id) {
94
+ return {
95
+ exports: {},
96
+ error: undefined,
97
+ id,
98
+ namespaceObject: undefined,
99
+ parents: [],
100
+ children: []
101
+ };
102
+ }
103
+ const BindingTag_Value = 0;
104
+ /**
105
+ * Terminates a module's group of entries in an {@link EsmReexports} list.
106
+ */ const REEXPORT_GROUP_END = 0;
107
+ /**
108
+ * Adds the getters to the exports object.
109
+ */ function esm(exports, bindings, dynamic) {
110
+ defineProp(exports, '__esModule', {
111
+ value: true
112
+ });
113
+ if (toStringTag) defineProp(exports, toStringTag, {
114
+ value: 'Module'
115
+ });
116
+ let i = 0;
117
+ while(i < bindings.length){
118
+ const propName = bindings[i++];
119
+ const tagOrFunction = bindings[i++];
120
+ if (typeof tagOrFunction === 'number') {
121
+ if (tagOrFunction === BindingTag_Value) {
122
+ defineProp(exports, propName, {
123
+ value: bindings[i++],
124
+ enumerable: true,
125
+ writable: false
126
+ });
127
+ } else {
128
+ throw new Error(`unexpected tag: ${tagOrFunction}`);
129
+ }
130
+ } else {
131
+ const getterFn = tagOrFunction;
132
+ if (typeof bindings[i] === 'function') {
133
+ const setterFn = bindings[i++];
134
+ defineProp(exports, propName, {
135
+ get: getterFn,
136
+ set: setterFn,
137
+ enumerable: true
138
+ });
139
+ } else {
140
+ defineProp(exports, propName, {
141
+ get: getterFn,
142
+ enumerable: true
143
+ });
144
+ }
145
+ }
146
+ }
147
+ // The properties defined above are already non-configurable and
148
+ // non-writable, so the namespace's existing exports are effectively
149
+ // immutable. Sealing additionally makes the object non-extensible, matching
150
+ // real ESM-namespace semantics. Modules with dynamic re-exports
151
+ // (`export *` from a CommonJS module) must stay extensible so the dynamic
152
+ // export proxy can surface keys discovered at runtime, so skip the seal for
153
+ // them.
154
+ if (!dynamic) Object.seal(exports);
155
+ }
156
+ /**
157
+ * Makes the module an ESM with exports
158
+ */ function esmExport(bindings, id, dynamic) {
159
+ let module;
160
+ let exports;
161
+ if (id != null) {
162
+ module = getOverwrittenModule(this.c, id);
163
+ exports = module.exports;
164
+ } else {
165
+ module = this.m;
166
+ exports = this.e;
167
+ }
168
+ module.namespaceObject = exports;
169
+ esm(exports, bindings, dynamic);
170
+ }
171
+ contextPrototype.s = esmExport;
172
+ /**
173
+ * Registers re-exports that all forward to properties of other modules.
174
+ *
175
+ * This is a compact spelling of the pattern
176
+ *
177
+ * ```js
178
+ * var ns = context.i(moduleId)
179
+ * context.s([exportName, () => ns[importedName], ...])
180
+ * ```
181
+ *
182
+ * The list is a flat sequence of groups. Each group starts with the source the exports come from,
183
+ * followed by that group's entries, and is terminated by the `0` sentinel (or the end of the list).
184
+ *
185
+ * The group head is either a **module id**, which is instantiated here:
186
+ *
187
+ * ```js
188
+ * context.S([
189
+ * 76061, 'default', 'f', 'named', 'A', 0,
190
+ * 29842, 'otherModule', 'f',
191
+ * ])
192
+ * ```
193
+ *
194
+ * or the **namespace value** of a module that has already been imported, which is used directly:
195
+ *
196
+ * ```js
197
+ * var ns1 = context.i(76061)
198
+ * context.S([ns1, 'default', 'f', 'named', 'A'])
199
+ * ```
200
+ *
201
+ * The producer picks the namespace form when it has generated the import anyway -- because some
202
+ * later import must not be reordered past it -- so nothing is instantiated twice. The two are told
203
+ * apart by type: a module id is always a string or number. A CommonJS function export produces a
204
+ * callable namespace value, so namespace heads can be functions as well as objects.
205
+ *
206
+ * Entries are `exportName, importedName` pairs, except when a group holds exactly one string. That
207
+ * string is then a comma-joined list of the same pairs, which saves the repeated quoting:
208
+ *
209
+ * ```js
210
+ * context.S([
211
+ * 76061, 'default,f,named,A', 0,
212
+ * 29842, 'otherModule,f',
213
+ * ])
214
+ * ```
215
+ *
216
+ * The producer picks that spelling independently for each group whose names contain no commas,
217
+ * since that group's names are recovered by splitting on them.
218
+ *
219
+ * Groups whose head is a module id are instantiated in list order, at the point where the call
220
+ * appears, so the producer must not merge such a group across an import of another module. The
221
+ * destination reuses a source data value or getter descriptor when one exists, falling back to a
222
+ * wrapper getter for dynamic/proxy/inherited properties.
223
+ *
224
+ * `id` names the module the exports belong to when this module was merged into a scope-hoisting
225
+ * group, exactly as it does for {@link EsmExport}.
226
+ *
227
+ * Only the source descriptor's payload (value or getter) is reused. {@link esm} still defines a
228
+ * fresh enumerable, non-configurable destination property, and no source setter is ever forwarded.
229
+ */ function esmReexport(list, id) {
230
+ const bindings = [];
231
+ let i = 0;
232
+ while(i < list.length){
233
+ const head = list[i++];
234
+ const start = i;
235
+ while(i < list.length && list[i] !== REEXPORT_GROUP_END)i++;
236
+ const end = i;
237
+ // Skip the sentinel, if this group was terminated by one rather than by the end of the list.
238
+ i++;
239
+ // Module ids are always strings or numbers. Other values are already-imported namespaces;
240
+ // notably, interop with a CommonJS function export produces a callable namespace function.
241
+ // `esmImport` may return a promise for an async module, but re-exports of async modules keep
242
+ // going through `context.s`, so the producer never routes them here and this stays synchronous.
243
+ const namespace = typeof head === 'string' || typeof head === 'number' ? esmImport.call(this, head) : head;
244
+ if (end - start === 1) {
245
+ const pairs = list[start].split(',');
246
+ for(let j = 0; j < pairs.length; j += 2){
247
+ appendReexportBinding(bindings, pairs[j], namespace, pairs[j + 1]);
248
+ }
249
+ } else {
250
+ for(let j = start; j < end; j += 2){
251
+ appendReexportBinding(bindings, list[j], namespace, list[j + 1]);
252
+ }
253
+ }
254
+ }
255
+ esmExport.call(this, bindings, id);
256
+ }
257
+ contextPrototype.S = esmReexport;
258
+ function appendReexportBinding(bindings, exportedName, namespace, importedName) {
259
+ const descriptor = Reflect.getOwnPropertyDescriptor(namespace, importedName);
260
+ if (descriptor) {
261
+ if ('value' in descriptor) {
262
+ // Code generation only routes immutable imported bindings through this helper, so a data
263
+ // descriptor is a constant export and can be captured once.
264
+ bindings.push(exportedName, BindingTag_Value, descriptor.value);
265
+ return;
266
+ }
267
+ if (descriptor.get) {
268
+ // Accessors remain live by reusing the source getter. `esmReexport` is only called by
269
+ // generated code: every group head is either produced by
270
+ // `this.i` or is the namespace variable from a generated `this.i` call. Every getter on such
271
+ // a namespace is receiver-independent: ESM bindings are compiler-generated arrow functions,
272
+ // and the CommonJS/dynamic-namespace paths create arrows in `createGetter` and
273
+ // `getOwnPropertyDescriptor`. The destination can therefore reuse the exact function instead
274
+ // of allocating another wrapper getter.
275
+ bindings.push(exportedName, descriptor.get);
276
+ return;
277
+ }
278
+ }
279
+ // Dynamic/proxy/inherited CommonJS edge cases may not expose a usable own descriptor.
280
+ bindings.push(exportedName, ()=>namespace[importedName]);
281
+ }
282
+ function ensureDynamicExports(module, exports) {
283
+ let reexportedObjects = REEXPORTED_OBJECTS.get(module);
284
+ if (!reexportedObjects) {
285
+ REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
286
+ // Returns the re-exported object that provides `prop` as an own property,
287
+ // or `undefined` if none does. The traps share this logic so they always
288
+ // agree on which keys are synthesized from `reexportedObjects`. `default`
289
+ // is never re-exported by `export *`, so it is never synthesized.
290
+ const reexportOwning = (prop)=>{
291
+ if (prop !== 'default') {
292
+ for (const obj of reexportedObjects){
293
+ if (hasOwnProperty.call(obj, prop)) return obj;
294
+ }
295
+ }
296
+ return undefined;
297
+ };
298
+ // Modules with dynamic re-exports are not sealed by `esm()`, so the
299
+ // target beneath the namespace stays extensible. That is what lets the
300
+ // `ownKeys` and `getOwnPropertyDescriptor` traps legally report keys that
301
+ // exist on `reexportedObjects` but not on the target itself.
302
+ module.exports = module.namespaceObject = new Proxy(exports, {
303
+ get (target, prop) {
304
+ if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
305
+ return Reflect.get(target, prop);
306
+ }
307
+ const obj = reexportOwning(prop);
308
+ return obj && Reflect.get(obj, prop);
309
+ },
310
+ // The namespace is read-only, like a real esm namespace object. The
311
+ // re-exported modules can still mutate their own exports (exposed live
312
+ // via `get`), but mutating the namespace itself is rejected. Refusing
313
+ // here, rather than forwarding to the extensible target, also prevents an
314
+ // assignment/definition from shadowing a dynamic re-export. It also
315
+ // prevents delete from removing a static export.
316
+ set () {
317
+ return false;
318
+ },
319
+ defineProperty () {
320
+ return false;
321
+ },
322
+ deleteProperty () {
323
+ return false;
324
+ },
325
+ // The `has` trap ensures that `'exportName' in starImports` will reflect
326
+ // the truth of whether a key is exported.
327
+ has (target, prop) {
328
+ if (Reflect.has(target, prop)) return true;
329
+ if (prop === 'default' || prop === '__esModule') return false;
330
+ return reexportOwning(prop) !== undefined;
331
+ },
332
+ // ownKeys and getOwnPropertyDescriptor together make the keys enumerable.
333
+ // If a value is returned from `ownKeys` but its property descriptor is
334
+ // not enumerable, it will not be visible to iterator methods.
335
+ // Collectively, they allow code like the following:
336
+ //
337
+ // ```
338
+ // // module.js re-exports dynamic CJS exports
339
+ // export * from './legacyModule.cjs'
340
+ //
341
+ // // from another JS file, reference the re-exported dynamic values
342
+ // import * as Namespace from './module.js'
343
+ // Object.keys(Namespace)
344
+ // ```
345
+ ownKeys (target) {
346
+ const keys = Reflect.ownKeys(target);
347
+ for (const obj of reexportedObjects){
348
+ for (const key of Reflect.ownKeys(obj)){
349
+ if (key !== 'default' && !keys.includes(key)) keys.push(key);
350
+ }
351
+ }
352
+ return keys;
353
+ },
354
+ getOwnPropertyDescriptor (target, prop) {
355
+ const own = Reflect.getOwnPropertyDescriptor(target, prop);
356
+ if (own || prop === 'default' || prop === '__esModule') return own;
357
+ const obj = reexportOwning(prop);
358
+ if (obj) {
359
+ // Synthetic keys don't exist on the target, so they MUST be
360
+ // reported as configurable. However the set/delete traps above will
361
+ // prevent them from actually being changed
362
+ return {
363
+ enumerable: true,
364
+ configurable: true,
365
+ get: ()=>Reflect.get(obj, prop)
366
+ };
367
+ }
368
+ return undefined;
369
+ }
370
+ });
371
+ }
372
+ return reexportedObjects;
373
+ }
374
+ /**
375
+ * Dynamically exports properties from an object
376
+ */ function dynamicExport(object, id) {
377
+ let module;
378
+ let exports;
379
+ if (id != null) {
380
+ module = getOverwrittenModule(this.c, id);
381
+ exports = module.exports;
382
+ } else {
383
+ module = this.m;
384
+ exports = this.e;
385
+ }
386
+ const reexportedObjects = ensureDynamicExports(module, exports);
387
+ if (typeof object === 'object' && object !== null) {
388
+ reexportedObjects.push(object);
389
+ }
390
+ }
391
+ contextPrototype.j = dynamicExport;
392
+ function exportValue(value, id) {
393
+ let module;
394
+ if (id != null) {
395
+ module = getOverwrittenModule(this.c, id);
396
+ } else {
397
+ module = this.m;
398
+ }
399
+ module.exports = value;
400
+ }
401
+ contextPrototype.v = exportValue;
402
+ function exportNamespace(namespace, id) {
403
+ let module;
404
+ if (id != null) {
405
+ module = getOverwrittenModule(this.c, id);
406
+ } else {
407
+ module = this.m;
408
+ }
409
+ module.exports = module.namespaceObject = namespace;
410
+ }
411
+ contextPrototype.n = exportNamespace;
412
+ function createGetter(obj, key) {
413
+ return ()=>obj[key];
414
+ }
415
+ /**
416
+ * @returns prototype of the object
417
+ */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
418
+ /** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
419
+ null,
420
+ getProto({}),
421
+ getProto([]),
422
+ getProto(getProto)
423
+ ];
424
+ /**
425
+ * @param raw
426
+ * @param ns
427
+ * @param allowExportDefault
428
+ * * `false`: will have the raw module as default export
429
+ * * `true`: will have the default property as default export
430
+ */ function interopEsm(raw, ns, allowExportDefault) {
431
+ const bindings = [];
432
+ let defaultLocation = -1;
433
+ for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
434
+ for (const key of Object.getOwnPropertyNames(current)){
435
+ bindings.push(key, createGetter(raw, key));
436
+ if (defaultLocation === -1 && key === 'default') {
437
+ defaultLocation = bindings.length - 1;
438
+ }
439
+ }
440
+ }
441
+ // this is not really correct
442
+ // we should set the `default` getter if the imported module is a `.cjs file`
443
+ if (!(allowExportDefault && defaultLocation >= 0)) {
444
+ // Replace the binding with one for the namespace itself in order to preserve iteration order.
445
+ if (defaultLocation >= 0) {
446
+ // Replace the getter with the value
447
+ bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
448
+ } else {
449
+ bindings.push('default', BindingTag_Value, raw);
450
+ }
451
+ }
452
+ esm(ns, bindings);
453
+ return ns;
454
+ }
455
+ function createNS(raw) {
456
+ if (typeof raw === 'function') {
457
+ return function(...args) {
458
+ return raw.apply(this, args);
459
+ };
460
+ } else {
461
+ return Object.create(null);
462
+ }
463
+ }
464
+ function esmImport(id) {
465
+ const module = getOrInstantiateModuleFromParent(id, this.m);
466
+ // any ES module has to have `module.namespaceObject` defined.
467
+ if (module.namespaceObject) return module.namespaceObject;
468
+ // only ESM can be an async module, so we don't need to worry about exports being a promise here.
469
+ const raw = module.exports;
470
+ return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
471
+ }
472
+ contextPrototype.i = esmImport;
473
+ function asyncLoader(moduleId) {
474
+ const loader = this.r(moduleId);
475
+ return loader(esmImport.bind(this));
476
+ }
477
+ contextPrototype.A = asyncLoader;
478
+ // Add a simple runtime require so that environments without one can still pass
479
+ // `typeof require` CommonJS checks so that exports are correctly registered.
480
+ const runtimeRequire = // @ts-ignore
481
+ typeof require === 'function' ? require : function require1() {
482
+ throw new Error('Unexpected use of runtime require');
483
+ };
484
+ contextPrototype.t = runtimeRequire;
485
+ function commonJsRequire(id) {
486
+ return getOrInstantiateModuleFromParent(id, this.m).exports;
487
+ }
488
+ contextPrototype.r = commonJsRequire;
489
+ /**
490
+ * Remove fragments and query parameters since they are never part of the context map keys
491
+ *
492
+ * This matches how we parse patterns at resolving time. Arguably we should only do this for
493
+ * strings passed to `import` but the resolve does it for `import` and `require` and so we do
494
+ * here as well.
495
+ */ function parseRequest(request) {
496
+ // Per the URI spec fragments can contain `?` characters, so we should trim it off first
497
+ // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
498
+ const hashIndex = request.indexOf('#');
499
+ if (hashIndex !== -1) {
500
+ request = request.substring(0, hashIndex);
501
+ }
502
+ const queryIndex = request.indexOf('?');
503
+ if (queryIndex !== -1) {
504
+ request = request.substring(0, queryIndex);
505
+ }
506
+ return request;
507
+ }
508
+ /**
509
+ * `require.context` and require/import expression runtime.
510
+ */ function moduleContext(map) {
511
+ function moduleContext(id) {
512
+ id = parseRequest(id);
513
+ if (hasOwnProperty.call(map, id)) {
514
+ return map[id].module();
515
+ }
516
+ const e = new Error(`Cannot find module '${id}'`);
517
+ e.code = 'MODULE_NOT_FOUND';
518
+ throw e;
519
+ }
520
+ moduleContext.keys = ()=>{
521
+ return Object.keys(map);
522
+ };
523
+ moduleContext.resolve = (id)=>{
524
+ id = parseRequest(id);
525
+ if (hasOwnProperty.call(map, id)) {
526
+ return map[id].id();
527
+ }
528
+ const e = new Error(`Cannot find module '${id}'`);
529
+ e.code = 'MODULE_NOT_FOUND';
530
+ throw e;
531
+ };
532
+ moduleContext.import = async (id)=>{
533
+ return await moduleContext(id);
534
+ };
535
+ return moduleContext;
536
+ }
537
+ contextPrototype.f = moduleContext;
538
+ /**
539
+ * Returns the path of a chunk defined by its data.
540
+ */ function getChunkPath(chunkData) {
541
+ return typeof chunkData === 'string' ? chunkData : chunkData.path;
542
+ }
543
+ // Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
544
+ // The flat format alternates one or more module IDs with their factory function.
545
+ // Strict factories can be prepended as a nested array.
546
+ function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
547
+ let i = offset;
548
+ const strictFactories = chunkModules[i];
549
+ if (Array.isArray(strictFactories)) {
550
+ installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
551
+ i++;
552
+ }
553
+ while(i < chunkModules.length){
554
+ let end = i + 1;
555
+ // Find our factory function
556
+ while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
557
+ end++;
558
+ }
559
+ if (end === chunkModules.length) {
560
+ throw new Error('malformed chunk format, expected a factory function');
561
+ }
562
+ // Install the factory for each module ID that doesn't already have one.
563
+ // When some IDs in this group already have a factory, reuse that existing
564
+ // group factory for the missing IDs to keep all IDs in the group consistent.
565
+ // Otherwise, install the factory from this chunk.
566
+ const moduleFactoryFn = chunkModules[end];
567
+ let existingGroupFactory = undefined;
568
+ for(let j = i; j < end; j++){
569
+ const id = chunkModules[j];
570
+ const existingFactory = moduleFactories.get(id);
571
+ if (existingFactory) {
572
+ existingGroupFactory = existingFactory;
573
+ break;
574
+ }
575
+ }
576
+ const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
577
+ let didInstallFactory = false;
578
+ for(let j = i; j < end; j++){
579
+ const id = chunkModules[j];
580
+ if (!moduleFactories.has(id)) {
581
+ if (!didInstallFactory) {
582
+ if (factoryToInstall === moduleFactoryFn) {
583
+ applyModuleFactoryName(moduleFactoryFn);
584
+ }
585
+ didInstallFactory = true;
586
+ }
587
+ moduleFactories.set(id, factoryToInstall);
588
+ newModuleId?.(id);
589
+ }
590
+ }
591
+ i = end + 1;
592
+ }
593
+ }
594
+ /**
595
+ * A pseudo "fake" URL object to resolve to its relative path.
596
+ *
597
+ * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
598
+ * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
599
+ * hydration mismatch.
600
+ *
601
+ * This is based on webpack's existing implementation:
602
+ * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
603
+ */ const relativeURL = function relativeURL(inputUrl) {
604
+ const realUrl = new URL(inputUrl, 'x:/');
605
+ const values = {};
606
+ for(const key in realUrl)values[key] = realUrl[key];
607
+ values.href = inputUrl;
608
+ values.pathname = inputUrl.replace(/[?#].*/, '');
609
+ values.origin = values.protocol = '';
610
+ values.toString = values.toJSON = (..._args)=>inputUrl;
611
+ for(const key in values)Object.defineProperty(this, key, {
612
+ enumerable: true,
613
+ configurable: true,
614
+ value: values[key]
615
+ });
616
+ };
617
+ relativeURL.prototype = URL.prototype;
618
+ contextPrototype.U = relativeURL;
619
+ /**
620
+ * Utility function to ensure all variants of an enum are handled.
621
+ */ function invariant(never, computeMessage) {
622
+ throw new Error(`Invariant: ${computeMessage(never)}`);
623
+ }
624
+ /**
625
+ * Constructs an error message for when a module factory is not available.
626
+ */ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
627
+ let instantiationReason;
628
+ switch(sourceType){
629
+ case 0:
630
+ instantiationReason = `as a runtime entry of chunk ${sourceData}`;
631
+ break;
632
+ case 1:
633
+ instantiationReason = `because it was required from module ${sourceData}`;
634
+ break;
635
+ case 2:
636
+ instantiationReason = 'because of an HMR update';
637
+ break;
638
+ default:
639
+ invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
640
+ }
641
+ return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
642
+ }
643
+ /**
644
+ * Returns a `file://` URL under a synthetic directory named after `root`
645
+ * (`ROOT` for the project root), for when the real filesystem path is unknown.
646
+ * The root name and path segments are percent-encoded so the result is always
647
+ * a valid file URI.
648
+ */ function placeholderFileUrl(modulePath, root) {
649
+ return `file:///${encodeURIComponent(root ?? 'ROOT')}/${modulePath.split('/').map(encodeURIComponent).join('/')}`;
650
+ }
651
+ /**
652
+ * A stub function to make `require` available but non-functional in ESM.
653
+ */ function requireStub(_moduleId) {
654
+ throw new Error('dynamic usage of require is not supported');
655
+ }
656
+ contextPrototype.z = requireStub;
657
+ // Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
658
+ contextPrototype.g = globalThis;
659
+ function applyModuleFactoryName(factory) {
660
+ // Give the module factory a nice name to improve stack traces.
661
+ Object.defineProperty(factory, 'name', {
662
+ value: 'module evaluation'
663
+ });
664
+ }
665
+ /// <reference path="../shared/runtime/runtime-utils.ts" />
666
+ /// A 'base' utilities to support runtime can have externals.
667
+ /// Currently this is for node.js / edge runtime both.
668
+ /// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
669
+ async function externalImport(id) {
670
+ let raw;
671
+ try {
672
+ raw = await import(id);
673
+ } catch (err) {
674
+ // TODO(alexkirsz) This can happen when a client-side module tries to load
675
+ // an external module we don't provide a shim for (e.g. querystring, url).
676
+ // For now, we fail semi-silently, but in the future this should be a
677
+ // compilation error.
678
+ throw new Error(`Failed to load external module ${id}: ${err}`);
679
+ }
680
+ if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
681
+ return interopEsm(raw.default, createNS(raw), true);
682
+ }
683
+ return raw;
684
+ }
685
+ contextPrototype.y = externalImport;
686
+ function externalRequire(id, thunk, esm = false) {
687
+ let raw;
688
+ try {
689
+ raw = thunk();
690
+ } catch (err) {
691
+ // TODO(alexkirsz) This can happen when a client-side module tries to load
692
+ // an external module we don't provide a shim for (e.g. querystring, url).
693
+ // For now, we fail semi-silently, but in the future this should be a
694
+ // compilation error.
695
+ throw new Error(`Failed to load external module ${id}: ${err}`);
696
+ }
697
+ if (!esm || raw.__esModule) {
698
+ return raw;
699
+ }
700
+ return interopEsm(raw, createNS(raw), true);
701
+ }
702
+ externalRequire.resolve = (id, options)=>{
703
+ return require.resolve(id, options);
704
+ };
705
+ contextPrototype.x = externalRequire;
706
+ /* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
707
+ const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
708
+ // Compute the relative path to the `distDir`.
709
+ const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
710
+ const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
711
+ // Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
712
+ const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
713
+ /**
714
+ * Returns an absolute path to the given module path.
715
+ * Module path should be relative, either path to a file or a directory.
716
+ *
717
+ * This fn allows to calculate an absolute path for some global static values, such as
718
+ * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
719
+ * See ImportMetaBinding::code_generation for the usage.
720
+ */ function resolveAbsolutePath(modulePath) {
721
+ if (modulePath) {
722
+ return path.join(ABSOLUTE_ROOT, modulePath);
723
+ }
724
+ return ABSOLUTE_ROOT;
725
+ }
726
+ Context.prototype.P = resolveAbsolutePath;
727
+ /**
728
+ * Returns an absolute `file://` URL for the given module path, which is
729
+ * relative to the project root or the named `root`.
730
+ *
731
+ * Uses `url.pathToFileURL` so that the resulting URL is a valid file URI on
732
+ * all platforms (forward slashes on Windows, drive letters handled
733
+ * correctly, path segments URL-encoded).
734
+ *
735
+ * The location of a named `root` isn't known at runtime (the output may have
736
+ * been moved away from the sources), so this returns a placeholder URL for it.
737
+ */ function resolveFileUrl(modulePath, root) {
738
+ if (root !== undefined) {
739
+ return placeholderFileUrl(modulePath, root);
740
+ }
741
+ return require('url').pathToFileURL(resolveAbsolutePath(modulePath)).href;
742
+ }
743
+ Context.prototype.F = resolveFileUrl;
744
+ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../../shared/runtime/runtime-utils.ts" />
745
+ /// <reference path="../../shared-node/base-externals-utils.ts" />
746
+ /// <reference path="../../shared-node/node-externals-utils.ts" />
747
+ /// <reference path="./nodejs-globals.d.ts" />
748
+ /**
749
+ * Base Node.js runtime shared between production and development.
750
+ * Contains chunk loading, module caching, and other non-HMR functionality.
751
+ */ process.env.TURBOPACK = '1';
752
+ const url = require('url');
753
+ const moduleFactories = new Map();
754
+ const moduleCache = new Map();
755
+ /**
756
+ * Returns an absolute path to the given module's id.
757
+ */ function resolvePathFromModule(moduleId) {
758
+ const exported = this.r(moduleId);
759
+ const exportedPath = exported?.default ?? exported;
760
+ if (typeof exportedPath !== 'string') {
761
+ return exported;
762
+ }
763
+ const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
764
+ const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
765
+ return url.pathToFileURL(resolved).href;
766
+ }
767
+ /**
768
+ * Exports a URL value. No suffix is added in Node.js runtime.
769
+ */ function exportUrl(urlValue, id) {
770
+ exportValue.call(this, urlValue, id);
771
+ }
772
+ function loadRuntimeChunk(sourcePath, chunkData) {
773
+ if (typeof chunkData === 'string') {
774
+ loadRuntimeChunkPath(sourcePath, chunkData);
775
+ } else {
776
+ loadRuntimeChunkPath(sourcePath, chunkData.path);
777
+ }
778
+ }
779
+ const loadedChunks = new Set();
780
+ const unsupportedLoadChunk = Promise.resolve(undefined);
781
+ const loadedChunk = Promise.resolve(undefined);
782
+ const chunkCache = new Map();
783
+ function clearChunkCache() {
784
+ chunkCache.clear();
785
+ loadedChunks.clear();
786
+ }
787
+ function loadRuntimeChunkPath(sourcePath, chunkPath) {
788
+ if (!isJs(chunkPath)) {
789
+ // We only support loading JS chunks in Node.js.
790
+ // This branch can be hit when trying to load a CSS chunk.
791
+ return;
792
+ }
793
+ if (loadedChunks.has(chunkPath)) {
794
+ return;
795
+ }
796
+ try {
797
+ const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
798
+ const chunkModules = require(resolved);
799
+ installCompressedModuleFactories(chunkModules, 0, moduleFactories);
800
+ loadedChunks.add(chunkPath);
801
+ } catch (cause) {
802
+ let errorMessage = `Failed to load chunk ${chunkPath}`;
803
+ if (sourcePath) {
804
+ errorMessage += ` from runtime for chunk ${sourcePath}`;
805
+ }
806
+ const error = new Error(errorMessage, {
807
+ cause
808
+ });
809
+ error.name = 'ChunkLoadError';
810
+ throw error;
811
+ }
812
+ }
813
+ function loadChunkAsync(chunkData) {
814
+ const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
815
+ if (!isJs(chunkPath)) {
816
+ // We only support loading JS chunks in Node.js.
817
+ // This branch can be hit when trying to load a CSS chunk.
818
+ return unsupportedLoadChunk;
819
+ }
820
+ let entry = chunkCache.get(chunkPath);
821
+ if (entry === undefined) {
822
+ try {
823
+ // resolve to an absolute path to simplify `require` handling
824
+ const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
825
+ // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
826
+ // However this is incompatible with hot reloading (since `import` doesn't use the require cache)
827
+ const chunkModules = require(resolved);
828
+ installCompressedModuleFactories(chunkModules, 0, moduleFactories);
829
+ entry = loadedChunk;
830
+ } catch (cause) {
831
+ const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
832
+ const error = new Error(errorMessage, {
833
+ cause
834
+ });
835
+ error.name = 'ChunkLoadError';
836
+ // Cache the failure promise, future requests will also get this same rejection
837
+ entry = Promise.reject(error);
838
+ }
839
+ chunkCache.set(chunkPath, entry);
840
+ }
841
+ // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
842
+ return entry;
843
+ }
844
+ contextPrototype.l = loadChunkAsync;
845
+ function loadChunkAsyncByUrl(chunkUrl) {
846
+ const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
847
+ return loadChunkAsync.call(this, path1);
848
+ }
849
+ contextPrototype.L = loadChunkAsyncByUrl;
850
+ // Shared runtime primitive: the root that on-disk chunk paths are resolved
851
+ // against. Used by the bundled wasm helper (exposed as `__turbopack_runtime_root__`).
852
+ contextPrototype.w = RUNTIME_ROOT;
853
+ const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
854
+ /**
855
+ * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
856
+ */ function isJs(chunkUrlOrPath) {
857
+ return regexJsUrl.test(chunkUrlOrPath);
858
+ }
859
+ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-base.ts" />
860
+ /**
861
+ * Production Node.js runtime.
862
+ * Uses ModuleWithDirection and simple module instantiation without HMR support.
863
+ */ // moduleCache and moduleFactories are declared in runtime-base.ts
864
+ // this is read in runtime-utils.ts so it creates a module with direction for hmr
865
+ createModuleWithDirectionFlag = true;
866
+ const nodeContextPrototype = Context.prototype;
867
+ nodeContextPrototype.q = exportUrl;
868
+ nodeContextPrototype.M = moduleFactories;
869
+ // Cast moduleCache to ModuleWithDirection for production mode
870
+ nodeContextPrototype.c = moduleCache;
871
+ nodeContextPrototype.R = resolvePathFromModule;
872
+ nodeContextPrototype.C = clearChunkCache;
873
+ function instantiateModule(id, sourceType, sourceData) {
874
+ const moduleFactory = moduleFactories.get(id);
875
+ if (typeof moduleFactory !== 'function') {
876
+ // This can happen if modules incorrectly handle HMR disposes/updates,
877
+ // e.g. when they keep a `setTimeout` around which still executes old code
878
+ // and contains e.g. a `require("something")` call.
879
+ throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData));
880
+ }
881
+ const module1 = createModuleWithDirection(id);
882
+ const exports = module1.exports;
883
+ moduleCache.set(id, module1);
884
+ const context = new Context(module1, exports);
885
+ // NOTE(alexkirsz) This can fail when the module encounters a runtime error.
886
+ try {
887
+ moduleFactory(context, module1, exports);
888
+ } catch (error) {
889
+ module1.error = error;
890
+ throw error;
891
+ }
892
+ ;
893
+ module1.loaded = true;
894
+ if (module1.namespaceObject && module1.exports !== module1.namespaceObject) {
895
+ // in case of a circular dependency: cjs1 -> esm2 -> cjs1
896
+ interopEsm(module1.exports, module1.namespaceObject);
897
+ }
898
+ return module1;
899
+ }
900
+ /**
901
+ * Retrieves a module from the cache, or instantiate it if it is not cached.
902
+ */ // @ts-ignore
903
+ function getOrInstantiateModuleFromParent(id, sourceModule) {
904
+ const module1 = moduleCache.get(id);
905
+ if (module1) {
906
+ if (module1.error) {
907
+ throw module1.error;
908
+ }
909
+ return module1;
910
+ }
911
+ return instantiateModule(id, SourceType.Parent, sourceModule.id);
912
+ }
913
+ /**
914
+ * Instantiates a runtime module.
915
+ */ function instantiateRuntimeModule(chunkPath, moduleId) {
916
+ return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
917
+ }
918
+ /**
919
+ * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
920
+ */ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
921
+ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
922
+ const module1 = moduleCache.get(moduleId);
923
+ if (module1) {
924
+ if (module1.error) {
925
+ throw module1.error;
926
+ }
927
+ return module1;
928
+ }
929
+ return instantiateRuntimeModule(chunkPath, moduleId);
930
+ }
931
+ module.exports = (sourcePath)=>({
932
+ m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
933
+ c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
934
+ });
935
+
936
+
937
+ //# sourceMappingURL=%5Bturbopack%5D_runtime.js.map