@farm.js/core 0.1.82 → 0.1.84

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 (253) hide show
  1. package/dist/{agent-mcp.d-C2Su3x4D.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-Yak-LqRd.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/{analyzer-RPU2KG4J.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  6. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  7. package/dist/api/node.d.mts +4 -3
  8. package/dist/api/node.d.ts +4 -3
  9. package/dist/api/route-manager.d.mts +4 -3
  10. package/dist/api/route-manager.d.ts +4 -3
  11. package/dist/api/runtime.d.mts +3 -2
  12. package/dist/api/runtime.d.ts +3 -2
  13. package/dist/api.d.mts +5 -4
  14. package/dist/api.d.ts +5 -4
  15. package/dist/{app-manifest.d-DZyXaICz.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  16. package/dist/{app-manifest.d-BcyOFMrg.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  17. package/dist/app-markdown.d.mts +3 -2
  18. package/dist/app-markdown.d.ts +3 -2
  19. package/dist/{app.d-CIoXsAbN.d.ts → app.d-CVPu_hoD.d.ts} +34 -4
  20. package/dist/{app.d-C0ePpuaG.d.mts → app.d-eSm7jgoc.d.mts} +34 -4
  21. package/dist/{chunk-B2PGVHBG.cjs → chunk-22BTYPIX.cjs} +4 -4
  22. package/dist/{chunk-BCTHOQPP.cjs → chunk-3OKSEJ33.cjs} +98 -10
  23. package/dist/{chunk-QSMUMK7Y.mjs → chunk-3WM7VBGW.mjs} +2 -2
  24. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  25. package/dist/{chunk-RMPUEH5T.cjs → chunk-57EEWWUS.cjs} +2 -2
  26. package/dist/{chunk-Q2VOT3K2.cjs → chunk-5I4ZGKP2.cjs} +395 -333
  27. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  28. package/dist/{chunk-RMLR5RMH.mjs → chunk-BCCCPFHQ.mjs} +92 -4
  29. package/dist/{chunk-LM2ZDNDD.cjs → chunk-BOEDYXAX.cjs} +30 -25
  30. package/dist/{chunk-NRCKBDYP.mjs → chunk-BRDGINBB.mjs} +153 -47
  31. package/dist/chunk-BUQR7KKO.mjs +17 -0
  32. package/dist/{chunk-63ZE6B6M.mjs → chunk-BZY3SRRD.mjs} +1 -1
  33. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  34. package/dist/{chunk-JK26IMT7.cjs → chunk-CVZY4TLW.cjs} +1 -1
  35. package/dist/{chunk-ZIZRIZLP.mjs → chunk-CWUQBECF.mjs} +3 -1
  36. package/dist/{chunk-DAXU2NBE.mjs → chunk-DFDQGHPU.mjs} +104 -42
  37. package/dist/{chunk-AIPZDBP6.cjs → chunk-DSWSDDP2.cjs} +844 -553
  38. package/dist/{chunk-DRO3NXA3.cjs → chunk-EBSL5TW7.cjs} +203 -93
  39. package/dist/{chunk-CJDBTTLB.mjs → chunk-EDBIBO67.mjs} +18 -13
  40. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  41. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  42. package/dist/chunk-GLNVLCUH.cjs +426 -0
  43. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  44. package/dist/{chunk-N2EFMN2K.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  45. package/dist/{chunk-OP5VI4TP.mjs → chunk-I5CVJ24H.mjs} +1 -1
  46. package/dist/{chunk-I4DR3HCH.mjs → chunk-INU4K4U4.mjs} +5 -5
  47. package/dist/{chunk-4X7LSGM6.mjs → chunk-IRJSZAJB.mjs} +1 -1
  48. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  49. package/dist/chunk-J6RFB324.cjs +17 -0
  50. package/dist/{chunk-47I2MYIR.mjs → chunk-KXVMWLTC.mjs} +484 -193
  51. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  52. package/dist/{chunk-VMBIKDKW.cjs → chunk-L3BSHASB.cjs} +6 -4
  53. package/dist/chunk-L5HDCDFT.mjs +426 -0
  54. package/dist/{chunk-GXLNARPO.mjs → chunk-M5XU22PQ.mjs} +1 -1
  55. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  56. package/dist/chunk-MAPHNGTF.cjs +98 -0
  57. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  58. package/dist/{chunk-C3VCYOU4.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  59. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  60. package/dist/{chunk-OMB7UGVW.mjs → chunk-NLHSKKTT.mjs} +14 -9
  61. package/dist/{chunk-ARORZ3MH.cjs → chunk-OFVBMS6I.cjs} +439 -333
  62. package/dist/{chunk-5MUFW5UU.cjs → chunk-OP7BIEUW.cjs} +2 -2
  63. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  64. package/dist/chunk-RJBUI5AN.mjs +18 -0
  65. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  66. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  67. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  68. package/dist/{chunk-HHQEKLZL.cjs → chunk-USMRAC72.cjs} +36 -31
  69. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  70. package/dist/{chunk-EL2Z6YFZ.mjs → chunk-XLULEFRW.mjs} +180 -70
  71. package/dist/{chunk-6BPFIYGY.cjs → chunk-YU6VL7H5.cjs} +3 -3
  72. package/dist/{chunk-CD5Z7RR5.cjs → chunk-Z37PDUJR.cjs} +4 -4
  73. package/dist/{cli-runtime.d-Hnvvadz7.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  74. package/dist/{cli-runtime.d-I0MphTbc.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  75. package/dist/{client-component.d-DapRqtSC.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  76. package/dist/{client-component.d-5QEvtJsg.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  77. package/dist/{client-plugins.d-DcmDzcSC.d.ts → client-plugins.d-BVXjyIkY.d.ts} +14 -0
  78. package/dist/{client-plugins.d-C1WM3ieD.d.mts → client-plugins.d-BwKwuO_0.d.mts} +14 -0
  79. package/dist/client-plugins.d.mts +2 -1
  80. package/dist/client-plugins.d.ts +2 -1
  81. package/dist/client.cjs +4 -3
  82. package/dist/client.d.mts +10 -9
  83. package/dist/client.d.ts +10 -9
  84. package/dist/client.mjs +3 -2
  85. package/dist/config.d.mts +2 -1
  86. package/dist/config.d.ts +2 -1
  87. package/dist/desktop.d.mts +3 -2
  88. package/dist/desktop.d.ts +3 -2
  89. package/dist/{devtools-5B7NZE6F.cjs → devtools-4SVIRV4P.cjs} +7 -7
  90. package/dist/{devtools-C5GXZZ7E.mjs → devtools-MWQA5LVN.mjs} +5 -5
  91. package/dist/docs.cjs +10 -9
  92. package/dist/docs.d.mts +15 -6
  93. package/dist/docs.d.ts +15 -6
  94. package/dist/docs.mjs +9 -8
  95. package/dist/environment/vite.cjs +5 -5
  96. package/dist/environment/vite.d.mts +1 -0
  97. package/dist/environment/vite.d.ts +1 -0
  98. package/dist/environment/vite.mjs +4 -4
  99. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  100. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  101. package/dist/{handler.d-B8bPCBzl.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  102. package/dist/{handler.d-Cliwo6Nu.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  103. package/dist/{headers.d-CVwSpSGX.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  104. package/dist/{headers.d-C_btqjV6.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  105. package/dist/index.cjs +32 -29
  106. package/dist/{index.d-DFuMZk9-.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  107. package/dist/{index.d-hOEbMcLk.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  108. package/dist/index.d.mts +26 -25
  109. package/dist/index.d.ts +26 -25
  110. package/dist/index.mjs +32 -29
  111. package/dist/integrations/orm.d.mts +2 -1
  112. package/dist/integrations/orm.d.ts +2 -1
  113. package/dist/integrations.d.mts +2 -1
  114. package/dist/integrations.d.ts +2 -1
  115. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  116. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  117. package/dist/internal/build-runtime.cjs +28 -27
  118. package/dist/internal/build-runtime.d.mts +5 -4
  119. package/dist/internal/build-runtime.d.ts +5 -4
  120. package/dist/internal/build-runtime.mjs +27 -26
  121. package/dist/internal/cli-runtime.cjs +9 -9
  122. package/dist/internal/cli-runtime.d.mts +8 -7
  123. package/dist/internal/cli-runtime.d.ts +8 -7
  124. package/dist/internal/cli-runtime.mjs +8 -8
  125. package/dist/internal/client-error-overlay.cjs +4 -4
  126. package/dist/internal/client-error-overlay.mjs +1 -1
  127. package/dist/internal/client-runtime.d.mts +8 -42
  128. package/dist/internal/client-runtime.d.ts +8 -42
  129. package/dist/internal/compression-runtime.d.mts +2 -1
  130. package/dist/internal/compression-runtime.d.ts +2 -1
  131. package/dist/internal/config-runtime.cjs +7 -7
  132. package/dist/internal/config-runtime.d.mts +6 -5
  133. package/dist/internal/config-runtime.d.ts +6 -5
  134. package/dist/internal/config-runtime.mjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  136. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  137. package/dist/internal/islands-action-client.cjs +18 -0
  138. package/dist/internal/islands-action-client.d.mts +18 -0
  139. package/dist/internal/islands-action-client.d.ts +18 -0
  140. package/dist/internal/islands-action-client.mjs +18 -0
  141. package/dist/internal/islands-runtime.cjs +3 -8
  142. package/dist/internal/islands-runtime.mjs +4 -9
  143. package/dist/internal/islx-actions-client.cjs +4 -3
  144. package/dist/internal/islx-actions-client.mjs +3 -2
  145. package/dist/internal/islx-actions-server.d.mts +0 -2
  146. package/dist/internal/islx-actions-server.d.ts +0 -2
  147. package/dist/internal/islx-client.cjs +13 -1
  148. package/dist/internal/islx-client.d.mts +11 -0
  149. package/dist/internal/islx-client.d.ts +11 -0
  150. package/dist/internal/islx-client.mjs +14 -0
  151. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  152. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  153. package/dist/internal/native-server-fns.cjs +4 -4
  154. package/dist/internal/native-server-fns.mjs +3 -3
  155. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  156. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  157. package/dist/internal/production-runtime.cjs +13 -13
  158. package/dist/internal/production-runtime.d.mts +11 -11
  159. package/dist/internal/production-runtime.d.ts +11 -11
  160. package/dist/internal/production-runtime.mjs +19 -19
  161. package/dist/internal/renderer-islands.cjs +47 -0
  162. package/dist/internal/renderer-islands.d.mts +32 -0
  163. package/dist/internal/renderer-islands.d.ts +32 -0
  164. package/dist/internal/renderer-islands.mjs +47 -0
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +2 -1
  168. package/dist/internal/start-manifest.d.ts +2 -1
  169. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  170. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  171. package/dist/markdown.d.mts +2 -1
  172. package/dist/markdown.d.ts +2 -1
  173. package/dist/middleware.d.mts +2 -1
  174. package/dist/middleware.d.ts +2 -1
  175. package/dist/mobile.d.mts +6 -3
  176. package/dist/mobile.d.ts +6 -3
  177. package/dist/{mount.d-DLeYxeRR.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  178. package/dist/{mount.d-CAovYKfs.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  179. package/dist/{navigation-delegate.d-Chv93QS6.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  180. package/dist/{navigation-delegate.d-BLM-8Q3Z.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  181. package/dist/navigation.d.mts +5 -5
  182. package/dist/navigation.d.ts +5 -5
  183. package/dist/plugin.cjs +23 -22
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +22 -21
  187. package/dist/{render-plan.d-BSTjTH8h.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  188. package/dist/{render-plan.d-CK5Lggyb.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +6 -5
  190. package/dist/renderer-client.d.mts +8 -7
  191. package/dist/renderer-client.d.ts +8 -7
  192. package/dist/renderer-client.mjs +2 -1
  193. package/dist/renderer.cjs +12 -2
  194. package/dist/renderer.d.mts +167 -4
  195. package/dist/renderer.d.ts +167 -4
  196. package/dist/renderer.mjs +11 -1
  197. package/dist/{request.d-BhggxQf3.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  198. package/dist/{request.d-CyJS9bjm.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  199. package/dist/request.d.mts +3 -2
  200. package/dist/request.d.ts +3 -2
  201. package/dist/{route-rendering.d-BLPPmI5I.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  202. package/dist/{route-rendering.d-CUpG2mZJ.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  203. package/dist/{router.d-2NQM1Kgw.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  204. package/dist/{router.d-0X2Ki6rf.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  205. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  206. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  207. package/dist/routes.d.mts +2 -1
  208. package/dist/routes.d.ts +2 -1
  209. package/dist/{rsc-pipeline-5AOF64FL.cjs → rsc-pipeline-OWBEZ7HB.cjs} +10 -10
  210. package/dist/{rsc-pipeline-DNRLYOJ7.mjs → rsc-pipeline-UT3Z2GDO.mjs} +9 -9
  211. package/dist/{runtime-EHG2FRXZ.mjs → runtime-F5I3WY3B.mjs} +12 -12
  212. package/dist/{runtime-ZVHG5SRB.cjs → runtime-SRMQ46SK.cjs} +15 -15
  213. package/dist/{runtime.d-CXuwkUgr.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  214. package/dist/{runtime.d-CaFXcu_Q.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  215. package/dist/{server-components-status.d-Cp7zvBm5.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  216. package/dist/{server-components-status.d-BdeFD8ZH.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  217. package/dist/server-plugins.d.mts +4 -3
  218. package/dist/server-plugins.d.ts +4 -3
  219. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  220. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  221. package/dist/server-query-client.cjs +5 -3
  222. package/dist/server-query-client.d.mts +3 -2
  223. package/dist/server-query-client.d.ts +3 -2
  224. package/dist/server-query-client.mjs +5 -3
  225. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  226. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  227. package/dist/server.cjs +52 -52
  228. package/dist/server.d.mts +12 -12
  229. package/dist/server.d.ts +12 -12
  230. package/dist/server.mjs +30 -30
  231. package/dist/{spa-router.d-l3G38xHa.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  232. package/dist/{spa-router.d-Bjgl-Osi.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  233. package/dist/{ssg.d-DDca17Lc.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  234. package/dist/{ssg.d-RnlHOqUL.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  235. package/dist/{store-core.d-BaOUOPf7.d.ts → store-core.d-5tVn5vi1.d.ts} +3 -3
  236. package/dist/{store-core.d-BZjuC6Zc.d.mts → store-core.d-BN2MxSG9.d.mts} +3 -3
  237. package/dist/testing.d.mts +2 -1
  238. package/dist/testing.d.ts +2 -1
  239. package/dist/{utils.d-D8TWmpWo.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  240. package/dist/{utils.d-tdzw0_zQ.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  241. package/dist/version.cjs +2 -2
  242. package/dist/version.mjs +1 -1
  243. package/dist/vite.cjs +23 -22
  244. package/dist/vite.d.mts +12 -6
  245. package/dist/vite.d.ts +12 -6
  246. package/dist/vite.mjs +22 -21
  247. package/package.json +13 -3
  248. package/dist/analyzer-LV23T6QN.cjs +0 -17
  249. package/dist/chunk-4QENVMG7.mjs +0 -34
  250. package/dist/chunk-AUFEM3FB.mjs +0 -229
  251. package/dist/chunk-S7WZUK3B.cjs +0 -229
  252. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  253. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
@@ -4,20 +4,22 @@
4
4
  var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
5
5
 
6
6
 
7
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
7
8
 
8
9
 
9
- var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
10
10
 
11
11
 
12
- var _chunkBBVLOENDcjs = require('./chunk-BBVLOEND.cjs');
12
+ var _chunkL3BSHASBcjs = require('./chunk-L3BSHASB.cjs');
13
13
 
14
14
 
15
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
15
+ var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
16
16
 
17
17
 
18
+ var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
18
19
 
19
20
 
20
21
 
22
+ var _chunkVS7HLH4Scjs = require('./chunk-VS7HLH4S.cjs');
21
23
 
22
24
 
23
25
 
@@ -49,15 +51,15 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
49
51
 
50
52
 
51
53
 
52
- var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
53
54
 
54
55
 
55
56
 
56
57
 
57
- var _chunkOZUINP2Pcjs = require('./chunk-OZUINP2P.cjs');
58
58
 
59
+ var _chunk4B6YJ5DScjs = require('./chunk-4B6YJ5DS.cjs');
59
60
 
60
- var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
61
+
62
+ var _chunk22BTYPIXcjs = require('./chunk-22BTYPIX.cjs');
61
63
 
62
64
 
63
65
 
@@ -69,7 +71,8 @@ var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
69
71
 
70
72
 
71
73
 
72
- var _chunkVS7HLH4Scjs = require('./chunk-VS7HLH4S.cjs');
74
+
75
+ var _chunkOZUINP2Pcjs = require('./chunk-OZUINP2P.cjs');
73
76
 
74
77
 
75
78
 
@@ -100,18 +103,19 @@ var _chunkWOAXQ5MZcjs = require('./chunk-WOAXQ5MZ.cjs');
100
103
 
101
104
 
102
105
 
103
- var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
106
+
107
+ var _chunkEBSL5TW7cjs = require('./chunk-EBSL5TW7.cjs');
104
108
 
105
109
 
106
110
 
107
111
  var _chunk5AMH6AFAcjs = require('./chunk-5AMH6AFA.cjs');
108
112
 
109
113
 
110
- var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
114
+ var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
111
115
 
112
116
 
113
117
 
114
- var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
118
+ var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
115
119
 
116
120
 
117
121
  var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
@@ -132,20 +136,17 @@ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
132
136
 
133
137
 
134
138
 
135
- var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
136
-
137
139
 
138
140
 
141
+ var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
139
142
 
140
143
 
141
144
 
142
145
 
143
146
 
144
147
 
145
- var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
146
148
 
147
-
148
- var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
149
+ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
149
150
 
150
151
 
151
152
 
@@ -163,7 +164,8 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
163
164
 
164
165
 
165
166
 
166
- var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
167
+
168
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
167
169
 
168
170
 
169
171
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
@@ -304,7 +306,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
304
306
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
305
307
 
306
308
 
307
- var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
309
+ var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
308
310
 
309
311
 
310
312
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -505,7 +507,15 @@ var RouteManager = class _RouteManager {
505
507
  this.redirects = /* @__PURE__ */ new Map();
506
508
  this.programmaticPages = /* @__PURE__ */ new Map();
507
509
  this.programmaticLayouts = /* @__PURE__ */ new Map();
508
- this.programmaticClientRoutes = _chunkDRO3NXA3cjs.mergeProgrammaticClientRoutes.call(void 0, []);
510
+ this.programmaticClientRoutes = _chunkEBSL5TW7cjs.mergeProgrammaticClientRoutes.call(void 0, []);
511
+ // The hydration settings each route rule returned, by file.
512
+ this.rendererRouteHydration = /* @__PURE__ */ new Map();
513
+ this.disposeRendererHydration = () => {
514
+ };
515
+ // The directories a renderer's route rules scan, and the files they mapped, absolute with `/`
516
+ // separators.
517
+ this.rendererRouteDirs = [];
518
+ this.rendererRouteModules = /* @__PURE__ */ new Set();
509
519
  this.discovery = Promise.resolve();
510
520
  this.reportedIslandsErrors = /* @__PURE__ */ new Set();
511
521
  // Each route module's hydration plan from the last plan, with the source files it read, so a dev
@@ -556,10 +566,65 @@ var RouteManager = class _RouteManager {
556
566
  this.programmaticPages = next.programmaticPages;
557
567
  this.programmaticLayouts = next.programmaticLayouts;
558
568
  this.programmaticClientRoutes = next.programmaticClientRoutes;
569
+ this.rendererNotFoundPath = next.rendererNotFoundPath;
570
+ this.rendererRouteHydration = next.rendererRouteHydration;
571
+ this.rendererRouteDirs = next.rendererRouteDirs;
572
+ this.rendererRouteModules = next.rendererRouteModules;
573
+ this.recordRendererHydration();
559
574
  });
560
575
  this.discovery = discovery;
561
576
  return discovery;
562
577
  }
578
+ /**
579
+ * Hands the client-module reader the renderer's hydration levels for this scan's pages and
580
+ * layouts (`hydration` and route rules on the renderer descriptor).
581
+ */
582
+ recordRendererHydration() {
583
+ this.disposeRendererHydration();
584
+ const renderer = this.config.renderer;
585
+ const routeModules = [];
586
+ for (const [kind, entries] of [
587
+ ["page", this.routes.values()],
588
+ ["layout", this.layouts.values()]
589
+ ]) {
590
+ for (const entry of entries) {
591
+ if (entry.source === "programmatic") continue;
592
+ routeModules.push({
593
+ modulePath: entry.modulePath,
594
+ kind,
595
+ hydration: this.rendererRouteHydration.get(entry.modulePath)
596
+ });
597
+ }
598
+ }
599
+ this.disposeRendererHydration = _chunkEBSL5TW7cjs.setFarmRendererHydrationScope.call(void 0,
600
+ _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, this.config).map((source) => source.root),
601
+ renderer,
602
+ routeModules
603
+ );
604
+ }
605
+ /**
606
+ * The not-found page a renderer's `routes()` mapped, null when it mapped none, or undefined when
607
+ * the renderer has no route rules and Farm looks for `src/app/not-found.*` itself.
608
+ */
609
+ getRendererNotFoundPath() {
610
+ return this.rendererNotFoundPath;
611
+ }
612
+ /**
613
+ * Whether `file` is under a directory a renderer's route rules scan, where adding or removing a
614
+ * file can change the routes.
615
+ */
616
+ isRendererRouteFile(file) {
617
+ if (this.rendererRouteDirs.length === 0) return false;
618
+ const normalized = file.replace(/\\/g, "/");
619
+ return this.rendererRouteDirs.some((dir) => normalized.startsWith(`${dir}/`));
620
+ }
621
+ /**
622
+ * Whether `file` is a page, layout, loading, error or not-found file a renderer's route rules
623
+ * mapped, where an edit can change what the route renders or whether it hydrates.
624
+ */
625
+ isRendererRouteModule(file) {
626
+ return this.rendererRouteModules.size > 0 && this.rendererRouteModules.has(file.replace(/\\/g, "/"));
627
+ }
563
628
  /** Fill this manager's empty route tables. Only a fresh manager made by discoverRoutes runs it. */
564
629
  async discoverInto() {
565
630
  const programmaticClientRoutes = [];
@@ -567,7 +632,7 @@ var RouteManager = class _RouteManager {
567
632
  await this.discoverFileRoutes(source);
568
633
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
569
634
  }
570
- this.programmaticClientRoutes = _chunkDRO3NXA3cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
635
+ this.programmaticClientRoutes = _chunkEBSL5TW7cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
571
636
  for (const slot of this.routeSlots.values()) {
572
637
  if (slot.interception && !this.pageRouteShapes.has(_chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
573
638
  throw new (0, _chunkML4TOUZPcjs.AmbiguousRouteError)(
@@ -586,8 +651,8 @@ var RouteManager = class _RouteManager {
586
651
  )
587
652
  );
588
653
  this.orderedLayouts = Array.from(this.layouts.values()).sort(
589
- (left, right) => _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, right.pattern)
590
- ).map((entry) => ({ entry, groupScope: _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, entry.pattern) }));
654
+ (left, right) => _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, right.pattern)
655
+ ).map((entry) => ({ entry, groupScope: _chunk4B6YJ5DScjs.getRouteGroupScope.call(void 0, entry.pattern) }));
591
656
  for (const slot of this.routeSlots.values()) {
592
657
  if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
593
658
  this.routeSlotOwnerSegments.set(
@@ -860,11 +925,11 @@ var RouteManager = class _RouteManager {
860
925
  return this.clientManifestCache.manifest;
861
926
  }
862
927
  const cacheFile = this.packageClientBoundaryCacheFile;
863
- const compute = () => _chunkDRO3NXA3cjs.withFarmSourceSnapshot.call(void 0,
928
+ const compute = () => _chunkEBSL5TW7cjs.withFarmSourceSnapshot.call(void 0,
864
929
  () => this.computeClientManifest(normalizedProjectRoot),
865
930
  this.sourceSnapshot
866
931
  );
867
- return cacheFile ? _chunkDRO3NXA3cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
932
+ return cacheFile ? _chunkEBSL5TW7cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
868
933
  }
869
934
  /**
870
935
  * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
@@ -873,7 +938,7 @@ var RouteManager = class _RouteManager {
873
938
  */
874
939
  trackSourceChanges() {
875
940
  this.sourceChangeTracking = true;
876
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkDRO3NXA3cjs.FarmSourceSnapshotStore)())));
941
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkEBSL5TW7cjs.FarmSourceSnapshotStore)())));
877
942
  }
878
943
  /**
879
944
  * @internal A production build edits no source while it runs, so what the plan reads, parses and
@@ -882,7 +947,7 @@ var RouteManager = class _RouteManager {
882
947
  */
883
948
  keepBuildSourceSnapshot() {
884
949
  if (this.sourceChangeTracking) return;
885
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkDRO3NXA3cjs.FarmSourceSnapshotStore)(false))));
950
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkEBSL5TW7cjs.FarmSourceSnapshotStore)(false))));
886
951
  }
887
952
  /**
888
953
  * @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
@@ -925,7 +990,7 @@ var RouteManager = class _RouteManager {
925
990
  return false;
926
991
  }
927
992
  const previous = _optionalChain([this, 'access', _18 => _18.sourceSnapshot, 'optionalAccess', _19 => _19.peekSource, 'call', _20 => _20(path4.default.resolve(file))]);
928
- return previous !== void 0 && _chunkDRO3NXA3cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
993
+ return previous !== void 0 && _chunkEBSL5TW7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
929
994
  }
930
995
  /**
931
996
  * A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
@@ -936,7 +1001,7 @@ var RouteManager = class _RouteManager {
936
1001
  if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
937
1002
  return { ...previous.plan };
938
1003
  }
939
- const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0, compute);
1004
+ const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0, compute);
940
1005
  const sources = /* @__PURE__ */ new Set();
941
1006
  for (const file of files) {
942
1007
  const source = this.planSourcePath(file);
@@ -944,7 +1009,7 @@ var RouteManager = class _RouteManager {
944
1009
  }
945
1010
  if (!this.sourceChangeTracking) {
946
1011
  for (const source of sources) {
947
- if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, source));
1012
+ if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, source));
948
1013
  }
949
1014
  }
950
1015
  this.ownerPlans.set(key, { plan: result, files: sources, planKey });
@@ -964,7 +1029,7 @@ var RouteManager = class _RouteManager {
964
1029
  const isUnchanged = (file) => {
965
1030
  let result = unchanged.get(file);
966
1031
  if (result === void 0) {
967
- result = this.planStamps.get(file) === _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file);
1032
+ result = this.planStamps.get(file) === _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file);
968
1033
  unchanged.set(file, result);
969
1034
  }
970
1035
  return result;
@@ -1011,7 +1076,7 @@ var RouteManager = class _RouteManager {
1011
1076
  */
1012
1077
  inspectPackages(operation) {
1013
1078
  const file = this.packageClientBoundaryCacheFile;
1014
- return file ? _chunkDRO3NXA3cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1079
+ return file ? _chunkEBSL5TW7cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1015
1080
  }
1016
1081
  computeClientManifest(normalizedProjectRoot) {
1017
1082
  const toUrlPath = (absolutePath) => {
@@ -1029,29 +1094,29 @@ var RouteManager = class _RouteManager {
1029
1094
  const unsupportedIntegrationProvider = integrationProviders.find(
1030
1095
  (provider) => provider.supportsIsolatedHydration !== true
1031
1096
  );
1032
- if (_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]) === "enabled" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
1097
+ if (_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]) === "enabled" && _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
1033
1098
  _chunk7U4XF76Rcjs.logger.warn(
1034
1099
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
1035
1100
  );
1036
1101
  }
1037
- const isolatedMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1102
+ const isolatedMode = _chunkEBSL5TW7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1038
1103
  _optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.isolatedClientHydration]),
1039
1104
  {
1040
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
1105
+ serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
1041
1106
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
1042
1107
  }
1043
1108
  );
1044
- const planOptions = _chunkDRO3NXA3cjs.getFarmClientHydrationPlanOptions.call(void 0,
1109
+ const planOptions = _chunkEBSL5TW7cjs.getFarmClientHydrationPlanOptions.call(void 0,
1045
1110
  this.config.renderer,
1046
1111
  Boolean(unsupportedIntegrationProvider)
1047
1112
  );
1048
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _33 => _33.config, 'access', _34 => _34.experimental, 'optionalAccess', _35 => _35.serverComponents])) === "islands";
1113
+ const islandsMode = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _33 => _33.config, 'access', _34 => _34.experimental, 'optionalAccess', _35 => _35.serverComponents])) === "islands";
1049
1114
  const changed = _optionalChain([this, 'access', _36 => _36.sourceSnapshot, 'optionalAccess', _37 => _37.refresh, 'call', _38 => _38(_nullishCoalesce(this.editedSources, () => ( [])))]);
1050
1115
  let edited = null;
1051
1116
  if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
1052
1117
  edited = /* @__PURE__ */ new Set();
1053
1118
  for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
1054
- if (_chunkDRO3NXA3cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1119
+ if (_chunkEBSL5TW7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1055
1120
  const source = this.planSourcePath(file);
1056
1121
  if (source) edited.add(source);
1057
1122
  }
@@ -1066,13 +1131,13 @@ var RouteManager = class _RouteManager {
1066
1131
  metadata: this.planRouteModule(
1067
1132
  `layout:${entry.modulePath}`,
1068
1133
  edited,
1069
- () => _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1134
+ () => _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1070
1135
  entry.modulePath,
1071
1136
  normalizedProjectRoot,
1072
1137
  isolatedMode,
1073
1138
  layoutPlanOptions
1074
1139
  ),
1075
- _chunkDRO3NXA3cjs.getClientModuleHydrationPlanKey.call(void 0,
1140
+ _chunkEBSL5TW7cjs.getClientModuleHydrationPlanKey.call(void 0,
1076
1141
  entry.modulePath,
1077
1142
  normalizedProjectRoot,
1078
1143
  isolatedMode,
@@ -1080,7 +1145,7 @@ var RouteManager = class _RouteManager {
1080
1145
  )
1081
1146
  )
1082
1147
  }));
1083
- const markdownComponentsPlan = _chunkDRO3NXA3cjs.createMarkdownPageHydrationPlanner.call(void 0,
1148
+ const markdownComponentsPlan = _chunkEBSL5TW7cjs.createMarkdownPageHydrationPlanner.call(void 0,
1084
1149
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
1085
1150
  normalizedProjectRoot,
1086
1151
  isolatedMode,
@@ -1096,13 +1161,13 @@ var RouteManager = class _RouteManager {
1096
1161
  metadata: _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1097
1162
  `page:${entry.modulePath}`,
1098
1163
  edited,
1099
- () => _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1164
+ () => _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1100
1165
  entry.modulePath,
1101
1166
  normalizedProjectRoot,
1102
1167
  isolatedMode,
1103
1168
  pagePlanOptions
1104
1169
  ),
1105
- _chunkDRO3NXA3cjs.getClientModuleHydrationPlanKey.call(void 0,
1170
+ _chunkEBSL5TW7cjs.getClientModuleHydrationPlanKey.call(void 0,
1106
1171
  entry.modulePath,
1107
1172
  normalizedProjectRoot,
1108
1173
  isolatedMode,
@@ -1132,18 +1197,18 @@ var RouteManager = class _RouteManager {
1132
1197
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
1133
1198
  );
1134
1199
  }
1135
- _chunkDRO3NXA3cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1200
+ _chunkEBSL5TW7cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1136
1201
  layoutEntries.map(({ entry, metadata }) => ({
1137
1202
  pattern: entry.pattern,
1138
- depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1203
+ depth: _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1139
1204
  metadata
1140
1205
  })),
1141
1206
  routeEntries.map(({ entry, metadata }) => ({
1142
1207
  pattern: getRouteEntryDirectory(entry),
1143
- depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1208
+ depth: _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1144
1209
  metadata
1145
1210
  })),
1146
- _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory,
1211
+ _chunk4B6YJ5DScjs.routeBoundaryCoversDirectory,
1147
1212
  { serverOwners: islandsMode }
1148
1213
  );
1149
1214
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
@@ -1163,7 +1228,7 @@ var RouteManager = class _RouteManager {
1163
1228
  const routes = routeEntries.map(({ entry, metadata }) => {
1164
1229
  const programmaticPage = this.programmaticPages.get(entry.modulePath);
1165
1230
  const layoutShouldHydrate = layoutEntries.some(
1166
- ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1231
+ ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunk4B6YJ5DScjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1167
1232
  );
1168
1233
  return {
1169
1234
  pattern: entry.pattern,
@@ -1179,8 +1244,8 @@ var RouteManager = class _RouteManager {
1179
1244
  modulePath: toUrlPath(boundary.modulePath)
1180
1245
  }))
1181
1246
  } : {},
1182
- ..._chunkDRO3NXA3cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1183
- renderPlan: _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
1247
+ ..._chunkEBSL5TW7cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1248
+ renderPlan: _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
1184
1249
  pageShouldHydrate: metadata.shouldHydrate,
1185
1250
  layoutShouldHydrate,
1186
1251
  islandStrategy: metadata.islandStrategy
@@ -1196,7 +1261,7 @@ var RouteManager = class _RouteManager {
1196
1261
  }))
1197
1262
  };
1198
1263
  });
1199
- const treeLayoutPatterns = islandsMode ? _chunkNEKO3HM2cjs.getFarmServerTreeLayoutPatterns.call(void 0,
1264
+ const treeLayoutPatterns = islandsMode ? _chunk4B6YJ5DScjs.getFarmServerTreeLayoutPatterns.call(void 0,
1200
1265
  layoutEntries.map(({ entry, metadata }) => ({
1201
1266
  pattern: entry.pattern,
1202
1267
  shouldHydrate: metadata.shouldHydrate,
@@ -1221,7 +1286,7 @@ var RouteManager = class _RouteManager {
1221
1286
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
1222
1287
  }));
1223
1288
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
1224
- const metadata = _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1289
+ const metadata = _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1225
1290
  return {
1226
1291
  name: entry.name,
1227
1292
  ownerPattern: entry.ownerPattern,
@@ -1237,7 +1302,7 @@ var RouteManager = class _RouteManager {
1237
1302
  };
1238
1303
  });
1239
1304
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
1240
- metadata: _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1305
+ metadata: _chunkEBSL5TW7cjs.getClientModuleHydrationPlan.call(void 0,
1241
1306
  entry.modulePath,
1242
1307
  normalizedProjectRoot,
1243
1308
  isolatedMode,
@@ -1339,7 +1404,7 @@ var RouteManager = class _RouteManager {
1339
1404
  loadModule: viteServer ? (componentModulePath) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
1340
1405
  }),
1341
1406
  config: mdxConfig,
1342
- renderer: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
1407
+ renderer: _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
1343
1408
  });
1344
1409
  }
1345
1410
  if (this.viteServer) {
@@ -1387,7 +1452,7 @@ var RouteManager = class _RouteManager {
1387
1452
  */
1388
1453
  createRoutePattern(route) {
1389
1454
  if (route.segments.length === 0) return "/";
1390
- return "/" + route.segments.map(_chunkNEKO3HM2cjs.formatRouteSegment).join("/");
1455
+ return "/" + route.segments.map(_chunk4B6YJ5DScjs.formatRouteSegment).join("/");
1391
1456
  }
1392
1457
  registerPageRoute(entry) {
1393
1458
  _chunkML4TOUZPcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
@@ -1406,15 +1471,42 @@ var RouteManager = class _RouteManager {
1406
1471
  }
1407
1472
  async discoverFileRoutes(source) {
1408
1473
  const appDir = _chunk7U4XF76Rcjs.resolveAppPath.call(void 0, source.root, source.srcDir, "app");
1409
- const componentExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1474
+ const componentExtensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1410
1475
  (extension) => extension.slice(1)
1411
1476
  );
1412
1477
  const componentGlob = componentExtensions.join(",");
1413
- const pageFiles = await safeGlobFiles(`**/page.{${componentGlob},md,mdx}`, appDir);
1478
+ const rendererRoutes = await _chunkGLNVLCUHcjs.resolveFarmRendererRoutes.call(void 0, {
1479
+ renderer: this.config.renderer,
1480
+ root: source.root,
1481
+ srcDir: source.srcDir
1482
+ });
1483
+ const routeModulePaths = /* @__PURE__ */ new Map();
1484
+ const modulePathOf = (file) => _nullishCoalesce(routeModulePaths.get(file), () => ( path4.default.join(appDir, file)));
1485
+ const rendererFiles = (kind) => (_nullishCoalesce(_optionalChain([rendererRoutes, 'optionalAccess', _48 => _48.entries]), () => ( []))).filter((entry) => entry.kind === kind).map((entry) => {
1486
+ routeModulePaths.set(entry.routeFile, entry.modulePath);
1487
+ if (entry.hydration.hydrate !== void 0 || entry.hydration.strategy !== void 0) {
1488
+ this.rendererRouteHydration.set(entry.modulePath, entry.hydration);
1489
+ }
1490
+ return entry.routeFile;
1491
+ });
1492
+ if (rendererRoutes) {
1493
+ this.rendererRouteDirs.push(rendererRoutes.dir.replace(/\\/g, "/"));
1494
+ for (const entry of rendererRoutes.entries) {
1495
+ this.rendererRouteModules.add(entry.modulePath.replace(/\\/g, "/"));
1496
+ }
1497
+ const notFound = rendererRoutes.entries.find((entry) => entry.kind === "not-found");
1498
+ if (notFound || this.rendererNotFoundPath === void 0) {
1499
+ this.rendererNotFoundPath = _nullishCoalesce(_optionalChain([notFound, 'optionalAccess', _49 => _49.modulePath]), () => ( null));
1500
+ }
1501
+ }
1502
+ const pageFiles = rendererRoutes ? [
1503
+ ...rendererFiles("page"),
1504
+ ...await safeGlobFiles(`**/@*/**/page.{${componentGlob},md,mdx}`, appDir)
1505
+ ] : await safeGlobFiles(`**/page.{${componentGlob},md,mdx}`, appDir);
1414
1506
  const slotDefaultFiles = await safeGlobFiles(`**/@*/**/default.{${componentGlob}}`, appDir);
1415
- const layoutFiles = await safeGlobFiles(`**/layout.{${componentGlob}}`, appDir);
1416
- const loadingFiles = await safeGlobFiles(`**/loading.{${componentGlob}}`, appDir);
1417
- const errorFiles = await safeGlobFiles(`**/error.{${componentGlob}}`, appDir);
1507
+ const layoutFiles = rendererRoutes ? rendererFiles("layout") : await safeGlobFiles(`**/layout.{${componentGlob}}`, appDir);
1508
+ const loadingFiles = rendererRoutes ? rendererFiles("loading") : await safeGlobFiles(`**/loading.{${componentGlob}}`, appDir);
1509
+ const errorFiles = rendererRoutes ? rendererFiles("error") : await safeGlobFiles(`**/error.{${componentGlob}}`, appDir);
1418
1510
  const metadataImageFiles = await safeGlobFiles(
1419
1511
  `**/{opengraph-image,twitter-image}.{${componentGlob},png,jpg,jpeg,gif,webp}`,
1420
1512
  appDir
@@ -1442,21 +1534,21 @@ var RouteManager = class _RouteManager {
1442
1534
  const markdownFiles = group.files.filter(_chunk26WP75W5cjs.isFarmMarkdownPageFile);
1443
1535
  if (componentFiles.length > 1) {
1444
1536
  throw new Error(
1445
- `Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path4.default.join(appDir, file)).join(" and ")}.`
1537
+ `Duplicate page route "${pattern}". Found ${componentFiles.map(modulePathOf).join(" and ")}.`
1446
1538
  );
1447
1539
  }
1448
1540
  if (markdownFiles.length > 1) {
1449
1541
  throw new Error(
1450
- `Duplicate markdown representation for page route "${pattern}". Found ${markdownFiles.map((file) => path4.default.join(appDir, file)).join(" and ")}.`
1542
+ `Duplicate markdown representation for page route "${pattern}". Found ${markdownFiles.map(modulePathOf).join(" and ")}.`
1451
1543
  );
1452
1544
  }
1453
1545
  const componentFile = componentFiles[0];
1454
1546
  const markdownFile = markdownFiles[0];
1455
1547
  const primaryFile = componentFile || markdownFile;
1456
1548
  if (!primaryFile) continue;
1457
- const modulePath = path4.default.join(appDir, primaryFile);
1549
+ const modulePath = modulePathOf(primaryFile);
1458
1550
  const existing = this.routes.get(pattern);
1459
- if (_optionalChain([existing, 'optionalAccess', _48 => _48.sourceRoot]) === source.root) {
1551
+ if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
1460
1552
  throw new Error(
1461
1553
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1462
1554
  );
@@ -1465,7 +1557,7 @@ var RouteManager = class _RouteManager {
1465
1557
  route: group.route,
1466
1558
  modulePath,
1467
1559
  ...markdownFile ? {
1468
- markdownSourcePath: path4.default.join(appDir, markdownFile)
1560
+ markdownSourcePath: modulePathOf(markdownFile)
1469
1561
  } : {},
1470
1562
  pattern,
1471
1563
  ...getPageDirectoryField(group.route, pattern),
@@ -1480,10 +1572,10 @@ var RouteManager = class _RouteManager {
1480
1572
  ]) {
1481
1573
  for (const file of files) {
1482
1574
  const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
1483
- const modulePath = path4.default.join(appDir, file);
1484
- const pattern = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1575
+ const modulePath = modulePathOf(file);
1576
+ const pattern = _chunk4B6YJ5DScjs.createRouteDirectoryPattern.call(void 0, route);
1485
1577
  const existing = target.get(pattern);
1486
- if (_optionalChain([existing, 'optionalAccess', _49 => _49.sourceRoot]) === source.root) {
1578
+ if (_optionalChain([existing, 'optionalAccess', _51 => _51.sourceRoot]) === source.root) {
1487
1579
  throw new Error(
1488
1580
  `Duplicate ${kind} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1489
1581
  );
@@ -1503,10 +1595,10 @@ var RouteManager = class _RouteManager {
1503
1595
  const modulePath = path4.default.join(appDir, file);
1504
1596
  const pattern = this.createRoutePattern(slot.route);
1505
1597
  const ownerPattern = this.createRoutePattern(slot.ownerRoute);
1506
- const ownerDirectory = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1598
+ const ownerDirectory = _chunk4B6YJ5DScjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1507
1599
  const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
1508
1600
  const existing = this.routeSlots.get(key);
1509
- if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
1601
+ if (_optionalChain([existing, 'optionalAccess', _52 => _52.sourceRoot]) === source.root) {
1510
1602
  throw new Error(
1511
1603
  `Duplicate route slot "${slot.name}" for "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1512
1604
  );
@@ -1535,7 +1627,7 @@ var RouteManager = class _RouteManager {
1535
1627
  const key = `${kind}:${pattern}`;
1536
1628
  const existing = this.metadataImages.get(key);
1537
1629
  const sourceType = isStaticMetadataImageFile(file) ? "static" : "module";
1538
- if (_optionalChain([existing, 'optionalAccess', _51 => _51.sourceRoot]) === source.root) {
1630
+ if (_optionalChain([existing, 'optionalAccess', _53 => _53.sourceRoot]) === source.root) {
1539
1631
  throw new Error(
1540
1632
  `Duplicate ${fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one static image or module per route segment.`
1541
1633
  );
@@ -1563,7 +1655,7 @@ var RouteManager = class _RouteManager {
1563
1655
  const pattern = this.createRoutePattern(route);
1564
1656
  const key = `${descriptor.kind}:${pattern}`;
1565
1657
  const existing = this.metadataRoutes.get(key);
1566
- if (_optionalChain([existing, 'optionalAccess', _52 => _52.sourceRoot]) === source.root) {
1658
+ if (_optionalChain([existing, 'optionalAccess', _54 => _54.sourceRoot]) === source.root) {
1567
1659
  throw new Error(
1568
1660
  `Duplicate ${descriptor.fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one .ts or .js metadata route per segment.`
1569
1661
  );
@@ -1585,11 +1677,11 @@ var RouteManager = class _RouteManager {
1585
1677
  srcDir: source.srcDir,
1586
1678
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1587
1679
  });
1588
- const graph = this.viteServer ? _chunkDRO3NXA3cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1680
+ const graph = this.viteServer ? _chunkEBSL5TW7cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1589
1681
  for (const { filePath, manifest } of manifests) {
1590
1682
  if (graph) {
1591
1683
  clientRoutes.push(
1592
- _chunkDRO3NXA3cjs.resolveProgrammaticClientRoutes.call(void 0, {
1684
+ _chunkEBSL5TW7cjs.resolveProgrammaticClientRoutes.call(void 0, {
1593
1685
  graph,
1594
1686
  routesFile: toRealPath(filePath),
1595
1687
  routes: manifest.routes,
@@ -1602,7 +1694,7 @@ var RouteManager = class _RouteManager {
1602
1694
  const route = _chunkYUCU6XB4cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
1603
1695
  const pattern = this.createRoutePattern(route);
1604
1696
  const existing = this.routes.get(pattern);
1605
- if (_optionalChain([existing, 'optionalAccess', _53 => _53.sourceRoot]) === source.root) {
1697
+ if (_optionalChain([existing, 'optionalAccess', _55 => _55.sourceRoot]) === source.root) {
1606
1698
  throw new Error(
1607
1699
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1608
1700
  );
@@ -1620,9 +1712,9 @@ var RouteManager = class _RouteManager {
1620
1712
  }
1621
1713
  if (definition.kind === "layout") {
1622
1714
  const route = _chunkYUCU6XB4cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
1623
- const pattern = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1715
+ const pattern = _chunk4B6YJ5DScjs.createRouteDirectoryPattern.call(void 0, route);
1624
1716
  const existing = this.layouts.get(pattern);
1625
- if (_optionalChain([existing, 'optionalAccess', _54 => _54.sourceRoot]) === source.root) {
1717
+ if (_optionalChain([existing, 'optionalAccess', _56 => _56.sourceRoot]) === source.root) {
1626
1718
  throw new Error(
1627
1719
  `Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1628
1720
  );
@@ -1651,7 +1743,7 @@ var RouteManager = class _RouteManager {
1651
1743
  }
1652
1744
  async loadProgrammaticRoutesModule(filePath) {
1653
1745
  if (this.viteServer) {
1654
- const viteRoot = _optionalChain([this, 'access', _55 => _55.viteServer, 'access', _56 => _56.config, 'optionalAccess', _57 => _57.root]) || this.config.root || process.cwd();
1746
+ const viteRoot = _optionalChain([this, 'access', _57 => _57.viteServer, 'access', _58 => _58.config, 'optionalAccess', _59 => _59.root]) || this.config.root || process.cwd();
1655
1747
  return await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer, _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, filePath, viteRoot));
1656
1748
  }
1657
1749
  return await import(
@@ -1667,7 +1759,7 @@ var RouteManager = class _RouteManager {
1667
1759
  const matchingLayouts = [];
1668
1760
  for (const { entry, groupScope } of this.orderedLayouts) {
1669
1761
  if (!_chunk7U4XF76Rcjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
1670
- if (groupScope !== null && !_chunkNEKO3HM2cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1762
+ if (groupScope !== null && !_chunk4B6YJ5DScjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1671
1763
  continue;
1672
1764
  }
1673
1765
  matchingLayouts.push(entry);
@@ -1748,14 +1840,14 @@ var RouteManager = class _RouteManager {
1748
1840
  let page = route;
1749
1841
  for (const boundaryEntry of boundaries.values()) {
1750
1842
  if (!_chunk7U4XF76Rcjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
1751
- const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1843
+ const groupScope = _chunk4B6YJ5DScjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1752
1844
  if (groupScope !== null) {
1753
1845
  if (page === void 0) page = this.matchPageRoute(_chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedPath));
1754
- if (!_chunkNEKO3HM2cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1846
+ if (!_chunk4B6YJ5DScjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1755
1847
  }
1756
1848
  const depth = boundaryEntry.route.segments.length;
1757
- const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _58 => _58.route, 'access', _59 => _59.segments, 'access', _60 => _60.length]), () => ( -1));
1758
- if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1849
+ const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _60 => _60.route, 'access', _61 => _61.segments, 'access', _62 => _62.length]), () => ( -1));
1850
+ if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunk4B6YJ5DScjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1759
1851
  bestMatch = boundaryEntry;
1760
1852
  }
1761
1853
  }
@@ -1782,8 +1874,6 @@ var RouteManager = class _RouteManager {
1782
1874
  getDocsAdapterRoutes() {
1783
1875
  const docs = this.config.docs;
1784
1876
  if (!docs || typeof docs !== "object" || !docs.enabled) return void 0;
1785
- const usesAdapter = Boolean(docs.adapter && docs.adapter.server && docs.adapter.react);
1786
- if (usesAdapter && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer)) return void 0;
1787
1877
  const entry = `/${String(docs.entry || "docs").replace(/^\/+|\/+$/g, "")}`;
1788
1878
  return {
1789
1879
  owns: (routePath) => entry === "/" || routePath === entry || routePath.startsWith(`${entry}/`),
@@ -1805,7 +1895,7 @@ var RouteManager = class _RouteManager {
1805
1895
  }));
1806
1896
  const i18n = this.getI18nConfig();
1807
1897
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1808
- const result = await _chunkVMBIKDKWcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1898
+ const result = await _chunkL3BSHASBcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1809
1899
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1810
1900
  ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1811
1901
  });
@@ -1852,7 +1942,7 @@ var RouteManager = class _RouteManager {
1852
1942
  async isRouteSSG(modulePath) {
1853
1943
  try {
1854
1944
  const mod = await this.loadRouteModule(modulePath);
1855
- const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1945
+ const rendering = await _chunkL3BSHASBcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1856
1946
  return rendering.ssg;
1857
1947
  } catch (e2) {
1858
1948
  return false;
@@ -1864,7 +1954,7 @@ var RouteManager = class _RouteManager {
1864
1954
  async hasRouteISR(modulePath) {
1865
1955
  try {
1866
1956
  const mod = await this.loadRouteModule(modulePath);
1867
- const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1957
+ const rendering = await _chunkL3BSHASBcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1868
1958
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
1869
1959
  } catch (e3) {
1870
1960
  return false;
@@ -1876,7 +1966,7 @@ var RouteManager = class _RouteManager {
1876
1966
  async getRouteRevalidateInterval(modulePath) {
1877
1967
  try {
1878
1968
  const mod = await this.loadRouteModule(modulePath);
1879
- const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1969
+ const rendering = await _chunkL3BSHASBcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1880
1970
  return rendering.revalidate;
1881
1971
  } catch (e4) {
1882
1972
  return void 0;
@@ -1884,7 +1974,7 @@ var RouteManager = class _RouteManager {
1884
1974
  }
1885
1975
  };
1886
1976
  function getPageDirectoryField(route, pattern) {
1887
- const directory = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1977
+ const directory = _chunk4B6YJ5DScjs.createRouteDirectoryPattern.call(void 0, route);
1888
1978
  return directory === pattern ? {} : { directory };
1889
1979
  }
1890
1980
  function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
@@ -2008,11 +2098,11 @@ function createFarmDevClientManifest(manifest, options) {
2008
2098
  }
2009
2099
  for (const layout of manifest.layouts) {
2010
2100
  if (layoutPatterns && !layoutPatterns.has(layout.pattern)) continue;
2011
- const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, layout.pattern);
2101
+ const groupScope = _chunk4B6YJ5DScjs.getRouteGroupScope.call(void 0, layout.pattern);
2012
2102
  clientManifest.layouts[layout.pattern] = {
2013
2103
  modulePath: layout.modulePath,
2014
2104
  pattern: layout.pattern,
2015
- ...groupScope ? { urlPattern: _chunkNEKO3HM2cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
2105
+ ...groupScope ? { urlPattern: _chunk4B6YJ5DScjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
2016
2106
  shouldHydrate: layout.shouldHydrate,
2017
2107
  islandStrategy: layout.islandStrategy,
2018
2108
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -2090,7 +2180,7 @@ function farmFontImportsPlugin(options = {}) {
2090
2180
  return;
2091
2181
  }
2092
2182
  const resource = registry.getDevResource(pathname);
2093
- if (!_optionalChain([resource, 'optionalAccess', _61 => _61.bytes])) {
2183
+ if (!_optionalChain([resource, 'optionalAccess', _63 => _63.bytes])) {
2094
2184
  next();
2095
2185
  return;
2096
2186
  }
@@ -2608,7 +2698,7 @@ function readFontOptions(code, id, call) {
2608
2698
  const declaration = call.ancestors.at(-2);
2609
2699
  const statement = call.ancestors.at(-3);
2610
2700
  const statementParent = call.ancestors.at(-4);
2611
- const isModuleScope = _optionalChain([declaration, 'optionalAccess', _62 => _62.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _63 => _63.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _64 => _64.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _65 => _65.type]) === "Program");
2701
+ const isModuleScope = _optionalChain([declaration, 'optionalAccess', _64 => _64.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _65 => _65.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _66 => _66.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _67 => _67.type]) === "Program");
2612
2702
  if (!isModuleScope || call.ancestors.some((ancestor) => isFunctionNode(ancestor))) {
2613
2703
  throw fontError(id, `${call.kind}() must be declared directly at module scope`);
2614
2704
  }
@@ -3174,17 +3264,17 @@ function resolveProviderModule(moduleId, root) {
3174
3264
 
3175
3265
  // src/server-actions-mode.ts
3176
3266
  function resolveFarmIslxActionsMode(config) {
3177
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _66 => _66.experimental, 'optionalAccess', _67 => _67.serverComponents])) === "islands") {
3267
+ if (_chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _68 => _68.experimental, 'optionalAccess', _69 => _69.serverComponents])) === "islands") {
3178
3268
  return "islands";
3179
3269
  }
3180
- if (_optionalChain([config, 'access', _68 => _68.experimental, 'optionalAccess', _69 => _69.serverActions]) !== true) return null;
3270
+ if (_optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverActions]) !== true) return null;
3181
3271
  const renderer = config.renderer;
3182
3272
  if (renderer === void 0 || renderer === false) return null;
3183
- if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer) || _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer)) return null;
3273
+ if (_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, renderer) || _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer)) return null;
3184
3274
  return "renderer";
3185
3275
  }
3186
3276
  function farmBrowserServerFnsEnabled(config) {
3187
- return _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverActions]) === true && resolveFarmIslxActionsMode(config) !== null;
3277
+ return _optionalChain([config, 'access', _72 => _72.experimental, 'optionalAccess', _73 => _73.serverActions]) === true && resolveFarmIslxActionsMode(config) !== null;
3188
3278
  }
3189
3279
 
3190
3280
  // src/island-inference.ts
@@ -3227,7 +3317,7 @@ function inferFarmIslandStrategy(filePath, root) {
3227
3317
  const result = _compiler.inferStrategy.call(void 0, file, code, {
3228
3318
  parse: parseFarmIslandSource,
3229
3319
  resolve: (specifier, importer) => {
3230
- const resolved = _chunkDRO3NXA3cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3320
+ const resolved = _chunkEBSL5TW7cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3231
3321
  return resolved.local ? resolved.path : null;
3232
3322
  }
3233
3323
  });
@@ -3247,7 +3337,7 @@ function inferFarmRouteRootStrategy(owners, root) {
3247
3337
  if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3248
3338
  return cached.result;
3249
3339
  }
3250
- const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3340
+ const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3251
3341
  const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3252
3342
  routeRootInferences.set(key, {
3253
3343
  stamps: [...read].map((file) => [file, modifiedAt(file)]),
@@ -3264,7 +3354,7 @@ function inferRouteRoot(owners, root) {
3264
3354
  const files = [];
3265
3355
  const modules = [];
3266
3356
  for (const owner of owners) {
3267
- const rendered = _chunkDRO3NXA3cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3357
+ const rendered = _chunkEBSL5TW7cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3268
3358
  if (!rendered) {
3269
3359
  return {
3270
3360
  strategy: null,
@@ -3280,7 +3370,7 @@ function inferRouteRoot(owners, root) {
3280
3370
  source = fs2.default.readFileSync(module, "utf8");
3281
3371
  } catch (e11) {
3282
3372
  }
3283
- if (_chunkDRO3NXA3cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3373
+ if (_chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3284
3374
  }
3285
3375
  for (const module of modules) {
3286
3376
  const result = inferFarmIslandStrategy(module, root);
@@ -3292,7 +3382,7 @@ function inferRouteRoot(owners, root) {
3292
3382
  function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
3293
3383
  const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
3294
3384
  const onRoute = layouts.filter(
3295
- (layout) => _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3385
+ (layout) => _chunk4B6YJ5DScjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3296
3386
  );
3297
3387
  const declared = [
3298
3388
  ...page.islandStrategy ? [page.islandStrategy] : [],
@@ -3323,9 +3413,9 @@ var _stream = require('stream');
3323
3413
  // src/not-found.ts
3324
3414
 
3325
3415
 
3326
- function resolveFarmNotFoundComponentPath(config, appDirs) {
3327
- const extensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3328
- const configuredPath = _optionalChain([config, 'access', _72 => _72.notFound, 'optionalAccess', _73 => _73.component, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]);
3416
+ function resolveFarmNotFoundComponentPath(config, appDirs, discovered) {
3417
+ const extensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3418
+ const configuredPath = _optionalChain([config, 'access', _74 => _74.notFound, 'optionalAccess', _75 => _75.component, 'optionalAccess', _76 => _76.trim, 'call', _77 => _77()]);
3329
3419
  if (configuredPath) {
3330
3420
  const componentPath = path4.default.isAbsolute(configuredPath) ? path4.default.normalize(configuredPath) : path4.default.resolve(config.root, configuredPath);
3331
3421
  if (!extensions.some((extension) => componentPath.endsWith(extension))) {
@@ -3338,6 +3428,7 @@ function resolveFarmNotFoundComponentPath(config, appDirs) {
3338
3428
  }
3339
3429
  return componentPath;
3340
3430
  }
3431
+ if (discovered !== void 0) return discovered;
3341
3432
  let discoveredPath = null;
3342
3433
  for (const appDir of appDirs) {
3343
3434
  for (const extension of extensions) {
@@ -3363,11 +3454,11 @@ function getFarmLayoutKey(pattern, params) {
3363
3454
  );
3364
3455
  }
3365
3456
  function countFarmKeptLayouts(layoutsHeader, layouts, params) {
3366
- const chain = _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3457
+ const chain = _chunk4B6YJ5DScjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3367
3458
  if (chain.length === 0) return 0;
3368
3459
  const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
3369
- if (chain[0] === keys[0]) return _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3370
- return keys.length > 1 ? 1 + _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
3460
+ if (chain[0] === keys[0]) return _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3461
+ return keys.length > 1 ? 1 + _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
3371
3462
  }
3372
3463
  function createFarmFlushToken() {
3373
3464
  const bytes = new Uint8Array(16);
@@ -3622,7 +3713,7 @@ function createDefaultErrorDiagnostics(error, root) {
3622
3713
  function canBootFarmIslandsClient(config) {
3623
3714
  const docs = config.docs;
3624
3715
  const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
3625
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _76 => _76.experimental, 'optionalAccess', _77 => _77.serverComponents])) === "islands" && !docsEnabled && _chunkDMSXZNQRcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkDMSXZNQRcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3716
+ return _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _78 => _78.experimental, 'optionalAccess', _79 => _79.serverComponents])) === "islands" && !docsEnabled && _chunkDMSXZNQRcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkDMSXZNQRcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3626
3717
  }
3627
3718
 
3628
3719
  // src/islands-kept-layouts.ts
@@ -3670,7 +3761,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
3670
3761
  function parse(code, file) {
3671
3762
  const extension = path4.default.extname(file).slice(1);
3672
3763
  const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
3673
- return _chunkDRO3NXA3cjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3764
+ return _chunkEBSL5TW7cjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3674
3765
  try {
3675
3766
  return _parseAst.parseAst.call(void 0, code, { lang });
3676
3767
  } catch (e14) {
@@ -3760,11 +3851,11 @@ function findFarmRequestDecidingConstruct(code, file) {
3760
3851
  reason = "import.meta";
3761
3852
  return;
3762
3853
  case "CallExpression":
3763
- if (_optionalChain([current, 'access', _78 => _78.callee, 'optionalAccess', _79 => _79.type]) === "Identifier" && current.callee.name === "use") {
3854
+ if (_optionalChain([current, 'access', _80 => _80.callee, 'optionalAccess', _81 => _81.type]) === "Identifier" && current.callee.name === "use") {
3764
3855
  reason = "a use() call";
3765
3856
  return;
3766
3857
  }
3767
- if (_optionalChain([current, 'access', _80 => _80.callee, 'optionalAccess', _81 => _81.type]) === "MemberExpression" && !current.callee.computed && _optionalChain([current, 'access', _82 => _82.callee, 'access', _83 => _83.object, 'optionalAccess', _84 => _84.type]) === "Identifier" && current.callee.object.name === "Math" && _optionalChain([current, 'access', _85 => _85.callee, 'access', _86 => _86.property, 'optionalAccess', _87 => _87.name]) === "random") {
3858
+ if (_optionalChain([current, 'access', _82 => _82.callee, 'optionalAccess', _83 => _83.type]) === "MemberExpression" && !current.callee.computed && _optionalChain([current, 'access', _84 => _84.callee, 'access', _85 => _85.object, 'optionalAccess', _86 => _86.type]) === "Identifier" && current.callee.object.name === "Math" && _optionalChain([current, 'access', _87 => _87.callee, 'access', _88 => _88.property, 'optionalAccess', _89 => _89.name]) === "random") {
3768
3859
  reason = "Math.random()";
3769
3860
  return;
3770
3861
  }
@@ -3805,14 +3896,14 @@ function isReference(node, parent, key) {
3805
3896
  }
3806
3897
  function readSource(file) {
3807
3898
  try {
3808
- _chunkDRO3NXA3cjs.noteFarmSourceRead.call(void 0, file);
3899
+ _chunkEBSL5TW7cjs.noteFarmSourceRead.call(void 0, file);
3809
3900
  return fs2.default.readFileSync(file, "utf8");
3810
3901
  } catch (e15) {
3811
3902
  return null;
3812
3903
  }
3813
3904
  }
3814
3905
  function explainFarmKeptLayoutRender(modulePath, root) {
3815
- const entry = _chunkDRO3NXA3cjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3906
+ const entry = _chunkEBSL5TW7cjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3816
3907
  if (!entry) return `${modulePath} does not resolve`;
3817
3908
  const visited = /* @__PURE__ */ new Set();
3818
3909
  const check = (file) => {
@@ -3822,7 +3913,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3822
3913
  if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
3823
3914
  const code = readSource(file);
3824
3915
  if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
3825
- const { reason, imports } = _chunkDRO3NXA3cjs.memoizeInFarmSourceSnapshot.call(void 0,
3916
+ const { reason, imports } = _chunkEBSL5TW7cjs.memoizeInFarmSourceSnapshot.call(void 0,
3826
3917
  "kept-layout-module",
3827
3918
  code,
3828
3919
  () => findFarmRequestDecidingConstruct(code, file)
@@ -3835,7 +3926,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3835
3926
  return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
3836
3927
  }
3837
3928
  if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
3838
- const resolved = _chunkDRO3NXA3cjs.resolveImportedModule.call(void 0, file, imported.source, root);
3929
+ const resolved = _chunkEBSL5TW7cjs.resolveImportedModule.call(void 0, file, imported.source, root);
3839
3930
  if (!resolved.path || !resolved.local) {
3840
3931
  return `${path4.default.relative(root, file)} imports ${imported.source}`;
3841
3932
  }
@@ -3850,15 +3941,15 @@ var answers = /* @__PURE__ */ new Map();
3850
3941
  function canFarmSkipKeptLayoutRender(modulePath, root) {
3851
3942
  const key = `${root}\0${modulePath}`;
3852
3943
  const known = answers.get(key);
3853
- if (known && known.stamps.every(([file, stamp]) => _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3944
+ if (known && known.stamps.every(([file, stamp]) => _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3854
3945
  return known.skip;
3855
3946
  }
3856
- const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0,
3947
+ const { result, files } = _chunkEBSL5TW7cjs.traceFarmSourceReads.call(void 0,
3857
3948
  () => explainFarmKeptLayoutRender(modulePath, root) === null
3858
3949
  );
3859
3950
  answers.set(key, {
3860
3951
  skip: result,
3861
- stamps: files.map((file) => [file, _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file)])
3952
+ stamps: files.map((file) => [file, _chunkEBSL5TW7cjs.getFarmSourceStamp.call(void 0, file)])
3862
3953
  });
3863
3954
  return result;
3864
3955
  }
@@ -3893,7 +3984,7 @@ function pipeFarmRendererWebStream(runtime) {
3893
3984
  source.once("error", (error) => {
3894
3985
  if (settleShell(error)) return;
3895
3986
  callbacks.onError(error);
3896
- _optionalChain([destination, 'optionalAccess', _88 => _88.end, 'call', _89 => _89()]);
3987
+ _optionalChain([destination, 'optionalAccess', _90 => _90.end, 'call', _91 => _91()]);
3897
3988
  });
3898
3989
  },
3899
3990
  (error) => settleShell(error)
@@ -3901,12 +3992,12 @@ function pipeFarmRendererWebStream(runtime) {
3901
3992
  return {
3902
3993
  pipe(target) {
3903
3994
  destination = target;
3904
- _optionalChain([source, 'optionalAccess', _90 => _90.pipe, 'call', _91 => _91(target)]);
3995
+ _optionalChain([source, 'optionalAccess', _92 => _92.pipe, 'call', _93 => _93(target)]);
3905
3996
  },
3906
3997
  abort() {
3907
3998
  aborted = true;
3908
- _optionalChain([source, 'optionalAccess', _92 => _92.destroy, 'call', _93 => _93()]);
3909
- _optionalChain([destination, 'optionalAccess', _94 => _94.end, 'call', _95 => _95()]);
3999
+ _optionalChain([source, 'optionalAccess', _94 => _94.destroy, 'call', _95 => _95()]);
4000
+ _optionalChain([destination, 'optionalAccess', _96 => _96.end, 'call', _97 => _97()]);
3910
4001
  }
3911
4002
  };
3912
4003
  };
@@ -3986,7 +4077,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
3986
4077
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
3987
4078
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
3988
4079
  warnedSuppressedAsyncHydrationModules.add(modulePath);
3989
- _chunk7U4XF76Rcjs.logger.warn(_chunkDRO3NXA3cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
4080
+ _chunk7U4XF76Rcjs.logger.warn(_chunkEBSL5TW7cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3990
4081
  }
3991
4082
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
3992
4083
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -4023,7 +4114,7 @@ function appendResponseHeader(res, name, value) {
4023
4114
  }
4024
4115
  }
4025
4116
  function requestHeader(req, name) {
4026
- const value = _optionalChain([req, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97[name]]);
4117
+ const value = _optionalChain([req, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99[name]]);
4027
4118
  return Array.isArray(value) ? value[0] : value;
4028
4119
  }
4029
4120
  function appendResponseVary(res, value) {
@@ -4037,7 +4128,7 @@ function appendResponseVary(res, value) {
4037
4128
  function renderI18nAlternateLinks(requestPath, snapshot, options) {
4038
4129
  if (snapshot.routing === "none") return "";
4039
4130
  const url = new URL(requestPath, "http://farm.local");
4040
- return _chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
4131
+ return _chunk4B6YJ5DScjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
4041
4132
  }
4042
4133
  var PPR_REFRESH_MAX_ATTEMPTS = 3;
4043
4134
  function createPPRRefreshScript() {
@@ -4128,12 +4219,12 @@ async function parseRouteModuleProps(routeModule, input) {
4128
4219
  }
4129
4220
  const schemas = routeModule.__farmRouteSchemas;
4130
4221
  const params = parseRouteModuleSchema(
4131
- _optionalChain([schemas, 'optionalAccess', _98 => _98.params]),
4222
+ _optionalChain([schemas, 'optionalAccess', _100 => _100.params]),
4132
4223
  input.props.params,
4133
4224
  "params",
4134
4225
  input.routePath
4135
4226
  );
4136
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _99 => _99.search]), input.search, "search", input.routePath);
4227
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _101 => _101.search]), input.search, "search", input.routePath);
4137
4228
  return {
4138
4229
  ...input.props,
4139
4230
  params,
@@ -4192,25 +4283,25 @@ var ServerRenderer = class {
4192
4283
  } else {
4193
4284
  _chunkWOAXQ5MZcjs.uninstallFarmIslandValues.call(void 0, );
4194
4285
  }
4195
- if (_optionalChain([this, 'access', _100 => _100.config, 'access', _101 => _101.notFound, 'optionalAccess', _102 => _102.component, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()])) {
4286
+ if (_optionalChain([this, 'access', _102 => _102.config, 'access', _103 => _103.notFound, 'optionalAccess', _104 => _104.component, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()])) {
4196
4287
  resolveFarmNotFoundComponentPath(this.config, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config));
4197
4288
  }
4198
- const loaded = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) ? this.reactRenderer = await import("./renderer/react/server.cjs") : _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
4199
- _chunkBCTHOQPPcjs.resolveFarmRendererModule.call(void 0,
4289
+ const loaded = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer) ? this.reactRenderer = await import("./renderer/react/server.cjs") : _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
4290
+ _chunk3OKSEJ33cjs.resolveFarmRendererModule.call(void 0,
4200
4291
  this.config.root || process.cwd(),
4201
4292
  this.config.renderer.server
4202
4293
  )
4203
4294
  ).href);
4204
4295
  const runtime = loaded;
4205
- _chunkBCTHOQPPcjs.assertFarmRendererServerModule.call(void 0, runtime, this.config.renderer);
4206
- _chunkBCTHOQPPcjs.assertFarmRendererStreamingRuntime.call(void 0,
4296
+ _chunk3OKSEJ33cjs.assertFarmRendererServerModule.call(void 0, runtime, this.config.renderer);
4297
+ _chunk3OKSEJ33cjs.assertFarmRendererStreamingRuntime.call(void 0,
4207
4298
  this.config.renderer.name,
4208
4299
  this.config.renderer,
4209
4300
  runtime,
4210
4301
  "node"
4211
4302
  );
4212
4303
  this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
4213
- _optionalChain([this, 'access', _105 => _105.routeManager, 'access', _106 => _106.setRendererRuntime, 'optionalCall', _107 => _107(this.rendererRuntime)]);
4304
+ _optionalChain([this, 'access', _107 => _107.routeManager, 'access', _108 => _108.setRendererRuntime, 'optionalCall', _109 => _109(this.rendererRuntime)]);
4214
4305
  await this.applyRendererAppSetup();
4215
4306
  }
4216
4307
  /**
@@ -4219,7 +4310,7 @@ var ServerRenderer = class {
4219
4310
  * re-applied on the next request without restarting.
4220
4311
  */
4221
4312
  async applyRendererAppSetup() {
4222
- const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0,
4313
+ const appSetupPath = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup.call(void 0,
4223
4314
  this.config.root || process.cwd(),
4224
4315
  this.config.renderer
4225
4316
  );
@@ -4280,7 +4371,7 @@ var ServerRenderer = class {
4280
4371
  /// Stylesheets the app imported through JS (fontsource packages, component
4281
4372
  /// CSS) that the document must link alongside globals.css — see #658.
4282
4373
  collectDevStyleHrefs() {
4283
- const graph = _optionalChain([this, 'access', _108 => _108.viteServer, 'optionalAccess', _109 => _109.moduleGraph]);
4374
+ const graph = _optionalChain([this, 'access', _110 => _110.viteServer, 'optionalAccess', _111 => _111.moduleGraph]);
4284
4375
  if (!graph) return [];
4285
4376
  return collectDevStylesheetUrls(
4286
4377
  graph.idToModuleMap.values(),
@@ -4331,7 +4422,7 @@ var ServerRenderer = class {
4331
4422
  "data-farm-layout-boundary": "true",
4332
4423
  "data-farm-layout-pattern": pattern,
4333
4424
  ...segment ? { "data-farm-layout-key": segment.key } : {},
4334
- ..._optionalChain([segment, 'optionalAccess', _110 => _110.kept]) ? { "data-farm-layout-kept": "true" } : {},
4425
+ ..._optionalChain([segment, 'optionalAccess', _112 => _112.kept]) ? { "data-farm-layout-kept": "true" } : {},
4335
4426
  style: { display: "contents" }
4336
4427
  },
4337
4428
  layoutElement
@@ -4362,10 +4453,10 @@ var ServerRenderer = class {
4362
4453
  return serverTree && this.rendererRuntime.renderServerTreePage ? this.rendererRuntime.renderServerTreePage(element, { values: false }) : this.rendererRuntime.isolateServerPageGraph(element);
4363
4454
  }
4364
4455
  async renderElementToCompleteHTML(element, options = {}) {
4365
- const streaming = _chunkBCTHOQPPcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4456
+ const streaming = _chunk3OKSEJ33cjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4366
4457
  const renderToPipeableStream = streaming.node ? this.rendererRuntime.renderToPipeableStream : void 0;
4367
4458
  if (renderToPipeableStream) {
4368
- const inlineBoundaries = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer);
4459
+ const inlineBoundaries = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer);
4369
4460
  return await new Promise((resolve3, reject) => {
4370
4461
  const chunks = [];
4371
4462
  let shellReady = false;
@@ -4411,7 +4502,7 @@ var ServerRenderer = class {
4411
4502
  element,
4412
4503
  rendererRenderOptions()
4413
4504
  );
4414
- return await _chunkBCTHOQPPcjs.readFarmRendererWebStream.call(void 0, stream);
4505
+ return await _chunk3OKSEJ33cjs.readFarmRendererWebStream.call(void 0, stream);
4415
4506
  }
4416
4507
  return await this.rendererRuntime.renderToString(element, rendererRenderOptions());
4417
4508
  }
@@ -4427,7 +4518,7 @@ var ServerRenderer = class {
4427
4518
  );
4428
4519
  return { html: rendered.html, head: rendered.head || "" };
4429
4520
  }
4430
- const { head, body } = _chunkNEKO3HM2cjs.takeFarmHoistedHead.call(void 0,
4521
+ const { head, body } = _chunk4B6YJ5DScjs.takeFarmHoistedHead.call(void 0,
4431
4522
  await this.renderElementToCompleteHTML(element, options),
4432
4523
  true
4433
4524
  );
@@ -4435,7 +4526,7 @@ var ServerRenderer = class {
4435
4526
  }
4436
4527
  /** Islands mode sends large prop values once, keyed by content (RFC 0003). */
4437
4528
  islandValues() {
4438
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _111 => _111.config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverComponents])) === "islands";
4529
+ return _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _113 => _113.config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands";
4439
4530
  }
4440
4531
  /**
4441
4532
  * The page's element. Only React renders an async component, so for any other renderer Farm
@@ -4444,7 +4535,7 @@ var ServerRenderer = class {
4444
4535
  */
4445
4536
  async createPageElement(PageComponent, pageProps) {
4446
4537
  const runtime = this.rendererRuntime;
4447
- if (_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) || typeof PageComponent !== "function" || _optionalChain([PageComponent, 'access', _114 => _114.constructor, 'optionalAccess', _115 => _115.name]) !== "AsyncFunction") {
4538
+ if (_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer) || typeof PageComponent !== "function" || _optionalChain([PageComponent, 'access', _116 => _116.constructor, 'optionalAccess', _117 => _117.name]) !== "AsyncFunction") {
4448
4539
  return runtime.createElement(PageComponent, pageProps);
4449
4540
  }
4450
4541
  const result = await PageComponent(pageProps);
@@ -4543,7 +4634,7 @@ var ServerRenderer = class {
4543
4634
  rejectLateRedirects: true
4544
4635
  }
4545
4636
  );
4546
- return fragmentTag ? _chunkNEKO3HM2cjs.takeFarmNavigationOutlet.call(void 0, html, fragmentTag) : html;
4637
+ return fragmentTag ? _chunk4B6YJ5DScjs.takeFarmNavigationOutlet.call(void 0, html, fragmentTag) : html;
4547
4638
  }
4548
4639
  /**
4549
4640
  * A built-in docs runtime page (`docs.entry`, no adapter) under layouts that hydrate, or whose
@@ -4553,7 +4644,7 @@ var ServerRenderer = class {
4553
4644
  * Any other docs response is sent as it is.
4554
4645
  */
4555
4646
  async wrapDocsResponseWithLayouts(request2, response) {
4556
- if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _116 => _116.headers, 'access', _117 => _117.get, 'call', _118 => _118("content-type"), 'optionalAccess', _119 => _119.toLowerCase, 'call', _120 => _120(), 'access', _121 => _121.includes, 'call', _122 => _122("text/html")])) {
4647
+ if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _118 => _118.headers, 'access', _119 => _119.get, 'call', _120 => _120("content-type"), 'optionalAccess', _121 => _121.toLowerCase, 'call', _122 => _122(), 'access', _123 => _123.includes, 'call', _124 => _124("text/html")])) {
4557
4648
  return response;
4558
4649
  }
4559
4650
  await this.initialize();
@@ -4568,14 +4659,14 @@ var ServerRenderer = class {
4568
4659
  return {
4569
4660
  pattern: layout.pattern,
4570
4661
  modulePath: layout.modulePath,
4571
- shouldHydrate: _optionalChain([entry, 'optionalAccess', _123 => _123.shouldHydrate]) === true,
4572
- islandStrategy: _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _124 => _124.islandStrategy]), () => ( null)),
4573
- hasIsolatedClientBoundaries: _optionalChain([entry, 'optionalAccess', _125 => _125.hasIsolatedClientBoundaries]) === true,
4574
- serverTree: _optionalChain([entry, 'optionalAccess', _126 => _126.serverTree]) === true,
4575
- islands: _optionalChain([entry, 'optionalAccess', _127 => _127.hasIsolatedClientBoundaries]) === true
4662
+ shouldHydrate: _optionalChain([entry, 'optionalAccess', _125 => _125.shouldHydrate]) === true,
4663
+ islandStrategy: _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _126 => _126.islandStrategy]), () => ( null)),
4664
+ hasIsolatedClientBoundaries: _optionalChain([entry, 'optionalAccess', _127 => _127.hasIsolatedClientBoundaries]) === true,
4665
+ serverTree: _optionalChain([entry, 'optionalAccess', _128 => _128.serverTree]) === true,
4666
+ islands: _optionalChain([entry, 'optionalAccess', _129 => _129.hasIsolatedClientBoundaries]) === true
4576
4667
  };
4577
4668
  });
4578
- if (!_chunkNEKO3HM2cjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
4669
+ if (!_chunk4B6YJ5DScjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
4579
4670
  const shouldHydrateLayout = layouts.some((layout) => layout.shouldHydrate);
4580
4671
  const hasIsolatedClientBoundaries = layouts.some(
4581
4672
  (layout) => layout.hasIsolatedClientBoundaries
@@ -4594,10 +4685,10 @@ var ServerRenderer = class {
4594
4685
  );
4595
4686
  const treeLayouts = layouts.map((layout, index) => ({
4596
4687
  ...layout,
4597
- Component: _optionalChain([modules, 'access', _128 => _128[index], 'optionalAccess', _129 => _129.default])
4688
+ Component: _optionalChain([modules, 'access', _130 => _130[index], 'optionalAccess', _131 => _131.default])
4598
4689
  }));
4599
- const islandStrategy = _chunkNEKO3HM2cjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
4600
- const tree = await _chunkNEKO3HM2cjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
4690
+ const islandStrategy = _chunk4B6YJ5DScjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
4691
+ const tree = await _chunk4B6YJ5DScjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
4601
4692
  pageHtml: bodyMatch[2],
4602
4693
  layouts: treeLayouts,
4603
4694
  params: matched.params,
@@ -4618,7 +4709,7 @@ var ServerRenderer = class {
4618
4709
  )
4619
4710
  )
4620
4711
  );
4621
- const rootMarkup = _chunkNEKO3HM2cjs.placeFarmDocsLayoutRoot.call(void 0, rendered.html);
4712
+ const rootMarkup = _chunk4B6YJ5DScjs.placeFarmDocsLayoutRoot.call(void 0, rendered.html);
4622
4713
  const clientLayouts = layouts.map((layout) => ({
4623
4714
  pattern: layout.pattern,
4624
4715
  modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, root),
@@ -4660,7 +4751,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4660
4751
  const head = [
4661
4752
  ...this.collectDevStyleLinks(),
4662
4753
  `<script type="module" src="/@vite/client"></script>`,
4663
- source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _130 => _130.rendererRuntime, 'access', _131 => _131.generateHydrationScript, 'optionalCall', _132 => _132()]),
4754
+ source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _132 => _132.rendererRuntime, 'access', _133 => _133.generateHydrationScript, 'optionalCall', _134 => _134()]),
4664
4755
  bootstrapScript
4665
4756
  ].filter(Boolean).map((markup) => _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, markup)).concat(rendered.head || []).join("\n ");
4666
4757
  const clientScript = source.includes('src="/@farm/client.js"') ? "" : `
@@ -4679,7 +4770,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4679
4770
  async runWithRequestContext(request2, fn) {
4680
4771
  return _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0,
4681
4772
  request2,
4682
- () => _optionalChain([this, 'access', _133 => _133.i18nRuntime, 'optionalAccess', _134 => _134.config, 'access', _135 => _135.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4773
+ () => _optionalChain([this, 'access', _135 => _135.i18nRuntime, 'optionalAccess', _136 => _136.config, 'access', _137 => _137.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4683
4774
  redirect: false
4684
4775
  }) : fn()
4685
4776
  );
@@ -4710,7 +4801,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4710
4801
  * Check if a path should be served from SSG cache
4711
4802
  */
4712
4803
  async shouldServeSSG(pathname) {
4713
- const ssgPage = _chunkVMBIKDKWcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4804
+ const ssgPage = _chunkL3BSHASBcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4714
4805
  if (!ssgPage) return null;
4715
4806
  const cached = await this.getCachedSSGPage(pathname);
4716
4807
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -4828,7 +4919,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4828
4919
  setImmediate(async () => {
4829
4920
  try {
4830
4921
  const mod = await this.routeManager.loadRouteModule(page.filePath);
4831
- if (!_optionalChain([mod, 'optionalAccess', _136 => _136.default])) return;
4922
+ if (!_optionalChain([mod, 'optionalAccess', _138 => _138.default])) return;
4832
4923
  const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
4833
4924
  const layoutModules = await Promise.all(
4834
4925
  layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
@@ -4842,7 +4933,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4842
4933
  };
4843
4934
  let pageElement = await this.createPageElement(PageComponent, pageProps);
4844
4935
  const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
4845
- (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _137 => _137.pattern])
4936
+ (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _139 => _139.pattern])
4846
4937
  ), () => ( {
4847
4938
  shouldHydrate: false,
4848
4939
  islandStrategy: null
@@ -4950,7 +5041,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4950
5041
  * such as a partial test double, has none.
4951
5042
  */
4952
5043
  publishSearchPreserveRoutes() {
4953
- _chunkWKVYF2B5cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _138 => _138.routeManager, 'access', _139 => _139.getSearchPreserveRoutes, 'optionalCall', _140 => _140()]), () => ( [])));
5044
+ _chunkWKVYF2B5cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _140 => _140.routeManager, 'access', _141 => _141.getSearchPreserveRoutes, 'optionalCall', _142 => _142()]), () => ( [])));
4954
5045
  }
4955
5046
  async renderPage(req, res) {
4956
5047
  await this.initialize();
@@ -4966,7 +5057,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4966
5057
  }
4967
5058
  const request2 = this.createPageRequest(req, res);
4968
5059
  const runtime = this.i18nRuntime;
4969
- if (_optionalChain([runtime, 'optionalAccess', _141 => _141.config, 'access', _142 => _142.enabled])) {
5060
+ if (_optionalChain([runtime, 'optionalAccess', _143 => _143.config, 'access', _144 => _144.enabled])) {
4970
5061
  const resolution = runtime.resolveRequest(request2);
4971
5062
  const varyHeaders = _chunk7Q2YWZF7cjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
4972
5063
  for (const header of varyHeaders) appendResponseVary(res, header);
@@ -5005,7 +5096,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5005
5096
  createPageRequestOnce(req, res) {
5006
5097
  const observable = typeof req.once === "function" && typeof res.once === "function";
5007
5098
  return _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5008
- trustProxy: _optionalChain([this, 'access', _143 => _143.config, 'access', _144 => _144.server, 'optionalAccess', _145 => _145.trustProxy]),
5099
+ trustProxy: _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.server, 'optionalAccess', _147 => _147.trustProxy]),
5009
5100
  signal: observable ? _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0,
5010
5101
  req,
5011
5102
  res
@@ -5035,7 +5126,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5035
5126
  };
5036
5127
  let pprShellWrite;
5037
5128
  try {
5038
- const url = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _146 => _146.config, 'access', _147 => _147.server, 'optionalAccess', _148 => _148.trustProxy]) });
5129
+ const url = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.server, 'optionalAccess', _150 => _150.trustProxy]) });
5039
5130
  pathname = url.pathname;
5040
5131
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
5041
5132
  searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
@@ -5198,11 +5289,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5198
5289
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
5199
5290
  error
5200
5291
  };
5201
- if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _149 => _149.notFound])) {
5292
+ if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _151 => _151.notFound])) {
5202
5293
  res.statusCode = 404;
5203
5294
  PageComponent = programmaticRouteComponents.notFound;
5204
5295
  pageProps = routeStateProps;
5205
- } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _150 => _150.error])) {
5296
+ } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _152 => _152.error])) {
5206
5297
  res.statusCode = 500;
5207
5298
  PageComponent = programmaticRouteComponents.error;
5208
5299
  pageProps = routeStateProps;
@@ -5210,10 +5301,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5210
5301
  throw error;
5211
5302
  }
5212
5303
  }
5213
- const renderingConfig = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5304
+ const renderingConfig = await _chunkL3BSHASBcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5214
5305
  routeModule,
5215
5306
  route.modulePath,
5216
- { experimentalPPR: _optionalChain([this, 'access', _151 => _151.config, 'access', _152 => _152.experimental, 'optionalAccess', _153 => _153.ppr]) === true }
5307
+ { experimentalPPR: _optionalChain([this, 'access', _153 => _153.config, 'access', _154 => _154.experimental, 'optionalAccess', _155 => _155.ppr]) === true }
5217
5308
  );
5218
5309
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
5219
5310
  const islandsNavigationRequest = Boolean(
@@ -5224,7 +5315,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5224
5315
  let pprShellOptions = canCachePPRShell ? {
5225
5316
  pathname,
5226
5317
  search: url.search,
5227
- locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _154 => _154.locale]), () => ( "")),
5318
+ locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _156 => _156.locale]), () => ( "")),
5228
5319
  origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
5229
5320
  revalidate: renderingConfig.revalidate
5230
5321
  } : void 0;
@@ -5302,7 +5393,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5302
5393
  const routeManifestEntry = routeManifest.routes.find(
5303
5394
  (entry) => entry.pattern === route.pattern
5304
5395
  );
5305
- const moduleMetadata = routeManifestEntry || _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5396
+ const moduleMetadata = routeManifestEntry || _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5306
5397
  const isClientComponent = moduleMetadata.isClientComponent;
5307
5398
  const renderedRouteSlots = await Promise.all(
5308
5399
  routeSlots.map(async (slot) => {
@@ -5353,20 +5444,20 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5353
5444
  if (moduleMetadata.suppressedAsyncHydration) {
5354
5445
  warnSuppressedAsyncHydrationOnce(
5355
5446
  route.modulePath,
5356
- _optionalChain([routeManifestEntry, 'optionalAccess', _155 => _155.suppressedAsyncHydrationReason])
5447
+ _optionalChain([routeManifestEntry, 'optionalAccess', _157 => _157.suppressedAsyncHydrationReason])
5357
5448
  );
5358
5449
  }
5359
5450
  const layoutHydrationMetadata = layouts.map((layout) => {
5360
5451
  const manifestEntry = routeManifest.layouts.find(
5361
5452
  (entry) => entry.pattern === layout.pattern
5362
5453
  );
5363
- if (_optionalChain([manifestEntry, 'optionalAccess', _156 => _156.suppressedAsyncHydration])) {
5454
+ if (_optionalChain([manifestEntry, 'optionalAccess', _158 => _158.suppressedAsyncHydration])) {
5364
5455
  warnSuppressedAsyncHydrationOnce(
5365
5456
  layout.modulePath,
5366
5457
  manifestEntry.suppressedAsyncHydrationReason
5367
5458
  );
5368
5459
  }
5369
- if (typeof _optionalChain([manifestEntry, 'optionalAccess', _157 => _157.shouldHydrate]) === "boolean") {
5460
+ if (typeof _optionalChain([manifestEntry, 'optionalAccess', _159 => _159.shouldHydrate]) === "boolean") {
5370
5461
  return {
5371
5462
  isClientComponent: manifestEntry.isClientComponent === true,
5372
5463
  shouldHydrate: manifestEntry.shouldHydrate,
@@ -5387,11 +5478,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5387
5478
  const clientLayouts = layouts.map((layout, index) => ({
5388
5479
  pattern: layout.pattern,
5389
5480
  modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
5390
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _158 => _158[index], 'optionalAccess', _159 => _159.shouldHydrate]) === true,
5391
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _160 => _160[index], 'optionalAccess', _161 => _161.islandStrategy]), () => ( null)),
5392
- ..._optionalChain([layoutHydrationMetadata, 'access', _162 => _162[index], 'optionalAccess', _163 => _163.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
5481
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _160 => _160[index], 'optionalAccess', _161 => _161.shouldHydrate]) === true,
5482
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _162 => _162[index], 'optionalAccess', _163 => _163.islandStrategy]), () => ( null)),
5483
+ ..._optionalChain([layoutHydrationMetadata, 'access', _164 => _164[index], 'optionalAccess', _165 => _165.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
5393
5484
  // Islands mode: the browser rebuilds this layout from its tree, not its module.
5394
- ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _164 => _164[index], 'optionalAccess', _165 => _165.serverTree]) === true ? { serverTree: true } : {}
5485
+ ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _166 => _166[index], 'optionalAccess', _167 => _167.serverTree]) === true ? { serverTree: true } : {}
5395
5486
  }));
5396
5487
  const hydrationStrategies = [
5397
5488
  ...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
@@ -5405,9 +5496,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5405
5496
  layouts.map((layout, index) => ({
5406
5497
  pattern: layout.pattern,
5407
5498
  modulePath: layout.modulePath,
5408
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _166 => _166[index], 'optionalAccess', _167 => _167.shouldHydrate]) === true,
5409
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _168 => _168[index], 'optionalAccess', _169 => _169.hasIsolatedClientBoundaries]) === true,
5410
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _170 => _170[index], 'optionalAccess', _171 => _171.islandStrategy]), () => ( null))
5499
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _168 => _168[index], 'optionalAccess', _169 => _169.shouldHydrate]) === true,
5500
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _170 => _170[index], 'optionalAccess', _171 => _171.hasIsolatedClientBoundaries]) === true,
5501
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _172 => _172[index], 'optionalAccess', _173 => _173.islandStrategy]), () => ( null))
5411
5502
  })),
5412
5503
  this.config.root || process.cwd(),
5413
5504
  true
@@ -5415,10 +5506,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5415
5506
  const hasHydratableRouteSlots = renderedRouteSlots.some(
5416
5507
  (slot) => slot.isClientComponent || slot.shouldHydrate
5417
5508
  );
5418
- const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _172 => _172.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5509
+ const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _174 => _174.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5419
5510
  req.__FARM_PAGE_PATH__ = route.modulePath;
5420
5511
  req.__FARM_ROUTE__ = pathname;
5421
- req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _173 => _173[0], 'optionalAccess', _174 => _174.modulePath]);
5512
+ req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _175 => _175[0], 'optionalAccess', _176 => _176.modulePath]);
5422
5513
  req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
5423
5514
  req.__FARM_PAGE_SHOULD_HYDRATE__ = shouldHydrate;
5424
5515
  req.__FARM_LAYOUT_SHOULD_HYDRATE__ = shouldHydrateLayout;
@@ -5429,7 +5520,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5429
5520
  req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
5430
5521
  req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
5431
5522
  req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
5432
- req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _175 => _175.modulePath]) ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5523
+ req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _177 => _177.modulePath]) ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5433
5524
  req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
5434
5525
  name: slot.name,
5435
5526
  ownerPattern: slot.ownerPattern,
@@ -5501,7 +5592,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5501
5592
  } else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
5502
5593
  pageElement = await this.isolateServerPage(
5503
5594
  pageElement,
5504
- _optionalChain([routeManifestEntry, 'optionalAccess', _176 => _176.serverTree]) === true
5595
+ _optionalChain([routeManifestEntry, 'optionalAccess', _178 => _178.serverTree]) === true
5505
5596
  );
5506
5597
  }
5507
5598
  pageElement = await this.createPageBoundary(pageElement, {
@@ -5516,7 +5607,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5516
5607
  if (keptLayouts > 0 && !layouts.slice(0, keptLayouts).every((layout) => canFarmSkipKeptLayoutRender(layout.modulePath, keptRoot))) {
5517
5608
  let keptElement = null;
5518
5609
  for (let i = keptLayouts - 1; i >= 0; i--) {
5519
- const KeptLayout = _optionalChain([layoutModules, 'access', _177 => _177[i], 'optionalAccess', _178 => _178.default]);
5610
+ const KeptLayout = _optionalChain([layoutModules, 'access', _179 => _179[i], 'optionalAccess', _180 => _180.default]);
5520
5611
  if (KeptLayout) {
5521
5612
  keptElement = this.rendererRuntime.createElement(KeptLayout, {
5522
5613
  children: keptElement,
@@ -5569,7 +5660,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5569
5660
  );
5570
5661
  slotProps[slot.name] = slotElement;
5571
5662
  }
5572
- wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _179 => _179[i], 'optionalAccess', _180 => _180.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5663
+ wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _181 => _181[i], 'optionalAccess', _182 => _182.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5573
5664
  LayoutComponent,
5574
5665
  { params },
5575
5666
  { children: wrappedElement, ...slotProps },
@@ -5712,7 +5803,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5712
5803
  }
5713
5804
  }
5714
5805
  emitFarmRenderError(req, pathname, error);
5715
- const errorStatus = _chunkNEKO3HM2cjs.resolveDefaultErrorStatus.call(void 0, error);
5806
+ const errorStatus = _chunk4B6YJ5DScjs.resolveDefaultErrorStatus.call(void 0, error);
5716
5807
  if (pprRefreshRoute) {
5717
5808
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
5718
5809
  type: "ppr.refresh.error",
@@ -5747,7 +5838,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5747
5838
  }
5748
5839
  await this.renderError(req, res, error, errorStatus);
5749
5840
  } finally {
5750
- _optionalChain([pprShellWrite, 'optionalAccess', _181 => _181.release, 'call', _182 => _182()]);
5841
+ _optionalChain([pprShellWrite, 'optionalAccess', _183 => _183.release, 'call', _184 => _184()]);
5751
5842
  }
5752
5843
  }
5753
5844
  async wrapWithIntegrationProviders(element) {
@@ -5756,13 +5847,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5756
5847
  for (let i = providers.length - 1; i >= 0; i--) {
5757
5848
  const provider = providers[i];
5758
5849
  if (provider.component || provider.type === "clerk") {
5759
- const rendererCapabilities = _chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
5850
+ const rendererCapabilities = _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
5760
5851
  if (!rendererCapabilities.functionComponents) {
5761
5852
  throw new Error(
5762
- `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _183 => _183.config, 'access', _184 => _184.renderer, 'optionalAccess', _185 => _185.name]), () => ( "the configured renderer"))}\` cannot.`
5853
+ `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _185 => _185.config, 'access', _186 => _186.renderer, 'optionalAccess', _187 => _187.name]), () => ( "the configured renderer"))}\` cannot.`
5763
5854
  );
5764
5855
  }
5765
- if (provider.type === "clerk" && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer)) {
5856
+ if (provider.type === "clerk" && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer)) {
5766
5857
  throw new Error(
5767
5858
  `Integration provider \`${provider.name}\` uses Clerk's React components, which require the React renderer.`
5768
5859
  );
@@ -5798,7 +5889,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5798
5889
  }
5799
5890
  if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
5800
5891
  _nullishCoalesce(providerSourceModule, () => ( "")),
5801
- _chunkBCTHOQPPcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _186 => _186.config, 'access', _187 => _187.renderer, 'optionalAccess', _188 => _188.componentExtensions]))
5892
+ _chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _188 => _188.config, 'access', _189 => _189.renderer, 'optionalAccess', _190 => _190.componentExtensions]))
5802
5893
  )) {
5803
5894
  ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
5804
5895
  }
@@ -5927,7 +6018,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5927
6018
  );
5928
6019
  }
5929
6020
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5930
- trustProxy: _optionalChain([this, 'access', _189 => _189.config, 'access', _190 => _190.server, 'optionalAccess', _191 => _191.trustProxy])
6021
+ trustProxy: _optionalChain([this, 'access', _191 => _191.config, 'access', _192 => _192.server, 'optionalAccess', _193 => _193.trustProxy])
5931
6022
  });
5932
6023
  const url = new URL(request2.url);
5933
6024
  const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
@@ -5945,7 +6036,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5945
6036
  origin: await this.getAgentOrigin(request2),
5946
6037
  readMarkdown: llmsContext.markdown
5947
6038
  }) : value;
5948
- const response = _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
6039
+ const response = _chunk4B6YJ5DScjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5949
6040
  method,
5950
6041
  request: request2
5951
6042
  });
@@ -5963,7 +6054,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5963
6054
  }
5964
6055
  /** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
5965
6056
  getGeneratedLlmsKind(pathname) {
5966
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _192 => _192.config, 'access', _193 => _193.agent, 'optionalAccess', _194 => _194.llmsTxt]));
6057
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _194 => _194.config, 'access', _195 => _195.agent, 'optionalAccess', _196 => _196.llmsTxt]));
5967
6058
  if (!config.enabled) return null;
5968
6059
  if (pathname === "/llms.txt") return "llms";
5969
6060
  return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
@@ -5971,9 +6062,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5971
6062
  async renderGeneratedLlmsTxt(req, res, kind) {
5972
6063
  try {
5973
6064
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5974
- trustProxy: _optionalChain([this, 'access', _195 => _195.config, 'access', _196 => _196.server, 'optionalAccess', _197 => _197.trustProxy])
6065
+ trustProxy: _optionalChain([this, 'access', _197 => _197.config, 'access', _198 => _198.server, 'optionalAccess', _199 => _199.trustProxy])
5975
6066
  });
5976
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _198 => _198.config, 'access', _199 => _199.agent, 'optionalAccess', _200 => _200.llmsTxt]));
6067
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _200 => _200.config, 'access', _201 => _201.agent, 'optionalAccess', _202 => _202.llmsTxt]));
5977
6068
  const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
5978
6069
  const body = kind === "llms-full" ? await _chunkOLKYHTLNcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
5979
6070
  origin: await this.getAgentOrigin(request2),
@@ -5981,7 +6072,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5981
6072
  }) : context.defaults;
5982
6073
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5983
6074
  res,
5984
- _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0,
6075
+ _chunk4B6YJ5DScjs.createFarmMetadataRouteResponse.call(void 0,
5985
6076
  kind,
5986
6077
  body,
5987
6078
  { revalidate: config.revalidate },
@@ -6000,23 +6091,23 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6000
6091
  }
6001
6092
  }
6002
6093
  getAgentCrawlers() {
6003
- return _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _201 => _201.config, 'access', _202 => _202.agent, 'optionalAccess', _203 => _203.crawlers]));
6094
+ return _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _203 => _203.config, 'access', _204 => _204.agent, 'optionalAccess', _205 => _205.crawlers]));
6004
6095
  }
6005
6096
  /** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
6006
6097
  async renderGeneratedRobotsTxt(req, res) {
6007
6098
  try {
6008
- const sitemapPath = _optionalChain([this, 'access', _204 => _204.routeManager, 'access', _205 => _205.matchMetadataRoute, 'call', _206 => _206("/sitemap.xml"), 'optionalAccess', _207 => _207.metadata, 'access', _208 => _208.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
6099
+ const sitemapPath = _optionalChain([this, 'access', _206 => _206.routeManager, 'access', _207 => _207.matchMetadataRoute, 'call', _208 => _208("/sitemap.xml"), 'optionalAccess', _209 => _209.metadata, 'access', _210 => _210.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
6009
6100
  const rootLayout = this.routeManager.getLayouts().get("/");
6010
6101
  const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
6011
6102
  const robots = _chunkEACD6ND7cjs.createFarmAgentRobots.call(void 0, {
6012
6103
  crawlers: this.getAgentCrawlers(),
6013
6104
  sitemapPath,
6014
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _209 => _209.metadataBase]),
6105
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _211 => _211.metadataBase]),
6015
6106
  basePath: this.config.basePath
6016
6107
  });
6017
6108
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
6018
6109
  res,
6019
- _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
6110
+ _chunk4B6YJ5DScjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
6020
6111
  );
6021
6112
  } catch (error) {
6022
6113
  _chunk7U4XF76Rcjs.logger.error(`Generated robots.txt failed: ${error}`);
@@ -6030,13 +6121,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6030
6121
  }
6031
6122
  }
6032
6123
  getAgentSitemap() {
6033
- return _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _210 => _210.config, 'access', _211 => _211.agent, 'optionalAccess', _212 => _212.sitemap]));
6124
+ return _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _212 => _212.config, 'access', _213 => _213.agent, 'optionalAccess', _214 => _214.sitemap]));
6034
6125
  }
6035
6126
  /** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
6036
6127
  async renderGeneratedSitemap(req, res) {
6037
6128
  try {
6038
6129
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
6039
- trustProxy: _optionalChain([this, 'access', _213 => _213.config, 'access', _214 => _214.server, 'optionalAccess', _215 => _215.trustProxy])
6130
+ trustProxy: _optionalChain([this, 'access', _215 => _215.config, 'access', _216 => _216.server, 'optionalAccess', _217 => _217.trustProxy])
6040
6131
  });
6041
6132
  const sources = await Promise.all(
6042
6133
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -6047,8 +6138,8 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6047
6138
  }),
6048
6139
  fs7.promises.stat(route.modulePath).catch(() => void 0)
6049
6140
  ]);
6050
- if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _216 => _216.metadata]))) return null;
6051
- return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _217 => _217.mtime, 'access', _218 => _218.toISOString, 'call', _219 => _219()]) };
6141
+ if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _218 => _218.metadata]))) return null;
6142
+ return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _219 => _219.mtime, 'access', _220 => _220.toISOString, 'call', _221 => _221()]) };
6052
6143
  })
6053
6144
  );
6054
6145
  const rootLayout = this.routeManager.getLayouts().get("/");
@@ -6058,15 +6149,15 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6058
6149
  {
6059
6150
  origin: new URL(request2.url).origin,
6060
6151
  config: this.getAgentSitemap(),
6061
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _220 => _220.metadataBase]),
6152
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _222 => _222.metadataBase]),
6062
6153
  basePath: this.config.basePath,
6063
6154
  trailingSlash: this.config.trailingSlash,
6064
- i18n: _optionalChain([this, 'access', _221 => _221.i18nRuntime, 'optionalAccess', _222 => _222.config])
6155
+ i18n: _optionalChain([this, 'access', _223 => _223.i18nRuntime, 'optionalAccess', _224 => _224.config])
6065
6156
  }
6066
6157
  );
6067
6158
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
6068
6159
  res,
6069
- _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
6160
+ _chunk4B6YJ5DScjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
6070
6161
  );
6071
6162
  } catch (error) {
6072
6163
  _chunk7U4XF76Rcjs.logger.error(`Generated sitemap.xml failed: ${error}`);
@@ -6093,9 +6184,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6093
6184
  * matcher) covers, as the production build decides.
6094
6185
  */
6095
6186
  getAgentListedRoutes() {
6096
- const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _223 => _223.middlewareRoutes, 'optionalCall', _224 => _224()]), () => ( [])) };
6187
+ const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _225 => _225.middlewareRoutes, 'optionalCall', _226 => _226()]), () => ( [])) };
6097
6188
  return [...this.routeManager.getRoutes()].filter(
6098
- ([pattern]) => !pattern.includes("[") && !_chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
6189
+ ([pattern]) => !pattern.includes("[") && !_chunk4B6YJ5DScjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
6099
6190
  );
6100
6191
  }
6101
6192
  /**
@@ -6119,22 +6210,22 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6119
6210
  * or a registered server such as the docs engine's. Production applies the same rules.
6120
6211
  */
6121
6212
  getDefaultMCPServer() {
6122
- if (_optionalChain([this, 'access', _225 => _225.config, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.mcp]) !== true || _chunkW53Z4WDIcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
6123
- if (_optionalChain([this, 'access', _228 => _228.apiRouteExists, 'optionalCall', _229 => _229("/api/mcp")])) return void 0;
6213
+ if (_optionalChain([this, 'access', _227 => _227.config, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.mcp]) !== true || _chunkW53Z4WDIcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
6214
+ if (_optionalChain([this, 'access', _230 => _230.apiRouteExists, 'optionalCall', _231 => _231("/api/mcp")])) return void 0;
6124
6215
  if (this.routeManager.matchRoute(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
6125
6216
  _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0,
6126
6217
  readAppPackageIdentity(this.config.root),
6127
- _chunkJK26IMT7cjs.FARM_VERSION
6218
+ _chunkCVZY4TLWcjs.FARM_VERSION
6128
6219
  ))));
6129
6220
  return _chunkW53Z4WDIcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
6130
6221
  }
6131
6222
  async renderDefaultMCP(req, res) {
6132
6223
  const server = this.getDefaultMCPServer();
6133
- const request2 = _nullishCoalesce(_chunk2RSVYJT6cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _230 => _230.config, 'access', _231 => _231.server, 'optionalAccess', _232 => _232.trustProxy]) })));
6224
+ const request2 = _nullishCoalesce(_chunk2RSVYJT6cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _232 => _232.config, 'access', _233 => _233.server, 'optionalAccess', _234 => _234.trustProxy]) })));
6134
6225
  try {
6135
6226
  const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-IUL6OPC3.cjs");
6136
6227
  const origin = new URL(request2.url).origin;
6137
- const i18n = _optionalChain([this, 'access', _233 => _233.i18nRuntime, 'optionalAccess', _234 => _234.config]);
6228
+ const i18n = _optionalChain([this, 'access', _235 => _235.i18nRuntime, 'optionalAccess', _236 => _236.config]);
6138
6229
  const metadataBase = await this.getRootMetadataBase();
6139
6230
  const response = await handleFarmDefaultMCPRequest(request2, {
6140
6231
  server,
@@ -6182,7 +6273,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6182
6273
  }
6183
6274
  /** Same inputs the production server gives llms.txt: static pages and root metadata. */
6184
6275
  async createLlmsTxtContext(request2, options = {}) {
6185
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _235 => _235.config, 'access', _236 => _236.agent, 'optionalAccess', _237 => _237.llmsTxt]));
6276
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _237 => _237.config, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.llmsTxt]));
6186
6277
  const origin = await this.getAgentOrigin(request2);
6187
6278
  const sources = await Promise.all(
6188
6279
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -6208,7 +6299,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6208
6299
  include: config.include,
6209
6300
  exclude: config.exclude,
6210
6301
  trailingSlash: this.config.trailingSlash,
6211
- i18n: _optionalChain([this, 'access', _238 => _238.i18nRuntime, 'optionalAccess', _239 => _239.config])
6302
+ i18n: _optionalChain([this, 'access', _240 => _240.i18nRuntime, 'optionalAccess', _241 => _241.config])
6212
6303
  }
6213
6304
  );
6214
6305
  return {
@@ -6218,7 +6309,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6218
6309
  pages,
6219
6310
  config,
6220
6311
  rootMetadata,
6221
- mcp: _optionalChain([this, 'access', _240 => _240.config, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.aiCatalog]) === false ? [] : _chunkB2PGVHBGcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6312
+ mcp: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.aiCatalog]) === false ? [] : _chunk22BTYPIXcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6222
6313
  basePath: this.config.basePath,
6223
6314
  apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
6224
6315
  _chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
@@ -6248,7 +6339,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6248
6339
  async getRootMetadataBase() {
6249
6340
  const rootLayout = this.routeManager.getLayouts().get("/");
6250
6341
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
6251
- return _optionalChain([rootMetadata, 'optionalAccess', _243 => _243.metadataBase]);
6342
+ return _optionalChain([rootMetadata, 'optionalAccess', _245 => _245.metadataBase]);
6252
6343
  }
6253
6344
  /**
6254
6345
  * Reads page mirrors back through this dev server, the way its .md handler
@@ -6260,8 +6351,8 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6260
6351
  * body is discarded.
6261
6352
  */
6262
6353
  createDevMarkdownReader(req) {
6263
- const socket = _optionalChain([req, 'optionalAccess', _244 => _244.socket]);
6264
- if (_optionalChain([req, 'optionalAccess', _245 => _245.method, 'optionalAccess', _246 => _246.toUpperCase, 'call', _247 => _247()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _248 => _248.localAddress]) || !socket.localPort) {
6354
+ const socket = _optionalChain([req, 'optionalAccess', _246 => _246.socket]);
6355
+ if (_optionalChain([req, 'optionalAccess', _247 => _247.method, 'optionalAccess', _248 => _248.toUpperCase, 'call', _249 => _249()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _250 => _250.localAddress]) || !socket.localPort) {
6265
6356
  return async () => null;
6266
6357
  }
6267
6358
  if (socket.encrypted) {
@@ -6309,7 +6400,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6309
6400
  renderer: this.getMetadataImageRenderer(),
6310
6401
  component: isRendererCompiledComponent(
6311
6402
  options.image.modulePath,
6312
- _nullishCoalesce(_optionalChain([this, 'access', _249 => _249.config, 'access', _250 => _250.renderer, 'optionalAccess', _251 => _251.componentExtensions]), () => ( []))
6403
+ _nullishCoalesce(_optionalChain([this, 'access', _251 => _251.config, 'access', _252 => _252.renderer, 'optionalAccess', _253 => _253.componentExtensions]), () => ( []))
6313
6404
  )
6314
6405
  });
6315
6406
  await this.writeMetadataImageResponse(req, res, handlerResult, imageModule);
@@ -6325,7 +6416,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6325
6416
  }
6326
6417
  /** The renderer that draws a metadata image: none for React, whose elements Satori reads directly. */
6327
6418
  getMetadataImageRenderer() {
6328
- return _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime;
6419
+ return _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime;
6329
6420
  }
6330
6421
  async writeStaticMetadataImageResponse(req, res, image) {
6331
6422
  const method = (req.method || "GET").toUpperCase();
@@ -6337,7 +6428,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6337
6428
  }
6338
6429
  const etag = `"${image.staticInfo.hash}"`;
6339
6430
  const requestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
6340
- trustProxy: _optionalChain([this, 'access', _252 => _252.config, 'access', _253 => _253.server, 'optionalAccess', _254 => _254.trustProxy])
6431
+ trustProxy: _optionalChain([this, 'access', _254 => _254.config, 'access', _255 => _255.server, 'optionalAccess', _256 => _256.trustProxy])
6341
6432
  });
6342
6433
  const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
6343
6434
  res.setHeader("Content-Type", image.staticInfo.contentType);
@@ -6388,7 +6479,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6388
6479
  });
6389
6480
  let wrapped = errorElement;
6390
6481
  const boundaryLayouts = options.errorPattern === void 0 ? options.layouts : options.layouts.filter(
6391
- (layout) => !("pattern" in layout) || _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0,
6482
+ (layout) => !("pattern" in layout) || _chunk4B6YJ5DScjs.routeBoundaryCoversDirectory.call(void 0,
6392
6483
  layout.pattern,
6393
6484
  options.errorPattern
6394
6485
  )
@@ -6444,7 +6535,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6444
6535
  */
6445
6536
  renderPreHydrationHold(req, bootClient) {
6446
6537
  const hydrates = req.__FARM_IS_CLIENT_COMPONENT__ === true || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true;
6447
- return hydrates && !bootClient && !this.isIslandsOnlyPage(req) ? _chunkNEKO3HM2cjs.createPreHydrationClickQueueScript.call(void 0, ) : "";
6538
+ return hydrates && !bootClient && !this.isIslandsOnlyPage(req) ? _chunk4B6YJ5DScjs.createPreHydrationClickQueueScript.call(void 0, ) : "";
6448
6539
  }
6449
6540
  async renderBufferedSSR(element, req, res, clearMiddlewareData, options = {}) {
6450
6541
  const startedAt = Date.now();
@@ -6492,7 +6583,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6492
6583
  </script>`);
6493
6584
  const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
6494
6585
  const rendererHydrationScript = farmScripts(
6495
- _optionalChain([this, 'access', _255 => _255.rendererRuntime, 'access', _256 => _256.generateHydrationScript, 'optionalCall', _257 => _257()]) || ""
6586
+ _optionalChain([this, 'access', _257 => _257.rendererRuntime, 'access', _258 => _258.generateHydrationScript, 'optionalCall', _259 => _259()]) || ""
6496
6587
  );
6497
6588
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
6498
6589
  const farmClientScript = farmScripts(
@@ -6503,7 +6594,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6503
6594
  element,
6504
6595
  {
6505
6596
  rejectLateNavigation: _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0,
6506
- _optionalChain([req, 'access', _258 => _258.headers, 'optionalAccess', _259 => _259[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6597
+ _optionalChain([req, 'access', _260 => _260.headers, 'optionalAccess', _261 => _261[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6507
6598
  )
6508
6599
  }
6509
6600
  );
@@ -6515,7 +6606,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6515
6606
  viewport: viewportTags
6516
6607
  } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6517
6608
  pathname: getFarmMetadataPathname(req),
6518
- jsonLd: _optionalChain([this, 'access', _260 => _260.config, 'access', _261 => _261.agent, 'optionalAccess', _262 => _262.jsonLd])
6609
+ jsonLd: _optionalChain([this, 'access', _262 => _262.config, 'access', _263 => _263.agent, 'optionalAccess', _264 => _264.jsonLd])
6519
6610
  });
6520
6611
  const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
6521
6612
  const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
@@ -6525,19 +6616,19 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6525
6616
  i18nSnapshot,
6526
6617
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
6527
6618
  ) : "";
6528
- const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
6619
+ const themeDocument = _chunk4B6YJ5DScjs.createFarmThemeDocumentParts.call(void 0,
6529
6620
  this.config.theme,
6530
6621
  this.config.basePath,
6531
6622
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
6532
6623
  );
6533
6624
  themeDocument.head = farmScripts(themeDocument.head);
6534
- const fullDocument = _chunkNEKO3HM2cjs.extractFarmFullDocument.call(void 0, _chunkNEKO3HM2cjs.markFarmDocumentLayouts.call(void 0, content));
6625
+ const fullDocument = _chunk4B6YJ5DScjs.extractFarmFullDocument.call(void 0, _chunk4B6YJ5DScjs.markFarmDocumentLayouts.call(void 0, content));
6535
6626
  let html;
6536
6627
  if (fullDocument) {
6537
6628
  const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
6538
- const documentHtml = shouldReplaceLayoutTitle ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
6539
- const effectiveRendererHead = hasExplicitTitle ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
6540
- html = _chunkNEKO3HM2cjs.composeFarmFullDocument.call(void 0, documentHtml, {
6629
+ const documentHtml = shouldReplaceLayoutTitle ? _chunk4B6YJ5DScjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
6630
+ const effectiveRendererHead = hasExplicitTitle ? _chunk4B6YJ5DScjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
6631
+ html = _chunk4B6YJ5DScjs.composeFarmFullDocument.call(void 0, documentHtml, {
6541
6632
  fallbackIcon: !hasFavicon,
6542
6633
  viewport: viewportTags,
6543
6634
  htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
@@ -6564,7 +6655,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6564
6655
  });
6565
6656
  } else {
6566
6657
  html = `<!DOCTYPE html>
6567
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _263 => _263.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6658
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _265 => _265.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6568
6659
  <head>
6569
6660
  ${themeDocument.head}
6570
6661
  <meta charset="utf-8">
@@ -6596,7 +6687,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6596
6687
  const securedHtml = this.secureDocumentHTML(req, html);
6597
6688
  if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
6598
6689
  res.end();
6599
- if (!options.captureStaticShell) await _optionalChain([options, 'access', _264 => _264.onComplete, 'optionalCall', _265 => _265(securedHtml)]);
6690
+ if (!options.captureStaticShell) await _optionalChain([options, 'access', _266 => _266.onComplete, 'optionalCall', _267 => _267(securedHtml)]);
6600
6691
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
6601
6692
  type: "render.stream.complete",
6602
6693
  route,
@@ -6606,7 +6697,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6606
6697
  emitFarmRenderError(req, route, error);
6607
6698
  throw error;
6608
6699
  } finally {
6609
- _optionalChain([clearMiddlewareData, 'optionalCall', _266 => _266()]);
6700
+ _optionalChain([clearMiddlewareData, 'optionalCall', _268 => _268()]);
6610
6701
  }
6611
6702
  }
6612
6703
  /**
@@ -6616,11 +6707,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6616
6707
  * call (async, a class, or one using hooks) falls back to detection from the stream.
6617
6708
  */
6618
6709
  async rootLayoutRendersDocument(req) {
6619
- const modulePath = _nullishCoalesce(req.__FARM_ROOT_LAYOUT_PATH__, () => ( (typeof this.routeManager.getLayouts === "function" ? _optionalChain([this, 'access', _267 => _267.routeManager, 'access', _268 => _268.getLayouts, 'call', _269 => _269(), 'access', _270 => _270.get, 'call', _271 => _271("/"), 'optionalAccess', _272 => _272.modulePath]) : void 0)));
6710
+ const modulePath = _nullishCoalesce(req.__FARM_ROOT_LAYOUT_PATH__, () => ( (typeof this.routeManager.getLayouts === "function" ? _optionalChain([this, 'access', _269 => _269.routeManager, 'access', _270 => _270.getLayouts, 'call', _271 => _271(), 'access', _272 => _272.get, 'call', _273 => _273("/"), 'optionalAccess', _274 => _274.modulePath]) : void 0)));
6620
6711
  if (!modulePath) return false;
6621
6712
  try {
6622
6713
  const Layout = (await this.routeManager.loadLayoutModule(modulePath)).default;
6623
- if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _273 => _273.prototype, 'optionalAccess', _274 => _274.isReactComponent]) || _optionalChain([Layout, 'access', _275 => _275.constructor, 'optionalAccess', _276 => _276.name]) === "AsyncFunction") {
6714
+ if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _275 => _275.prototype, 'optionalAccess', _276 => _276.isReactComponent]) || _optionalChain([Layout, 'access', _277 => _277.constructor, 'optionalAccess', _278 => _278.name]) === "AsyncFunction") {
6624
6715
  return false;
6625
6716
  }
6626
6717
  const cached = documentLayouts.get(Layout);
@@ -6643,10 +6734,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6643
6734
  }
6644
6735
  async renderWithSSR(element, req, res, clearMiddlewareData, options = {}) {
6645
6736
  const runtime = this.rendererRuntime;
6646
- const renderToPipeableStream = _nullishCoalesce(runtime.renderToPipeableStream, () => ( (_chunkBCTHOQPPcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0)));
6737
+ const renderToPipeableStream = _nullishCoalesce(runtime.renderToPipeableStream, () => ( (_chunk3OKSEJ33cjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0)));
6647
6738
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6648
6739
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6649
- if (!renderToPipeableStream || _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _277 => _277.headers, 'optionalAccess', _278 => _278[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer))) {
6740
+ if (!renderToPipeableStream || _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _279 => _279.headers, 'optionalAccess', _280 => _280[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, this.config.renderer))) {
6650
6741
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
6651
6742
  }
6652
6743
  return new Promise((resolve3, reject) => {
@@ -6724,7 +6815,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6724
6815
  const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
6725
6816
  const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ) !== "mobile" && canBootFarmIslandsClient(this.config);
6726
6817
  const hydrationClickQueueScript = this.renderPreHydrationHold(req, bootClient);
6727
- const rendererHydrationScript = _optionalChain([this, 'access', _279 => _279.rendererRuntime, 'access', _280 => _280.generateHydrationScript, 'optionalCall', _281 => _281()]) || "";
6818
+ const rendererHydrationScript = _optionalChain([this, 'access', _281 => _281.rendererRuntime, 'access', _282 => _282.generateHydrationScript, 'optionalCall', _283 => _283()]) || "";
6728
6819
  const {
6729
6820
  title,
6730
6821
  tags: metaTags,
@@ -6733,7 +6824,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6733
6824
  viewport: viewportTags
6734
6825
  } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6735
6826
  pathname: getFarmMetadataPathname(req),
6736
- jsonLd: _optionalChain([this, 'access', _282 => _282.config, 'access', _283 => _283.agent, 'optionalAccess', _284 => _284.jsonLd])
6827
+ jsonLd: _optionalChain([this, 'access', _284 => _284.config, 'access', _285 => _285.agent, 'optionalAccess', _286 => _286.jsonLd])
6737
6828
  });
6738
6829
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
6739
6830
  const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
@@ -6742,7 +6833,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6742
6833
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
6743
6834
  ) : "";
6744
6835
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
6745
- const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
6836
+ const themeDocument = _chunk4B6YJ5DScjs.createFarmThemeDocumentParts.call(void 0,
6746
6837
  this.config.theme,
6747
6838
  this.config.basePath,
6748
6839
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
@@ -6761,7 +6852,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6761
6852
  formState: _chunkOZUINP2Pcjs.getFarmFormState.call(void 0, ),
6762
6853
  onShellReady() {
6763
6854
  if (pendingNavigationError) {
6764
- _optionalChain([abort, 'optionalCall', _285 => _285(pendingNavigationError)]);
6855
+ _optionalChain([abort, 'optionalCall', _287 => _287(pendingNavigationError)]);
6765
6856
  if (clearMiddlewareData) {
6766
6857
  clearMiddlewareData();
6767
6858
  }
@@ -6779,7 +6870,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6779
6870
  console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
6780
6871
  }
6781
6872
  const shell = `<!DOCTYPE html>
6782
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _286 => _286.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6873
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _288 => _288.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6783
6874
  <head>
6784
6875
  ${themeDocument.head}
6785
6876
  <meta charset="utf-8">
@@ -6801,14 +6892,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6801
6892
  let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
6802
6893
  let heldHead = "";
6803
6894
  const releaseShell = (complete) => {
6804
- const split = _chunkNEKO3HM2cjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6895
+ const split = _chunk4B6YJ5DScjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6805
6896
  if (!split) return null;
6806
- const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6807
- const opened = _chunkNEKO3HM2cjs.appendFarmHead.call(void 0, shellHead, split.head);
6897
+ const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunk4B6YJ5DScjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6898
+ const opened = _chunk4B6YJ5DScjs.appendFarmHead.call(void 0, shellHead, split.head);
6808
6899
  pendingShell = "";
6809
6900
  heldHead = "";
6810
6901
  htmlParts.push(opened);
6811
- _optionalChain([staticShellParts, 'optionalAccess', _287 => _287.push, 'call', _288 => _288(opened)]);
6902
+ _optionalChain([staticShellParts, 'optionalAccess', _289 => _289.push, 'call', _290 => _290(opened)]);
6812
6903
  res.write(opened);
6813
6904
  return split.body;
6814
6905
  };
@@ -6820,11 +6911,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6820
6911
  ${stampDocumentHTML(earlyClientScript)}`
6821
6912
  )
6822
6913
  } : document;
6823
- const documentTransform = streamDocument ? _chunkNEKO3HM2cjs.createFarmStreamedDocumentTransform.call(void 0,
6914
+ const documentTransform = streamDocument ? _chunk4B6YJ5DScjs.createFarmStreamedDocumentTransform.call(void 0,
6824
6915
  (opening) => withEarlyClient(
6825
- _chunkNEKO3HM2cjs.openFarmStreamedDocument.call(void 0,
6826
- _chunkNEKO3HM2cjs.markFarmDocumentLayouts.call(void 0,
6827
- hasExplicitTitle ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, opening) : opening
6916
+ _chunk4B6YJ5DScjs.openFarmStreamedDocument.call(void 0,
6917
+ _chunk4B6YJ5DScjs.markFarmDocumentLayouts.call(void 0,
6918
+ hasExplicitTitle ? _chunk4B6YJ5DScjs.removeFarmDocumentTitles.call(void 0, opening) : opening
6828
6919
  ),
6829
6920
  {
6830
6921
  fallbackIcon: !hasFavicon,
@@ -6865,7 +6956,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6865
6956
  const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
6866
6957
  if (!checkedFullDocument && renderedText) {
6867
6958
  documentPrefix += renderedText;
6868
- const prefix = _chunkNEKO3HM2cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6959
+ const prefix = _chunk4B6YJ5DScjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6869
6960
  if (prefix !== "pending") {
6870
6961
  checkedFullDocument = true;
6871
6962
  documentPrefix = "";
@@ -6884,7 +6975,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6884
6975
  staticShellClosed = true;
6885
6976
  if (!suspenseHoleEmitted) {
6886
6977
  suspenseHoleEmitted = true;
6887
- _optionalChain([options, 'access', _289 => _289.onSuspenseHoleDetected, 'optionalCall', _290 => _290()]);
6978
+ _optionalChain([options, 'access', _291 => _291.onSuspenseHoleDetected, 'optionalCall', _292 => _292()]);
6888
6979
  }
6889
6980
  } else {
6890
6981
  staticShellParts.push(chunkText);
@@ -6936,7 +7027,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6936
7027
  const body = releaseShell(true);
6937
7028
  if (body) {
6938
7029
  htmlParts.push(body);
6939
- _optionalChain([staticShellParts, 'optionalAccess', _291 => _291.push, 'call', _292 => _292(body)]);
7030
+ _optionalChain([staticShellParts, 'optionalAccess', _293 => _293.push, 'call', _294 => _294(body)]);
6940
7031
  res.write(body);
6941
7032
  }
6942
7033
  }
@@ -6968,8 +7059,8 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6968
7059
  recordRenderedChunk(tail, rewritten);
6969
7060
  if (tail) res.write(tail);
6970
7061
  }
6971
- const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _293 => _293.end, 'call', _294 => _294()]);
6972
- if (_optionalChain([documentEnd, 'optionalAccess', _295 => _295.text])) {
7062
+ const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _295 => _295.end, 'call', _296 => _296()]);
7063
+ if (_optionalChain([documentEnd, 'optionalAccess', _297 => _297.text])) {
6973
7064
  recordRenderedChunk(documentEnd.text, "");
6974
7065
  res.write(documentEnd.text);
6975
7066
  }
@@ -6980,7 +7071,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6980
7071
  deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
6981
7072
  earlyClient,
6982
7073
  // A full document: Farm's #root closes only where Farm opened it.
6983
- ..._optionalChain([documentEnd, 'optionalAccess', _296 => _296.document]) ? { closeRoot: documentEnd.rootOpened } : {}
7074
+ ..._optionalChain([documentEnd, 'optionalAccess', _298 => _298.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6984
7075
  })
6985
7076
  );
6986
7077
  htmlParts.push(footer);
@@ -7082,17 +7173,25 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7082
7173
  const snapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
7083
7174
  return snapshot && url.startsWith("/") && !url.startsWith("//") ? _chunkGYJT2U7Jcjs.localizeFarmHref.call(void 0, url, snapshot.locale, snapshot) : url;
7084
7175
  }
7176
+ /**
7177
+ * The not-found page the renderer's `routes()` mapped, or undefined when the renderer has no route
7178
+ * rules and the not-found lookup scans `src/app` as before.
7179
+ */
7180
+ getRendererNotFoundPath() {
7181
+ return _optionalChain([this, 'access', _299 => _299.config, 'access', _300 => _300.renderer, 'optionalAccess', _301 => _301.routes]) ? this.routeManager.getRendererNotFoundPath() : void 0;
7182
+ }
7085
7183
  /** The app's not-found component, or null when it relies on the built-in page. */
7086
7184
  async loadNotFoundModule() {
7087
7185
  const notFoundPath = resolveFarmNotFoundComponentPath(
7088
7186
  this.config,
7089
- _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config)
7187
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config),
7188
+ this.getRendererNotFoundPath()
7090
7189
  );
7091
7190
  if (!notFoundPath) return null;
7092
7191
  return await this.routeManager.loadRouteModule(notFoundPath);
7093
7192
  }
7094
7193
  async loadNotFoundComponent() {
7095
- return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _297 => _297.default]), async () => ( null));
7194
+ return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _302 => _302.default]), async () => ( null));
7096
7195
  }
7097
7196
  /** The not-found document's head: layout and not-found metadata, as production renders it. */
7098
7197
  async notFoundMetadataHead(layoutModule, notFoundModule) {
@@ -7115,13 +7214,13 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7115
7214
  */
7116
7215
  async createLateNavigationRecoveryHTML(req, error) {
7117
7216
  if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
7118
- return _chunkNEKO3HM2cjs.createLateRedirectRecovery.call(void 0,
7217
+ return _chunk4B6YJ5DScjs.createLateRedirectRecovery.call(void 0,
7119
7218
  this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
7120
7219
  this.getCspNonce(req) || ""
7121
7220
  );
7122
7221
  }
7123
7222
  const pathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7124
- trustProxy: _optionalChain([this, 'access', _298 => _298.config, 'access', _299 => _299.server, 'optionalAccess', _300 => _300.trustProxy])
7223
+ trustProxy: _optionalChain([this, 'access', _303 => _303.config, 'access', _304 => _304.server, 'optionalAccess', _305 => _305.trustProxy])
7125
7224
  }).pathname;
7126
7225
  let content = this.defaultNotFoundContent();
7127
7226
  const NotFoundComponent = await this.loadNotFoundComponent();
@@ -7136,14 +7235,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7136
7235
  _chunk7U4XF76Rcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
7137
7236
  }
7138
7237
  }
7139
- return _chunkNEKO3HM2cjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
7238
+ return _chunk4B6YJ5DScjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
7140
7239
  }
7141
7240
  async render404(req, res) {
7142
7241
  res.statusCode = 404;
7143
7242
  const pathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7144
- trustProxy: _optionalChain([this, 'access', _301 => _301.config, 'access', _302 => _302.server, 'optionalAccess', _303 => _303.trustProxy])
7243
+ trustProxy: _optionalChain([this, 'access', _306 => _306.config, 'access', _307 => _307.server, 'optionalAccess', _308 => _308.trustProxy])
7145
7244
  }).pathname;
7146
- if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7245
+ if (_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7147
7246
  res.setHeader("Content-Type", "application/json");
7148
7247
  res.end(JSON.stringify({ error: "Not found", pathname }));
7149
7248
  return;
@@ -7166,11 +7265,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7166
7265
  return;
7167
7266
  }
7168
7267
  const appDir = path10.join(this.config.root, this.config.srcDir, "app");
7169
- const notFoundExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7268
+ const notFoundExtensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7170
7269
  let layoutModule = null;
7270
+ const rendererRootLayout = _optionalChain([this, 'access', _309 => _309.config, 'access', _310 => _310.renderer, 'optionalAccess', _311 => _311.routes]) ? _optionalChain([this, 'access', _312 => _312.routeManager, 'access', _313 => _313.getLayouts, 'call', _314 => _314(), 'access', _315 => _315.get, 'call', _316 => _316("/"), 'optionalAccess', _317 => _317.modulePath]) : void 0;
7171
7271
  try {
7172
- for (const ext of notFoundExtensions) {
7173
- const layoutPath = path10.join(appDir, `layout${ext}`);
7272
+ for (const layoutPath of rendererRootLayout ? [rendererRootLayout] : notFoundExtensions.map((ext) => path10.join(appDir, `layout${ext}`))) {
7174
7273
  if (fs7.existsSync(layoutPath)) {
7175
7274
  layoutModule = await this.routeManager.loadLayoutModule(layoutPath);
7176
7275
  break;
@@ -7178,13 +7277,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7178
7277
  }
7179
7278
  const notFoundPath = resolveFarmNotFoundComponentPath(
7180
7279
  this.config,
7181
- _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config)
7280
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config),
7281
+ this.getRendererNotFoundPath()
7182
7282
  );
7183
7283
  if (notFoundPath) {
7184
7284
  const notFoundModule = await this.loadNotFoundModule();
7185
- const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _304 => _304.default]), () => ( null));
7285
+ const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _318 => _318.default]), () => ( null));
7186
7286
  if (NotFoundComponent) {
7187
- const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _305 => _305.default]), () => ( null));
7287
+ const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _319 => _319.default]), () => ( null));
7188
7288
  let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
7189
7289
  if (LayoutComponent) {
7190
7290
  element = this.rendererRuntime.createElement(LayoutComponent, {
@@ -7221,23 +7321,23 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7221
7321
  res.statusCode = statusCode;
7222
7322
  const isDev = process.env.NODE_ENV === "development";
7223
7323
  const requestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7224
- trustProxy: _optionalChain([this, 'access', _306 => _306.config, 'access', _307 => _307.server, 'optionalAccess', _308 => _308.trustProxy])
7324
+ trustProxy: _optionalChain([this, 'access', _320 => _320.config, 'access', _321 => _321.server, 'optionalAccess', _322 => _322.trustProxy])
7225
7325
  });
7226
7326
  const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
7227
- const statusText = _chunkNEKO3HM2cjs.getDefaultErrorStatusText.call(void 0, statusCode);
7327
+ const statusText = _chunk4B6YJ5DScjs.getDefaultErrorStatusText.call(void 0, statusCode);
7228
7328
  const content = this.stampFarmScripts(
7229
7329
  req,
7230
- _chunkNEKO3HM2cjs.createDefaultErrorMarkup.call(void 0, {
7330
+ _chunk4B6YJ5DScjs.createDefaultErrorMarkup.call(void 0, {
7231
7331
  statusCode,
7232
7332
  statusText,
7233
7333
  requestPath: requestUrl.pathname,
7234
7334
  method: req.method || "GET",
7235
- message: _optionalChain([diagnostics, 'optionalAccess', _309 => _309.message]),
7236
- errorName: _optionalChain([diagnostics, 'optionalAccess', _310 => _310.name]),
7237
- stack: _optionalChain([diagnostics, 'optionalAccess', _311 => _311.stack]),
7238
- sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _312 => _312.sourceFrame]),
7335
+ message: _optionalChain([diagnostics, 'optionalAccess', _323 => _323.message]),
7336
+ errorName: _optionalChain([diagnostics, 'optionalAccess', _324 => _324.name]),
7337
+ stack: _optionalChain([diagnostics, 'optionalAccess', _325 => _325.stack]),
7338
+ sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _326 => _326.sourceFrame]),
7239
7339
  development: isDev,
7240
- farmVersion: _chunkJK26IMT7cjs.FARM_VERSION,
7340
+ farmVersion: _chunkCVZY4TLWcjs.FARM_VERSION,
7241
7341
  nodeVersion: process.version,
7242
7342
  mode: isDev ? "development" : "production"
7243
7343
  })
@@ -7263,9 +7363,9 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7263
7363
  */
7264
7364
  getI18nAlternateOptions(req, metadata) {
7265
7365
  return {
7266
- metadataBase: _optionalChain([metadata, 'optionalAccess', _313 => _313.metadataBase]),
7267
- origin: req ? _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _314 => _314.config, 'access', _315 => _315.server, 'optionalAccess', _316 => _316.trustProxy]) }).origin : void 0,
7268
- languages: _optionalChain([metadata, 'optionalAccess', _317 => _317.alternates, 'optionalAccess', _318 => _318.languages])
7366
+ metadataBase: _optionalChain([metadata, 'optionalAccess', _327 => _327.metadataBase]),
7367
+ origin: req ? _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _328 => _328.config, 'access', _329 => _329.server, 'optionalAccess', _330 => _330.trustProxy]) }).origin : void 0,
7368
+ languages: _optionalChain([metadata, 'optionalAccess', _331 => _331.alternates, 'optionalAccess', _332 => _332.languages])
7269
7369
  };
7270
7370
  }
7271
7371
  createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
@@ -7284,20 +7384,20 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7284
7384
  this.getI18nAlternateOptions(alternates.req, alternates.metadata)
7285
7385
  ) : "";
7286
7386
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
7287
- const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
7387
+ const themeDocument = _chunk4B6YJ5DScjs.createFarmThemeDocumentParts.call(void 0,
7288
7388
  this.config.theme,
7289
7389
  this.config.basePath,
7290
7390
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
7291
7391
  );
7292
7392
  themeDocument.head = farmScripts(themeDocument.head);
7293
7393
  const rendererHydrationScript = farmScripts(
7294
- _optionalChain([this, 'access', _319 => _319.rendererRuntime, 'access', _320 => _320.generateHydrationScript, 'optionalCall', _321 => _321()]) || ""
7394
+ _optionalChain([this, 'access', _333 => _333.rendererRuntime, 'access', _334 => _334.generateHydrationScript, 'optionalCall', _335 => _335()]) || ""
7295
7395
  );
7296
- const viewportTags = _chunkY3DO7BIJcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _322 => _322.metadata, 'optionalAccess', _323 => _323.viewport]));
7297
- const fullDocument = _chunkNEKO3HM2cjs.extractFarmFullDocument.call(void 0, _chunkNEKO3HM2cjs.markFarmDocumentLayouts.call(void 0, content));
7396
+ const viewportTags = _chunkY3DO7BIJcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _336 => _336.metadata, 'optionalAccess', _337 => _337.viewport]));
7397
+ const fullDocument = _chunk4B6YJ5DScjs.extractFarmFullDocument.call(void 0, _chunk4B6YJ5DScjs.markFarmDocumentLayouts.call(void 0, content));
7298
7398
  if (fullDocument) {
7299
- return _chunkNEKO3HM2cjs.composeFarmFullDocument.call(void 0,
7300
- metadataHead ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
7399
+ return _chunk4B6YJ5DScjs.composeFarmFullDocument.call(void 0,
7400
+ metadataHead ? _chunk4B6YJ5DScjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
7301
7401
  {
7302
7402
  fallbackIcon: !metadataHead,
7303
7403
  viewport: viewportTags,
@@ -7323,7 +7423,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7323
7423
  );
7324
7424
  }
7325
7425
  return `<!DOCTYPE html>
7326
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _324 => _324.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7426
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _338 => _338.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7327
7427
  <head>
7328
7428
  ${themeDocument.head}
7329
7429
  <meta charset="utf-8">
@@ -7364,7 +7464,7 @@ ${clientScript}
7364
7464
  const deploymentId = this.getDeploymentId();
7365
7465
  res.setHeader(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
7366
7466
  if ((req.method || "GET").toUpperCase() !== "GET") return;
7367
- const isSecure = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _325 => _325.config, 'access', _326 => _326.server, 'optionalAccess', _327 => _327.trustProxy]) }).protocol === "https:";
7467
+ const isSecure = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _339 => _339.config, 'access', _340 => _340.server, 'optionalAccess', _341 => _341.trustProxy]) }).protocol === "https:";
7368
7468
  const cookie = _chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
7369
7469
  const existing = res.getHeader("Set-Cookie");
7370
7470
  if (Array.isArray(existing)) {
@@ -7427,7 +7527,7 @@ var FarmApp = class {
7427
7527
  await this.serverRenderer.initialize();
7428
7528
  await this.verifyAppStructure();
7429
7529
  await this.routeManager.discoverRoutes();
7430
- if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7530
+ if (_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7431
7531
  this.routeManager.generateClientManifest(this.config.root);
7432
7532
  if (process.env.FARM_VERBOSE) {
7433
7533
  _chunk7U4XF76Rcjs.logger.success("Farm.js application initialized successfully!");
@@ -7456,13 +7556,13 @@ var FarmApp = class {
7456
7556
  outDir: config.outDir || "dist",
7457
7557
  basePath,
7458
7558
  trailingSlash: _nullishCoalesce(config.trailingSlash, () => ( false)),
7459
- renderer: _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, config.renderer),
7559
+ renderer: _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, config.renderer),
7460
7560
  preset: _nullishCoalesce(config.preset, () => ( "node-server")),
7461
7561
  deploy: config.deploy || {},
7462
7562
  storage: config.storage || {},
7463
7563
  schema: config.schema || {},
7464
7564
  cache: config.cache || {},
7465
- auth: isResolvedAuthConfig(config.auth) ? config.auth : _chunkUVV3I5QAcjs.resolveFarmAuthConfig.call(void 0, config.auth),
7565
+ auth: isResolvedAuthConfig(config.auth) ? config.auth : _chunkL2GUEYHRcjs.resolveFarmAuthConfig.call(void 0, config.auth),
7466
7566
  integrations: config.integrations || {},
7467
7567
  plugins: config.plugins || [],
7468
7568
  migrations: config.migrations || { commands: [] },
@@ -7477,7 +7577,7 @@ var FarmApp = class {
7477
7577
  security: _chunk6JHZPB52cjs.resolveFarmSecurityConfig.call(void 0, config.security),
7478
7578
  images: _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
7479
7579
  config.images,
7480
- _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7580
+ _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7481
7581
  ),
7482
7582
  performance: _chunkEACD6ND7cjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
7483
7583
  theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
@@ -7500,17 +7600,17 @@ var FarmApp = class {
7500
7600
  config.devtools,
7501
7601
  process.env.NODE_ENV === "production" ? "production" : "development"
7502
7602
  ),
7503
- devIndicators: _chunkUVV3I5QAcjs.resolveFarmDevIndicatorsConfig.call(void 0,
7603
+ devIndicators: _chunkL2GUEYHRcjs.resolveFarmDevIndicatorsConfig.call(void 0,
7504
7604
  config.devIndicators,
7505
7605
  process.env.NODE_ENV === "production" ? "production" : "development"
7506
7606
  ),
7507
7607
  env: config.env || { server: {}, public: {} },
7508
7608
  suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
7509
7609
  experimental: {
7510
- serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _328 => _328.experimental, 'optionalAccess', _329 => _329.serverComponents]), () => ( false)),
7511
- serverActions: _nullishCoalesce(_optionalChain([config, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverActions]), () => ( false)),
7512
- isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _332 => _332.experimental, 'optionalAccess', _333 => _333.isolatedClientHydration]), () => ( "off")),
7513
- ppr: _nullishCoalesce(_optionalChain([config, 'access', _334 => _334.experimental, 'optionalAccess', _335 => _335.ppr]), () => ( false)),
7610
+ serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _342 => _342.experimental, 'optionalAccess', _343 => _343.serverComponents]), () => ( false)),
7611
+ serverActions: _nullishCoalesce(_optionalChain([config, 'access', _344 => _344.experimental, 'optionalAccess', _345 => _345.serverActions]), () => ( false)),
7612
+ isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _346 => _346.experimental, 'optionalAccess', _347 => _347.isolatedClientHydration]), () => ( "off")),
7613
+ ppr: _nullishCoalesce(_optionalChain([config, 'access', _348 => _348.experimental, 'optionalAccess', _349 => _349.ppr]), () => ( false)),
7514
7614
  ...config.experimental
7515
7615
  },
7516
7616
  agent: _nullishCoalesce(config.agent, () => ( {})),
@@ -7530,6 +7630,7 @@ var FarmApp = class {
7530
7630
  );
7531
7631
  }
7532
7632
  async verifyAppStructure() {
7633
+ if (typeof _optionalChain([this, 'access', _350 => _350.config, 'access', _351 => _351.renderer, 'optionalAccess', _352 => _352.routes]) === "function") return;
7533
7634
  const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config);
7534
7635
  const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunk7U4XF76Rcjs.fileExists.call(void 0, appDir)))).some(
7535
7636
  Boolean
@@ -7546,14 +7647,14 @@ var FarmApp = class {
7546
7647
  `App directory not found at ${appDir}. Please create a src/app directory or extend a Farm layer containing routes.`
7547
7648
  );
7548
7649
  }
7549
- const componentExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7650
+ const componentExtensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7550
7651
  const rootLayoutPaths = appDirs.flatMap(
7551
7652
  (appDir) => componentExtensions.map((extension) => path4.default.join(appDir, `layout${extension}`))
7552
7653
  );
7553
7654
  const hasRootLayout = await Promise.all(rootLayoutPaths.map((p) => _chunk7U4XF76Rcjs.fileExists.call(void 0, p))).then(
7554
7655
  (results) => results.some(Boolean)
7555
7656
  );
7556
- if (!hasRootLayout && !_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7657
+ if (!hasRootLayout && !_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7557
7658
  _chunk7U4XF76Rcjs.logger.warn(
7558
7659
  `No root layout found. Consider creating src/app/layout${componentExtensions[0]} for consistent page structure.`
7559
7660
  );
@@ -7569,7 +7670,7 @@ function isResolvedAuthConfig(value) {
7569
7670
  );
7570
7671
  }
7571
7672
  function normalizeFarmAppAPIConfig(config) {
7572
- if (typeof _optionalChain([config, 'optionalAccess', _336 => _336.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _337 => _337.basePath]) === "function") {
7673
+ if (typeof _optionalChain([config, 'optionalAccess', _353 => _353.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _354 => _354.basePath]) === "function") {
7573
7674
  throw new Error(
7574
7675
  "Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
7575
7676
  );
@@ -7584,7 +7685,7 @@ function createFarmApp(config, viteServer) {
7584
7685
  var SHARP_INSTALL_HINT = _chunkKORZ6PREcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
7585
7686
  var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
7586
7687
  function resolveFarmImageProviderForRuntime(images, options) {
7587
- const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _338 => _338.provider]), () => ( "auto"));
7688
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _355 => _355.provider]), () => ( "auto"));
7588
7689
  if (provider === "none") return images;
7589
7690
  const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
7590
7691
  if (!usesSharp || _chunkKORZ6PREcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
@@ -7725,9 +7826,9 @@ function staticValue(node) {
7725
7826
  }
7726
7827
  }
7727
7828
  function property(object, name) {
7728
- return _optionalChain([object, 'access', _339 => _339.properties, 'access', _340 => _340.find, 'call', _341 => _341(
7829
+ return _optionalChain([object, 'access', _356 => _356.properties, 'access', _357 => _357.find, 'call', _358 => _358(
7729
7830
  (entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
7730
- ), 'optionalAccess', _342 => _342.value]);
7831
+ ), 'optionalAccess', _359 => _359.value]);
7731
7832
  }
7732
7833
  function toolFromObject(object) {
7733
7834
  const name = staticValue(property(object, "name"));
@@ -7773,7 +7874,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7773
7874
  if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
7774
7875
  continue;
7775
7876
  for (const specifier of statement.specifiers) {
7776
- const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _343 => _343.imported, 'optionalAccess', _344 => _344.name]), () => ( _optionalChain([specifier, 'access', _345 => _345.imported, 'optionalAccess', _346 => _346.value])));
7877
+ const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _360 => _360.imported, 'optionalAccess', _361 => _361.name]), () => ( _optionalChain([specifier, 'access', _362 => _362.imported, 'optionalAccess', _363 => _363.value])));
7777
7878
  if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
7778
7879
  locals.set(specifier.local.name, imported);
7779
7880
  }
@@ -7789,7 +7890,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7789
7890
  const [argument] = current.arguments;
7790
7891
  if (definer && argument) {
7791
7892
  const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
7792
- (element) => _optionalChain([element, 'optionalAccess', _347 => _347.type]) === "ObjectExpression"
7893
+ (element) => _optionalChain([element, 'optionalAccess', _364 => _364.type]) === "ObjectExpression"
7793
7894
  ) : [] : argument.type === "ObjectExpression" ? [argument] : [];
7794
7895
  for (const object of objects) {
7795
7896
  const tool = toolFromObject(object);
@@ -7850,8 +7951,8 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
7850
7951
 
7851
7952
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
7852
7953
  function resolveFarmClientCacheAdapterEntry(root, cache2) {
7853
- const client = _optionalChain([cache2, 'optionalAccess', _348 => _348.client]);
7854
- const adapter = _optionalChain([client, 'optionalAccess', _349 => _349.adapter]);
7954
+ const client = _optionalChain([cache2, 'optionalAccess', _365 => _365.client]);
7955
+ const adapter = _optionalChain([client, 'optionalAccess', _366 => _366.adapter]);
7855
7956
  if (adapter === void 0) return void 0;
7856
7957
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
7857
7958
  throw new Error(
@@ -7866,8 +7967,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
7866
7967
  );
7867
7968
  }
7868
7969
  const options = {};
7869
- if (_optionalChain([client, 'optionalAccess', _350 => _350.version]) !== void 0) options.version = client.version;
7870
- if (_optionalChain([client, 'optionalAccess', _351 => _351.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
7970
+ if (_optionalChain([client, 'optionalAccess', _367 => _367.version]) !== void 0) options.version = client.version;
7971
+ if (_optionalChain([client, 'optionalAccess', _368 => _368.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
7871
7972
  return { importPath: found.replace(/\\/g, "/"), options };
7872
7973
  }
7873
7974
  function resolveAdapterFile(resolved) {
@@ -8325,8 +8426,8 @@ function redactFarmDocsClientConfig(code, filename) {
8325
8426
  const current = node;
8326
8427
  if (current.type === "Property") {
8327
8428
  const name = propertyKeyName(current);
8328
- const valueType = _optionalChain([current, 'access', _352 => _352.value, 'optionalAccess', _353 => _353.type]);
8329
- const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkSM2SYWARcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
8429
+ const valueType = _optionalChain([current, 'access', _369 => _369.value, 'optionalAccess', _370 => _370.type]);
8430
+ const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkXJDB564Acjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
8330
8431
  if (name && credential) {
8331
8432
  edits.push(
8332
8433
  current.shorthand || current.method || current.kind !== "init" ? { start: current.start, end: current.end, text: `${JSON.stringify(name)}: undefined` } : {
@@ -8368,7 +8469,7 @@ function farmDocsClientConfigPlugin(configModule) {
8368
8469
  // Never matches without a docs config module, so the bundler never calls the handler.
8369
8470
  filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
8370
8471
  handler(code, id, options) {
8371
- if (_optionalChain([options, 'optionalAccess', _354 => _354.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8472
+ if (_optionalChain([options, 'optionalAccess', _371 => _371.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8372
8473
  const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
8373
8474
  return redacted === null ? null : { code: redacted, map: null };
8374
8475
  }
@@ -8464,20 +8565,25 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
8464
8565
  function isInstalledPackage(root, specifier) {
8465
8566
  const parts = specifier.split("/");
8466
8567
  const name = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
8467
- const directory = _chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, name);
8568
+ const directory = _chunkF7JVO3OZcjs.findFarmAppPackageDir.call(void 0, root, name);
8468
8569
  return directory !== void 0 && directory.split(path4.default.sep).includes("node_modules");
8469
8570
  }
8470
8571
  function getFarmClientOptimizeDepsInclude(renderer, root) {
8471
8572
  return Array.from(
8472
8573
  /* @__PURE__ */ new Set([
8473
8574
  ...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE,
8474
- ..._optionalChain([renderer, 'optionalAccess', _355 => _355.optimizeDeps]) || [],
8575
+ ..._optionalChain([renderer, 'optionalAccess', _372 => _372.optimizeDeps]) || [],
8475
8576
  // Farm's browser entry imports a renderer's client module, and no app file does, so Vite's
8476
8577
  // scan never sees it and finds it only on the first page request, then bundles again. The
8477
8578
  // React entry imports `react-dom/client` instead, which is already listed. A linked
8478
8579
  // renderer stays source: pre-bundling it would copy the packages it shares with the app's
8479
8580
  // components into the bundle, so a hook would read a different copy than the renderer set.
8480
- ...renderer && root && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _chunkPWDBWXQIcjs.isPackageSpecifier.call(void 0, renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : []
8581
+ ...renderer && root && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _chunkPWDBWXQIcjs.isPackageSpecifier.call(void 0, renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : [],
8582
+ // The islands runtime of a renderer that declares `islands`, which only Farm's entry imports.
8583
+ ...renderer && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, renderer).islands ? [
8584
+ "@farm.js/core/internal/renderer-islands",
8585
+ "@farm.js/core > @farm.js/islx/islands/client"
8586
+ ] : []
8481
8587
  ])
8482
8588
  );
8483
8589
  }
@@ -8490,7 +8596,7 @@ function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
8490
8596
  });
8491
8597
  }
8492
8598
  function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8493
- if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8599
+ if (_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8494
8600
  const jsxImportSource = renderer ? renderer.jsxImportSource : void 0;
8495
8601
  return {
8496
8602
  // Keep normal application dependency discovery for CJS-only packages, but
@@ -8503,7 +8609,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8503
8609
  // Farm's HTML boots through a virtual module and imports route UI lazily.
8504
8610
  // Explicit entries let Vite finish that crawl before a navigation can
8505
8611
  // rotate the optimizer hash underneath a hydrated React runtime.
8506
- ..._optionalChain([entries, 'optionalAccess', _356 => _356.length]) ? { entries: [...entries] } : {},
8612
+ ..._optionalChain([entries, 'optionalAccess', _373 => _373.length]) ? { entries: [...entries] } : {},
8507
8613
  // Vite's dependency scan compiles JSX on its own: with the app tsconfig's `jsxImportSource`
8508
8614
  // when there is one, otherwise as React, whatever the renderer's plugin set for its own
8509
8615
  // transforms. React is the default already, and naming it here would override a tsconfig
@@ -8544,8 +8650,8 @@ function mergeFarmViteAlias(farmValue, userValue) {
8544
8650
  return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
8545
8651
  }
8546
8652
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8547
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _357 => _357.optimizeDeps, 'optionalAccess', _358 => _358.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _359 => _359.optimizeDeps, 'optionalAccess', _360 => _360.noDiscovery])));
8548
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _361 => _361.optimizeDeps, 'optionalAccess', _362 => _362.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _363 => _363.optimizeDeps, 'optionalAccess', _364 => _364.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _365 => _365.optimizeDeps, 'optionalAccess', _366 => _366.holdUntilCrawlEnd]))));
8653
+ const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _374 => _374.optimizeDeps, 'optionalAccess', _375 => _375.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _376 => _376.optimizeDeps, 'optionalAccess', _377 => _377.noDiscovery])));
8654
+ const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _378 => _378.optimizeDeps, 'optionalAccess', _379 => _379.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _380 => _380.optimizeDeps, 'optionalAccess', _381 => _381.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _382 => _382.optimizeDeps, 'optionalAccess', _383 => _383.holdUntilCrawlEnd]))));
8549
8655
  return {
8550
8656
  ...farmConfig,
8551
8657
  ...userConfig,
@@ -8557,9 +8663,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8557
8663
  resolve: {
8558
8664
  ...farmConfig.resolve,
8559
8665
  ...userConfig.resolve,
8560
- alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _367 => _367.resolve, 'optionalAccess', _368 => _368.alias]), _optionalChain([userConfig, 'access', _369 => _369.resolve, 'optionalAccess', _370 => _370.alias])),
8666
+ alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _384 => _384.resolve, 'optionalAccess', _385 => _385.alias]), _optionalChain([userConfig, 'access', _386 => _386.resolve, 'optionalAccess', _387 => _387.alias])),
8561
8667
  dedupe: Array.from(
8562
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _371 => _371.resolve, 'optionalAccess', _372 => _372.dedupe]) || [], ..._optionalChain([userConfig, 'access', _373 => _373.resolve, 'optionalAccess', _374 => _374.dedupe]) || []])
8668
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _388 => _388.resolve, 'optionalAccess', _389 => _389.dedupe]) || [], ..._optionalChain([userConfig, 'access', _390 => _390.resolve, 'optionalAccess', _391 => _391.dedupe]) || []])
8563
8669
  )
8564
8670
  },
8565
8671
  optimizeDeps: {
@@ -8569,21 +8675,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8569
8675
  holdUntilCrawlEnd,
8570
8676
  include: Array.from(
8571
8677
  /* @__PURE__ */ new Set([
8572
- ..._optionalChain([farmConfig, 'access', _375 => _375.optimizeDeps, 'optionalAccess', _376 => _376.include]) || [],
8573
- ..._optionalChain([userConfig, 'access', _377 => _377.optimizeDeps, 'optionalAccess', _378 => _378.include]) || []
8678
+ ..._optionalChain([farmConfig, 'access', _392 => _392.optimizeDeps, 'optionalAccess', _393 => _393.include]) || [],
8679
+ ..._optionalChain([userConfig, 'access', _394 => _394.optimizeDeps, 'optionalAccess', _395 => _395.include]) || []
8574
8680
  ])
8575
8681
  ),
8576
8682
  exclude: Array.from(
8577
8683
  /* @__PURE__ */ new Set([
8578
- ..._optionalChain([farmConfig, 'access', _379 => _379.optimizeDeps, 'optionalAccess', _380 => _380.exclude]) || [],
8579
- ..._optionalChain([userConfig, 'access', _381 => _381.optimizeDeps, 'optionalAccess', _382 => _382.exclude]) || []
8684
+ ..._optionalChain([farmConfig, 'access', _396 => _396.optimizeDeps, 'optionalAccess', _397 => _397.exclude]) || [],
8685
+ ..._optionalChain([userConfig, 'access', _398 => _398.optimizeDeps, 'optionalAccess', _399 => _399.exclude]) || []
8580
8686
  ])
8581
8687
  )
8582
8688
  },
8583
8689
  ssr: {
8584
8690
  ...farmConfig.ssr,
8585
8691
  ...userConfig.ssr,
8586
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _383 => _383.ssr, 'optionalAccess', _384 => _384.noExternal]), _optionalChain([userConfig, 'access', _385 => _385.ssr, 'optionalAccess', _386 => _386.noExternal]))
8692
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _400 => _400.ssr, 'optionalAccess', _401 => _401.noExternal]), _optionalChain([userConfig, 'access', _402 => _402.ssr, 'optionalAccess', _403 => _403.noExternal]))
8587
8693
  }
8588
8694
  };
8589
8695
  }
@@ -8654,8 +8760,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8654
8760
  ...userRolldownOptions
8655
8761
  };
8656
8762
  const merged = mergeFarmViteConfig(farmConfig, shared);
8657
- const farmBundlerOptions = _optionalChain([farmConfig, 'access', _387 => _387.build, 'optionalAccess', _388 => _388.rollupOptions]);
8658
- const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _389 => _389.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _390 => _390.output]);
8763
+ const farmBundlerOptions = _optionalChain([farmConfig, 'access', _404 => _404.build, 'optionalAccess', _405 => _405.rollupOptions]);
8764
+ const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _406 => _406.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _407 => _407.output]);
8659
8765
  return {
8660
8766
  ...merged,
8661
8767
  build: {
@@ -8672,7 +8778,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8672
8778
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
8673
8779
  ssr: {
8674
8780
  ...merged.ssr,
8675
- external: mergeExternal(_optionalChain([farmConfig, 'access', _391 => _391.ssr, 'optionalAccess', _392 => _392.external]), _optionalChain([userConfig, 'access', _393 => _393.ssr, 'optionalAccess', _394 => _394.external]))
8781
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _408 => _408.ssr, 'optionalAccess', _409 => _409.external]), _optionalChain([userConfig, 'access', _410 => _410.ssr, 'optionalAccess', _411 => _411.external]))
8676
8782
  }
8677
8783
  };
8678
8784
  }