@farm.js/core 0.1.80 → 0.1.82

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 (390) hide show
  1. package/dist/{agent-mcp.d-BPa5n0ld.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +2 -1
  5. package/dist/agent-runtime.d.ts +2 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-LV23T6QN.cjs +17 -0
  8. package/dist/{analyzer-F7CWE5VA.mjs → analyzer-RPU2KG4J.mjs} +3 -2
  9. package/dist/api/client.cjs +1 -1
  10. package/dist/api/client.mjs +1 -1
  11. package/dist/api/client.native.cjs +1 -1
  12. package/dist/api/client.native.mjs +1 -1
  13. package/dist/api/node.cjs +6 -5
  14. package/dist/api/node.d.mts +4 -3
  15. package/dist/api/node.d.ts +4 -3
  16. package/dist/api/node.mjs +5 -4
  17. package/dist/api/route-manager.cjs +7 -6
  18. package/dist/api/route-manager.d.mts +4 -3
  19. package/dist/api/route-manager.d.ts +4 -3
  20. package/dist/api/route-manager.mjs +6 -5
  21. package/dist/api/runtime.cjs +5 -4
  22. package/dist/api/runtime.d.mts +3 -2
  23. package/dist/api/runtime.d.ts +3 -2
  24. package/dist/api/runtime.mjs +4 -3
  25. package/dist/api.cjs +9 -8
  26. package/dist/api.d.mts +5 -4
  27. package/dist/api.d.ts +5 -4
  28. package/dist/api.mjs +8 -7
  29. package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
  30. package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
  31. package/dist/app-markdown.cjs +3 -3
  32. package/dist/app-markdown.d.mts +5 -4
  33. package/dist/app-markdown.d.ts +5 -4
  34. package/dist/app-markdown.mjs +2 -2
  35. package/dist/{app.d-DXeRWZK7.d.mts → app.d-C0ePpuaG.d.mts} +30 -4
  36. package/dist/{app.d-DwX1ePhs.d.ts → app.d-CIoXsAbN.d.ts} +30 -4
  37. package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
  38. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  39. package/dist/chunk-2UYYXSUS.mjs +401 -0
  40. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  41. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  42. package/dist/chunk-3DE6RK7K.cjs +36 -0
  43. package/dist/{chunk-GBW5DU7V.mjs → chunk-47I2MYIR.mjs} +487 -304
  44. package/dist/{chunk-RQBGHHOQ.mjs → chunk-4X7LSGM6.mjs} +1 -1
  45. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  46. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  47. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  48. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  49. package/dist/{chunk-AXA2BSX3.cjs → chunk-5MUFW5UU.cjs} +22 -21
  50. package/dist/{chunk-MQOHYV6L.cjs → chunk-5P65LXGU.cjs} +11 -11
  51. package/dist/{chunk-KEU55O2D.mjs → chunk-63ZE6B6M.mjs} +7 -6
  52. package/dist/{chunk-TS3ZHJN5.cjs → chunk-6BPFIYGY.cjs} +3 -3
  53. package/dist/{chunk-NJ4OASLP.mjs → chunk-6QYPP5KC.mjs} +2 -2
  54. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  55. package/dist/{chunk-G4SZC2WH.cjs → chunk-AIPZDBP6.cjs} +557 -374
  56. package/dist/{chunk-X4TSMQWF.cjs → chunk-ARORZ3MH.cjs} +548 -397
  57. package/dist/{chunk-K3XKEZR6.mjs → chunk-AUFEM3FB.mjs} +1 -1
  58. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  59. package/dist/{chunk-5OAN7BG5.cjs → chunk-B2PGVHBG.cjs} +4 -4
  60. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  61. package/dist/chunk-B7L24VPX.cjs +401 -0
  62. package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
  63. package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
  64. package/dist/{chunk-67MZTLTF.cjs → chunk-BCTHOQPP.cjs} +37 -9
  65. package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
  66. package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
  67. package/dist/{chunk-QHAISITM.mjs → chunk-C3VCYOU4.mjs} +1 -1
  68. package/dist/chunk-C5QHZ626.cjs +85 -0
  69. package/dist/{chunk-3K2E55BJ.mjs → chunk-CA2HBLXP.mjs} +13 -3
  70. package/dist/{chunk-ANZLZNNX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
  71. package/dist/{chunk-4MIDUSIX.mjs → chunk-CJDBTTLB.mjs} +17 -17
  72. package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
  73. package/dist/chunk-D2VAANBS.mjs +48 -0
  74. package/dist/{chunk-XZBBKZGW.mjs → chunk-DAXU2NBE.mjs} +128 -41
  75. package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  76. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  77. package/dist/{chunk-ZVSQN7NC.cjs → chunk-DRO3NXA3.cjs} +40 -43
  78. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  79. package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  80. package/dist/{chunk-MDEFTF63.mjs → chunk-EL2Z6YFZ.mjs} +25 -28
  81. package/dist/chunk-EZYKV24V.mjs +385 -0
  82. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  83. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  84. package/dist/{chunk-V73Y4UBL.mjs → chunk-GXLNARPO.mjs} +151 -16
  85. package/dist/{chunk-ZPEZXQTM.cjs → chunk-HHQEKLZL.cjs} +2 -2
  86. package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
  87. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  88. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  89. package/dist/{chunk-44G4XHEL.mjs → chunk-I4DR3HCH.mjs} +11 -11
  90. package/dist/chunk-I4WZRG73.mjs +54 -0
  91. package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
  92. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  93. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  94. package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
  95. package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
  96. package/dist/{chunk-CCMP4JD2.cjs → chunk-JK26IMT7.cjs} +1 -1
  97. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  98. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  99. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  100. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  101. package/dist/{chunk-LVGB5PYK.cjs → chunk-LM2ZDNDD.cjs} +28 -28
  102. package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
  103. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  104. package/dist/{chunk-DVHFIETW.cjs → chunk-N2EFMN2K.cjs} +18 -18
  105. package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
  106. package/dist/{chunk-KKVRWNDH.mjs → chunk-NAHDG6UX.mjs} +4 -4
  107. package/dist/{chunk-UWOCYINY.cjs → chunk-NEKO3HM2.cjs} +12 -2
  108. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  109. package/dist/{chunk-ZDYYZX73.mjs → chunk-NRCKBDYP.mjs} +266 -115
  110. package/dist/{chunk-EG5YBYHO.mjs → chunk-OMB7UGVW.mjs} +1 -1
  111. package/dist/{chunk-JGEN2FIT.mjs → chunk-OP5VI4TP.mjs} +1 -1
  112. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  113. package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
  114. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  115. package/dist/{chunk-WJ2O2MPP.cjs → chunk-Q2VOT3K2.cjs} +494 -407
  116. package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
  117. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  118. package/dist/{chunk-3JQBQG7K.mjs → chunk-QSMUMK7Y.mjs} +2 -2
  119. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  120. package/dist/{chunk-GCRT6GJG.mjs → chunk-RMLR5RMH.mjs} +30 -2
  121. package/dist/{chunk-XY5OZQF6.cjs → chunk-RMPUEH5T.cjs} +2 -2
  122. package/dist/{chunk-7DD5TNPS.cjs → chunk-S7WZUK3B.cjs} +2 -2
  123. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  124. package/dist/{chunk-Z4SMFUZ7.cjs → chunk-U54REWMJ.cjs} +23 -23
  125. package/dist/chunk-U6XYBTUT.mjs +36 -0
  126. package/dist/chunk-UDMBUTJD.mjs +85 -0
  127. package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
  128. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  129. package/dist/{chunk-SDICLSQU.cjs → chunk-VMBIKDKW.cjs} +10 -10
  130. package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  131. package/dist/chunk-VS7HLH4S.cjs +385 -0
  132. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  133. package/dist/chunk-WMRGIQTA.cjs +48 -0
  134. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  135. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  136. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  137. package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
  138. package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
  139. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  140. package/dist/{chunk-YN3YMSKD.mjs → chunk-ZIZRIZLP.mjs} +3 -3
  141. package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
  142. package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
  143. package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
  144. package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
  145. package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-C1WM3ieD.d.mts} +7 -13
  146. package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-DcmDzcSC.d.ts} +7 -13
  147. package/dist/client-plugins.d.mts +2 -1
  148. package/dist/client-plugins.d.ts +2 -1
  149. package/dist/client.cjs +9 -8
  150. package/dist/client.d.mts +20 -151
  151. package/dist/client.d.ts +20 -151
  152. package/dist/client.mjs +8 -7
  153. package/dist/config.d.mts +2 -1
  154. package/dist/config.d.ts +2 -1
  155. package/dist/cron.cjs +2 -2
  156. package/dist/cron.mjs +1 -1
  157. package/dist/desktop.d.mts +3 -2
  158. package/dist/desktop.d.ts +3 -2
  159. package/dist/{devtools-JJOYTIMS.cjs → devtools-5B7NZE6F.cjs} +15 -14
  160. package/dist/{devtools-F3FDFV26.mjs → devtools-C5GXZZ7E.mjs} +12 -11
  161. package/dist/docs.cjs +14 -13
  162. package/dist/docs.d.mts +4 -3
  163. package/dist/docs.d.ts +4 -3
  164. package/dist/docs.mjs +13 -12
  165. package/dist/environment/vite.cjs +7 -6
  166. package/dist/environment/vite.mjs +6 -5
  167. package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
  168. package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
  169. package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
  170. package/dist/{headers.d-CAW4wPey.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
  171. package/dist/index.cjs +68 -65
  172. package/dist/{index.d-BEVK61zS.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
  173. package/dist/{index.d-ah2c89Wu.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
  174. package/dist/index.d.mts +25 -23
  175. package/dist/index.d.ts +25 -23
  176. package/dist/index.mjs +72 -69
  177. package/dist/instrumentation.cjs +3 -3
  178. package/dist/instrumentation.mjs +2 -2
  179. package/dist/integrations/orm.d.mts +2 -1
  180. package/dist/integrations/orm.d.ts +2 -1
  181. package/dist/integrations.cjs +4 -3
  182. package/dist/integrations.d.mts +2 -1
  183. package/dist/integrations.d.ts +2 -1
  184. package/dist/integrations.mjs +3 -2
  185. package/dist/internal/app-markdown-runtime.cjs +2 -2
  186. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  187. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  188. package/dist/internal/app-markdown-runtime.mjs +1 -1
  189. package/dist/internal/build-runtime.cjs +49 -47
  190. package/dist/internal/build-runtime.d.mts +5 -4
  191. package/dist/internal/build-runtime.d.ts +5 -4
  192. package/dist/internal/build-runtime.mjs +48 -46
  193. package/dist/internal/cli-runtime.cjs +25 -24
  194. package/dist/internal/cli-runtime.d.mts +8 -7
  195. package/dist/internal/cli-runtime.d.ts +8 -7
  196. package/dist/internal/cli-runtime.mjs +26 -25
  197. package/dist/internal/client-error-overlay.cjs +4 -4
  198. package/dist/internal/client-error-overlay.mjs +1 -1
  199. package/dist/internal/client-runtime.cjs +76 -15
  200. package/dist/internal/client-runtime.d.mts +18 -7
  201. package/dist/internal/client-runtime.d.ts +18 -7
  202. package/dist/internal/client-runtime.mjs +67 -6
  203. package/dist/internal/compression-runtime.d.mts +2 -1
  204. package/dist/internal/compression-runtime.d.ts +2 -1
  205. package/dist/internal/config-runtime.cjs +14 -13
  206. package/dist/internal/config-runtime.d.mts +4 -3
  207. package/dist/internal/config-runtime.d.ts +4 -3
  208. package/dist/internal/config-runtime.mjs +13 -12
  209. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  210. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  211. package/dist/internal/form-actions.cjs +3 -3
  212. package/dist/internal/form-actions.mjs +2 -2
  213. package/dist/internal/infra-analytics-runtime.cjs +9 -7
  214. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  215. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  216. package/dist/internal/infra-analytics-runtime.mjs +9 -7
  217. package/dist/internal/island-codec.cjs +3 -3
  218. package/dist/internal/island-codec.mjs +2 -2
  219. package/dist/internal/island-value-store.d.mts +1 -1
  220. package/dist/internal/island-value-store.d.ts +1 -1
  221. package/dist/internal/islands-boot.cjs +63 -23
  222. package/dist/internal/islands-boot.d.mts +5 -3
  223. package/dist/internal/islands-boot.d.ts +5 -3
  224. package/dist/internal/islands-boot.mjs +58 -18
  225. package/dist/internal/islands-runtime.cjs +10 -56
  226. package/dist/internal/islands-runtime.mjs +6 -52
  227. package/dist/internal/islands-server.cjs +4 -4
  228. package/dist/internal/islands-server.mjs +3 -3
  229. package/dist/internal/islx-actions-client.cjs +36 -0
  230. package/dist/internal/islx-actions-client.d.mts +13 -0
  231. package/dist/internal/islx-actions-client.d.ts +13 -0
  232. package/dist/internal/islx-actions-client.mjs +36 -0
  233. package/dist/internal/islx-actions-server.cjs +8 -0
  234. package/dist/internal/islx-actions-server.d.mts +6 -0
  235. package/dist/internal/islx-actions-server.d.ts +6 -0
  236. package/dist/internal/islx-actions-server.mjs +8 -0
  237. package/dist/internal/islx-client.d.mts +0 -4
  238. package/dist/internal/islx-client.d.ts +0 -4
  239. package/dist/internal/isolated-boundary.cjs +3 -3
  240. package/dist/internal/isolated-boundary.d.mts +1 -1
  241. package/dist/internal/isolated-boundary.d.ts +1 -1
  242. package/dist/internal/isolated-boundary.mjs +2 -2
  243. package/dist/internal/metadata-image-runtime.cjs +4 -2
  244. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  245. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  246. package/dist/internal/metadata-image-runtime.mjs +5 -3
  247. package/dist/internal/native-server-fns.cjs +5 -4
  248. package/dist/internal/native-server-fns.mjs +4 -3
  249. package/dist/internal/navigation-neutral.cjs +36 -0
  250. package/dist/internal/navigation-neutral.d.mts +14 -0
  251. package/dist/internal/navigation-neutral.d.ts +14 -0
  252. package/dist/internal/navigation-neutral.mjs +36 -0
  253. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  254. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  255. package/dist/internal/production-runtime.cjs +30 -25
  256. package/dist/internal/production-runtime.d.mts +14 -11
  257. package/dist/internal/production-runtime.d.ts +14 -11
  258. package/dist/internal/production-runtime.mjs +35 -30
  259. package/dist/internal/server-tree.cjs +5 -4
  260. package/dist/internal/server-tree.d.mts +3 -4
  261. package/dist/internal/server-tree.d.ts +3 -4
  262. package/dist/internal/server-tree.mjs +4 -3
  263. package/dist/internal/spa-router.cjs +3 -3
  264. package/dist/internal/spa-router.d.mts +4 -3
  265. package/dist/internal/spa-router.d.ts +4 -3
  266. package/dist/internal/spa-router.mjs +2 -2
  267. package/dist/internal/start-manifest.d.mts +2 -1
  268. package/dist/internal/start-manifest.d.ts +2 -1
  269. package/dist/internal/vercel-edge-middleware.cjs +1 -1
  270. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  271. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  272. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  273. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  274. package/dist/layers-XLOMMQP7.cjs +21 -0
  275. package/dist/markdown.d.mts +2 -1
  276. package/dist/markdown.d.ts +2 -1
  277. package/dist/middleware.cjs +5 -5
  278. package/dist/middleware.d.mts +2 -1
  279. package/dist/middleware.d.ts +2 -1
  280. package/dist/middleware.mjs +4 -4
  281. package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
  282. package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
  283. package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
  284. package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
  285. package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
  286. package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
  287. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  288. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  289. package/dist/navigation.cjs +6 -6
  290. package/dist/navigation.d.mts +7 -6
  291. package/dist/navigation.d.ts +7 -6
  292. package/dist/navigation.mjs +5 -5
  293. package/dist/{nitro-C3MYDX7V.mjs → nitro-FK3SZM4H.mjs} +2 -2
  294. package/dist/{nitro-6UOJXJZ6.cjs → nitro-YDFMH5PY.cjs} +6 -6
  295. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  296. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  297. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  298. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  299. package/dist/plugin.cjs +41 -37
  300. package/dist/plugin.d.mts +6 -5
  301. package/dist/plugin.d.ts +6 -5
  302. package/dist/plugin.mjs +40 -36
  303. package/dist/query/client.cjs +10 -10
  304. package/dist/query/client.mjs +5 -5
  305. package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
  306. package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
  307. package/dist/renderer/none/server.cjs +5 -1
  308. package/dist/renderer/none/server.d.mts +3 -1
  309. package/dist/renderer/none/server.d.ts +3 -1
  310. package/dist/renderer/none/server.mjs +4 -0
  311. package/dist/renderer/react/server.cjs +6 -6
  312. package/dist/renderer/react/server.mjs +3 -3
  313. package/dist/renderer-client.cjs +79 -17
  314. package/dist/renderer-client.d.mts +13 -97
  315. package/dist/renderer-client.d.ts +13 -97
  316. package/dist/renderer-client.mjs +69 -7
  317. package/dist/renderer.cjs +4 -2
  318. package/dist/renderer.d.mts +43 -5
  319. package/dist/renderer.d.ts +43 -5
  320. package/dist/renderer.mjs +3 -1
  321. package/dist/{request.d-RCnCBuWq.d.mts → request.d-BhggxQf3.d.mts} +1 -1
  322. package/dist/{request.d-CE0FIkiM.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
  323. package/dist/request.d.mts +3 -2
  324. package/dist/request.d.ts +3 -2
  325. package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
  326. package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
  327. package/dist/{router.d-BU_WE6Ol.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
  328. package/dist/{router.d-D8Vvwl4i.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
  329. package/dist/routes.cjs +1 -1
  330. package/dist/routes.d.mts +2 -1
  331. package/dist/routes.d.ts +2 -1
  332. package/dist/routes.mjs +1 -1
  333. package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-5AOF64FL.cjs} +19 -18
  334. package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-DNRLYOJ7.mjs} +18 -17
  335. package/dist/{runtime-SQFRHRGJ.mjs → runtime-EHG2FRXZ.mjs} +18 -17
  336. package/dist/{runtime-WZ3CHHGJ.cjs → runtime-ZVHG5SRB.cjs} +20 -19
  337. package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
  338. package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
  339. package/dist/server-action-security.cjs +1 -1
  340. package/dist/server-action-security.mjs +1 -1
  341. package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
  342. package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
  343. package/dist/server-fn.cjs +3 -3
  344. package/dist/server-fn.mjs +2 -2
  345. package/dist/server-plugins.cjs +1 -1
  346. package/dist/server-plugins.d.mts +4 -3
  347. package/dist/server-plugins.d.ts +4 -3
  348. package/dist/server-plugins.mjs +1 -1
  349. package/dist/server-query.cjs +4 -4
  350. package/dist/server-query.mjs +3 -3
  351. package/dist/server.cjs +82 -71
  352. package/dist/server.d.mts +12 -11
  353. package/dist/server.d.ts +12 -11
  354. package/dist/server.mjs +61 -50
  355. package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-Bjgl-Osi.d.ts} +3 -3
  356. package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-l3G38xHa.d.mts} +3 -3
  357. package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
  358. package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
  359. package/dist/store-core.d-BZjuC6Zc.d.mts +309 -0
  360. package/dist/store-core.d-BaOUOPf7.d.ts +309 -0
  361. package/dist/testing.cjs +7 -6
  362. package/dist/testing.d.mts +2 -1
  363. package/dist/testing.d.ts +2 -1
  364. package/dist/testing.mjs +6 -5
  365. package/dist/{utils.d-_dvevm5s.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
  366. package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
  367. package/dist/version.cjs +2 -2
  368. package/dist/version.mjs +1 -1
  369. package/dist/vite.cjs +43 -37
  370. package/dist/vite.d.mts +18 -7
  371. package/dist/vite.d.ts +18 -7
  372. package/dist/vite.mjs +42 -36
  373. package/dist/workflows.cjs +2 -2
  374. package/dist/workflows.mjs +1 -1
  375. package/package.json +17 -2
  376. package/dist/analyzer-I7RBBQ65.cjs +0 -16
  377. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  378. package/dist/chunk-HONTCUK6.mjs +0 -203
  379. package/dist/chunk-K6PGK7DC.cjs +0 -203
  380. package/dist/chunk-NBIVGHAT.mjs +0 -50
  381. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  382. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  383. package/dist/layers-HMEGUEXM.cjs +0 -21
  384. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  385. package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
  386. package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
  387. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  388. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  389. package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
  390. package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
@@ -1,17 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
4
+ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
5
5
 
6
6
 
7
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
8
7
 
9
8
 
9
+ var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
10
10
 
11
11
 
12
- var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
12
+ var _chunkBBVLOENDcjs = require('./chunk-BBVLOEND.cjs');
13
13
 
14
14
 
15
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
15
16
 
16
17
 
17
18
 
@@ -45,32 +46,34 @@ var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
45
46
 
46
47
 
47
48
 
48
- var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
49
49
 
50
50
 
51
- var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
52
51
 
52
+ var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
53
53
 
54
54
 
55
55
 
56
56
 
57
+ var _chunkOZUINP2Pcjs = require('./chunk-OZUINP2P.cjs');
57
58
 
58
59
 
59
- var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
60
+ var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
60
61
 
61
62
 
62
- var _chunkK6PGK7DCcjs = require('./chunk-K6PGK7DC.cjs');
63
63
 
64
64
 
65
65
 
66
- var _chunk52LTENREcjs = require('./chunk-52LTENRE.cjs');
66
+
67
+
68
+ var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
67
69
 
68
70
 
69
71
 
72
+ var _chunkVS7HLH4Scjs = require('./chunk-VS7HLH4S.cjs');
70
73
 
71
- var _chunkPBJ7MEOVcjs = require('./chunk-PBJ7MEOV.cjs');
72
74
 
73
75
 
76
+ var _chunkWOAXQ5MZcjs = require('./chunk-WOAXQ5MZ.cjs');
74
77
 
75
78
 
76
79
 
@@ -95,10 +98,9 @@ var _chunkPBJ7MEOVcjs = require('./chunk-PBJ7MEOV.cjs');
95
98
 
96
99
 
97
100
 
98
- var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
99
101
 
100
102
 
101
- var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
103
+ var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
102
104
 
103
105
 
104
106
 
@@ -122,7 +124,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
122
124
 
123
125
 
124
126
 
125
- var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
127
+ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
126
128
 
127
129
 
128
130
 
@@ -130,9 +132,9 @@ var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
130
132
 
131
133
 
132
134
 
135
+ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
133
136
 
134
137
 
135
- var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
136
138
 
137
139
 
138
140
 
@@ -140,13 +142,15 @@ var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
140
142
 
141
143
 
142
144
 
143
- var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
145
+ var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
144
146
 
145
147
 
146
148
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
147
149
 
148
150
 
149
151
 
152
+ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
153
+
150
154
 
151
155
 
152
156
 
@@ -156,27 +160,26 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
156
160
 
157
161
 
158
162
 
159
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
160
163
 
161
164
 
162
165
 
163
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
166
+ var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
164
167
 
165
168
 
166
169
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
167
170
 
168
171
 
169
- var _chunk5ZHC6QGDcjs = require('./chunk-5ZHC6QGD.cjs');
172
+ var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
170
173
 
171
174
 
172
175
  var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
173
176
 
174
177
 
175
178
 
176
- var _chunkHNUBRUFQcjs = require('./chunk-HNUBRUFQ.cjs');
179
+ var _chunkHQEYZSF3cjs = require('./chunk-HQEYZSF3.cjs');
177
180
 
178
181
 
179
- var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
182
+ var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
180
183
 
181
184
 
182
185
 
@@ -192,7 +195,10 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
192
195
  var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
193
196
 
194
197
 
195
- var _chunkGBESKA76cjs = require('./chunk-GBESKA76.cjs');
198
+ var _chunkPWDBWXQIcjs = require('./chunk-PWDBWXQI.cjs');
199
+
200
+
201
+ var _chunkBSX5OGSDcjs = require('./chunk-BSX5OGSD.cjs');
196
202
 
197
203
 
198
204
  var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
@@ -200,7 +206,7 @@ var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
200
206
 
201
207
 
202
208
 
203
- var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
209
+ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
204
210
 
205
211
 
206
212
  var _chunkNW3DL2PMcjs = require('./chunk-NW3DL2PM.cjs');
@@ -256,10 +262,10 @@ var _chunkBIAGSYIZcjs = require('./chunk-BIAGSYIZ.cjs');
256
262
  var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
257
263
 
258
264
 
259
- var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
265
+ var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
260
266
 
261
267
 
262
- var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
268
+ var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
263
269
 
264
270
 
265
271
  var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
@@ -298,13 +304,13 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
298
304
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
299
305
 
300
306
 
301
- var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
307
+ var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
302
308
 
303
309
 
304
- var _chunkWKVYF2B5cjs = require('./chunk-WKVYF2B5.cjs');
310
+ var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
305
311
 
306
312
 
307
- var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
313
+ var _chunkWKVYF2B5cjs = require('./chunk-WKVYF2B5.cjs');
308
314
 
309
315
 
310
316
  var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
@@ -357,10 +363,6 @@ var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
357
363
 
358
364
 
359
365
 
360
- var _chunk3BIASUGRcjs = require('./chunk-3BIASUGR.cjs');
361
-
362
-
363
-
364
366
 
365
367
  var _chunk7JUIK547cjs = require('./chunk-7JUIK547.cjs');
366
368
 
@@ -383,6 +385,10 @@ var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
383
385
  var _chunkML4TOUZPcjs = require('./chunk-ML4TOUZP.cjs');
384
386
 
385
387
 
388
+
389
+ var _chunk3BIASUGRcjs = require('./chunk-3BIASUGR.cjs');
390
+
391
+
386
392
  var _chunkUZM3PDKKcjs = require('./chunk-UZM3PDKK.cjs');
387
393
 
388
394
  // src/static-metadata-image.ts
@@ -499,7 +505,7 @@ var RouteManager = class _RouteManager {
499
505
  this.redirects = /* @__PURE__ */ new Map();
500
506
  this.programmaticPages = /* @__PURE__ */ new Map();
501
507
  this.programmaticLayouts = /* @__PURE__ */ new Map();
502
- this.programmaticClientRoutes = _chunkZVSQN7NCcjs.mergeProgrammaticClientRoutes.call(void 0, []);
508
+ this.programmaticClientRoutes = _chunkDRO3NXA3cjs.mergeProgrammaticClientRoutes.call(void 0, []);
503
509
  this.discovery = Promise.resolve();
504
510
  this.reportedIslandsErrors = /* @__PURE__ */ new Set();
505
511
  // Each route module's hydration plan from the last plan, with the source files it read, so a dev
@@ -557,11 +563,11 @@ var RouteManager = class _RouteManager {
557
563
  /** Fill this manager's empty route tables. Only a fresh manager made by discoverRoutes runs it. */
558
564
  async discoverInto() {
559
565
  const programmaticClientRoutes = [];
560
- for (const source of _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, this.config)) {
566
+ for (const source of _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, this.config)) {
561
567
  await this.discoverFileRoutes(source);
562
568
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
563
569
  }
564
- this.programmaticClientRoutes = _chunkZVSQN7NCcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
570
+ this.programmaticClientRoutes = _chunkDRO3NXA3cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
565
571
  for (const slot of this.routeSlots.values()) {
566
572
  if (slot.interception && !this.pageRouteShapes.has(_chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
567
573
  throw new (0, _chunkML4TOUZPcjs.AmbiguousRouteError)(
@@ -580,8 +586,8 @@ var RouteManager = class _RouteManager {
580
586
  )
581
587
  );
582
588
  this.orderedLayouts = Array.from(this.layouts.values()).sort(
583
- (left, right) => _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, right.pattern)
584
- ).map((entry) => ({ entry, groupScope: _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, entry.pattern) }));
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) }));
585
591
  for (const slot of this.routeSlots.values()) {
586
592
  if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
587
593
  this.routeSlotOwnerSegments.set(
@@ -854,11 +860,11 @@ var RouteManager = class _RouteManager {
854
860
  return this.clientManifestCache.manifest;
855
861
  }
856
862
  const cacheFile = this.packageClientBoundaryCacheFile;
857
- const compute = () => _chunkZVSQN7NCcjs.withFarmSourceSnapshot.call(void 0,
863
+ const compute = () => _chunkDRO3NXA3cjs.withFarmSourceSnapshot.call(void 0,
858
864
  () => this.computeClientManifest(normalizedProjectRoot),
859
865
  this.sourceSnapshot
860
866
  );
861
- return cacheFile ? _chunkZVSQN7NCcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
867
+ return cacheFile ? _chunkDRO3NXA3cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
862
868
  }
863
869
  /**
864
870
  * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
@@ -867,7 +873,7 @@ var RouteManager = class _RouteManager {
867
873
  */
868
874
  trackSourceChanges() {
869
875
  this.sourceChangeTracking = true;
870
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkZVSQN7NCcjs.FarmSourceSnapshotStore)())));
876
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkDRO3NXA3cjs.FarmSourceSnapshotStore)())));
871
877
  }
872
878
  /**
873
879
  * @internal A production build edits no source while it runs, so what the plan reads, parses and
@@ -876,7 +882,7 @@ var RouteManager = class _RouteManager {
876
882
  */
877
883
  keepBuildSourceSnapshot() {
878
884
  if (this.sourceChangeTracking) return;
879
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkZVSQN7NCcjs.FarmSourceSnapshotStore)(false))));
885
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkDRO3NXA3cjs.FarmSourceSnapshotStore)(false))));
880
886
  }
881
887
  /**
882
888
  * @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
@@ -919,7 +925,7 @@ var RouteManager = class _RouteManager {
919
925
  return false;
920
926
  }
921
927
  const previous = _optionalChain([this, 'access', _18 => _18.sourceSnapshot, 'optionalAccess', _19 => _19.peekSource, 'call', _20 => _20(path4.default.resolve(file))]);
922
- return previous !== void 0 && _chunkZVSQN7NCcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
928
+ return previous !== void 0 && _chunkDRO3NXA3cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
923
929
  }
924
930
  /**
925
931
  * A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
@@ -930,7 +936,7 @@ var RouteManager = class _RouteManager {
930
936
  if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
931
937
  return { ...previous.plan };
932
938
  }
933
- const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0, compute);
939
+ const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0, compute);
934
940
  const sources = /* @__PURE__ */ new Set();
935
941
  for (const file of files) {
936
942
  const source = this.planSourcePath(file);
@@ -938,7 +944,7 @@ var RouteManager = class _RouteManager {
938
944
  }
939
945
  if (!this.sourceChangeTracking) {
940
946
  for (const source of sources) {
941
- if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, source));
947
+ if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, source));
942
948
  }
943
949
  }
944
950
  this.ownerPlans.set(key, { plan: result, files: sources, planKey });
@@ -958,7 +964,7 @@ var RouteManager = class _RouteManager {
958
964
  const isUnchanged = (file) => {
959
965
  let result = unchanged.get(file);
960
966
  if (result === void 0) {
961
- result = this.planStamps.get(file) === _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file);
967
+ result = this.planStamps.get(file) === _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file);
962
968
  unchanged.set(file, result);
963
969
  }
964
970
  return result;
@@ -1005,7 +1011,7 @@ var RouteManager = class _RouteManager {
1005
1011
  */
1006
1012
  inspectPackages(operation) {
1007
1013
  const file = this.packageClientBoundaryCacheFile;
1008
- return file ? _chunkZVSQN7NCcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1014
+ return file ? _chunkDRO3NXA3cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1009
1015
  }
1010
1016
  computeClientManifest(normalizedProjectRoot) {
1011
1017
  const toUrlPath = (absolutePath) => {
@@ -1017,7 +1023,7 @@ var RouteManager = class _RouteManager {
1017
1023
  }
1018
1024
  return absolutePath;
1019
1025
  };
1020
- const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
1026
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
1021
1027
  (provider) => provider.component || provider.type === "clerk"
1022
1028
  );
1023
1029
  const unsupportedIntegrationProvider = integrationProviders.find(
@@ -1028,14 +1034,14 @@ var RouteManager = class _RouteManager {
1028
1034
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
1029
1035
  );
1030
1036
  }
1031
- const isolatedMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1037
+ const isolatedMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1032
1038
  _optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.isolatedClientHydration]),
1033
1039
  {
1034
1040
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
1035
1041
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
1036
1042
  }
1037
1043
  );
1038
- const planOptions = _chunkZVSQN7NCcjs.getFarmClientHydrationPlanOptions.call(void 0,
1044
+ const planOptions = _chunkDRO3NXA3cjs.getFarmClientHydrationPlanOptions.call(void 0,
1039
1045
  this.config.renderer,
1040
1046
  Boolean(unsupportedIntegrationProvider)
1041
1047
  );
@@ -1045,7 +1051,7 @@ var RouteManager = class _RouteManager {
1045
1051
  if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
1046
1052
  edited = /* @__PURE__ */ new Set();
1047
1053
  for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
1048
- if (_chunkZVSQN7NCcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1054
+ if (_chunkDRO3NXA3cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
1049
1055
  const source = this.planSourcePath(file);
1050
1056
  if (source) edited.add(source);
1051
1057
  }
@@ -1060,13 +1066,13 @@ var RouteManager = class _RouteManager {
1060
1066
  metadata: this.planRouteModule(
1061
1067
  `layout:${entry.modulePath}`,
1062
1068
  edited,
1063
- () => _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
1069
+ () => _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1064
1070
  entry.modulePath,
1065
1071
  normalizedProjectRoot,
1066
1072
  isolatedMode,
1067
1073
  layoutPlanOptions
1068
1074
  ),
1069
- _chunkZVSQN7NCcjs.getClientModuleHydrationPlanKey.call(void 0,
1075
+ _chunkDRO3NXA3cjs.getClientModuleHydrationPlanKey.call(void 0,
1070
1076
  entry.modulePath,
1071
1077
  normalizedProjectRoot,
1072
1078
  isolatedMode,
@@ -1074,7 +1080,7 @@ var RouteManager = class _RouteManager {
1074
1080
  )
1075
1081
  )
1076
1082
  }));
1077
- const markdownComponentsPlan = _chunkZVSQN7NCcjs.createMarkdownPageHydrationPlanner.call(void 0,
1083
+ const markdownComponentsPlan = _chunkDRO3NXA3cjs.createMarkdownPageHydrationPlanner.call(void 0,
1078
1084
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
1079
1085
  normalizedProjectRoot,
1080
1086
  isolatedMode,
@@ -1087,16 +1093,16 @@ var RouteManager = class _RouteManager {
1087
1093
  const pagePlanOptions = { ...planOptions, serverOwners: islandsMode };
1088
1094
  const routeEntries = Array.from(this.routes.values()).map((entry) => ({
1089
1095
  entry,
1090
- metadata: _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1096
+ metadata: _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1091
1097
  `page:${entry.modulePath}`,
1092
1098
  edited,
1093
- () => _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
1099
+ () => _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1094
1100
  entry.modulePath,
1095
1101
  normalizedProjectRoot,
1096
1102
  isolatedMode,
1097
1103
  pagePlanOptions
1098
1104
  ),
1099
- _chunkZVSQN7NCcjs.getClientModuleHydrationPlanKey.call(void 0,
1105
+ _chunkDRO3NXA3cjs.getClientModuleHydrationPlanKey.call(void 0,
1100
1106
  entry.modulePath,
1101
1107
  normalizedProjectRoot,
1102
1108
  isolatedMode,
@@ -1105,7 +1111,7 @@ var RouteManager = class _RouteManager {
1105
1111
  )
1106
1112
  }));
1107
1113
  const markdownFallback = routeEntries.find(
1108
- ({ entry, metadata }) => _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
1114
+ ({ entry, metadata }) => _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
1109
1115
  );
1110
1116
  if (markdownFallback) {
1111
1117
  _chunk7U4XF76Rcjs.logger.warn(
@@ -1113,7 +1119,7 @@ var RouteManager = class _RouteManager {
1113
1119
  );
1114
1120
  }
1115
1121
  const markdownStaticPackages = _optionalChain([routeEntries, 'access', _39 => _39.find, 'call', _40 => _40(
1116
- ({ entry, metadata }) => _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
1122
+ ({ entry, metadata }) => _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
1117
1123
  ), 'optionalAccess', _41 => _41.metadata, 'access', _42 => _42.staticPackageBoundaries]);
1118
1124
  if (markdownStaticPackages) {
1119
1125
  _chunk7U4XF76Rcjs.logger.info(
@@ -1121,23 +1127,23 @@ var RouteManager = class _RouteManager {
1121
1127
  );
1122
1128
  }
1123
1129
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
1124
- if (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
1130
+ if (_chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
1125
1131
  _chunk7U4XF76Rcjs.logger.info(
1126
1132
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
1127
1133
  );
1128
1134
  }
1129
- _chunkZVSQN7NCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1135
+ _chunkDRO3NXA3cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1130
1136
  layoutEntries.map(({ entry, metadata }) => ({
1131
1137
  pattern: entry.pattern,
1132
- depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1138
+ depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1133
1139
  metadata
1134
1140
  })),
1135
1141
  routeEntries.map(({ entry, metadata }) => ({
1136
1142
  pattern: getRouteEntryDirectory(entry),
1137
- depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1143
+ depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1138
1144
  metadata
1139
1145
  })),
1140
- _chunkUWOCYINYcjs.routeBoundaryCoversDirectory,
1146
+ _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory,
1141
1147
  { serverOwners: islandsMode }
1142
1148
  );
1143
1149
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
@@ -1157,7 +1163,7 @@ var RouteManager = class _RouteManager {
1157
1163
  const routes = routeEntries.map(({ entry, metadata }) => {
1158
1164
  const programmaticPage = this.programmaticPages.get(entry.modulePath);
1159
1165
  const layoutShouldHydrate = layoutEntries.some(
1160
- ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1166
+ ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1161
1167
  );
1162
1168
  return {
1163
1169
  pattern: entry.pattern,
@@ -1173,8 +1179,8 @@ var RouteManager = class _RouteManager {
1173
1179
  modulePath: toUrlPath(boundary.modulePath)
1174
1180
  }))
1175
1181
  } : {},
1176
- ..._chunkZVSQN7NCcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1177
- renderPlan: _chunkUWOCYINYcjs.createFarmRouteRenderPlan.call(void 0, {
1182
+ ..._chunkDRO3NXA3cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1183
+ renderPlan: _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
1178
1184
  pageShouldHydrate: metadata.shouldHydrate,
1179
1185
  layoutShouldHydrate,
1180
1186
  islandStrategy: metadata.islandStrategy
@@ -1190,7 +1196,7 @@ var RouteManager = class _RouteManager {
1190
1196
  }))
1191
1197
  };
1192
1198
  });
1193
- const treeLayoutPatterns = islandsMode ? _chunkUWOCYINYcjs.getFarmServerTreeLayoutPatterns.call(void 0,
1199
+ const treeLayoutPatterns = islandsMode ? _chunkNEKO3HM2cjs.getFarmServerTreeLayoutPatterns.call(void 0,
1194
1200
  layoutEntries.map(({ entry, metadata }) => ({
1195
1201
  pattern: entry.pattern,
1196
1202
  shouldHydrate: metadata.shouldHydrate,
@@ -1215,7 +1221,7 @@ var RouteManager = class _RouteManager {
1215
1221
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
1216
1222
  }));
1217
1223
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
1218
- const metadata = _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1224
+ const metadata = _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1219
1225
  return {
1220
1226
  name: entry.name,
1221
1227
  ownerPattern: entry.ownerPattern,
@@ -1231,7 +1237,7 @@ var RouteManager = class _RouteManager {
1231
1237
  };
1232
1238
  });
1233
1239
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
1234
- metadata: _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0,
1240
+ metadata: _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0,
1235
1241
  entry.modulePath,
1236
1242
  normalizedProjectRoot,
1237
1243
  isolatedMode,
@@ -1323,16 +1329,17 @@ var RouteManager = class _RouteManager {
1323
1329
  const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
1324
1330
  return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
1325
1331
  }
1326
- if (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1332
+ if (_chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1327
1333
  const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
1328
1334
  const viteServer = this.viteServer;
1329
- return await _chunkHNUBRUFQcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1335
+ return await _chunkHQEYZSF3cjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1330
1336
  // Loaded on render: the route runtime manifest only reads metadata and rendering config.
1331
- components: () => _chunkHNUBRUFQcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1337
+ components: () => _chunkHQEYZSF3cjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1332
1338
  root: this.config.root,
1333
1339
  loadModule: viteServer ? (componentModulePath) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
1334
1340
  }),
1335
- config: mdxConfig
1341
+ config: mdxConfig,
1342
+ renderer: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
1336
1343
  });
1337
1344
  }
1338
1345
  if (this.viteServer) {
@@ -1380,7 +1387,7 @@ var RouteManager = class _RouteManager {
1380
1387
  */
1381
1388
  createRoutePattern(route) {
1382
1389
  if (route.segments.length === 0) return "/";
1383
- return "/" + route.segments.map(_chunkUWOCYINYcjs.formatRouteSegment).join("/");
1390
+ return "/" + route.segments.map(_chunkNEKO3HM2cjs.formatRouteSegment).join("/");
1384
1391
  }
1385
1392
  registerPageRoute(entry) {
1386
1393
  _chunkML4TOUZPcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
@@ -1399,7 +1406,7 @@ var RouteManager = class _RouteManager {
1399
1406
  }
1400
1407
  async discoverFileRoutes(source) {
1401
1408
  const appDir = _chunk7U4XF76Rcjs.resolveAppPath.call(void 0, source.root, source.srcDir, "app");
1402
- const componentExtensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1409
+ const componentExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1403
1410
  (extension) => extension.slice(1)
1404
1411
  );
1405
1412
  const componentGlob = componentExtensions.join(",");
@@ -1431,8 +1438,8 @@ var RouteManager = class _RouteManager {
1431
1438
  }
1432
1439
  }
1433
1440
  for (const [pattern, group] of canonicalPageGroups) {
1434
- const componentFiles = group.files.filter((file) => !_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, file));
1435
- const markdownFiles = group.files.filter(_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile);
1441
+ const componentFiles = group.files.filter((file) => !_chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, file));
1442
+ const markdownFiles = group.files.filter(_chunk26WP75W5cjs.isFarmMarkdownPageFile);
1436
1443
  if (componentFiles.length > 1) {
1437
1444
  throw new Error(
1438
1445
  `Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path4.default.join(appDir, file)).join(" and ")}.`
@@ -1474,7 +1481,7 @@ var RouteManager = class _RouteManager {
1474
1481
  for (const file of files) {
1475
1482
  const route = _chunk7U4XF76Rcjs.parseRoutePath.call(void 0, file);
1476
1483
  const modulePath = path4.default.join(appDir, file);
1477
- const pattern = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
1484
+ const pattern = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1478
1485
  const existing = target.get(pattern);
1479
1486
  if (_optionalChain([existing, 'optionalAccess', _49 => _49.sourceRoot]) === source.root) {
1480
1487
  throw new Error(
@@ -1496,7 +1503,7 @@ var RouteManager = class _RouteManager {
1496
1503
  const modulePath = path4.default.join(appDir, file);
1497
1504
  const pattern = this.createRoutePattern(slot.route);
1498
1505
  const ownerPattern = this.createRoutePattern(slot.ownerRoute);
1499
- const ownerDirectory = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1506
+ const ownerDirectory = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1500
1507
  const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
1501
1508
  const existing = this.routeSlots.get(key);
1502
1509
  if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
@@ -1578,11 +1585,11 @@ var RouteManager = class _RouteManager {
1578
1585
  srcDir: source.srcDir,
1579
1586
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1580
1587
  });
1581
- const graph = this.viteServer ? _chunkZVSQN7NCcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1588
+ const graph = this.viteServer ? _chunkDRO3NXA3cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1582
1589
  for (const { filePath, manifest } of manifests) {
1583
1590
  if (graph) {
1584
1591
  clientRoutes.push(
1585
- _chunkZVSQN7NCcjs.resolveProgrammaticClientRoutes.call(void 0, {
1592
+ _chunkDRO3NXA3cjs.resolveProgrammaticClientRoutes.call(void 0, {
1586
1593
  graph,
1587
1594
  routesFile: toRealPath(filePath),
1588
1595
  routes: manifest.routes,
@@ -1613,7 +1620,7 @@ var RouteManager = class _RouteManager {
1613
1620
  }
1614
1621
  if (definition.kind === "layout") {
1615
1622
  const route = _chunkYUCU6XB4cjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
1616
- const pattern = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
1623
+ const pattern = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1617
1624
  const existing = this.layouts.get(pattern);
1618
1625
  if (_optionalChain([existing, 'optionalAccess', _54 => _54.sourceRoot]) === source.root) {
1619
1626
  throw new Error(
@@ -1660,7 +1667,7 @@ var RouteManager = class _RouteManager {
1660
1667
  const matchingLayouts = [];
1661
1668
  for (const { entry, groupScope } of this.orderedLayouts) {
1662
1669
  if (!_chunk7U4XF76Rcjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
1663
- if (groupScope !== null && !_chunkUWOCYINYcjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1670
+ if (groupScope !== null && !_chunkNEKO3HM2cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1664
1671
  continue;
1665
1672
  }
1666
1673
  matchingLayouts.push(entry);
@@ -1741,14 +1748,14 @@ var RouteManager = class _RouteManager {
1741
1748
  let page = route;
1742
1749
  for (const boundaryEntry of boundaries.values()) {
1743
1750
  if (!_chunk7U4XF76Rcjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
1744
- const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1751
+ const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1745
1752
  if (groupScope !== null) {
1746
1753
  if (page === void 0) page = this.matchPageRoute(_chunk7U4XF76Rcjs.splitRoutePath.call(void 0, normalizedPath));
1747
- if (!_chunkUWOCYINYcjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1754
+ if (!_chunkNEKO3HM2cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1748
1755
  }
1749
1756
  const depth = boundaryEntry.route.segments.length;
1750
1757
  const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _58 => _58.route, 'access', _59 => _59.segments, 'access', _60 => _60.length]), () => ( -1));
1751
- if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1758
+ if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1752
1759
  bestMatch = boundaryEntry;
1753
1760
  }
1754
1761
  }
@@ -1776,7 +1783,7 @@ var RouteManager = class _RouteManager {
1776
1783
  const docs = this.config.docs;
1777
1784
  if (!docs || typeof docs !== "object" || !docs.enabled) return void 0;
1778
1785
  const usesAdapter = Boolean(docs.adapter && docs.adapter.server && docs.adapter.react);
1779
- if (usesAdapter && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) return void 0;
1786
+ if (usesAdapter && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer)) return void 0;
1780
1787
  const entry = `/${String(docs.entry || "docs").replace(/^\/+|\/+$/g, "")}`;
1781
1788
  return {
1782
1789
  owns: (routePath) => entry === "/" || routePath === entry || routePath.startsWith(`${entry}/`),
@@ -1798,7 +1805,7 @@ var RouteManager = class _RouteManager {
1798
1805
  }));
1799
1806
  const i18n = this.getI18nConfig();
1800
1807
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1801
- const result = await _chunkSDICLSQUcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1808
+ const result = await _chunkVMBIKDKWcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1802
1809
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1803
1810
  ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1804
1811
  });
@@ -1845,7 +1852,7 @@ var RouteManager = class _RouteManager {
1845
1852
  async isRouteSSG(modulePath) {
1846
1853
  try {
1847
1854
  const mod = await this.loadRouteModule(modulePath);
1848
- const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1855
+ const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1849
1856
  return rendering.ssg;
1850
1857
  } catch (e2) {
1851
1858
  return false;
@@ -1857,7 +1864,7 @@ var RouteManager = class _RouteManager {
1857
1864
  async hasRouteISR(modulePath) {
1858
1865
  try {
1859
1866
  const mod = await this.loadRouteModule(modulePath);
1860
- const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1867
+ const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1861
1868
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
1862
1869
  } catch (e3) {
1863
1870
  return false;
@@ -1869,7 +1876,7 @@ var RouteManager = class _RouteManager {
1869
1876
  async getRouteRevalidateInterval(modulePath) {
1870
1877
  try {
1871
1878
  const mod = await this.loadRouteModule(modulePath);
1872
- const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1879
+ const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1873
1880
  return rendering.revalidate;
1874
1881
  } catch (e4) {
1875
1882
  return void 0;
@@ -1877,7 +1884,7 @@ var RouteManager = class _RouteManager {
1877
1884
  }
1878
1885
  };
1879
1886
  function getPageDirectoryField(route, pattern) {
1880
- const directory = _chunkUWOCYINYcjs.createRouteDirectoryPattern.call(void 0, route);
1887
+ const directory = _chunkNEKO3HM2cjs.createRouteDirectoryPattern.call(void 0, route);
1881
1888
  return directory === pattern ? {} : { directory };
1882
1889
  }
1883
1890
  function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
@@ -2001,11 +2008,11 @@ function createFarmDevClientManifest(manifest, options) {
2001
2008
  }
2002
2009
  for (const layout of manifest.layouts) {
2003
2010
  if (layoutPatterns && !layoutPatterns.has(layout.pattern)) continue;
2004
- const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, layout.pattern);
2011
+ const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, layout.pattern);
2005
2012
  clientManifest.layouts[layout.pattern] = {
2006
2013
  modulePath: layout.modulePath,
2007
2014
  pattern: layout.pattern,
2008
- ...groupScope ? { urlPattern: _chunkUWOCYINYcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
2015
+ ...groupScope ? { urlPattern: _chunkNEKO3HM2cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
2009
2016
  shouldHydrate: layout.shouldHydrate,
2010
2017
  islandStrategy: layout.islandStrategy,
2011
2018
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -3080,7 +3087,7 @@ function generateFarmIntegrationProviderClientCode(providers, root, rendererComp
3080
3087
  let hasClerkProvider = false;
3081
3088
  renderedProviders.forEach((provider, index) => {
3082
3089
  let componentExpression = "null";
3083
- if (_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
3090
+ if (_chunkB3HQTGXScjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
3084
3091
  const namespace = `FarmIntegrationProviderModule${index}`;
3085
3092
  imports.push(
3086
3093
  `import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
@@ -3137,7 +3144,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
3137
3144
  const entries = [];
3138
3145
  let needsMarkHelper = false;
3139
3146
  providers.forEach((provider, index) => {
3140
- if (!_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
3147
+ if (!_chunkB3HQTGXScjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
3141
3148
  const namespace = `FarmServerIntegrationProviderModule${index}`;
3142
3149
  imports.push(
3143
3150
  `import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
@@ -3165,6 +3172,21 @@ function resolveProviderModule(moduleId, root) {
3165
3172
  return _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, path4.default.resolve(root, moduleId), root);
3166
3173
  }
3167
3174
 
3175
+ // src/server-actions-mode.ts
3176
+ function resolveFarmIslxActionsMode(config) {
3177
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _66 => _66.experimental, 'optionalAccess', _67 => _67.serverComponents])) === "islands") {
3178
+ return "islands";
3179
+ }
3180
+ if (_optionalChain([config, 'access', _68 => _68.experimental, 'optionalAccess', _69 => _69.serverActions]) !== true) return null;
3181
+ const renderer = config.renderer;
3182
+ if (renderer === void 0 || renderer === false) return null;
3183
+ if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer) || _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer)) return null;
3184
+ return "renderer";
3185
+ }
3186
+ function farmBrowserServerFnsEnabled(config) {
3187
+ return _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverActions]) === true && resolveFarmIslxActionsMode(config) !== null;
3188
+ }
3189
+
3168
3190
  // src/island-inference.ts
3169
3191
 
3170
3192
 
@@ -3205,7 +3227,7 @@ function inferFarmIslandStrategy(filePath, root) {
3205
3227
  const result = _compiler.inferStrategy.call(void 0, file, code, {
3206
3228
  parse: parseFarmIslandSource,
3207
3229
  resolve: (specifier, importer) => {
3208
- const resolved = _chunkZVSQN7NCcjs.resolveImportedModule.call(void 0, importer, specifier, root);
3230
+ const resolved = _chunkDRO3NXA3cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3209
3231
  return resolved.local ? resolved.path : null;
3210
3232
  }
3211
3233
  });
@@ -3225,7 +3247,7 @@ function inferFarmRouteRootStrategy(owners, root) {
3225
3247
  if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3226
3248
  return cached.result;
3227
3249
  }
3228
- const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3250
+ const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3229
3251
  const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3230
3252
  routeRootInferences.set(key, {
3231
3253
  stamps: [...read].map((file) => [file, modifiedAt(file)]),
@@ -3242,7 +3264,7 @@ function inferRouteRoot(owners, root) {
3242
3264
  const files = [];
3243
3265
  const modules = [];
3244
3266
  for (const owner of owners) {
3245
- const rendered = _chunkZVSQN7NCcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3267
+ const rendered = _chunkDRO3NXA3cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3246
3268
  if (!rendered) {
3247
3269
  return {
3248
3270
  strategy: null,
@@ -3258,7 +3280,7 @@ function inferRouteRoot(owners, root) {
3258
3280
  source = fs2.default.readFileSync(module, "utf8");
3259
3281
  } catch (e11) {
3260
3282
  }
3261
- if (_chunkZVSQN7NCcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3283
+ if (_chunkDRO3NXA3cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3262
3284
  }
3263
3285
  for (const module of modules) {
3264
3286
  const result = inferFarmIslandStrategy(module, root);
@@ -3270,7 +3292,7 @@ function inferRouteRoot(owners, root) {
3270
3292
  function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
3271
3293
  const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
3272
3294
  const onRoute = layouts.filter(
3273
- (layout) => _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3295
+ (layout) => _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3274
3296
  );
3275
3297
  const declared = [
3276
3298
  ...page.islandStrategy ? [page.islandStrategy] : [],
@@ -3302,8 +3324,8 @@ var _stream = require('stream');
3302
3324
 
3303
3325
 
3304
3326
  function resolveFarmNotFoundComponentPath(config, appDirs) {
3305
- const extensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3306
- const configuredPath = _optionalChain([config, 'access', _66 => _66.notFound, 'optionalAccess', _67 => _67.component, 'optionalAccess', _68 => _68.trim, 'call', _69 => _69()]);
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()]);
3307
3329
  if (configuredPath) {
3308
3330
  const componentPath = path4.default.isAbsolute(configuredPath) ? path4.default.normalize(configuredPath) : path4.default.resolve(config.root, configuredPath);
3309
3331
  if (!extensions.some((extension) => componentPath.endsWith(extension))) {
@@ -3341,11 +3363,11 @@ function getFarmLayoutKey(pattern, params) {
3341
3363
  );
3342
3364
  }
3343
3365
  function countFarmKeptLayouts(layoutsHeader, layouts, params) {
3344
- const chain = _chunkUWOCYINYcjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3366
+ const chain = _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3345
3367
  if (chain.length === 0) return 0;
3346
3368
  const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
3347
- if (chain[0] === keys[0]) return _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3348
- return keys.length > 1 ? 1 + _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
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;
3349
3371
  }
3350
3372
  function createFarmFlushToken() {
3351
3373
  const bytes = new Uint8Array(16);
@@ -3600,7 +3622,7 @@ function createDefaultErrorDiagnostics(error, root) {
3600
3622
  function canBootFarmIslandsClient(config) {
3601
3623
  const docs = config.docs;
3602
3624
  const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
3603
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) === "islands" && !docsEnabled && _chunkZ5BANEQDcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkZ5BANEQDcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
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");
3604
3626
  }
3605
3627
 
3606
3628
  // src/islands-kept-layouts.ts
@@ -3648,7 +3670,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
3648
3670
  function parse(code, file) {
3649
3671
  const extension = path4.default.extname(file).slice(1);
3650
3672
  const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
3651
- return _chunkZVSQN7NCcjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3673
+ return _chunkDRO3NXA3cjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3652
3674
  try {
3653
3675
  return _parseAst.parseAst.call(void 0, code, { lang });
3654
3676
  } catch (e14) {
@@ -3738,11 +3760,11 @@ function findFarmRequestDecidingConstruct(code, file) {
3738
3760
  reason = "import.meta";
3739
3761
  return;
3740
3762
  case "CallExpression":
3741
- if (_optionalChain([current, 'access', _72 => _72.callee, 'optionalAccess', _73 => _73.type]) === "Identifier" && current.callee.name === "use") {
3763
+ if (_optionalChain([current, 'access', _78 => _78.callee, 'optionalAccess', _79 => _79.type]) === "Identifier" && current.callee.name === "use") {
3742
3764
  reason = "a use() call";
3743
3765
  return;
3744
3766
  }
3745
- if (_optionalChain([current, 'access', _74 => _74.callee, 'optionalAccess', _75 => _75.type]) === "MemberExpression" && !current.callee.computed && _optionalChain([current, 'access', _76 => _76.callee, 'access', _77 => _77.object, 'optionalAccess', _78 => _78.type]) === "Identifier" && current.callee.object.name === "Math" && _optionalChain([current, 'access', _79 => _79.callee, 'access', _80 => _80.property, 'optionalAccess', _81 => _81.name]) === "random") {
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") {
3746
3768
  reason = "Math.random()";
3747
3769
  return;
3748
3770
  }
@@ -3783,14 +3805,14 @@ function isReference(node, parent, key) {
3783
3805
  }
3784
3806
  function readSource(file) {
3785
3807
  try {
3786
- _chunkZVSQN7NCcjs.noteFarmSourceRead.call(void 0, file);
3808
+ _chunkDRO3NXA3cjs.noteFarmSourceRead.call(void 0, file);
3787
3809
  return fs2.default.readFileSync(file, "utf8");
3788
3810
  } catch (e15) {
3789
3811
  return null;
3790
3812
  }
3791
3813
  }
3792
3814
  function explainFarmKeptLayoutRender(modulePath, root) {
3793
- const entry = _chunkZVSQN7NCcjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3815
+ const entry = _chunkDRO3NXA3cjs.resolveModuleSourcePath.call(void 0, modulePath, root);
3794
3816
  if (!entry) return `${modulePath} does not resolve`;
3795
3817
  const visited = /* @__PURE__ */ new Set();
3796
3818
  const check = (file) => {
@@ -3800,7 +3822,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3800
3822
  if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
3801
3823
  const code = readSource(file);
3802
3824
  if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
3803
- const { reason, imports } = _chunkZVSQN7NCcjs.memoizeInFarmSourceSnapshot.call(void 0,
3825
+ const { reason, imports } = _chunkDRO3NXA3cjs.memoizeInFarmSourceSnapshot.call(void 0,
3804
3826
  "kept-layout-module",
3805
3827
  code,
3806
3828
  () => findFarmRequestDecidingConstruct(code, file)
@@ -3813,7 +3835,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
3813
3835
  return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
3814
3836
  }
3815
3837
  if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
3816
- const resolved = _chunkZVSQN7NCcjs.resolveImportedModule.call(void 0, file, imported.source, root);
3838
+ const resolved = _chunkDRO3NXA3cjs.resolveImportedModule.call(void 0, file, imported.source, root);
3817
3839
  if (!resolved.path || !resolved.local) {
3818
3840
  return `${path4.default.relative(root, file)} imports ${imported.source}`;
3819
3841
  }
@@ -3828,20 +3850,67 @@ var answers = /* @__PURE__ */ new Map();
3828
3850
  function canFarmSkipKeptLayoutRender(modulePath, root) {
3829
3851
  const key = `${root}\0${modulePath}`;
3830
3852
  const known = answers.get(key);
3831
- if (known && known.stamps.every(([file, stamp]) => _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3853
+ if (known && known.stamps.every(([file, stamp]) => _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
3832
3854
  return known.skip;
3833
3855
  }
3834
- const { result, files } = _chunkZVSQN7NCcjs.traceFarmSourceReads.call(void 0,
3856
+ const { result, files } = _chunkDRO3NXA3cjs.traceFarmSourceReads.call(void 0,
3835
3857
  () => explainFarmKeptLayoutRender(modulePath, root) === null
3836
3858
  );
3837
3859
  answers.set(key, {
3838
3860
  skip: result,
3839
- stamps: files.map((file) => [file, _chunkZVSQN7NCcjs.getFarmSourceStamp.call(void 0, file)])
3861
+ stamps: files.map((file) => [file, _chunkDRO3NXA3cjs.getFarmSourceStamp.call(void 0, file)])
3840
3862
  });
3841
3863
  return result;
3842
3864
  }
3843
3865
 
3844
3866
  // src/server/renderer.ts
3867
+ function pipeFarmRendererWebStream(runtime) {
3868
+ return (element, callbacks) => {
3869
+ let source;
3870
+ let destination;
3871
+ let aborted = false;
3872
+ let shellSettled = false;
3873
+ const settleShell = (error) => {
3874
+ if (shellSettled) return false;
3875
+ shellSettled = true;
3876
+ if (error === void 0) callbacks.onShellReady();
3877
+ else callbacks.onShellError(error);
3878
+ return true;
3879
+ };
3880
+ Promise.resolve().then(
3881
+ () => runtime.renderToReadableStream(element, {
3882
+ ...callbacks.nonce ? { nonce: callbacks.nonce } : {},
3883
+ onError: callbacks.onError
3884
+ })
3885
+ ).then(
3886
+ (stream) => {
3887
+ source = _stream.Readable.fromWeb(stream);
3888
+ if (aborted) {
3889
+ source.destroy();
3890
+ return;
3891
+ }
3892
+ source.once("readable", () => settleShell());
3893
+ source.once("error", (error) => {
3894
+ if (settleShell(error)) return;
3895
+ callbacks.onError(error);
3896
+ _optionalChain([destination, 'optionalAccess', _88 => _88.end, 'call', _89 => _89()]);
3897
+ });
3898
+ },
3899
+ (error) => settleShell(error)
3900
+ );
3901
+ return {
3902
+ pipe(target) {
3903
+ destination = target;
3904
+ _optionalChain([source, 'optionalAccess', _90 => _90.pipe, 'call', _91 => _91(target)]);
3905
+ },
3906
+ abort() {
3907
+ aborted = true;
3908
+ _optionalChain([source, 'optionalAccess', _92 => _92.destroy, 'call', _93 => _93()]);
3909
+ _optionalChain([destination, 'optionalAccess', _94 => _94.end, 'call', _95 => _95()]);
3910
+ }
3911
+ };
3912
+ };
3913
+ }
3845
3914
  var islands;
3846
3915
  function withFarmIslandsRenders(runtime, islandsRuntime) {
3847
3916
  const wrap = (element) => islandsRuntime.withFarmIslandsRender(
@@ -3917,7 +3986,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
3917
3986
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
3918
3987
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
3919
3988
  warnedSuppressedAsyncHydrationModules.add(modulePath);
3920
- _chunk7U4XF76Rcjs.logger.warn(_chunkZVSQN7NCcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3989
+ _chunk7U4XF76Rcjs.logger.warn(_chunkDRO3NXA3cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3921
3990
  }
3922
3991
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
3923
3992
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -3954,7 +4023,7 @@ function appendResponseHeader(res, name, value) {
3954
4023
  }
3955
4024
  }
3956
4025
  function requestHeader(req, name) {
3957
- const value = _optionalChain([req, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83[name]]);
4026
+ const value = _optionalChain([req, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97[name]]);
3958
4027
  return Array.isArray(value) ? value[0] : value;
3959
4028
  }
3960
4029
  function appendResponseVary(res, value) {
@@ -3968,16 +4037,12 @@ function appendResponseVary(res, value) {
3968
4037
  function renderI18nAlternateLinks(requestPath, snapshot, options) {
3969
4038
  if (snapshot.routing === "none") return "";
3970
4039
  const url = new URL(requestPath, "http://farm.local");
3971
- return _chunkUWOCYINYcjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
4040
+ return _chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
3972
4041
  }
3973
4042
  var PPR_REFRESH_MAX_ATTEMPTS = 3;
3974
4043
  function createPPRRefreshScript() {
3975
4044
  return `<script>(function(){if(window.__FARM_PPR_REFRESHING__)return;window.__FARM_PPR_REFRESHING__=true;var owner=document.currentScript;function applyState(doc){doc.querySelectorAll("script[data-farm-refresh-state]").forEach(function(source){var script=document.createElement("script");if(owner&&owner.nonce)script.nonce=owner.nonce;script.textContent=source.textContent||"";document.head.appendChild(script);script.remove();});}function key(node){return node.nodeType===1?node.getAttribute("id"):null}function compatible(current,next){if(current.nodeType!==next.nodeType)return false;if(current.nodeType===1&&current.tagName!==next.tagName)return false;var currentKey=key(current);var nextKey=key(next);return currentKey||nextKey?currentKey===nextKey:true}function syncAttributes(current,next){Array.from(current.attributes).forEach(function(attribute){if(!next.hasAttribute(attribute.name))current.removeAttribute(attribute.name)});Array.from(next.attributes).forEach(function(attribute){if(current.getAttribute(attribute.name)!==attribute.value)current.setAttribute(attribute.name,attribute.value)})}function syncChildren(current,next){var cursor=current.firstChild;Array.from(next.childNodes).forEach(function(nextChild){if(cursor&&compatible(cursor,nextChild)){var matched=cursor;cursor=cursor.nextSibling;syncNode(matched,nextChild);return}var candidate=cursor;while(candidate&&!compatible(candidate,nextChild))candidate=candidate.nextSibling;if(candidate){current.insertBefore(candidate,cursor);syncNode(candidate,nextChild);return}current.insertBefore(nextChild.cloneNode(true),cursor)});while(cursor){var stale=cursor;cursor=cursor.nextSibling;stale.remove()}}function syncNode(current,next){if(current.nodeType===3||current.nodeType===8){if(current.nodeValue!==next.nodeValue)current.nodeValue=next.nodeValue;return}if(current.nodeType!==1)return;var tag=current.tagName;var value=tag==="INPUT"&&current.type==="file"?null:"value" in current?current.value:null;var checked="checked" in current?current.checked:null;var selected=tag==="SELECT"?Array.from(current.options).map(function(option){return option.selected}):null;var focused=document.activeElement===current;var selection=focused&&typeof current.selectionStart==="number"?[current.selectionStart,current.selectionEnd,current.selectionDirection]:null;syncAttributes(current,next);syncChildren(current,next);if(value!==null)current.value=value;if(checked!==null)current.checked=checked;if(selected)Array.from(current.options).forEach(function(option,index){option.selected=selected[index]===true});if(selection)try{current.setSelectionRange(selection[0],selection[1],selection[2])}catch{}}function replaceRoot(html){var doc=new DOMParser().parseFromString(html,"text/html");var next=doc.getElementById("root");var current=document.getElementById("root");if(!next||!current)return false;applyState(doc);syncNode(current,next);return true}var attempts=0,settle;window.__FARM_PPR_REFRESH_PROMISE__=new Promise(function(resolve){settle=resolve;});function release(){window.__FARM_PPR_REFRESHING__=false;}function retry(){settle();if(window.__FARM_PPR_HYDRATING__||attempts>=${PPR_REFRESH_MAX_ATTEMPTS})return release();if(navigator.onLine===false){window.addEventListener("online",run,{once:true});return;}setTimeout(run,1000*Math.pow(2,attempts-1));}function run(){if(window.__FARM_PPR_HYDRATING__)return release();attempts++;fetch(window.location.href,{cache:"no-store",credentials:"same-origin",headers:{"x-farm-ppr-refresh":"1"}}).then(function(response){if(!response.ok)throw new Error("status "+response.status);return response.text();}).then(function(html){if(window.__FARM_PPR_HYDRATING__)return release();if(!replaceRoot(html))throw new Error("no root");settle();}).catch(retry);}run();})();</script>`;
3976
4045
  }
3977
- function createPreHydrationClickQueueScript() {
3978
- const selector = JSON.stringify(_chunk7KJJ4SBScjs.FARM_ISLAND_REPLAYABLE_SELECTOR);
3979
- return `<script>(function(){if(window.__FARM_PREHYDRATION_CLICK_QUEUE__)return;var queue=[];window.__FARM_PREHYDRATION_CLICK_QUEUE__=queue;window.__FARM_HYDRATED__=false;document.documentElement.dataset.farmHydrated="false";function isModified(event){return !!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}function inHydrated(node){return !!(node&&node.closest&&node.closest('[data-farm-island-hydrated="true"]'))}function closestQueuedTarget(target){while(target&&target!==document.documentElement){if(target.matches&&target.matches(${selector}))return target;target=target.parentElement}return null}function announce(target,kind){document.dispatchEvent(new CustomEvent("farm:island-interaction",{detail:{target:target,kind:kind||null}}))}function submits(target,kind){return kind==="submit"||!!(target.form&&target.type==="submit")}function hold(event,target,kind){if(!(submits(target,kind)&&queue.some(function(item){return item.target===target}))){queue.push({target:target,kind:kind,createdAt:Date.now()});announce(target,kind)}event.preventDefault();event.stopImmediatePropagation()}document.addEventListener("click",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented||event.button!==0||isModified(event))return;var target=closestQueuedTarget(event.target);if(!target||target.closest&&target.closest("a[href]")||inHydrated(target))return;hold(event,target,"click")},true);document.addEventListener("submit",function(event){if(window.__FARM_HYDRATED__)return;if(event.defaultPrevented)return;var form=event.target;if(!form||form.nodeName!=="FORM"||inHydrated(form))return;hold(event,form,"submit")},true);function observe(event){if(window.__FARM_HYDRATED__)return;var target=event.target;if(!(target&&target.closest)||inHydrated(target))return;announce(target,null)}document.addEventListener("pointerdown",observe,true);document.addEventListener("focusin",observe,true);})();</script>`;
3980
- }
3981
4046
  function rendererRenderOptions() {
3982
4047
  const nonce = _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, );
3983
4048
  return nonce ? { nonce } : void 0;
@@ -4063,12 +4128,12 @@ async function parseRouteModuleProps(routeModule, input) {
4063
4128
  }
4064
4129
  const schemas = routeModule.__farmRouteSchemas;
4065
4130
  const params = parseRouteModuleSchema(
4066
- _optionalChain([schemas, 'optionalAccess', _84 => _84.params]),
4131
+ _optionalChain([schemas, 'optionalAccess', _98 => _98.params]),
4067
4132
  input.props.params,
4068
4133
  "params",
4069
4134
  input.routePath
4070
4135
  );
4071
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _85 => _85.search]), input.search, "search", input.routePath);
4136
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _99 => _99.search]), input.search, "search", input.routePath);
4072
4137
  return {
4073
4138
  ...input.props,
4074
4139
  params,
@@ -4121,38 +4186,31 @@ var ServerRenderer = class {
4121
4186
  async initialize() {
4122
4187
  if (this.rendererRuntime) return;
4123
4188
  if (this.islandValues()) {
4124
- _chunk52LTENREcjs.installFarmIslandValues.call(void 0, );
4189
+ _chunkWOAXQ5MZcjs.installFarmIslandValues.call(void 0, );
4125
4190
  (await import("./internal/islands-server.cjs")).installFarmIslandsServer();
4126
4191
  await _asyncNullishCoalesce(islands, async () => ( (islands = await import("./internal/islands-runtime.cjs"))));
4127
4192
  } else {
4128
- _chunk52LTENREcjs.uninstallFarmIslandValues.call(void 0, );
4193
+ _chunkWOAXQ5MZcjs.uninstallFarmIslandValues.call(void 0, );
4129
4194
  }
4130
- if (_optionalChain([this, 'access', _86 => _86.config, 'access', _87 => _87.notFound, 'optionalAccess', _88 => _88.component, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()])) {
4131
- resolveFarmNotFoundComponentPath(this.config, _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, this.config));
4195
+ if (_optionalChain([this, 'access', _100 => _100.config, 'access', _101 => _101.notFound, 'optionalAccess', _102 => _102.component, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()])) {
4196
+ resolveFarmNotFoundComponentPath(this.config, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config));
4132
4197
  }
4133
- const loaded = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? this.reactRenderer = await import("./renderer/react/server.cjs") : _chunk67MZTLTFcjs.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,
4134
- _chunk67MZTLTFcjs.resolveFarmRendererModule.call(void 0,
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,
4135
4200
  this.config.root || process.cwd(),
4136
4201
  this.config.renderer.server
4137
4202
  )
4138
4203
  ).href);
4139
4204
  const runtime = loaded;
4140
- const required = ["createElement", "isValidElement", "renderToString"];
4141
- for (const key of required) {
4142
- if (typeof runtime[key] !== "function") {
4143
- throw new Error(
4144
- `Renderer \`${this.config.renderer.name}\` server module must export ${key}().`
4145
- );
4146
- }
4147
- }
4148
- _chunk67MZTLTFcjs.assertFarmRendererStreamingRuntime.call(void 0,
4205
+ _chunkBCTHOQPPcjs.assertFarmRendererServerModule.call(void 0, runtime, this.config.renderer);
4206
+ _chunkBCTHOQPPcjs.assertFarmRendererStreamingRuntime.call(void 0,
4149
4207
  this.config.renderer.name,
4150
4208
  this.config.renderer,
4151
4209
  runtime,
4152
4210
  "node"
4153
4211
  );
4154
4212
  this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
4155
- _optionalChain([this, 'access', _91 => _91.routeManager, 'access', _92 => _92.setRendererRuntime, 'optionalCall', _93 => _93(this.rendererRuntime)]);
4213
+ _optionalChain([this, 'access', _105 => _105.routeManager, 'access', _106 => _106.setRendererRuntime, 'optionalCall', _107 => _107(this.rendererRuntime)]);
4156
4214
  await this.applyRendererAppSetup();
4157
4215
  }
4158
4216
  /**
@@ -4161,7 +4219,7 @@ var ServerRenderer = class {
4161
4219
  * re-applied on the next request without restarting.
4162
4220
  */
4163
4221
  async applyRendererAppSetup() {
4164
- const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0,
4222
+ const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0,
4165
4223
  this.config.root || process.cwd(),
4166
4224
  this.config.renderer
4167
4225
  );
@@ -4177,7 +4235,10 @@ var ServerRenderer = class {
4177
4235
  this.appliedAppSetupModule = setupModule;
4178
4236
  configureApp(setupModule.default);
4179
4237
  }
4180
- createPageBoundary(pageElement, options) {
4238
+ async createPageBoundary(pageElement, options) {
4239
+ if (options.pageShouldHydrate && !options.layoutShouldHydrate) {
4240
+ pageElement = await this.wrapIslandIntegrationProviders(pageElement);
4241
+ }
4181
4242
  const boundary = this.rendererRuntime.createElement(
4182
4243
  "div",
4183
4244
  {
@@ -4192,6 +4253,15 @@ var ServerRenderer = class {
4192
4253
  );
4193
4254
  return options.pageShouldHydrate && !options.layoutShouldHydrate && this.reactRenderer ? this.reactRenderer.markPagePosition(boundary) : boundary;
4194
4255
  }
4256
+ /**
4257
+ * The browser hydrates a page island or a route slot as its own root, inside the integration
4258
+ * providers, so the server renders the providers inside it too, or a provider that renders
4259
+ * markup (a Vue `<slot />` renders fragment markers) puts the root's HTML out of step. React
4260
+ * lines an island up with its tree position instead, and its providers render no markup.
4261
+ */
4262
+ async wrapIslandIntegrationProviders(element) {
4263
+ return this.reactRenderer ? element : this.wrapWithIntegrationProviders(element);
4264
+ }
4195
4265
  /// The app's `<srcDir>/app/globals.css`, linked only when it exists, as the
4196
4266
  /// production build imports it only when it exists. An app without one gets
4197
4267
  /// no stylesheet link rather than a failing request.
@@ -4210,7 +4280,7 @@ var ServerRenderer = class {
4210
4280
  /// Stylesheets the app imported through JS (fontsource packages, component
4211
4281
  /// CSS) that the document must link alongside globals.css — see #658.
4212
4282
  collectDevStyleHrefs() {
4213
- const graph = _optionalChain([this, 'access', _94 => _94.viteServer, 'optionalAccess', _95 => _95.moduleGraph]);
4283
+ const graph = _optionalChain([this, 'access', _108 => _108.viteServer, 'optionalAccess', _109 => _109.moduleGraph]);
4214
4284
  if (!graph) return [];
4215
4285
  return collectDevStylesheetUrls(
4216
4286
  graph.idToModuleMap.values(),
@@ -4261,7 +4331,7 @@ var ServerRenderer = class {
4261
4331
  "data-farm-layout-boundary": "true",
4262
4332
  "data-farm-layout-pattern": pattern,
4263
4333
  ...segment ? { "data-farm-layout-key": segment.key } : {},
4264
- ..._optionalChain([segment, 'optionalAccess', _96 => _96.kept]) ? { "data-farm-layout-kept": "true" } : {},
4334
+ ..._optionalChain([segment, 'optionalAccess', _110 => _110.kept]) ? { "data-farm-layout-kept": "true" } : {},
4265
4335
  style: { display: "contents" }
4266
4336
  },
4267
4337
  layoutElement
@@ -4292,10 +4362,10 @@ var ServerRenderer = class {
4292
4362
  return serverTree && this.rendererRuntime.renderServerTreePage ? this.rendererRuntime.renderServerTreePage(element, { values: false }) : this.rendererRuntime.isolateServerPageGraph(element);
4293
4363
  }
4294
4364
  async renderElementToCompleteHTML(element, options = {}) {
4295
- const streaming = _chunk67MZTLTFcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4365
+ const streaming = _chunkBCTHOQPPcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4296
4366
  const renderToPipeableStream = streaming.node ? this.rendererRuntime.renderToPipeableStream : void 0;
4297
4367
  if (renderToPipeableStream) {
4298
- const inlineBoundaries = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer);
4368
+ const inlineBoundaries = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer);
4299
4369
  return await new Promise((resolve3, reject) => {
4300
4370
  const chunks = [];
4301
4371
  let shellReady = false;
@@ -4313,7 +4383,7 @@ var ServerRenderer = class {
4313
4383
  writable.once("error", reject);
4314
4384
  const stream = renderToPipeableStream(element, {
4315
4385
  nonce: _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, ),
4316
- formState: _chunkPBJ7MEOVcjs.getFarmFormState.call(void 0, ),
4386
+ formState: _chunkOZUINP2Pcjs.getFarmFormState.call(void 0, ),
4317
4387
  ...inlineBoundaries ? {
4318
4388
  progressiveChunkSize: Number.MAX_SAFE_INTEGER,
4319
4389
  onAllReady() {
@@ -4341,7 +4411,7 @@ var ServerRenderer = class {
4341
4411
  element,
4342
4412
  rendererRenderOptions()
4343
4413
  );
4344
- return await _chunk67MZTLTFcjs.readFarmRendererWebStream.call(void 0, stream);
4414
+ return await _chunkBCTHOQPPcjs.readFarmRendererWebStream.call(void 0, stream);
4345
4415
  }
4346
4416
  return await this.rendererRuntime.renderToString(element, rendererRenderOptions());
4347
4417
  }
@@ -4357,7 +4427,7 @@ var ServerRenderer = class {
4357
4427
  );
4358
4428
  return { html: rendered.html, head: rendered.head || "" };
4359
4429
  }
4360
- const { head, body } = _chunkUWOCYINYcjs.takeFarmHoistedHead.call(void 0,
4430
+ const { head, body } = _chunkNEKO3HM2cjs.takeFarmHoistedHead.call(void 0,
4361
4431
  await this.renderElementToCompleteHTML(element, options),
4362
4432
  true
4363
4433
  );
@@ -4365,7 +4435,20 @@ var ServerRenderer = class {
4365
4435
  }
4366
4436
  /** Islands mode sends large prop values once, keyed by content (RFC 0003). */
4367
4437
  islandValues() {
4368
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _97 => _97.config, 'access', _98 => _98.experimental, 'optionalAccess', _99 => _99.serverComponents])) === "islands";
4438
+ return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _111 => _111.config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverComponents])) === "islands";
4439
+ }
4440
+ /**
4441
+ * The page's element. Only React renders an async component, so for any other renderer Farm
4442
+ * awaits an async page itself and hands the renderer what it returned, as the production
4443
+ * server does. A `page.md` page is one: it compiles its Markdown on first render.
4444
+ */
4445
+ async createPageElement(PageComponent, pageProps) {
4446
+ 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") {
4448
+ return runtime.createElement(PageComponent, pageProps);
4449
+ }
4450
+ const result = await PageComponent(pageProps);
4451
+ return runtime.isValidElement(result) ? result : runtime.createElement(runtime.Fragment, null, result);
4369
4452
  }
4370
4453
  /**
4371
4454
  * Render the route tree used by client navigation without producing a second
@@ -4378,7 +4461,7 @@ var ServerRenderer = class {
4378
4461
  _chunkD22BUQKWcjs.setFarmBasePath.call(void 0, this.config.basePath);
4379
4462
  this.publishSearchPreserveRoutes();
4380
4463
  _chunkDVJM55D2cjs.setFarmTrailingSlashPreference.call(void 0, this.config.trailingSlash);
4381
- let element = this.rendererRuntime.createElement(input.PageComponent, input.pageProps);
4464
+ let element = await this.createPageElement(input.PageComponent, input.pageProps);
4382
4465
  if (input.LoadingComponent) {
4383
4466
  element = this.rendererRuntime.createElement(
4384
4467
  this.rendererRuntime.Suspense,
@@ -4396,7 +4479,7 @@ var ServerRenderer = class {
4396
4479
  } else if (input.layoutShouldHydrate && !input.pageShouldHydrate && this.rendererRuntime.isolateServerPageGraph) {
4397
4480
  element = await this.isolateServerPage(element, input.serverTree === true);
4398
4481
  }
4399
- element = this.createPageBoundary(element, {
4482
+ element = await this.createPageBoundary(element, {
4400
4483
  pageShouldHydrate: input.pageShouldHydrate,
4401
4484
  layoutShouldHydrate: input.layoutShouldHydrate,
4402
4485
  islandStrategy: input.islandStrategy
@@ -4421,7 +4504,11 @@ var ServerRenderer = class {
4421
4504
  continue;
4422
4505
  }
4423
4506
  let slotElement = this.rendererRuntime.createElement(slot.module.default, slot.props);
4424
- if (slot.shouldHydrate !== false) slotElement = this.wrapClientGraph(slotElement);
4507
+ if (slot.shouldHydrate !== false) {
4508
+ slotElement = this.wrapClientGraph(
4509
+ await this.wrapIslandIntegrationProviders(slotElement)
4510
+ );
4511
+ }
4425
4512
  slotProps[slot.name] = this.rendererRuntime.createElement(
4426
4513
  "div",
4427
4514
  {
@@ -4456,7 +4543,7 @@ var ServerRenderer = class {
4456
4543
  rejectLateRedirects: true
4457
4544
  }
4458
4545
  );
4459
- return fragmentTag ? _chunkUWOCYINYcjs.takeFarmNavigationOutlet.call(void 0, html, fragmentTag) : html;
4546
+ return fragmentTag ? _chunkNEKO3HM2cjs.takeFarmNavigationOutlet.call(void 0, html, fragmentTag) : html;
4460
4547
  }
4461
4548
  /**
4462
4549
  * A built-in docs runtime page (`docs.entry`, no adapter) under layouts that hydrate, or whose
@@ -4466,7 +4553,7 @@ var ServerRenderer = class {
4466
4553
  * Any other docs response is sent as it is.
4467
4554
  */
4468
4555
  async wrapDocsResponseWithLayouts(request2, response) {
4469
- if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _100 => _100.headers, 'access', _101 => _101.get, 'call', _102 => _102("content-type"), 'optionalAccess', _103 => _103.toLowerCase, 'call', _104 => _104(), 'access', _105 => _105.includes, 'call', _106 => _106("text/html")])) {
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")])) {
4470
4557
  return response;
4471
4558
  }
4472
4559
  await this.initialize();
@@ -4481,14 +4568,14 @@ var ServerRenderer = class {
4481
4568
  return {
4482
4569
  pattern: layout.pattern,
4483
4570
  modulePath: layout.modulePath,
4484
- shouldHydrate: _optionalChain([entry, 'optionalAccess', _107 => _107.shouldHydrate]) === true,
4485
- islandStrategy: _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _108 => _108.islandStrategy]), () => ( null)),
4486
- hasIsolatedClientBoundaries: _optionalChain([entry, 'optionalAccess', _109 => _109.hasIsolatedClientBoundaries]) === true,
4487
- serverTree: _optionalChain([entry, 'optionalAccess', _110 => _110.serverTree]) === true,
4488
- islands: _optionalChain([entry, 'optionalAccess', _111 => _111.hasIsolatedClientBoundaries]) === true
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
4489
4576
  };
4490
4577
  });
4491
- if (!_chunkUWOCYINYcjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
4578
+ if (!_chunkNEKO3HM2cjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
4492
4579
  const shouldHydrateLayout = layouts.some((layout) => layout.shouldHydrate);
4493
4580
  const hasIsolatedClientBoundaries = layouts.some(
4494
4581
  (layout) => layout.hasIsolatedClientBoundaries
@@ -4507,10 +4594,10 @@ var ServerRenderer = class {
4507
4594
  );
4508
4595
  const treeLayouts = layouts.map((layout, index) => ({
4509
4596
  ...layout,
4510
- Component: _optionalChain([modules, 'access', _112 => _112[index], 'optionalAccess', _113 => _113.default])
4597
+ Component: _optionalChain([modules, 'access', _128 => _128[index], 'optionalAccess', _129 => _129.default])
4511
4598
  }));
4512
- const islandStrategy = _chunkUWOCYINYcjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
4513
- const tree = await _chunkUWOCYINYcjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
4599
+ const islandStrategy = _chunkNEKO3HM2cjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
4600
+ const tree = await _chunkNEKO3HM2cjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
4514
4601
  pageHtml: bodyMatch[2],
4515
4602
  layouts: treeLayouts,
4516
4603
  params: matched.params,
@@ -4531,7 +4618,7 @@ var ServerRenderer = class {
4531
4618
  )
4532
4619
  )
4533
4620
  );
4534
- const rootMarkup = _chunkUWOCYINYcjs.placeFarmDocsLayoutRoot.call(void 0, rendered.html);
4621
+ const rootMarkup = _chunkNEKO3HM2cjs.placeFarmDocsLayoutRoot.call(void 0, rendered.html);
4535
4622
  const clientLayouts = layouts.map((layout) => ({
4536
4623
  pattern: layout.pattern,
4537
4624
  modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, root),
@@ -4567,13 +4654,13 @@ window.__FARM_ISLAND_STRATEGY__ = ${serializeInlineValue(islandStrategy)};
4567
4654
  window.__FARM_PAGE_MODULE__ = "";
4568
4655
  window.__FARM_LOADING_MODULE__ = null;
4569
4656
  window.__FARM_MANIFEST__ = ${serializeInlineValue(clientManifest)};
4570
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${serializeInlineValue(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
4657
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${serializeInlineValue(_chunkB3HQTGXScjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
4571
4658
  window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "null"};
4572
4659
  </script>`;
4573
4660
  const head = [
4574
4661
  ...this.collectDevStyleLinks(),
4575
4662
  `<script type="module" src="/@vite/client"></script>`,
4576
- source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _114 => _114.rendererRuntime, 'access', _115 => _115.generateHydrationScript, 'optionalCall', _116 => _116()]),
4663
+ source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _130 => _130.rendererRuntime, 'access', _131 => _131.generateHydrationScript, 'optionalCall', _132 => _132()]),
4577
4664
  bootstrapScript
4578
4665
  ].filter(Boolean).map((markup) => _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, markup)).concat(rendered.head || []).join("\n ");
4579
4666
  const clientScript = source.includes('src="/@farm/client.js"') ? "" : `
@@ -4592,7 +4679,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4592
4679
  async runWithRequestContext(request2, fn) {
4593
4680
  return _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0,
4594
4681
  request2,
4595
- () => _optionalChain([this, 'access', _117 => _117.i18nRuntime, 'optionalAccess', _118 => _118.config, 'access', _119 => _119.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4682
+ () => _optionalChain([this, 'access', _133 => _133.i18nRuntime, 'optionalAccess', _134 => _134.config, 'access', _135 => _135.enabled]) ? _chunkSXXSQVKKcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4596
4683
  redirect: false
4597
4684
  }) : fn()
4598
4685
  );
@@ -4623,7 +4710,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4623
4710
  * Check if a path should be served from SSG cache
4624
4711
  */
4625
4712
  async shouldServeSSG(pathname) {
4626
- const ssgPage = _chunkSDICLSQUcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4713
+ const ssgPage = _chunkVMBIKDKWcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4627
4714
  if (!ssgPage) return null;
4628
4715
  const cached = await this.getCachedSSGPage(pathname);
4629
4716
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -4741,7 +4828,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4741
4828
  setImmediate(async () => {
4742
4829
  try {
4743
4830
  const mod = await this.routeManager.loadRouteModule(page.filePath);
4744
- if (!_optionalChain([mod, 'optionalAccess', _120 => _120.default])) return;
4831
+ if (!_optionalChain([mod, 'optionalAccess', _136 => _136.default])) return;
4745
4832
  const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
4746
4833
  const layoutModules = await Promise.all(
4747
4834
  layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
@@ -4753,9 +4840,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4753
4840
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, {}),
4754
4841
  path: page.urlPath
4755
4842
  };
4756
- let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
4843
+ let pageElement = await this.createPageElement(PageComponent, pageProps);
4757
4844
  const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
4758
- (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _121 => _121.pattern])
4845
+ (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _137 => _137.pattern])
4759
4846
  ), () => ( {
4760
4847
  shouldHydrate: false,
4761
4848
  islandStrategy: null
@@ -4767,7 +4854,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4767
4854
  }))
4768
4855
  );
4769
4856
  const layoutShouldHydrate = layoutMetadata.some((metadata) => metadata.shouldHydrate);
4770
- pageElement = this.createPageBoundary(pageElement, {
4857
+ pageElement = await this.createPageBoundary(pageElement, {
4771
4858
  pageShouldHydrate: pageMetadata.shouldHydrate,
4772
4859
  layoutShouldHydrate,
4773
4860
  islandStrategy: pageMetadata.islandStrategy
@@ -4784,7 +4871,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4784
4871
  if (pageMetadata.shouldHydrate && !layoutShouldHydrate && this.reactRenderer) {
4785
4872
  pageElement = this.reactRenderer.markLayoutPosition(pageElement);
4786
4873
  }
4787
- const html = await this.rendererRuntime.renderToString(
4874
+ const { html, head: rendererHead } = await this.renderElementToDocumentParts(
4788
4875
  await this.wrapWithIntegrationProviders(pageElement)
4789
4876
  );
4790
4877
  const mergedMetadata = await this.resolveRouteMetadata({
@@ -4793,8 +4880,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4793
4880
  pageProps,
4794
4881
  pathname: page.urlPath
4795
4882
  });
4796
- const { title, tags, hasFavicon } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, mergedMetadata);
4797
- const metadataHead = `${hasFavicon ? "" : '<link rel="icon" href="data:,">\n '}<title>${title}</title>${tags}`;
4883
+ const { title, tags, hasFavicon, hasExplicitTitle } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, mergedMetadata);
4884
+ const titleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
4885
+ const metadataHead = `${hasFavicon ? "" : '<link rel="icon" href="data:,">\n '}${titleTag}${tags}${rendererHead}`;
4798
4886
  const fullDocument = this.createFullHTML(
4799
4887
  html,
4800
4888
  pageMetadata.shouldHydrate === true,
@@ -4862,7 +4950,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4862
4950
  * such as a partial test double, has none.
4863
4951
  */
4864
4952
  publishSearchPreserveRoutes() {
4865
- _chunkWKVYF2B5cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _122 => _122.routeManager, 'access', _123 => _123.getSearchPreserveRoutes, 'optionalCall', _124 => _124()]), () => ( [])));
4953
+ _chunkWKVYF2B5cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _138 => _138.routeManager, 'access', _139 => _139.getSearchPreserveRoutes, 'optionalCall', _140 => _140()]), () => ( [])));
4866
4954
  }
4867
4955
  async renderPage(req, res) {
4868
4956
  await this.initialize();
@@ -4878,7 +4966,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4878
4966
  }
4879
4967
  const request2 = this.createPageRequest(req, res);
4880
4968
  const runtime = this.i18nRuntime;
4881
- if (_optionalChain([runtime, 'optionalAccess', _125 => _125.config, 'access', _126 => _126.enabled])) {
4969
+ if (_optionalChain([runtime, 'optionalAccess', _141 => _141.config, 'access', _142 => _142.enabled])) {
4882
4970
  const resolution = runtime.resolveRequest(request2);
4883
4971
  const varyHeaders = _chunk7Q2YWZF7cjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
4884
4972
  for (const header of varyHeaders) appendResponseVary(res, header);
@@ -4917,7 +5005,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4917
5005
  createPageRequestOnce(req, res) {
4918
5006
  const observable = typeof req.once === "function" && typeof res.once === "function";
4919
5007
  return _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
4920
- trustProxy: _optionalChain([this, 'access', _127 => _127.config, 'access', _128 => _128.server, 'optionalAccess', _129 => _129.trustProxy]),
5008
+ trustProxy: _optionalChain([this, 'access', _143 => _143.config, 'access', _144 => _144.server, 'optionalAccess', _145 => _145.trustProxy]),
4921
5009
  signal: observable ? _chunk7Q7UB4TLcjs.createFarmNodeRequestAbortSignal.call(void 0,
4922
5010
  req,
4923
5011
  res
@@ -4947,7 +5035,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4947
5035
  };
4948
5036
  let pprShellWrite;
4949
5037
  try {
4950
- const url = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _130 => _130.config, 'access', _131 => _131.server, 'optionalAccess', _132 => _132.trustProxy]) });
5038
+ const url = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _146 => _146.config, 'access', _147 => _147.server, 'optionalAccess', _148 => _148.trustProxy]) });
4951
5039
  pathname = url.pathname;
4952
5040
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
4953
5041
  searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
@@ -5034,7 +5122,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5034
5122
  params
5035
5123
  });
5036
5124
  let actionRequest;
5037
- if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _133 => _133.config, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverComponents])) === "islands") {
5125
+ if (req.method === "POST" && resolveFarmIslxActionsMode(this.config) !== null) {
5038
5126
  await Promise.all([
5039
5127
  this.routeManager.loadRouteModule(route.modulePath),
5040
5128
  ...layouts.map((layout) => this.routeManager.loadLayoutModule(layout.modulePath))
@@ -5045,7 +5133,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5045
5133
  toMiddlewareMap(req.__FARM_MIDDLEWARE_DATA__),
5046
5134
  () => _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0,
5047
5135
  toMiddlewareMap(req.__FARM_MIDDLEWARE_CONTEXT__),
5048
- () => _chunkPBJ7MEOVcjs.handleFarmFormActionRequest.call(void 0,
5136
+ () => _chunkOZUINP2Pcjs.handleFarmFormActionRequest.call(void 0,
5049
5137
  formActionRequest,
5050
5138
  _chunkXRFGOYXGcjs.resolveServerActionsConfig.call(void 0, this.config.serverActions),
5051
5139
  // Before a rewrite, the URL the browser posted to.
@@ -5110,11 +5198,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5110
5198
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
5111
5199
  error
5112
5200
  };
5113
- if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _136 => _136.notFound])) {
5201
+ if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _149 => _149.notFound])) {
5114
5202
  res.statusCode = 404;
5115
5203
  PageComponent = programmaticRouteComponents.notFound;
5116
5204
  pageProps = routeStateProps;
5117
- } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _137 => _137.error])) {
5205
+ } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _150 => _150.error])) {
5118
5206
  res.statusCode = 500;
5119
5207
  PageComponent = programmaticRouteComponents.error;
5120
5208
  pageProps = routeStateProps;
@@ -5122,10 +5210,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5122
5210
  throw error;
5123
5211
  }
5124
5212
  }
5125
- const renderingConfig = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5213
+ const renderingConfig = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5126
5214
  routeModule,
5127
5215
  route.modulePath,
5128
- { experimentalPPR: _optionalChain([this, 'access', _138 => _138.config, 'access', _139 => _139.experimental, 'optionalAccess', _140 => _140.ppr]) === true }
5216
+ { experimentalPPR: _optionalChain([this, 'access', _151 => _151.config, 'access', _152 => _152.experimental, 'optionalAccess', _153 => _153.ppr]) === true }
5129
5217
  );
5130
5218
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
5131
5219
  const islandsNavigationRequest = Boolean(
@@ -5136,7 +5224,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5136
5224
  let pprShellOptions = canCachePPRShell ? {
5137
5225
  pathname,
5138
5226
  search: url.search,
5139
- locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _141 => _141.locale]), () => ( "")),
5227
+ locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _154 => _154.locale]), () => ( "")),
5140
5228
  origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
5141
5229
  revalidate: renderingConfig.revalidate
5142
5230
  } : void 0;
@@ -5210,18 +5298,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5210
5298
  LoadingFallbackComponent = loadingModule.default;
5211
5299
  }
5212
5300
  }
5213
- let ErrorFallbackComponent = null;
5214
- if (errorBoundaryEntry) {
5215
- const errorModule = await this.routeManager.loadRouteModule(errorBoundaryEntry.modulePath);
5216
- if (errorModule.default) {
5217
- ErrorFallbackComponent = errorModule.default;
5218
- }
5219
- }
5220
5301
  const routeManifest = this.routeManager.generateClientManifest(this.config.root);
5221
5302
  const routeManifestEntry = routeManifest.routes.find(
5222
5303
  (entry) => entry.pattern === route.pattern
5223
5304
  );
5224
- const moduleMetadata = routeManifestEntry || _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5305
+ const moduleMetadata = routeManifestEntry || _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5225
5306
  const isClientComponent = moduleMetadata.isClientComponent;
5226
5307
  const renderedRouteSlots = await Promise.all(
5227
5308
  routeSlots.map(async (slot) => {
@@ -5272,20 +5353,20 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5272
5353
  if (moduleMetadata.suppressedAsyncHydration) {
5273
5354
  warnSuppressedAsyncHydrationOnce(
5274
5355
  route.modulePath,
5275
- _optionalChain([routeManifestEntry, 'optionalAccess', _142 => _142.suppressedAsyncHydrationReason])
5356
+ _optionalChain([routeManifestEntry, 'optionalAccess', _155 => _155.suppressedAsyncHydrationReason])
5276
5357
  );
5277
5358
  }
5278
5359
  const layoutHydrationMetadata = layouts.map((layout) => {
5279
5360
  const manifestEntry = routeManifest.layouts.find(
5280
5361
  (entry) => entry.pattern === layout.pattern
5281
5362
  );
5282
- if (_optionalChain([manifestEntry, 'optionalAccess', _143 => _143.suppressedAsyncHydration])) {
5363
+ if (_optionalChain([manifestEntry, 'optionalAccess', _156 => _156.suppressedAsyncHydration])) {
5283
5364
  warnSuppressedAsyncHydrationOnce(
5284
5365
  layout.modulePath,
5285
5366
  manifestEntry.suppressedAsyncHydrationReason
5286
5367
  );
5287
5368
  }
5288
- if (typeof _optionalChain([manifestEntry, 'optionalAccess', _144 => _144.shouldHydrate]) === "boolean") {
5369
+ if (typeof _optionalChain([manifestEntry, 'optionalAccess', _157 => _157.shouldHydrate]) === "boolean") {
5289
5370
  return {
5290
5371
  isClientComponent: manifestEntry.isClientComponent === true,
5291
5372
  shouldHydrate: manifestEntry.shouldHydrate,
@@ -5306,11 +5387,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5306
5387
  const clientLayouts = layouts.map((layout, index) => ({
5307
5388
  pattern: layout.pattern,
5308
5389
  modulePath: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
5309
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _145 => _145[index], 'optionalAccess', _146 => _146.shouldHydrate]) === true,
5310
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _147 => _147[index], 'optionalAccess', _148 => _148.islandStrategy]), () => ( null)),
5311
- ..._optionalChain([layoutHydrationMetadata, 'access', _149 => _149[index], 'optionalAccess', _150 => _150.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
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 } : {},
5312
5393
  // Islands mode: the browser rebuilds this layout from its tree, not its module.
5313
- ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _151 => _151[index], 'optionalAccess', _152 => _152.serverTree]) === true ? { serverTree: true } : {}
5394
+ ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _164 => _164[index], 'optionalAccess', _165 => _165.serverTree]) === true ? { serverTree: true } : {}
5314
5395
  }));
5315
5396
  const hydrationStrategies = [
5316
5397
  ...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
@@ -5324,9 +5405,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5324
5405
  layouts.map((layout, index) => ({
5325
5406
  pattern: layout.pattern,
5326
5407
  modulePath: layout.modulePath,
5327
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _153 => _153[index], 'optionalAccess', _154 => _154.shouldHydrate]) === true,
5328
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _155 => _155[index], 'optionalAccess', _156 => _156.hasIsolatedClientBoundaries]) === true,
5329
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _157 => _157[index], 'optionalAccess', _158 => _158.islandStrategy]), () => ( null))
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))
5330
5411
  })),
5331
5412
  this.config.root || process.cwd(),
5332
5413
  true
@@ -5334,10 +5415,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5334
5415
  const hasHydratableRouteSlots = renderedRouteSlots.some(
5335
5416
  (slot) => slot.isClientComponent || slot.shouldHydrate
5336
5417
  );
5337
- const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _159 => _159.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5418
+ const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _172 => _172.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5338
5419
  req.__FARM_PAGE_PATH__ = route.modulePath;
5339
5420
  req.__FARM_ROUTE__ = pathname;
5340
- req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _160 => _160[0], 'optionalAccess', _161 => _161.modulePath]);
5421
+ req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _173 => _173[0], 'optionalAccess', _174 => _174.modulePath]);
5341
5422
  req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
5342
5423
  req.__FARM_PAGE_SHOULD_HYDRATE__ = shouldHydrate;
5343
5424
  req.__FARM_LAYOUT_SHOULD_HYDRATE__ = shouldHydrateLayout;
@@ -5348,7 +5429,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5348
5429
  req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
5349
5430
  req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
5350
5431
  req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
5351
- req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _162 => _162.modulePath]) ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5432
+ req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _175 => _175.modulePath]) ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5352
5433
  req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
5353
5434
  name: slot.name,
5354
5435
  ownerPattern: slot.ownerPattern,
@@ -5398,7 +5479,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5398
5479
  await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0, middlewareDataForContext, async () => {
5399
5480
  await _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0, middlewareContext, async () => {
5400
5481
  await _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0, currentRequest, async () => {
5401
- let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
5482
+ let pageElement = await this.createPageElement(PageComponent, pageProps);
5402
5483
  if (LoadingFallbackComponent && !islandsNavigationRequest) {
5403
5484
  const loadingFallback = this.rendererRuntime.createElement(LoadingFallbackComponent, {
5404
5485
  ...createRouteStateProps({
@@ -5420,10 +5501,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5420
5501
  } else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
5421
5502
  pageElement = await this.isolateServerPage(
5422
5503
  pageElement,
5423
- _optionalChain([routeManifestEntry, 'optionalAccess', _163 => _163.serverTree]) === true
5504
+ _optionalChain([routeManifestEntry, 'optionalAccess', _176 => _176.serverTree]) === true
5424
5505
  );
5425
5506
  }
5426
- pageElement = this.createPageBoundary(pageElement, {
5507
+ pageElement = await this.createPageBoundary(pageElement, {
5427
5508
  pageShouldHydrate: isClientComponent || shouldHydrate,
5428
5509
  layoutShouldHydrate: shouldHydrateLayout,
5429
5510
  islandStrategy: hydrationIslandStrategy
@@ -5435,7 +5516,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5435
5516
  if (keptLayouts > 0 && !layouts.slice(0, keptLayouts).every((layout) => canFarmSkipKeptLayoutRender(layout.modulePath, keptRoot))) {
5436
5517
  let keptElement = null;
5437
5518
  for (let i = keptLayouts - 1; i >= 0; i--) {
5438
- const KeptLayout = _optionalChain([layoutModules, 'access', _164 => _164[i], 'optionalAccess', _165 => _165.default]);
5519
+ const KeptLayout = _optionalChain([layoutModules, 'access', _177 => _177[i], 'optionalAccess', _178 => _178.default]);
5439
5520
  if (KeptLayout) {
5440
5521
  keptElement = this.rendererRuntime.createElement(KeptLayout, {
5441
5522
  children: keptElement,
@@ -5472,7 +5553,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5472
5553
  slot.module.default,
5473
5554
  slot.props
5474
5555
  );
5475
- if (slot.shouldHydrate) slotElement = this.wrapClientGraph(slotElement);
5556
+ if (slot.shouldHydrate) {
5557
+ slotElement = this.wrapClientGraph(
5558
+ await this.wrapIslandIntegrationProviders(slotElement)
5559
+ );
5560
+ }
5476
5561
  slotElement = this.rendererRuntime.createElement(
5477
5562
  "div",
5478
5563
  {
@@ -5484,7 +5569,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5484
5569
  );
5485
5570
  slotProps[slot.name] = slotElement;
5486
5571
  }
5487
- wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _166 => _166[i], 'optionalAccess', _167 => _167.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5572
+ wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _179 => _179[i], 'optionalAccess', _180 => _180.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5488
5573
  LayoutComponent,
5489
5574
  { params },
5490
5575
  { children: wrappedElement, ...slotProps },
@@ -5503,24 +5588,6 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5503
5588
  if (shouldHydrateLayout) {
5504
5589
  wrappedElement = this.wrapClientGraph(wrappedElement);
5505
5590
  }
5506
- if (ErrorFallbackComponent && this.rendererRuntime.ErrorBoundary) {
5507
- wrappedElement = this.rendererRuntime.createElement(
5508
- this.rendererRuntime.ErrorBoundary,
5509
- {
5510
- Fallback: ErrorFallbackComponent,
5511
- fallbackProps: {
5512
- ...createRouteStateProps({
5513
- params,
5514
- searchParamsObject,
5515
- path: pathname,
5516
- middlewareMap,
5517
- pluginExposedContext
5518
- })
5519
- }
5520
- },
5521
- wrappedElement
5522
- );
5523
- }
5524
5591
  if ((isClientComponent || shouldHydrate) && !shouldHydrateLayout && this.reactRenderer) {
5525
5592
  wrappedElement = this.reactRenderer.markLayoutPosition(wrappedElement);
5526
5593
  }
@@ -5645,7 +5712,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5645
5712
  }
5646
5713
  }
5647
5714
  emitFarmRenderError(req, pathname, error);
5648
- const errorStatus = _chunkUWOCYINYcjs.resolveDefaultErrorStatus.call(void 0, error);
5715
+ const errorStatus = _chunkNEKO3HM2cjs.resolveDefaultErrorStatus.call(void 0, error);
5649
5716
  if (pprRefreshRoute) {
5650
5717
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
5651
5718
  type: "ppr.refresh.error",
@@ -5680,29 +5747,29 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5680
5747
  }
5681
5748
  await this.renderError(req, res, error, errorStatus);
5682
5749
  } finally {
5683
- _optionalChain([pprShellWrite, 'optionalAccess', _168 => _168.release, 'call', _169 => _169()]);
5750
+ _optionalChain([pprShellWrite, 'optionalAccess', _181 => _181.release, 'call', _182 => _182()]);
5684
5751
  }
5685
5752
  }
5686
5753
  async wrapWithIntegrationProviders(element) {
5687
- const providers = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, this.config.integrations);
5754
+ const providers = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, this.config.integrations);
5688
5755
  let wrapped = element;
5689
5756
  for (let i = providers.length - 1; i >= 0; i--) {
5690
5757
  const provider = providers[i];
5691
5758
  if (provider.component || provider.type === "clerk") {
5692
- const rendererCapabilities = _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
5759
+ const rendererCapabilities = _chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
5693
5760
  if (!rendererCapabilities.functionComponents) {
5694
5761
  throw new Error(
5695
- `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _170 => _170.config, 'access', _171 => _171.renderer, 'optionalAccess', _172 => _172.name]), () => ( "the configured renderer"))}\` cannot.`
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.`
5696
5763
  );
5697
5764
  }
5698
- if (provider.type === "clerk" && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) {
5765
+ if (provider.type === "clerk" && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer)) {
5699
5766
  throw new Error(
5700
5767
  `Integration provider \`${provider.name}\` uses Clerk's React components, which require the React renderer.`
5701
5768
  );
5702
5769
  }
5703
5770
  let ProviderComponent;
5704
5771
  let providerSourceModule;
5705
- if (_chunkWGWWRV2Mcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
5772
+ if (_chunkB3HQTGXScjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
5706
5773
  providerSourceModule = provider.component.module;
5707
5774
  const providerModuleId = provider.component.module.startsWith(".") ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0,
5708
5775
  path10.resolve(this.config.root, provider.component.module),
@@ -5731,7 +5798,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5731
5798
  }
5732
5799
  if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
5733
5800
  _nullishCoalesce(providerSourceModule, () => ( "")),
5734
- _chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _173 => _173.config, 'access', _174 => _174.renderer, 'optionalAccess', _175 => _175.componentExtensions]))
5801
+ _chunkBCTHOQPPcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _186 => _186.config, 'access', _187 => _187.renderer, 'optionalAccess', _188 => _188.componentExtensions]))
5735
5802
  )) {
5736
5803
  ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
5737
5804
  }
@@ -5860,7 +5927,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5860
5927
  );
5861
5928
  }
5862
5929
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5863
- trustProxy: _optionalChain([this, 'access', _176 => _176.config, 'access', _177 => _177.server, 'optionalAccess', _178 => _178.trustProxy])
5930
+ trustProxy: _optionalChain([this, 'access', _189 => _189.config, 'access', _190 => _190.server, 'optionalAccess', _191 => _191.trustProxy])
5864
5931
  });
5865
5932
  const url = new URL(request2.url);
5866
5933
  const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
@@ -5878,7 +5945,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5878
5945
  origin: await this.getAgentOrigin(request2),
5879
5946
  readMarkdown: llmsContext.markdown
5880
5947
  }) : value;
5881
- const response = _chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5948
+ const response = _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5882
5949
  method,
5883
5950
  request: request2
5884
5951
  });
@@ -5896,7 +5963,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5896
5963
  }
5897
5964
  /** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
5898
5965
  getGeneratedLlmsKind(pathname) {
5899
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _179 => _179.config, 'access', _180 => _180.agent, 'optionalAccess', _181 => _181.llmsTxt]));
5966
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _192 => _192.config, 'access', _193 => _193.agent, 'optionalAccess', _194 => _194.llmsTxt]));
5900
5967
  if (!config.enabled) return null;
5901
5968
  if (pathname === "/llms.txt") return "llms";
5902
5969
  return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
@@ -5904,9 +5971,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5904
5971
  async renderGeneratedLlmsTxt(req, res, kind) {
5905
5972
  try {
5906
5973
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5907
- trustProxy: _optionalChain([this, 'access', _182 => _182.config, 'access', _183 => _183.server, 'optionalAccess', _184 => _184.trustProxy])
5974
+ trustProxy: _optionalChain([this, 'access', _195 => _195.config, 'access', _196 => _196.server, 'optionalAccess', _197 => _197.trustProxy])
5908
5975
  });
5909
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _185 => _185.config, 'access', _186 => _186.agent, 'optionalAccess', _187 => _187.llmsTxt]));
5976
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _198 => _198.config, 'access', _199 => _199.agent, 'optionalAccess', _200 => _200.llmsTxt]));
5910
5977
  const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
5911
5978
  const body = kind === "llms-full" ? await _chunkOLKYHTLNcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
5912
5979
  origin: await this.getAgentOrigin(request2),
@@ -5914,7 +5981,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5914
5981
  }) : context.defaults;
5915
5982
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5916
5983
  res,
5917
- _chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0,
5984
+ _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0,
5918
5985
  kind,
5919
5986
  body,
5920
5987
  { revalidate: config.revalidate },
@@ -5933,23 +6000,23 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5933
6000
  }
5934
6001
  }
5935
6002
  getAgentCrawlers() {
5936
- return _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _188 => _188.config, 'access', _189 => _189.agent, 'optionalAccess', _190 => _190.crawlers]));
6003
+ return _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _201 => _201.config, 'access', _202 => _202.agent, 'optionalAccess', _203 => _203.crawlers]));
5937
6004
  }
5938
6005
  /** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
5939
6006
  async renderGeneratedRobotsTxt(req, res) {
5940
6007
  try {
5941
- const sitemapPath = _optionalChain([this, 'access', _191 => _191.routeManager, 'access', _192 => _192.matchMetadataRoute, 'call', _193 => _193("/sitemap.xml"), 'optionalAccess', _194 => _194.metadata, 'access', _195 => _195.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
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;
5942
6009
  const rootLayout = this.routeManager.getLayouts().get("/");
5943
6010
  const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5944
- const robots = _chunk4OFWG4IKcjs.createFarmAgentRobots.call(void 0, {
6011
+ const robots = _chunkEACD6ND7cjs.createFarmAgentRobots.call(void 0, {
5945
6012
  crawlers: this.getAgentCrawlers(),
5946
6013
  sitemapPath,
5947
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _196 => _196.metadataBase]),
6014
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _209 => _209.metadataBase]),
5948
6015
  basePath: this.config.basePath
5949
6016
  });
5950
6017
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5951
6018
  res,
5952
- _chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
6019
+ _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
5953
6020
  );
5954
6021
  } catch (error) {
5955
6022
  _chunk7U4XF76Rcjs.logger.error(`Generated robots.txt failed: ${error}`);
@@ -5963,13 +6030,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5963
6030
  }
5964
6031
  }
5965
6032
  getAgentSitemap() {
5966
- return _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _197 => _197.config, 'access', _198 => _198.agent, 'optionalAccess', _199 => _199.sitemap]));
6033
+ return _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _210 => _210.config, 'access', _211 => _211.agent, 'optionalAccess', _212 => _212.sitemap]));
5967
6034
  }
5968
6035
  /** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
5969
6036
  async renderGeneratedSitemap(req, res) {
5970
6037
  try {
5971
6038
  const request2 = _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5972
- trustProxy: _optionalChain([this, 'access', _200 => _200.config, 'access', _201 => _201.server, 'optionalAccess', _202 => _202.trustProxy])
6039
+ trustProxy: _optionalChain([this, 'access', _213 => _213.config, 'access', _214 => _214.server, 'optionalAccess', _215 => _215.trustProxy])
5973
6040
  });
5974
6041
  const sources = await Promise.all(
5975
6042
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5980,26 +6047,26 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5980
6047
  }),
5981
6048
  fs7.promises.stat(route.modulePath).catch(() => void 0)
5982
6049
  ]);
5983
- if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _203 => _203.metadata]))) return null;
5984
- return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _204 => _204.mtime, 'access', _205 => _205.toISOString, 'call', _206 => _206()]) };
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()]) };
5985
6052
  })
5986
6053
  );
5987
6054
  const rootLayout = this.routeManager.getLayouts().get("/");
5988
6055
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5989
- const sitemap = _chunk4OFWG4IKcjs.createFarmDefaultSitemap.call(void 0,
6056
+ const sitemap = _chunkEACD6ND7cjs.createFarmDefaultSitemap.call(void 0,
5990
6057
  sources.filter((source) => source !== null),
5991
6058
  {
5992
6059
  origin: new URL(request2.url).origin,
5993
6060
  config: this.getAgentSitemap(),
5994
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _207 => _207.metadataBase]),
6061
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _220 => _220.metadataBase]),
5995
6062
  basePath: this.config.basePath,
5996
6063
  trailingSlash: this.config.trailingSlash,
5997
- i18n: _optionalChain([this, 'access', _208 => _208.i18nRuntime, 'optionalAccess', _209 => _209.config])
6064
+ i18n: _optionalChain([this, 'access', _221 => _221.i18nRuntime, 'optionalAccess', _222 => _222.config])
5998
6065
  }
5999
6066
  );
6000
6067
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
6001
6068
  res,
6002
- _chunkUWOCYINYcjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
6069
+ _chunkNEKO3HM2cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
6003
6070
  );
6004
6071
  } catch (error) {
6005
6072
  _chunk7U4XF76Rcjs.logger.error(`Generated sitemap.xml failed: ${error}`);
@@ -6026,9 +6093,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6026
6093
  * matcher) covers, as the production build decides.
6027
6094
  */
6028
6095
  getAgentListedRoutes() {
6029
- const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _210 => _210.middlewareRoutes, 'optionalCall', _211 => _211()]), () => ( [])) };
6096
+ const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _223 => _223.middlewareRoutes, 'optionalCall', _224 => _224()]), () => ( [])) };
6030
6097
  return [...this.routeManager.getRoutes()].filter(
6031
- ([pattern]) => !pattern.includes("[") && !_chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
6098
+ ([pattern]) => !pattern.includes("[") && !_chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
6032
6099
  );
6033
6100
  }
6034
6101
  /**
@@ -6052,22 +6119,22 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6052
6119
  * or a registered server such as the docs engine's. Production applies the same rules.
6053
6120
  */
6054
6121
  getDefaultMCPServer() {
6055
- if (_optionalChain([this, 'access', _212 => _212.config, 'access', _213 => _213.agent, 'optionalAccess', _214 => _214.mcp]) !== true || _chunkW53Z4WDIcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
6056
- if (_optionalChain([this, 'access', _215 => _215.apiRouteExists, 'optionalCall', _216 => _216("/api/mcp")])) return void 0;
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;
6057
6124
  if (this.routeManager.matchRoute(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
6058
6125
  _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0,
6059
6126
  readAppPackageIdentity(this.config.root),
6060
- _chunkCCMP4JD2cjs.FARM_VERSION
6127
+ _chunkJK26IMT7cjs.FARM_VERSION
6061
6128
  ))));
6062
6129
  return _chunkW53Z4WDIcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
6063
6130
  }
6064
6131
  async renderDefaultMCP(req, res) {
6065
6132
  const server = this.getDefaultMCPServer();
6066
- const request2 = _nullishCoalesce(_chunk2RSVYJT6cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk2RSVYJT6cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _217 => _217.config, 'access', _218 => _218.server, 'optionalAccess', _219 => _219.trustProxy]) })));
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]) })));
6067
6134
  try {
6068
6135
  const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-IUL6OPC3.cjs");
6069
6136
  const origin = new URL(request2.url).origin;
6070
- const i18n = _optionalChain([this, 'access', _220 => _220.i18nRuntime, 'optionalAccess', _221 => _221.config]);
6137
+ const i18n = _optionalChain([this, 'access', _233 => _233.i18nRuntime, 'optionalAccess', _234 => _234.config]);
6071
6138
  const metadataBase = await this.getRootMetadataBase();
6072
6139
  const response = await handleFarmDefaultMCPRequest(request2, {
6073
6140
  server,
@@ -6115,7 +6182,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6115
6182
  }
6116
6183
  /** Same inputs the production server gives llms.txt: static pages and root metadata. */
6117
6184
  async createLlmsTxtContext(request2, options = {}) {
6118
- const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _222 => _222.config, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.llmsTxt]));
6185
+ const config = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _235 => _235.config, 'access', _236 => _236.agent, 'optionalAccess', _237 => _237.llmsTxt]));
6119
6186
  const origin = await this.getAgentOrigin(request2);
6120
6187
  const sources = await Promise.all(
6121
6188
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -6141,7 +6208,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6141
6208
  include: config.include,
6142
6209
  exclude: config.exclude,
6143
6210
  trailingSlash: this.config.trailingSlash,
6144
- i18n: _optionalChain([this, 'access', _225 => _225.i18nRuntime, 'optionalAccess', _226 => _226.config])
6211
+ i18n: _optionalChain([this, 'access', _238 => _238.i18nRuntime, 'optionalAccess', _239 => _239.config])
6145
6212
  }
6146
6213
  );
6147
6214
  return {
@@ -6151,7 +6218,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6151
6218
  pages,
6152
6219
  config,
6153
6220
  rootMetadata,
6154
- mcp: _optionalChain([this, 'access', _227 => _227.config, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.aiCatalog]) === false ? [] : _chunk5OAN7BG5cjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6221
+ mcp: _optionalChain([this, 'access', _240 => _240.config, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.aiCatalog]) === false ? [] : _chunkB2PGVHBGcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6155
6222
  basePath: this.config.basePath,
6156
6223
  apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
6157
6224
  _chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
@@ -6181,7 +6248,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6181
6248
  async getRootMetadataBase() {
6182
6249
  const rootLayout = this.routeManager.getLayouts().get("/");
6183
6250
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
6184
- return _optionalChain([rootMetadata, 'optionalAccess', _230 => _230.metadataBase]);
6251
+ return _optionalChain([rootMetadata, 'optionalAccess', _243 => _243.metadataBase]);
6185
6252
  }
6186
6253
  /**
6187
6254
  * Reads page mirrors back through this dev server, the way its .md handler
@@ -6193,8 +6260,8 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6193
6260
  * body is discarded.
6194
6261
  */
6195
6262
  createDevMarkdownReader(req) {
6196
- const socket = _optionalChain([req, 'optionalAccess', _231 => _231.socket]);
6197
- if (_optionalChain([req, 'optionalAccess', _232 => _232.method, 'optionalAccess', _233 => _233.toUpperCase, 'call', _234 => _234()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _235 => _235.localAddress]) || !socket.localPort) {
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) {
6198
6265
  return async () => null;
6199
6266
  }
6200
6267
  if (socket.encrypted) {
@@ -6238,18 +6305,28 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6238
6305
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, options.searchParamsObject),
6239
6306
  path: options.pagePath
6240
6307
  };
6241
- const handlerResult = typeof imageModule.default === "function" ? await imageModule.default(imageProps) : imageModule.default;
6308
+ const handlerResult = await _chunkVS7HLH4Scjs.resolveFarmMetadataImageValue.call(void 0, imageModule, imageProps, {
6309
+ renderer: this.getMetadataImageRenderer(),
6310
+ component: isRendererCompiledComponent(
6311
+ options.image.modulePath,
6312
+ _nullishCoalesce(_optionalChain([this, 'access', _249 => _249.config, 'access', _250 => _250.renderer, 'optionalAccess', _251 => _251.componentExtensions]), () => ( []))
6313
+ )
6314
+ });
6242
6315
  await this.writeMetadataImageResponse(req, res, handlerResult, imageModule);
6243
6316
  }
6244
6317
  async writeMetadataImageResponse(req, res, value, imageModule) {
6245
6318
  const ifNoneMatch = req.headers["if-none-match"];
6246
- const response = await _chunkK6PGK7DCcjs.createFarmMetadataImageResponse.call(void 0, value, imageModule, {
6319
+ const response = await _chunkVS7HLH4Scjs.createFarmMetadataImageResponse.call(void 0, value, imageModule, {
6247
6320
  method: req.method,
6248
6321
  ifNoneMatch: Array.isArray(ifNoneMatch) ? ifNoneMatch[0] : ifNoneMatch,
6249
- renderer: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
6322
+ renderer: this.getMetadataImageRenderer()
6250
6323
  });
6251
6324
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
6252
6325
  }
6326
+ /** The renderer that draws a metadata image: none for React, whose elements Satori reads directly. */
6327
+ getMetadataImageRenderer() {
6328
+ return _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime;
6329
+ }
6253
6330
  async writeStaticMetadataImageResponse(req, res, image) {
6254
6331
  const method = (req.method || "GET").toUpperCase();
6255
6332
  if (method !== "GET" && method !== "HEAD") {
@@ -6260,7 +6337,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6260
6337
  }
6261
6338
  const etag = `"${image.staticInfo.hash}"`;
6262
6339
  const requestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
6263
- trustProxy: _optionalChain([this, 'access', _236 => _236.config, 'access', _237 => _237.server, 'optionalAccess', _238 => _238.trustProxy])
6340
+ trustProxy: _optionalChain([this, 'access', _252 => _252.config, 'access', _253 => _253.server, 'optionalAccess', _254 => _254.trustProxy])
6264
6341
  });
6265
6342
  const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
6266
6343
  res.setHeader("Content-Type", image.staticInfo.contentType);
@@ -6311,7 +6388,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6311
6388
  });
6312
6389
  let wrapped = errorElement;
6313
6390
  const boundaryLayouts = options.errorPattern === void 0 ? options.layouts : options.layouts.filter(
6314
- (layout) => !("pattern" in layout) || _chunkUWOCYINYcjs.routeBoundaryCoversDirectory.call(void 0,
6391
+ (layout) => !("pattern" in layout) || _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory.call(void 0,
6315
6392
  layout.pattern,
6316
6393
  options.errorPattern
6317
6394
  )
@@ -6354,6 +6431,21 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6354
6431
  return false;
6355
6432
  }
6356
6433
  }
6434
+ /**
6435
+ * Islands mode: a page whose route hydrates nothing as a root hydrates only islands, which hold
6436
+ * their own clicks, so nothing else on it is held, as in production.
6437
+ */
6438
+ isIslandsOnlyPage(req) {
6439
+ return this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
6440
+ }
6441
+ /**
6442
+ * The head script that holds a page's clicks and submits until it hydrates, which the client
6443
+ * replays once it has. Production writes it into the same pages, streamed or buffered.
6444
+ */
6445
+ renderPreHydrationHold(req, bootClient) {
6446
+ 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, ) : "";
6448
+ }
6357
6449
  async renderBufferedSSR(element, req, res, clearMiddlewareData, options = {}) {
6358
6450
  const startedAt = Date.now();
6359
6451
  const route = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
@@ -6395,22 +6487,23 @@ window.__FARM_ISLAND_STRATEGY__ = ${JSON.stringify(req.__FARM_ISLAND_STRATEGY__
6395
6487
  window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
6396
6488
  window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
6397
6489
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
6398
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6490
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkB3HQTGXScjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6399
6491
  window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
6400
6492
  </script>`);
6401
6493
  const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
6402
6494
  const rendererHydrationScript = farmScripts(
6403
- _optionalChain([this, 'access', _239 => _239.rendererRuntime, 'access', _240 => _240.generateHydrationScript, 'optionalCall', _241 => _241()]) || ""
6495
+ _optionalChain([this, 'access', _255 => _255.rendererRuntime, 'access', _256 => _256.generateHydrationScript, 'optionalCall', _257 => _257()]) || ""
6404
6496
  );
6405
6497
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
6406
6498
  const farmClientScript = farmScripts(
6407
6499
  `<script type="module" src="/@farm/client.js"></script>`
6408
6500
  );
6501
+ const holdScript = farmScripts(this.renderPreHydrationHold(req, false));
6409
6502
  const { html: content, head: rendererHead } = await this.renderElementToDocumentParts(
6410
6503
  element,
6411
6504
  {
6412
6505
  rejectLateNavigation: _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0,
6413
- _optionalChain([req, 'access', _242 => _242.headers, 'optionalAccess', _243 => _243[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6506
+ _optionalChain([req, 'access', _258 => _258.headers, 'optionalAccess', _259 => _259[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6414
6507
  )
6415
6508
  }
6416
6509
  );
@@ -6422,7 +6515,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6422
6515
  viewport: viewportTags
6423
6516
  } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6424
6517
  pathname: getFarmMetadataPathname(req),
6425
- jsonLd: _optionalChain([this, 'access', _244 => _244.config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.jsonLd])
6518
+ jsonLd: _optionalChain([this, 'access', _260 => _260.config, 'access', _261 => _261.agent, 'optionalAccess', _262 => _262.jsonLd])
6426
6519
  });
6427
6520
  const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
6428
6521
  const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
@@ -6432,19 +6525,19 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6432
6525
  i18nSnapshot,
6433
6526
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
6434
6527
  ) : "";
6435
- const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
6528
+ const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
6436
6529
  this.config.theme,
6437
6530
  this.config.basePath,
6438
6531
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
6439
6532
  );
6440
6533
  themeDocument.head = farmScripts(themeDocument.head);
6441
- const fullDocument = _chunkUWOCYINYcjs.extractFarmFullDocument.call(void 0, _chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0, content));
6534
+ const fullDocument = _chunkNEKO3HM2cjs.extractFarmFullDocument.call(void 0, _chunkNEKO3HM2cjs.markFarmDocumentLayouts.call(void 0, content));
6442
6535
  let html;
6443
6536
  if (fullDocument) {
6444
6537
  const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
6445
- const documentHtml = shouldReplaceLayoutTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
6446
- const effectiveRendererHead = hasExplicitTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
6447
- html = _chunkUWOCYINYcjs.composeFarmFullDocument.call(void 0, documentHtml, {
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, {
6448
6541
  fallbackIcon: !hasFavicon,
6449
6542
  viewport: viewportTags,
6450
6543
  htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
@@ -6464,13 +6557,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6464
6557
  ...this.collectDevStyleLinks(),
6465
6558
  viteClientScript,
6466
6559
  rendererHydrationScript,
6467
- bootstrapScript
6560
+ bootstrapScript,
6561
+ holdScript
6468
6562
  ].filter(Boolean).join("\n "),
6469
6563
  bodyFooter: [deferredScript, farmClientScript].filter(Boolean).join("\n ")
6470
6564
  });
6471
6565
  } else {
6472
6566
  html = `<!DOCTYPE html>
6473
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _247 => _247.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6567
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _263 => _263.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6474
6568
  <head>
6475
6569
  ${themeDocument.head}
6476
6570
  <meta charset="utf-8">
@@ -6484,7 +6578,8 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6484
6578
  ${l}`).join("")}
6485
6579
  ${viteClientScript}
6486
6580
  ${rendererHydrationScript}
6487
- ${bootstrapScript}
6581
+ ${bootstrapScript}${holdScript ? `
6582
+ ${holdScript}` : ""}
6488
6583
  </head>
6489
6584
  <body class="">
6490
6585
  <div id="root">${content}</div>
@@ -6501,7 +6596,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6501
6596
  const securedHtml = this.secureDocumentHTML(req, html);
6502
6597
  if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
6503
6598
  res.end();
6504
- if (!options.captureStaticShell) await _optionalChain([options, 'access', _248 => _248.onComplete, 'optionalCall', _249 => _249(securedHtml)]);
6599
+ if (!options.captureStaticShell) await _optionalChain([options, 'access', _264 => _264.onComplete, 'optionalCall', _265 => _265(securedHtml)]);
6505
6600
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
6506
6601
  type: "render.stream.complete",
6507
6602
  route,
@@ -6511,7 +6606,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6511
6606
  emitFarmRenderError(req, route, error);
6512
6607
  throw error;
6513
6608
  } finally {
6514
- _optionalChain([clearMiddlewareData, 'optionalCall', _250 => _250()]);
6609
+ _optionalChain([clearMiddlewareData, 'optionalCall', _266 => _266()]);
6515
6610
  }
6516
6611
  }
6517
6612
  /**
@@ -6521,11 +6616,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6521
6616
  * call (async, a class, or one using hooks) falls back to detection from the stream.
6522
6617
  */
6523
6618
  async rootLayoutRendersDocument(req) {
6524
- const modulePath = _nullishCoalesce(req.__FARM_ROOT_LAYOUT_PATH__, () => ( (typeof this.routeManager.getLayouts === "function" ? _optionalChain([this, 'access', _251 => _251.routeManager, 'access', _252 => _252.getLayouts, 'call', _253 => _253(), 'access', _254 => _254.get, 'call', _255 => _255("/"), 'optionalAccess', _256 => _256.modulePath]) : void 0)));
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)));
6525
6620
  if (!modulePath) return false;
6526
6621
  try {
6527
6622
  const Layout = (await this.routeManager.loadLayoutModule(modulePath)).default;
6528
- if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _257 => _257.prototype, 'optionalAccess', _258 => _258.isReactComponent]) || _optionalChain([Layout, 'access', _259 => _259.constructor, 'optionalAccess', _260 => _260.name]) === "AsyncFunction") {
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") {
6529
6624
  return false;
6530
6625
  }
6531
6626
  const cached = documentLayouts.get(Layout);
@@ -6547,10 +6642,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6547
6642
  }
6548
6643
  }
6549
6644
  async renderWithSSR(element, req, res, clearMiddlewareData, options = {}) {
6550
- const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
6645
+ 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)));
6551
6647
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6552
6648
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6553
- if (!renderToPipeableStream || _chunk2NOHVIJ3cjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _261 => _261.headers, 'optionalAccess', _262 => _262[_chunk2NOHVIJ3cjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
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))) {
6554
6650
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
6555
6651
  }
6556
6652
  return new Promise((resolve3, reject) => {
@@ -6620,14 +6716,15 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
6620
6716
  req.__FARM_LOADING_MODULE_PATH__ || null
6621
6717
  )};
6622
6718
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
6623
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6719
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkB3HQTGXScjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6624
6720
  window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
6625
- </script>${_chunkPBJ7MEOVcjs.renderFarmFormStateScript.call(void 0, )}`;
6626
- const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
6721
+ </script>${_chunkOZUINP2Pcjs.renderFarmFormStateScript.call(void 0, )}`;
6722
+ const islandsOnlyPage = this.isIslandsOnlyPage(req);
6627
6723
  const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
6628
6724
  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;
6629
6725
  const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ) !== "mobile" && canBootFarmIslandsClient(this.config);
6630
- const hydrationClickQueueScript = !islandsOnlyPage && !bootClient && (isClientComponent || req.__FARM_SHOULD_HYDRATE__ === true || req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ === true) ? createPreHydrationClickQueueScript() : "";
6726
+ const hydrationClickQueueScript = this.renderPreHydrationHold(req, bootClient);
6727
+ const rendererHydrationScript = _optionalChain([this, 'access', _279 => _279.rendererRuntime, 'access', _280 => _280.generateHydrationScript, 'optionalCall', _281 => _281()]) || "";
6631
6728
  const {
6632
6729
  title,
6633
6730
  tags: metaTags,
@@ -6636,7 +6733,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6636
6733
  viewport: viewportTags
6637
6734
  } = _chunkY3DO7BIJcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6638
6735
  pathname: getFarmMetadataPathname(req),
6639
- jsonLd: _optionalChain([this, 'access', _263 => _263.config, 'access', _264 => _264.agent, 'optionalAccess', _265 => _265.jsonLd])
6736
+ jsonLd: _optionalChain([this, 'access', _282 => _282.config, 'access', _283 => _283.agent, 'optionalAccess', _284 => _284.jsonLd])
6640
6737
  });
6641
6738
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
6642
6739
  const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
@@ -6645,7 +6742,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6645
6742
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
6646
6743
  ) : "";
6647
6744
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
6648
- const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
6745
+ const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
6649
6746
  this.config.theme,
6650
6747
  this.config.basePath,
6651
6748
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
@@ -6661,10 +6758,10 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6661
6758
  const earlyClientScript = bootClient ? createFarmDevBootScript(waitingRoot, rootStrategy) : FARM_DEV_EARLY_CLIENT_SCRIPT;
6662
6759
  const { pipe, abort } = renderToPipeableStream(streamRoot, {
6663
6760
  nonce: cspNonce,
6664
- formState: _chunkPBJ7MEOVcjs.getFarmFormState.call(void 0, ),
6761
+ formState: _chunkOZUINP2Pcjs.getFarmFormState.call(void 0, ),
6665
6762
  onShellReady() {
6666
6763
  if (pendingNavigationError) {
6667
- _optionalChain([abort, 'optionalCall', _266 => _266(pendingNavigationError)]);
6764
+ _optionalChain([abort, 'optionalCall', _285 => _285(pendingNavigationError)]);
6668
6765
  if (clearMiddlewareData) {
6669
6766
  clearMiddlewareData();
6670
6767
  }
@@ -6682,7 +6779,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6682
6779
  console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
6683
6780
  }
6684
6781
  const shell = `<!DOCTYPE html>
6685
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _267 => _267.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6782
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _286 => _286.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6686
6783
  <head>
6687
6784
  ${themeDocument.head}
6688
6785
  <meta charset="utf-8">
@@ -6693,7 +6790,8 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6693
6790
  ${fontHead}
6694
6791
  ${globalStylesheetLink}${devStyleLinks.map((l) => `
6695
6792
  ${l}`).join("")}
6696
- <script type="module" src="/@vite/client"></script>
6793
+ <script type="module" src="/@vite/client"></script>${rendererHydrationScript ? `
6794
+ ${rendererHydrationScript}` : ""}
6697
6795
  ${propsScript}
6698
6796
  ${hydrationClickQueueScript}
6699
6797
  </head>
@@ -6703,14 +6801,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6703
6801
  let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
6704
6802
  let heldHead = "";
6705
6803
  const releaseShell = (complete) => {
6706
- const split = _chunkUWOCYINYcjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6804
+ const split = _chunkNEKO3HM2cjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6707
6805
  if (!split) return null;
6708
- const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6709
- const opened = _chunkUWOCYINYcjs.appendFarmHead.call(void 0, shellHead, split.head);
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);
6710
6808
  pendingShell = "";
6711
6809
  heldHead = "";
6712
6810
  htmlParts.push(opened);
6713
- _optionalChain([staticShellParts, 'optionalAccess', _268 => _268.push, 'call', _269 => _269(opened)]);
6811
+ _optionalChain([staticShellParts, 'optionalAccess', _287 => _287.push, 'call', _288 => _288(opened)]);
6714
6812
  res.write(opened);
6715
6813
  return split.body;
6716
6814
  };
@@ -6722,11 +6820,11 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6722
6820
  ${stampDocumentHTML(earlyClientScript)}`
6723
6821
  )
6724
6822
  } : document;
6725
- const documentTransform = streamDocument ? _chunkUWOCYINYcjs.createFarmStreamedDocumentTransform.call(void 0,
6823
+ const documentTransform = streamDocument ? _chunkNEKO3HM2cjs.createFarmStreamedDocumentTransform.call(void 0,
6726
6824
  (opening) => withEarlyClient(
6727
- _chunkUWOCYINYcjs.openFarmStreamedDocument.call(void 0,
6728
- _chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0,
6729
- hasExplicitTitle ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, opening) : opening
6825
+ _chunkNEKO3HM2cjs.openFarmStreamedDocument.call(void 0,
6826
+ _chunkNEKO3HM2cjs.markFarmDocumentLayouts.call(void 0,
6827
+ hasExplicitTitle ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, opening) : opening
6730
6828
  ),
6731
6829
  {
6732
6830
  fallbackIcon: !hasFavicon,
@@ -6747,6 +6845,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6747
6845
  globalStylesheetLink,
6748
6846
  ...devStyleLinks,
6749
6847
  `<script type="module" src="/@vite/client"></script>`,
6848
+ rendererHydrationScript,
6750
6849
  propsScript,
6751
6850
  hydrationClickQueueScript
6752
6851
  ].filter(Boolean).join("\n ")
@@ -6766,7 +6865,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6766
6865
  const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
6767
6866
  if (!checkedFullDocument && renderedText) {
6768
6867
  documentPrefix += renderedText;
6769
- const prefix = _chunkUWOCYINYcjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6868
+ const prefix = _chunkNEKO3HM2cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6770
6869
  if (prefix !== "pending") {
6771
6870
  checkedFullDocument = true;
6772
6871
  documentPrefix = "";
@@ -6785,7 +6884,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6785
6884
  staticShellClosed = true;
6786
6885
  if (!suspenseHoleEmitted) {
6787
6886
  suspenseHoleEmitted = true;
6788
- _optionalChain([options, 'access', _270 => _270.onSuspenseHoleDetected, 'optionalCall', _271 => _271()]);
6887
+ _optionalChain([options, 'access', _289 => _289.onSuspenseHoleDetected, 'optionalCall', _290 => _290()]);
6789
6888
  }
6790
6889
  } else {
6791
6890
  staticShellParts.push(chunkText);
@@ -6837,7 +6936,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6837
6936
  const body = releaseShell(true);
6838
6937
  if (body) {
6839
6938
  htmlParts.push(body);
6840
- _optionalChain([staticShellParts, 'optionalAccess', _272 => _272.push, 'call', _273 => _273(body)]);
6939
+ _optionalChain([staticShellParts, 'optionalAccess', _291 => _291.push, 'call', _292 => _292(body)]);
6841
6940
  res.write(body);
6842
6941
  }
6843
6942
  }
@@ -6869,8 +6968,8 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6869
6968
  recordRenderedChunk(tail, rewritten);
6870
6969
  if (tail) res.write(tail);
6871
6970
  }
6872
- const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _274 => _274.end, 'call', _275 => _275()]);
6873
- if (_optionalChain([documentEnd, 'optionalAccess', _276 => _276.text])) {
6971
+ const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _293 => _293.end, 'call', _294 => _294()]);
6972
+ if (_optionalChain([documentEnd, 'optionalAccess', _295 => _295.text])) {
6874
6973
  recordRenderedChunk(documentEnd.text, "");
6875
6974
  res.write(documentEnd.text);
6876
6975
  }
@@ -6881,7 +6980,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6881
6980
  deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
6882
6981
  earlyClient,
6883
6982
  // A full document: Farm's #root closes only where Farm opened it.
6884
- ..._optionalChain([documentEnd, 'optionalAccess', _277 => _277.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6983
+ ..._optionalChain([documentEnd, 'optionalAccess', _296 => _296.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6885
6984
  })
6886
6985
  );
6887
6986
  htmlParts.push(footer);
@@ -6987,13 +7086,13 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
6987
7086
  async loadNotFoundModule() {
6988
7087
  const notFoundPath = resolveFarmNotFoundComponentPath(
6989
7088
  this.config,
6990
- _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, this.config)
7089
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config)
6991
7090
  );
6992
7091
  if (!notFoundPath) return null;
6993
7092
  return await this.routeManager.loadRouteModule(notFoundPath);
6994
7093
  }
6995
7094
  async loadNotFoundComponent() {
6996
- return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _278 => _278.default]), async () => ( null));
7095
+ return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _297 => _297.default]), async () => ( null));
6997
7096
  }
6998
7097
  /** The not-found document's head: layout and not-found metadata, as production renders it. */
6999
7098
  async notFoundMetadataHead(layoutModule, notFoundModule) {
@@ -7016,13 +7115,13 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7016
7115
  */
7017
7116
  async createLateNavigationRecoveryHTML(req, error) {
7018
7117
  if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
7019
- return _chunkUWOCYINYcjs.createLateRedirectRecovery.call(void 0,
7118
+ return _chunkNEKO3HM2cjs.createLateRedirectRecovery.call(void 0,
7020
7119
  this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
7021
7120
  this.getCspNonce(req) || ""
7022
7121
  );
7023
7122
  }
7024
7123
  const pathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7025
- trustProxy: _optionalChain([this, 'access', _279 => _279.config, 'access', _280 => _280.server, 'optionalAccess', _281 => _281.trustProxy])
7124
+ trustProxy: _optionalChain([this, 'access', _298 => _298.config, 'access', _299 => _299.server, 'optionalAccess', _300 => _300.trustProxy])
7026
7125
  }).pathname;
7027
7126
  let content = this.defaultNotFoundContent();
7028
7127
  const NotFoundComponent = await this.loadNotFoundComponent();
@@ -7037,14 +7136,14 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7037
7136
  _chunk7U4XF76Rcjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
7038
7137
  }
7039
7138
  }
7040
- return _chunkUWOCYINYcjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
7139
+ return _chunkNEKO3HM2cjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
7041
7140
  }
7042
7141
  async render404(req, res) {
7043
7142
  res.statusCode = 404;
7044
7143
  const pathname = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7045
- trustProxy: _optionalChain([this, 'access', _282 => _282.config, 'access', _283 => _283.server, 'optionalAccess', _284 => _284.trustProxy])
7144
+ trustProxy: _optionalChain([this, 'access', _301 => _301.config, 'access', _302 => _302.server, 'optionalAccess', _303 => _303.trustProxy])
7046
7145
  }).pathname;
7047
- if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7146
+ if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7048
7147
  res.setHeader("Content-Type", "application/json");
7049
7148
  res.end(JSON.stringify({ error: "Not found", pathname }));
7050
7149
  return;
@@ -7067,7 +7166,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7067
7166
  return;
7068
7167
  }
7069
7168
  const appDir = path10.join(this.config.root, this.config.srcDir, "app");
7070
- const notFoundExtensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7169
+ const notFoundExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7071
7170
  let layoutModule = null;
7072
7171
  try {
7073
7172
  for (const ext of notFoundExtensions) {
@@ -7079,13 +7178,13 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7079
7178
  }
7080
7179
  const notFoundPath = resolveFarmNotFoundComponentPath(
7081
7180
  this.config,
7082
- _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, this.config)
7181
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config)
7083
7182
  );
7084
7183
  if (notFoundPath) {
7085
7184
  const notFoundModule = await this.loadNotFoundModule();
7086
- const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _285 => _285.default]), () => ( null));
7185
+ const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _304 => _304.default]), () => ( null));
7087
7186
  if (NotFoundComponent) {
7088
- const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _286 => _286.default]), () => ( null));
7187
+ const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _305 => _305.default]), () => ( null));
7089
7188
  let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
7090
7189
  if (LayoutComponent) {
7091
7190
  element = this.rendererRuntime.createElement(LayoutComponent, {
@@ -7122,23 +7221,23 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7122
7221
  res.statusCode = statusCode;
7123
7222
  const isDev = process.env.NODE_ENV === "development";
7124
7223
  const requestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
7125
- trustProxy: _optionalChain([this, 'access', _287 => _287.config, 'access', _288 => _288.server, 'optionalAccess', _289 => _289.trustProxy])
7224
+ trustProxy: _optionalChain([this, 'access', _306 => _306.config, 'access', _307 => _307.server, 'optionalAccess', _308 => _308.trustProxy])
7126
7225
  });
7127
7226
  const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
7128
- const statusText = _chunkUWOCYINYcjs.getDefaultErrorStatusText.call(void 0, statusCode);
7227
+ const statusText = _chunkNEKO3HM2cjs.getDefaultErrorStatusText.call(void 0, statusCode);
7129
7228
  const content = this.stampFarmScripts(
7130
7229
  req,
7131
- _chunkUWOCYINYcjs.createDefaultErrorMarkup.call(void 0, {
7230
+ _chunkNEKO3HM2cjs.createDefaultErrorMarkup.call(void 0, {
7132
7231
  statusCode,
7133
7232
  statusText,
7134
7233
  requestPath: requestUrl.pathname,
7135
7234
  method: req.method || "GET",
7136
- message: _optionalChain([diagnostics, 'optionalAccess', _290 => _290.message]),
7137
- errorName: _optionalChain([diagnostics, 'optionalAccess', _291 => _291.name]),
7138
- stack: _optionalChain([diagnostics, 'optionalAccess', _292 => _292.stack]),
7139
- sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _293 => _293.sourceFrame]),
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]),
7140
7239
  development: isDev,
7141
- farmVersion: _chunkCCMP4JD2cjs.FARM_VERSION,
7240
+ farmVersion: _chunkJK26IMT7cjs.FARM_VERSION,
7142
7241
  nodeVersion: process.version,
7143
7242
  mode: isDev ? "development" : "production"
7144
7243
  })
@@ -7164,9 +7263,9 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7164
7263
  */
7165
7264
  getI18nAlternateOptions(req, metadata) {
7166
7265
  return {
7167
- metadataBase: _optionalChain([metadata, 'optionalAccess', _294 => _294.metadataBase]),
7168
- origin: req ? _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _295 => _295.config, 'access', _296 => _296.server, 'optionalAccess', _297 => _297.trustProxy]) }).origin : void 0,
7169
- languages: _optionalChain([metadata, 'optionalAccess', _298 => _298.alternates, 'optionalAccess', _299 => _299.languages])
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])
7170
7269
  };
7171
7270
  }
7172
7271
  createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
@@ -7176,7 +7275,7 @@ window.__FARM_I18N__ = ${_chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0
7176
7275
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
7177
7276
  const integrationManifestScript = farmScripts(`<script>
7178
7277
  window.__FARM_DEPLOYMENT_ID__ = ${serializeInlineValue(this.getDeploymentId())};
7179
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkWGWWRV2Mcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
7278
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkB3HQTGXScjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
7180
7279
  ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};` : ""}
7181
7280
  </script>`);
7182
7281
  const alternateLinks = i18nSnapshot ? renderI18nAlternateLinks(
@@ -7185,20 +7284,20 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7185
7284
  this.getI18nAlternateOptions(alternates.req, alternates.metadata)
7186
7285
  ) : "";
7187
7286
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
7188
- const themeDocument = _chunkUWOCYINYcjs.createFarmThemeDocumentParts.call(void 0,
7287
+ const themeDocument = _chunkNEKO3HM2cjs.createFarmThemeDocumentParts.call(void 0,
7189
7288
  this.config.theme,
7190
7289
  this.config.basePath,
7191
7290
  _chunk5AMH6AFAcjs.getTheme.call(void 0, )
7192
7291
  );
7193
7292
  themeDocument.head = farmScripts(themeDocument.head);
7194
7293
  const rendererHydrationScript = farmScripts(
7195
- _optionalChain([this, 'access', _300 => _300.rendererRuntime, 'access', _301 => _301.generateHydrationScript, 'optionalCall', _302 => _302()]) || ""
7294
+ _optionalChain([this, 'access', _319 => _319.rendererRuntime, 'access', _320 => _320.generateHydrationScript, 'optionalCall', _321 => _321()]) || ""
7196
7295
  );
7197
- const viewportTags = _chunkY3DO7BIJcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _303 => _303.metadata, 'optionalAccess', _304 => _304.viewport]));
7198
- const fullDocument = _chunkUWOCYINYcjs.extractFarmFullDocument.call(void 0, _chunkUWOCYINYcjs.markFarmDocumentLayouts.call(void 0, content));
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));
7199
7298
  if (fullDocument) {
7200
- return _chunkUWOCYINYcjs.composeFarmFullDocument.call(void 0,
7201
- metadataHead ? _chunkUWOCYINYcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
7299
+ return _chunkNEKO3HM2cjs.composeFarmFullDocument.call(void 0,
7300
+ metadataHead ? _chunkNEKO3HM2cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
7202
7301
  {
7203
7302
  fallbackIcon: !metadataHead,
7204
7303
  viewport: viewportTags,
@@ -7224,7 +7323,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7224
7323
  );
7225
7324
  }
7226
7325
  return `<!DOCTYPE html>
7227
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _305 => _305.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7326
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _324 => _324.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7228
7327
  <head>
7229
7328
  ${themeDocument.head}
7230
7329
  <meta charset="utf-8">
@@ -7265,7 +7364,7 @@ ${clientScript}
7265
7364
  const deploymentId = this.getDeploymentId();
7266
7365
  res.setHeader(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
7267
7366
  if ((req.method || "GET").toUpperCase() !== "GET") return;
7268
- const isSecure = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _306 => _306.config, 'access', _307 => _307.server, 'optionalAccess', _308 => _308.trustProxy]) }).protocol === "https:";
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:";
7269
7368
  const cookie = _chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
7270
7369
  const existing = res.getHeader("Set-Cookie");
7271
7370
  if (Array.isArray(existing)) {
@@ -7328,7 +7427,7 @@ var FarmApp = class {
7328
7427
  await this.serverRenderer.initialize();
7329
7428
  await this.verifyAppStructure();
7330
7429
  await this.routeManager.discoverRoutes();
7331
- if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7430
+ if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7332
7431
  this.routeManager.generateClientManifest(this.config.root);
7333
7432
  if (process.env.FARM_VERBOSE) {
7334
7433
  _chunk7U4XF76Rcjs.logger.success("Farm.js application initialized successfully!");
@@ -7357,7 +7456,7 @@ var FarmApp = class {
7357
7456
  outDir: config.outDir || "dist",
7358
7457
  basePath,
7359
7458
  trailingSlash: _nullishCoalesce(config.trailingSlash, () => ( false)),
7360
- renderer: _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer),
7459
+ renderer: _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, config.renderer),
7361
7460
  preset: _nullishCoalesce(config.preset, () => ( "node-server")),
7362
7461
  deploy: config.deploy || {},
7363
7462
  storage: config.storage || {},
@@ -7367,8 +7466,8 @@ var FarmApp = class {
7367
7466
  integrations: config.integrations || {},
7368
7467
  plugins: config.plugins || [],
7369
7468
  migrations: config.migrations || { commands: [] },
7370
- cron: _chunk5ZHC6QGDcjs.resolveCronConfig.call(void 0, config.cron),
7371
- workflows: _chunkGBESKA76cjs.resolveWorkflowsConfig.call(void 0, config.workflows),
7469
+ cron: _chunkHQKCSJEHcjs.resolveCronConfig.call(void 0, config.cron),
7470
+ workflows: _chunkBSX5OGSDcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
7372
7471
  api: normalizeFarmAppAPIConfig(config.api),
7373
7472
  middleware: config.middleware || {},
7374
7473
  routeRules: _chunkIIHZ2BEEcjs.normalizeRouteRules.call(void 0, config.routeRules),
@@ -7378,9 +7477,9 @@ var FarmApp = class {
7378
7477
  security: _chunk6JHZPB52cjs.resolveFarmSecurityConfig.call(void 0, config.security),
7379
7478
  images: _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
7380
7479
  config.images,
7381
- _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7480
+ _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7382
7481
  ),
7383
- performance: _chunk4OFWG4IKcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
7482
+ performance: _chunkEACD6ND7cjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
7384
7483
  theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
7385
7484
  i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
7386
7485
  root,
@@ -7408,10 +7507,10 @@ var FarmApp = class {
7408
7507
  env: config.env || { server: {}, public: {} },
7409
7508
  suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
7410
7509
  experimental: {
7411
- serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _309 => _309.experimental, 'optionalAccess', _310 => _310.serverComponents]), () => ( false)),
7412
- serverActions: _nullishCoalesce(_optionalChain([config, 'access', _311 => _311.experimental, 'optionalAccess', _312 => _312.serverActions]), () => ( false)),
7413
- isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _313 => _313.experimental, 'optionalAccess', _314 => _314.isolatedClientHydration]), () => ( "off")),
7414
- ppr: _nullishCoalesce(_optionalChain([config, 'access', _315 => _315.experimental, 'optionalAccess', _316 => _316.ppr]), () => ( false)),
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)),
7415
7514
  ...config.experimental
7416
7515
  },
7417
7516
  agent: _nullishCoalesce(config.agent, () => ( {})),
@@ -7431,12 +7530,12 @@ var FarmApp = class {
7431
7530
  );
7432
7531
  }
7433
7532
  async verifyAppStructure() {
7434
- const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, this.config);
7533
+ const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, this.config);
7435
7534
  const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunk7U4XF76Rcjs.fileExists.call(void 0, appDir)))).some(
7436
7535
  Boolean
7437
7536
  );
7438
7537
  if (!hasAppDirectory) {
7439
- const routeFiles = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7538
+ const routeFiles = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7440
7539
  (source) => _chunkHS4JPIGRcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
7441
7540
  );
7442
7541
  if (routeFiles.length > 0) {
@@ -7447,14 +7546,14 @@ var FarmApp = class {
7447
7546
  `App directory not found at ${appDir}. Please create a src/app directory or extend a Farm layer containing routes.`
7448
7547
  );
7449
7548
  }
7450
- const componentExtensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7549
+ const componentExtensions = _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7451
7550
  const rootLayoutPaths = appDirs.flatMap(
7452
7551
  (appDir) => componentExtensions.map((extension) => path4.default.join(appDir, `layout${extension}`))
7453
7552
  );
7454
7553
  const hasRootLayout = await Promise.all(rootLayoutPaths.map((p) => _chunk7U4XF76Rcjs.fileExists.call(void 0, p))).then(
7455
7554
  (results) => results.some(Boolean)
7456
7555
  );
7457
- if (!hasRootLayout && !_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7556
+ if (!hasRootLayout && !_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7458
7557
  _chunk7U4XF76Rcjs.logger.warn(
7459
7558
  `No root layout found. Consider creating src/app/layout${componentExtensions[0]} for consistent page structure.`
7460
7559
  );
@@ -7470,7 +7569,7 @@ function isResolvedAuthConfig(value) {
7470
7569
  );
7471
7570
  }
7472
7571
  function normalizeFarmAppAPIConfig(config) {
7473
- if (typeof _optionalChain([config, 'optionalAccess', _317 => _317.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _318 => _318.basePath]) === "function") {
7572
+ if (typeof _optionalChain([config, 'optionalAccess', _336 => _336.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _337 => _337.basePath]) === "function") {
7474
7573
  throw new Error(
7475
7574
  "Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
7476
7575
  );
@@ -7485,7 +7584,7 @@ function createFarmApp(config, viteServer) {
7485
7584
  var SHARP_INSTALL_HINT = _chunkKORZ6PREcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
7486
7585
  var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
7487
7586
  function resolveFarmImageProviderForRuntime(images, options) {
7488
- const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _319 => _319.provider]), () => ( "auto"));
7587
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _338 => _338.provider]), () => ( "auto"));
7489
7588
  if (provider === "none") return images;
7490
7589
  const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
7491
7590
  if (!usesSharp || _chunkKORZ6PREcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
@@ -7626,9 +7725,9 @@ function staticValue(node) {
7626
7725
  }
7627
7726
  }
7628
7727
  function property(object, name) {
7629
- return _optionalChain([object, 'access', _320 => _320.properties, 'access', _321 => _321.find, 'call', _322 => _322(
7728
+ return _optionalChain([object, 'access', _339 => _339.properties, 'access', _340 => _340.find, 'call', _341 => _341(
7630
7729
  (entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
7631
- ), 'optionalAccess', _323 => _323.value]);
7730
+ ), 'optionalAccess', _342 => _342.value]);
7632
7731
  }
7633
7732
  function toolFromObject(object) {
7634
7733
  const name = staticValue(property(object, "name"));
@@ -7674,7 +7773,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7674
7773
  if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
7675
7774
  continue;
7676
7775
  for (const specifier of statement.specifiers) {
7677
- const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _324 => _324.imported, 'optionalAccess', _325 => _325.name]), () => ( _optionalChain([specifier, 'access', _326 => _326.imported, 'optionalAccess', _327 => _327.value])));
7776
+ const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _343 => _343.imported, 'optionalAccess', _344 => _344.name]), () => ( _optionalChain([specifier, 'access', _345 => _345.imported, 'optionalAccess', _346 => _346.value])));
7678
7777
  if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
7679
7778
  locals.set(specifier.local.name, imported);
7680
7779
  }
@@ -7690,7 +7789,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7690
7789
  const [argument] = current.arguments;
7691
7790
  if (definer && argument) {
7692
7791
  const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
7693
- (element) => _optionalChain([element, 'optionalAccess', _328 => _328.type]) === "ObjectExpression"
7792
+ (element) => _optionalChain([element, 'optionalAccess', _347 => _347.type]) === "ObjectExpression"
7694
7793
  ) : [] : argument.type === "ObjectExpression" ? [argument] : [];
7695
7794
  for (const object of objects) {
7696
7795
  const tool = toolFromObject(object);
@@ -7751,8 +7850,8 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
7751
7850
 
7752
7851
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
7753
7852
  function resolveFarmClientCacheAdapterEntry(root, cache2) {
7754
- const client = _optionalChain([cache2, 'optionalAccess', _329 => _329.client]);
7755
- const adapter = _optionalChain([client, 'optionalAccess', _330 => _330.adapter]);
7853
+ const client = _optionalChain([cache2, 'optionalAccess', _348 => _348.client]);
7854
+ const adapter = _optionalChain([client, 'optionalAccess', _349 => _349.adapter]);
7756
7855
  if (adapter === void 0) return void 0;
7757
7856
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
7758
7857
  throw new Error(
@@ -7767,8 +7866,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
7767
7866
  );
7768
7867
  }
7769
7868
  const options = {};
7770
- if (_optionalChain([client, 'optionalAccess', _331 => _331.version]) !== void 0) options.version = client.version;
7771
- if (_optionalChain([client, 'optionalAccess', _332 => _332.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
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;
7772
7871
  return { importPath: found.replace(/\\/g, "/"), options };
7773
7872
  }
7774
7873
  function resolveAdapterFile(resolved) {
@@ -7973,6 +8072,15 @@ function createFarmNavigationScript(script) {
7973
8072
  freshScript.textContent = script.textContent || "";
7974
8073
  return freshScript;
7975
8074
  }
8075
+ // Readies nodes parsed outside the page (DOMParser, a <template>) for the page they move into.
8076
+ // Those parse as a page without scripting, so a <noscript>'s content comes out as elements, whose
8077
+ // images and frames would load once in the page. They become the text the page's own parser makes
8078
+ // of that markup.
8079
+ function adoptFarmParsedNodes(root) {
8080
+ for (const noscript of Array.from(root.querySelectorAll("noscript"))) {
8081
+ noscript.textContent = noscript.innerHTML;
8082
+ }
8083
+ }
7976
8084
  // React streams Suspense content after its fallback, in a hidden segment that a reveal script
7977
8085
  // ($RC for a boundary, $RS for a segment placeholder) moves into place. This makes the same moves
7978
8086
  // in a parsed page, before it goes on screen, and drops the calls it made, so the islands in that
@@ -8071,7 +8179,8 @@ async function readFarmNavigationStream(body, flushToken) {
8071
8179
  cancel: function() { reader.cancel().catch(function() {}); },
8072
8180
  };
8073
8181
  }`;
8074
- var FARM_EARLY_NAVIGATION_SOURCE = `// The request the boot script sent for a link clicked before the router ran (islands-boot.ts).
8182
+ var FARM_EARLY_NAVIGATION_SOURCE = `// The request the boot script sent for a link pressed or clicked before the router ran
8183
+ // (islands-boot.ts).
8075
8184
  // The next navigation request takes its response when it is the same request, and aborts it
8076
8185
  // otherwise. The held island values may differ: a response for fewer of them carries more values,
8077
8186
  // which fits any page. As with a prefetched page, a response sent over 30 seconds ago is not used.
@@ -8216,7 +8325,7 @@ function redactFarmDocsClientConfig(code, filename) {
8216
8325
  const current = node;
8217
8326
  if (current.type === "Property") {
8218
8327
  const name = propertyKeyName(current);
8219
- const valueType = _optionalChain([current, 'access', _333 => _333.value, 'optionalAccess', _334 => _334.type]);
8328
+ const valueType = _optionalChain([current, 'access', _352 => _352.value, 'optionalAccess', _353 => _353.type]);
8220
8329
  const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkSM2SYWARcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
8221
8330
  if (name && credential) {
8222
8331
  edits.push(
@@ -8259,7 +8368,7 @@ function farmDocsClientConfigPlugin(configModule) {
8259
8368
  // Never matches without a docs config module, so the bundler never calls the handler.
8260
8369
  filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
8261
8370
  handler(code, id, options) {
8262
- if (_optionalChain([options, 'optionalAccess', _335 => _335.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8371
+ if (_optionalChain([options, 'optionalAccess', _354 => _354.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8263
8372
  const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
8264
8373
  return redacted === null ? null : { code: redacted, map: null };
8265
8374
  }
@@ -8333,14 +8442,43 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
8333
8442
  "@farm.js/core/query/client",
8334
8443
  "@farm.js/core/server-fn/client",
8335
8444
  "@farm.js/core/server-query/client",
8445
+ // Farm's browser entry imports these and no app file does, so Vite's scan cannot see them. In an
8446
+ // app that installs Farm from the registry, Vite found them on the first page request, bundled
8447
+ // again, and reloaded the page while it loaded.
8448
+ "@farm.js/core/internal/client-runtime",
8449
+ "@farm.js/core/internal/spa-router",
8450
+ "@farm.js/core/router",
8451
+ // The typed API client. The development server excludes the server-only `@farm.js/core/api`,
8452
+ // and Vite's scan skips every subpath of an excluded package, so an app's import of the client
8453
+ // was also found only on the first request.
8454
+ "@farm.js/core/api/client",
8336
8455
  // Islands mode's browser runtime: Farm imports islx, which the app reaches only through Farm.
8337
8456
  "@farm.js/core > @farm.js/islx/client",
8338
8457
  "@farm.js/core > @farm.js/islx/react",
8339
- "@farm.js/core > @farm.js/islx/react/client"
8458
+ "@farm.js/core > @farm.js/islx/react/client",
8459
+ // What a browser module's import of a server function compiles to on other renderers (see
8460
+ // `resolveFarmIslxActionsMode`). Found only when that module is first requested, it made Vite
8461
+ // bundle again and reload the page while it loaded.
8462
+ "@farm.js/core/internal/islx-actions-client"
8340
8463
  ];
8341
- function getFarmClientOptimizeDepsInclude(renderer) {
8464
+ function isInstalledPackage(root, specifier) {
8465
+ const parts = specifier.split("/");
8466
+ const name = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
8467
+ const directory = _chunkBBVLOENDcjs.findFarmAppPackageDir.call(void 0, root, name);
8468
+ return directory !== void 0 && directory.split(path4.default.sep).includes("node_modules");
8469
+ }
8470
+ function getFarmClientOptimizeDepsInclude(renderer, root) {
8342
8471
  return Array.from(
8343
- /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _336 => _336.optimizeDeps]) || []])
8472
+ /* @__PURE__ */ new Set([
8473
+ ...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE,
8474
+ ..._optionalChain([renderer, 'optionalAccess', _355 => _355.optimizeDeps]) || [],
8475
+ // Farm's browser entry imports a renderer's client module, and no app file does, so Vite's
8476
+ // scan never sees it and finds it only on the first page request, then bundles again. The
8477
+ // React entry imports `react-dom/client` instead, which is already listed. A linked
8478
+ // renderer stays source: pre-bundling it would copy the packages it shares with the app's
8479
+ // 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] : []
8481
+ ])
8344
8482
  );
8345
8483
  }
8346
8484
  function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
@@ -8351,8 +8489,9 @@ function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
8351
8489
  return `${prefix}/${FARM_CLIENT_ENTRY_PATTERN}`;
8352
8490
  });
8353
8491
  }
8354
- function createFarmClientOptimizeDepsConfig(entries, renderer) {
8355
- if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8492
+ function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8493
+ if (_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8494
+ const jsxImportSource = renderer ? renderer.jsxImportSource : void 0;
8356
8495
  return {
8357
8496
  // Keep normal application dependency discovery for CJS-only packages, but
8358
8497
  // seed every Farm browser runtime so React is present in the first crawl.
@@ -8360,11 +8499,20 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
8360
8499
  // Waiting for the crawl avoids serving a partial optimizer generation and
8361
8500
  // then changing browser hashes while hydration is already in progress.
8362
8501
  holdUntilCrawlEnd: true,
8363
- include: getFarmClientOptimizeDepsInclude(renderer || void 0),
8502
+ include: getFarmClientOptimizeDepsInclude(renderer || void 0, root),
8364
8503
  // Farm's HTML boots through a virtual module and imports route UI lazily.
8365
8504
  // Explicit entries let Vite finish that crawl before a navigation can
8366
8505
  // rotate the optimizer hash underneath a hydrated React runtime.
8367
- ..._optionalChain([entries, 'optionalAccess', _337 => _337.length]) ? { entries: [...entries] } : {}
8506
+ ..._optionalChain([entries, 'optionalAccess', _356 => _356.length]) ? { entries: [...entries] } : {},
8507
+ // Vite's dependency scan compiles JSX on its own: with the app tsconfig's `jsxImportSource`
8508
+ // when there is one, otherwise as React, whatever the renderer's plugin set for its own
8509
+ // transforms. React is the default already, and naming it here would override a tsconfig
8510
+ // source such as Emotion's. A renderer plugin's own scan setting is merged over this one.
8511
+ ...jsxImportSource && jsxImportSource !== "react" ? {
8512
+ rolldownOptions: {
8513
+ transform: { jsx: { runtime: "automatic", importSource: jsxImportSource } }
8514
+ }
8515
+ } : {}
8368
8516
  };
8369
8517
  }
8370
8518
  function createFarmSourceAlias(projectRoot, srcDir = "src") {
@@ -8396,8 +8544,8 @@ function mergeFarmViteAlias(farmValue, userValue) {
8396
8544
  return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
8397
8545
  }
8398
8546
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8399
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _338 => _338.optimizeDeps, 'optionalAccess', _339 => _339.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _340 => _340.optimizeDeps, 'optionalAccess', _341 => _341.noDiscovery])));
8400
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _342 => _342.optimizeDeps, 'optionalAccess', _343 => _343.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _344 => _344.optimizeDeps, 'optionalAccess', _345 => _345.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _346 => _346.optimizeDeps, 'optionalAccess', _347 => _347.holdUntilCrawlEnd]))));
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]))));
8401
8549
  return {
8402
8550
  ...farmConfig,
8403
8551
  ...userConfig,
@@ -8409,9 +8557,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8409
8557
  resolve: {
8410
8558
  ...farmConfig.resolve,
8411
8559
  ...userConfig.resolve,
8412
- alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _348 => _348.resolve, 'optionalAccess', _349 => _349.alias]), _optionalChain([userConfig, 'access', _350 => _350.resolve, 'optionalAccess', _351 => _351.alias])),
8560
+ alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _367 => _367.resolve, 'optionalAccess', _368 => _368.alias]), _optionalChain([userConfig, 'access', _369 => _369.resolve, 'optionalAccess', _370 => _370.alias])),
8413
8561
  dedupe: Array.from(
8414
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _352 => _352.resolve, 'optionalAccess', _353 => _353.dedupe]) || [], ..._optionalChain([userConfig, 'access', _354 => _354.resolve, 'optionalAccess', _355 => _355.dedupe]) || []])
8562
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _371 => _371.resolve, 'optionalAccess', _372 => _372.dedupe]) || [], ..._optionalChain([userConfig, 'access', _373 => _373.resolve, 'optionalAccess', _374 => _374.dedupe]) || []])
8415
8563
  )
8416
8564
  },
8417
8565
  optimizeDeps: {
@@ -8421,21 +8569,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8421
8569
  holdUntilCrawlEnd,
8422
8570
  include: Array.from(
8423
8571
  /* @__PURE__ */ new Set([
8424
- ..._optionalChain([farmConfig, 'access', _356 => _356.optimizeDeps, 'optionalAccess', _357 => _357.include]) || [],
8425
- ..._optionalChain([userConfig, 'access', _358 => _358.optimizeDeps, 'optionalAccess', _359 => _359.include]) || []
8572
+ ..._optionalChain([farmConfig, 'access', _375 => _375.optimizeDeps, 'optionalAccess', _376 => _376.include]) || [],
8573
+ ..._optionalChain([userConfig, 'access', _377 => _377.optimizeDeps, 'optionalAccess', _378 => _378.include]) || []
8426
8574
  ])
8427
8575
  ),
8428
8576
  exclude: Array.from(
8429
8577
  /* @__PURE__ */ new Set([
8430
- ..._optionalChain([farmConfig, 'access', _360 => _360.optimizeDeps, 'optionalAccess', _361 => _361.exclude]) || [],
8431
- ..._optionalChain([userConfig, 'access', _362 => _362.optimizeDeps, 'optionalAccess', _363 => _363.exclude]) || []
8578
+ ..._optionalChain([farmConfig, 'access', _379 => _379.optimizeDeps, 'optionalAccess', _380 => _380.exclude]) || [],
8579
+ ..._optionalChain([userConfig, 'access', _381 => _381.optimizeDeps, 'optionalAccess', _382 => _382.exclude]) || []
8432
8580
  ])
8433
8581
  )
8434
8582
  },
8435
8583
  ssr: {
8436
8584
  ...farmConfig.ssr,
8437
8585
  ...userConfig.ssr,
8438
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _364 => _364.ssr, 'optionalAccess', _365 => _365.noExternal]), _optionalChain([userConfig, 'access', _366 => _366.ssr, 'optionalAccess', _367 => _367.noExternal]))
8586
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _383 => _383.ssr, 'optionalAccess', _384 => _384.noExternal]), _optionalChain([userConfig, 'access', _385 => _385.ssr, 'optionalAccess', _386 => _386.noExternal]))
8439
8587
  }
8440
8588
  };
8441
8589
  }
@@ -8506,8 +8654,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8506
8654
  ...userRolldownOptions
8507
8655
  };
8508
8656
  const merged = mergeFarmViteConfig(farmConfig, shared);
8509
- const farmBundlerOptions = _optionalChain([farmConfig, 'access', _368 => _368.build, 'optionalAccess', _369 => _369.rollupOptions]);
8510
- const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _370 => _370.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _371 => _371.output]);
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]);
8511
8659
  return {
8512
8660
  ...merged,
8513
8661
  build: {
@@ -8524,7 +8672,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8524
8672
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
8525
8673
  ssr: {
8526
8674
  ...merged.ssr,
8527
- external: mergeExternal(_optionalChain([farmConfig, 'access', _372 => _372.ssr, 'optionalAccess', _373 => _373.external]), _optionalChain([userConfig, 'access', _374 => _374.ssr, 'optionalAccess', _375 => _375.external]))
8675
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _391 => _391.ssr, 'optionalAccess', _392 => _392.external]), _optionalChain([userConfig, 'access', _393 => _393.ssr, 'optionalAccess', _394 => _394.external]))
8528
8676
  }
8529
8677
  };
8530
8678
  }
@@ -8602,4 +8750,7 @@ ${FARM_DARK_VARIANT}
8602
8750
 
8603
8751
 
8604
8752
 
8605
- exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.createFarmDevClientManifest = createFarmDevClientManifest; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.farmDevServerStylesheetsPlugin = farmDevServerStylesheetsPlugin; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.invalidateFarmRouteRootInferences = invalidateFarmRouteRootInferences; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.canFarmSkipKeptLayoutRender = canFarmSkipKeptLayoutRender; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.toBakedMarkdownSourcePath = toBakedMarkdownSourcePath; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_EARLY_NAVIGATION_SOURCE = FARM_EARLY_NAVIGATION_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.FARM_VIDEO_PLAYER_HTML = FARM_VIDEO_PLAYER_HTML; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteAlias = mergeFarmViteAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;
8753
+
8754
+
8755
+
8756
+ exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.createFarmDevClientManifest = createFarmDevClientManifest; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.farmDevServerStylesheetsPlugin = farmDevServerStylesheetsPlugin; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.isRendererCompiledComponent = isRendererCompiledComponent; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.resolveFarmIslxActionsMode = resolveFarmIslxActionsMode; exports.farmBrowserServerFnsEnabled = farmBrowserServerFnsEnabled; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.invalidateFarmRouteRootInferences = invalidateFarmRouteRootInferences; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.canFarmSkipKeptLayoutRender = canFarmSkipKeptLayoutRender; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.toBakedMarkdownSourcePath = toBakedMarkdownSourcePath; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_EARLY_NAVIGATION_SOURCE = FARM_EARLY_NAVIGATION_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.FARM_VIDEO_PLAYER_HTML = FARM_VIDEO_PLAYER_HTML; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteAlias = mergeFarmViteAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;