@farm.js/core 0.1.81 → 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 (240) hide show
  1. package/dist/{agent-mcp.d-Cxi3214_.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DMqOqnOA.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 +1 -1
  5. package/dist/agent-runtime.d.ts +1 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-LV23T6QN.cjs +17 -0
  8. package/dist/{analyzer-IC66UJCU.mjs → analyzer-RPU2KG4J.mjs} +2 -2
  9. package/dist/api/node.cjs +5 -4
  10. package/dist/api/node.d.mts +3 -3
  11. package/dist/api/node.d.ts +3 -3
  12. package/dist/api/node.mjs +4 -3
  13. package/dist/api/route-manager.cjs +5 -4
  14. package/dist/api/route-manager.d.mts +3 -3
  15. package/dist/api/route-manager.d.ts +3 -3
  16. package/dist/api/route-manager.mjs +4 -3
  17. package/dist/api/runtime.cjs +4 -3
  18. package/dist/api/runtime.d.mts +2 -2
  19. package/dist/api/runtime.d.ts +2 -2
  20. package/dist/api/runtime.mjs +3 -2
  21. package/dist/api.cjs +7 -6
  22. package/dist/api.d.mts +4 -4
  23. package/dist/api.d.ts +4 -4
  24. package/dist/api.mjs +6 -5
  25. package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
  26. package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
  27. package/dist/app-markdown.d.mts +2 -2
  28. package/dist/app-markdown.d.ts +2 -2
  29. package/dist/{app.d-BJuSurgy.d.mts → app.d-C0ePpuaG.d.mts} +21 -4
  30. package/dist/{app.d-DGIoFt5D.d.ts → app.d-CIoXsAbN.d.ts} +21 -4
  31. package/dist/chunk-3DE6RK7K.cjs +36 -0
  32. package/dist/{chunk-NOYKBGUK.mjs → chunk-47I2MYIR.mjs} +130 -46
  33. package/dist/{chunk-GY63XD6K.mjs → chunk-4X7LSGM6.mjs} +1 -1
  34. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  35. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  36. package/dist/{chunk-CPZZBCPO.cjs → chunk-5MUFW5UU.cjs} +2 -2
  37. package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
  38. package/dist/{chunk-XOXCQGAF.mjs → chunk-63ZE6B6M.mjs} +1 -1
  39. package/dist/{chunk-XOGCNKB7.cjs → chunk-6BPFIYGY.cjs} +3 -3
  40. package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
  41. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  42. package/dist/{chunk-2Y2HRZQY.cjs → chunk-AIPZDBP6.cjs} +312 -228
  43. package/dist/{chunk-CL7BUGVB.cjs → chunk-ARORZ3MH.cjs} +286 -240
  44. package/dist/{chunk-ONSZP5JK.mjs → chunk-AUFEM3FB.mjs} +1 -1
  45. package/dist/{chunk-FYZD7DUS.cjs → chunk-B2PGVHBG.cjs} +4 -4
  46. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  47. package/dist/{chunk-M6DAIE4T.cjs → chunk-BCTHOQPP.cjs} +10 -8
  48. package/dist/{chunk-S3IWDDQ3.mjs → chunk-C3VCYOU4.mjs} +1 -1
  49. package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
  50. package/dist/{chunk-W6C3LEXX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
  51. package/dist/{chunk-YH7ENV3K.mjs → chunk-CJDBTTLB.mjs} +4 -4
  52. package/dist/{chunk-5N526T7Q.mjs → chunk-DAXU2NBE.mjs} +74 -18
  53. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  54. package/dist/{chunk-46UV2E7I.cjs → chunk-DRO3NXA3.cjs} +9 -9
  55. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  56. package/dist/{chunk-HTNJ7A4D.mjs → chunk-EL2Z6YFZ.mjs} +2 -2
  57. package/dist/{chunk-IM3UINTZ.mjs → chunk-GXLNARPO.mjs} +151 -16
  58. package/dist/{chunk-E3HBD2K3.cjs → chunk-HHQEKLZL.cjs} +2 -2
  59. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  60. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  61. package/dist/{chunk-BJWJP5A4.mjs → chunk-I4DR3HCH.mjs} +3 -3
  62. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  63. package/dist/{chunk-NSLRK5DK.cjs → chunk-JK26IMT7.cjs} +1 -1
  64. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  65. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  66. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  67. package/dist/{chunk-MOGRRZMW.cjs → chunk-LM2ZDNDD.cjs} +16 -16
  68. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  69. package/dist/{chunk-ZIYJWJV2.cjs → chunk-N2EFMN2K.cjs} +8 -8
  70. package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
  71. package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
  72. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  73. package/dist/{chunk-IPG6B25T.mjs → chunk-NRCKBDYP.mjs} +78 -32
  74. package/dist/{chunk-POL5RCVU.mjs → chunk-OMB7UGVW.mjs} +1 -1
  75. package/dist/{chunk-D77OGI6X.mjs → chunk-OP5VI4TP.mjs} +1 -1
  76. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  77. package/dist/{chunk-OIWDEDUO.cjs → chunk-Q2VOT3K2.cjs} +392 -336
  78. package/dist/{chunk-RZ6XUEQS.mjs → chunk-QSMUMK7Y.mjs} +2 -2
  79. package/dist/{chunk-2HMSSPCZ.mjs → chunk-RMLR5RMH.mjs} +4 -2
  80. package/dist/{chunk-ADQ2LATR.cjs → chunk-RMPUEH5T.cjs} +2 -2
  81. package/dist/{chunk-AHVF5GI2.cjs → chunk-S7WZUK3B.cjs} +2 -2
  82. package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
  83. package/dist/chunk-U6XYBTUT.mjs +36 -0
  84. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  85. package/dist/{chunk-OUDNUFVR.cjs → chunk-VMBIKDKW.cjs} +4 -4
  86. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  87. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  88. package/dist/{chunk-TLSGRK7E.mjs → chunk-ZIZRIZLP.mjs} +1 -1
  89. package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
  90. package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
  91. package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
  92. package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
  93. package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-C1WM3ieD.d.mts} +6 -1
  94. package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-DcmDzcSC.d.ts} +6 -1
  95. package/dist/client-plugins.d.mts +1 -1
  96. package/dist/client-plugins.d.ts +1 -1
  97. package/dist/client.d.mts +7 -7
  98. package/dist/client.d.ts +7 -7
  99. package/dist/config.d.mts +1 -1
  100. package/dist/config.d.ts +1 -1
  101. package/dist/cron.cjs +2 -2
  102. package/dist/cron.mjs +1 -1
  103. package/dist/desktop.d.mts +2 -2
  104. package/dist/desktop.d.ts +2 -2
  105. package/dist/{devtools-EI5N366Z.cjs → devtools-5B7NZE6F.cjs} +10 -9
  106. package/dist/{devtools-XJHODO5H.mjs → devtools-C5GXZZ7E.mjs} +7 -6
  107. package/dist/docs.cjs +9 -8
  108. package/dist/docs.d.mts +3 -3
  109. package/dist/docs.d.ts +3 -3
  110. package/dist/docs.mjs +8 -7
  111. package/dist/environment/vite.cjs +4 -4
  112. package/dist/environment/vite.mjs +3 -3
  113. package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
  114. package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
  115. package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
  116. package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
  117. package/dist/index.cjs +28 -27
  118. package/dist/{index.d-DzDHOttz.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
  119. package/dist/{index.d-Dhc2scRl.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
  120. package/dist/index.d.mts +22 -22
  121. package/dist/index.d.ts +22 -22
  122. package/dist/index.mjs +27 -26
  123. package/dist/integrations/orm.d.mts +1 -1
  124. package/dist/integrations/orm.d.ts +1 -1
  125. package/dist/integrations.cjs +4 -3
  126. package/dist/integrations.d.mts +1 -1
  127. package/dist/integrations.d.ts +1 -1
  128. package/dist/integrations.mjs +3 -2
  129. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  130. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  131. package/dist/internal/build-runtime.cjs +26 -25
  132. package/dist/internal/build-runtime.d.mts +4 -4
  133. package/dist/internal/build-runtime.d.ts +4 -4
  134. package/dist/internal/build-runtime.mjs +25 -24
  135. package/dist/internal/cli-runtime.cjs +11 -10
  136. package/dist/internal/cli-runtime.d.mts +7 -7
  137. package/dist/internal/cli-runtime.d.ts +7 -7
  138. package/dist/internal/cli-runtime.mjs +10 -9
  139. package/dist/internal/client-error-overlay.cjs +4 -4
  140. package/dist/internal/client-error-overlay.mjs +1 -1
  141. package/dist/internal/client-runtime.d.mts +5 -5
  142. package/dist/internal/client-runtime.d.ts +5 -5
  143. package/dist/internal/compression-runtime.d.mts +1 -1
  144. package/dist/internal/compression-runtime.d.ts +1 -1
  145. package/dist/internal/config-runtime.cjs +9 -8
  146. package/dist/internal/config-runtime.d.mts +3 -3
  147. package/dist/internal/config-runtime.d.ts +3 -3
  148. package/dist/internal/config-runtime.mjs +8 -7
  149. package/dist/internal/infra-analytics-runtime.cjs +8 -6
  150. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  151. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  152. package/dist/internal/infra-analytics-runtime.mjs +8 -6
  153. package/dist/internal/islands-boot.cjs +54 -20
  154. package/dist/internal/islands-boot.d.mts +5 -3
  155. package/dist/internal/islands-boot.d.ts +5 -3
  156. package/dist/internal/islands-boot.mjs +49 -15
  157. package/dist/internal/native-server-fns.cjs +4 -4
  158. package/dist/internal/native-server-fns.mjs +3 -3
  159. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  160. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  161. package/dist/internal/production-runtime.cjs +11 -6
  162. package/dist/internal/production-runtime.d.mts +13 -11
  163. package/dist/internal/production-runtime.d.ts +13 -11
  164. package/dist/internal/production-runtime.mjs +10 -5
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +1 -1
  168. package/dist/internal/start-manifest.d.ts +1 -1
  169. package/dist/markdown.d.mts +1 -1
  170. package/dist/markdown.d.ts +1 -1
  171. package/dist/middleware.d.mts +1 -1
  172. package/dist/middleware.d.ts +1 -1
  173. package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
  174. package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
  175. package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
  176. package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
  177. package/dist/navigation.d.mts +4 -4
  178. package/dist/navigation.d.ts +4 -4
  179. package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
  180. package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
  181. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  182. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  183. package/dist/plugin.cjs +21 -19
  184. package/dist/plugin.d.mts +5 -5
  185. package/dist/plugin.d.ts +5 -5
  186. package/dist/plugin.mjs +20 -18
  187. package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
  188. package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +48 -5
  190. package/dist/renderer-client.d.mts +5 -5
  191. package/dist/renderer-client.d.ts +5 -5
  192. package/dist/renderer-client.mjs +48 -5
  193. package/dist/renderer.cjs +2 -2
  194. package/dist/renderer.d.mts +10 -0
  195. package/dist/renderer.d.ts +10 -0
  196. package/dist/renderer.mjs +1 -1
  197. package/dist/{request.d-Dx82V8bz.d.mts → request.d-BhggxQf3.d.mts} +1 -1
  198. package/dist/{request.d-DUMuWxSN.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
  199. package/dist/request.d.mts +2 -2
  200. package/dist/request.d.ts +2 -2
  201. package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
  202. package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
  203. package/dist/{router.d-CJBSG5jr.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
  204. package/dist/{router.d-BtkKDxUB.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
  205. package/dist/routes.d.mts +1 -1
  206. package/dist/routes.d.ts +1 -1
  207. package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-5AOF64FL.cjs} +10 -9
  208. package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-DNRLYOJ7.mjs} +9 -8
  209. package/dist/{runtime-OJ7FXFUI.mjs → runtime-EHG2FRXZ.mjs} +9 -8
  210. package/dist/{runtime-YWQVBC3V.cjs → runtime-ZVHG5SRB.cjs} +13 -12
  211. package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
  212. package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
  213. package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
  214. package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
  215. package/dist/server-plugins.d.mts +3 -3
  216. package/dist/server-plugins.d.ts +3 -3
  217. package/dist/server.cjs +54 -48
  218. package/dist/server.d.mts +11 -11
  219. package/dist/server.d.ts +11 -11
  220. package/dist/server.mjs +30 -24
  221. package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Bjgl-Osi.d.ts} +2 -2
  222. package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-l3G38xHa.d.mts} +2 -2
  223. package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
  224. package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
  225. package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BZjuC6Zc.d.mts} +11 -3
  226. package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-BaOUOPf7.d.ts} +11 -3
  227. package/dist/testing.cjs +5 -4
  228. package/dist/testing.d.mts +1 -1
  229. package/dist/testing.d.ts +1 -1
  230. package/dist/testing.mjs +4 -3
  231. package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
  232. package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
  233. package/dist/version.cjs +2 -2
  234. package/dist/version.mjs +1 -1
  235. package/dist/vite.cjs +21 -19
  236. package/dist/vite.d.mts +6 -6
  237. package/dist/vite.d.ts +6 -6
  238. package/dist/vite.mjs +20 -18
  239. package/package.json +2 -2
  240. package/dist/analyzer-435DCIQ6.cjs +0 -17
@@ -32,7 +32,7 @@ var _chunkMHKPXX3Jcjs = require('./chunk-MHKPXX3J.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkXOGCNKB7cjs = require('./chunk-XOGCNKB7.cjs');
35
+ var _chunk6BPFIYGYcjs = require('./chunk-6BPFIYGY.cjs');
36
36
 
37
37
 
38
38
 
@@ -41,7 +41,7 @@ var _chunkXOGCNKB7cjs = require('./chunk-XOGCNKB7.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkE3HBD2K3cjs = require('./chunk-E3HBD2K3.cjs');
44
+ var _chunkHHQEKLZLcjs = require('./chunk-HHQEKLZL.cjs');
45
45
 
46
46
 
47
47
 
@@ -65,16 +65,13 @@ var _chunkN3H7UPBMcjs = require('./chunk-N3H7UPBM.cjs');
65
65
  var _chunkYUQUGVSVcjs = require('./chunk-YUQUGVSV.cjs');
66
66
 
67
67
 
68
- var _chunkW6C3LEXXcjs = require('./chunk-W6C3LEXX.cjs');
69
-
70
-
71
68
  var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
72
69
 
73
70
 
74
71
 
75
72
 
76
73
 
77
- var _chunkMOGRRZMWcjs = require('./chunk-MOGRRZMW.cjs');
74
+ var _chunkLM2ZDNDDcjs = require('./chunk-LM2ZDNDD.cjs');
78
75
 
79
76
 
80
77
  var _chunk3BTN3NP7cjs = require('./chunk-3BTN3NP7.cjs');
@@ -119,23 +116,23 @@ var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
119
116
 
120
117
 
121
118
 
122
- var _chunkCL7BUGVBcjs = require('./chunk-CL7BUGVB.cjs');
119
+ var _chunkARORZ3MHcjs = require('./chunk-ARORZ3MH.cjs');
123
120
 
124
121
 
125
122
 
126
123
 
127
124
 
128
125
 
129
- var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
126
+ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
130
127
 
131
128
 
132
- var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
129
+ var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
133
130
 
134
131
 
135
132
 
136
133
 
137
134
 
138
- var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
135
+ var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
139
136
 
140
137
 
141
138
 
@@ -148,7 +145,7 @@ var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
148
145
 
149
146
 
150
147
 
151
- var _chunkOFVCWV2Dcjs = require('./chunk-OFVCWV2D.cjs');
148
+ var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
152
149
 
153
150
 
154
151
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -158,11 +155,15 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
158
155
 
159
156
 
160
157
 
158
+ var _chunkCD5Z7RR5cjs = require('./chunk-CD5Z7RR5.cjs');
159
+
161
160
 
162
161
 
163
162
 
164
163
 
165
- var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
164
+
165
+
166
+ var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
166
167
 
167
168
 
168
169
 
@@ -170,7 +171,7 @@ var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
170
171
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
171
172
 
172
173
 
173
- var _chunkADQ2LATRcjs = require('./chunk-ADQ2LATR.cjs');
174
+ var _chunkRMPUEH5Tcjs = require('./chunk-RMPUEH5T.cjs');
174
175
 
175
176
 
176
177
  var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
@@ -191,7 +192,7 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
191
192
 
192
193
 
193
194
 
194
- var _chunk46UV2E7Icjs = require('./chunk-46UV2E7I.cjs');
195
+ var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
195
196
 
196
197
 
197
198
 
@@ -223,14 +224,14 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
223
224
 
224
225
 
225
226
 
226
- var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
227
+ var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
227
228
 
228
229
 
229
230
 
230
231
 
231
232
 
232
233
 
233
- var _chunk5ZHC6QGDcjs = require('./chunk-5ZHC6QGD.cjs');
234
+ var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
234
235
 
235
236
 
236
237
  var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
@@ -260,7 +261,7 @@ var _chunkBSX5OGSDcjs = require('./chunk-BSX5OGSD.cjs');
260
261
 
261
262
 
262
263
 
263
- var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
264
+ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
264
265
 
265
266
 
266
267
  var _chunkQKW6DLDTcjs = require('./chunk-QKW6DLDT.cjs');
@@ -274,7 +275,7 @@ var _chunkNW3DL2PMcjs = require('./chunk-NW3DL2PM.cjs');
274
275
  var _chunkSHDCKRP4cjs = require('./chunk-SHDCKRP4.cjs');
275
276
 
276
277
 
277
- var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
278
+ var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
278
279
 
279
280
 
280
281
  var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
@@ -302,7 +303,7 @@ var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
302
303
  var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
303
304
 
304
305
 
305
- var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
306
+ var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
306
307
 
307
308
 
308
309
  var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
@@ -645,7 +646,7 @@ async function compileFarmDocsManifest(docs, options) {
645
646
  isPathGuarded: options.isPathGuarded,
646
647
  basePath
647
648
  });
648
- const apiHandler = _chunkE3HBD2K3cjs.createFarmDocsAPIHandler.call(void 0, {
649
+ const apiHandler = _chunkHHQEKLZLcjs.createFarmDocsAPIHandler.call(void 0, {
649
650
  rootDir: options.root,
650
651
  srcDir: options.srcDir,
651
652
  docs,
@@ -1022,7 +1023,7 @@ async function createFarmRouteRuntimeManifest(options) {
1022
1023
  const routes = [];
1023
1024
  for (const [pattern, entry] of options.routeManager.getRoutes()) {
1024
1025
  const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
1025
- const rendering = await _chunkOUDNUFVRcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1026
+ const rendering = await _chunkVMBIKDKWcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1026
1027
  const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
1027
1028
  routes.push({
1028
1029
  kind: "page",
@@ -1635,7 +1636,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
1635
1636
  // removed block used (`readFileSync` for a version, say).
1636
1637
  enforce: "pre",
1637
1638
  transform: {
1638
- filter: { id: _chunkCL7BUGVBcjs.fileNamePattern.call(void 0, configFiles) },
1639
+ filter: { id: _chunkARORZ3MHcjs.fileNamePattern.call(void 0, configFiles) },
1639
1640
  async handler(code, id) {
1640
1641
  const file = id.split("?", 1)[0];
1641
1642
  if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
@@ -1954,7 +1955,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
1954
1955
  logLevel: "silent",
1955
1956
  plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
1956
1957
  resolve: {
1957
- alias: _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
1958
+ alias: _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
1958
1959
  conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
1959
1960
  },
1960
1961
  transform: {
@@ -2314,7 +2315,7 @@ function hasReactDomEdgeServerBuild(root) {
2314
2315
  }
2315
2316
  }
2316
2317
  function shouldAliasReactServerToWebBuild(renderer, preset) {
2317
- return _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge";
2318
+ return _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge";
2318
2319
  }
2319
2320
  function isCloudflareImagePreset(preset) {
2320
2321
  return preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module";
@@ -2356,7 +2357,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2356
2357
  return {
2357
2358
  name: "farm-omitted-metadata-image-runtime",
2358
2359
  resolveId: {
2359
- filter: { id: _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2360
+ filter: { id: _chunkARORZ3MHcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2360
2361
  handler(source, importer) {
2361
2362
  if (source !== "@vercel/og") return null;
2362
2363
  const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
@@ -2365,7 +2366,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2365
2366
  }
2366
2367
  },
2367
2368
  load: {
2368
- filter: { id: _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2369
+ filter: { id: _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2369
2370
  handler(id) {
2370
2371
  if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
2371
2372
  return `
@@ -2694,7 +2695,7 @@ function hasFarmPluginRoutes(config) {
2694
2695
  }
2695
2696
  function farmServerRuntimePluginsMayHandlePath(config, pathname) {
2696
2697
  return (config.plugins || []).some(
2697
- (plugin) => _chunkWGWWRV2Mcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
2698
+ (plugin) => _chunkB3HQTGXScjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
2698
2699
  // prerendered file never answers or sends; its endpoints live under /__farm/.
2699
2700
  plugin.name !== _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
2700
2701
  );
@@ -2834,7 +2835,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2834
2835
  const productionVite = productionViteResult.value;
2835
2836
  _chunk7U4XF76Rcjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
2836
2837
  const mobileClient = shouldBuildFarmMobileClient(config);
2837
- const rendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer);
2838
+ const rendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer);
2838
2839
  const buildClientBundle = async () => {
2839
2840
  if (rendererDisabled) {
2840
2841
  await fs5.rm(clientOutputDir, { recursive: true, force: true });
@@ -2985,7 +2986,7 @@ function collectFarmPrerenderedMarkdownBodies(pageRoutes) {
2985
2986
  for (const route of pageRoutes) {
2986
2987
  if (route.source === void 0 || !_chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
2987
2988
  const { body } = _chunk26WP75W5cjs.parseMarkdownFrontmatter.call(void 0, route.source);
2988
- const rendering = _chunkOUDNUFVRcjs.resolveRouteRenderingConfig.call(void 0,
2989
+ const rendering = _chunkVMBIKDKWcjs.resolveRouteRenderingConfig.call(void 0,
2989
2990
  _chunk26WP75W5cjs.readFarmMarkdownRouteConfig.call(void 0, body),
2990
2991
  route.source
2991
2992
  );
@@ -3029,7 +3030,7 @@ async function writeFarmVideoPlayerToClient(outputDir) {
3029
3030
  const filePath = _path2.default.join(outputDir, _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH.slice(1));
3030
3031
  await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
3031
3032
  try {
3032
- await fs5.writeFile(filePath, _chunkCL7BUGVBcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
3033
+ await fs5.writeFile(filePath, _chunkARORZ3MHcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
3033
3034
  } catch (error) {
3034
3035
  if (error.code !== "EEXIST") throw error;
3035
3036
  }
@@ -3063,7 +3064,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
3063
3064
  }
3064
3065
  const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
3065
3066
  await fs5.writeFile(fontCssPath, normalizedFontCss);
3066
- await fs5.writeFile(clientCssPath, _chunkCL7BUGVBcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3067
+ await fs5.writeFile(clientCssPath, _chunkARORZ3MHcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3067
3068
  }
3068
3069
  function importsFarmClientBlockedPackage(id, packageName) {
3069
3070
  return id === packageName || id.startsWith(`${packageName}/`);
@@ -3113,10 +3114,10 @@ async function validateClientBuildOutput(root, srcDir, outputDir) {
3113
3114
  }
3114
3115
  }
3115
3116
  function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, options = {}) {
3116
- const key = _chunk46UV2E7Icjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3117
+ const key = _chunkDRO3NXA3cjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3117
3118
  let plan = cache.get(key);
3118
3119
  if (!plan) {
3119
- plan = _chunk46UV2E7Icjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3120
+ plan = _chunkDRO3NXA3cjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3120
3121
  cache.set(key, plan);
3121
3122
  }
3122
3123
  return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
@@ -3130,7 +3131,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3130
3131
  farmPlugin,
3131
3132
  farmServerOnlyEntriesPlugin
3132
3133
  } = await import("./vite.cjs");
3133
- const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
3134
+ const { PluginManager: PluginManager2 } = await import("./plugin-3PT7I26P.cjs");
3134
3135
  const fs5 = await import("fs/promises");
3135
3136
  const pluginManager = new PluginManager2({
3136
3137
  config,
@@ -3139,7 +3140,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3139
3140
  });
3140
3141
  pluginManager.addPlugins(config.plugins || []);
3141
3142
  const clientPages = [];
3142
- const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3143
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3143
3144
  (provider) => provider.component || provider.type === "clerk"
3144
3145
  );
3145
3146
  const unsupportedIntegrationProvider = integrationProviders.find(
@@ -3150,14 +3151,14 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3150
3151
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
3151
3152
  );
3152
3153
  }
3153
- const isolatedMode = _chunk46UV2E7Icjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3154
+ const isolatedMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3154
3155
  _optionalChain([config, 'access', _95 => _95.experimental, 'optionalAccess', _96 => _96.isolatedClientHydration]),
3155
3156
  {
3156
3157
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _97 => _97.experimental, 'optionalAccess', _98 => _98.serverComponents])) === "rsc",
3157
3158
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
3158
3159
  }
3159
3160
  );
3160
- const planOptions = _chunk46UV2E7Icjs.getFarmClientHydrationPlanOptions.call(void 0,
3161
+ const planOptions = _chunkDRO3NXA3cjs.getFarmClientHydrationPlanOptions.call(void 0,
3161
3162
  config.renderer,
3162
3163
  Boolean(unsupportedIntegrationProvider)
3163
3164
  );
@@ -3169,11 +3170,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3169
3170
  ...planOptions,
3170
3171
  serverTreeLayouts: pagePlanOptions.serverOwners
3171
3172
  };
3172
- const layoutAppliesToRoute = _chunkOFVCWV2Dcjs.routeBoundaryCoversDirectory;
3173
+ const layoutAppliesToRoute = _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory;
3173
3174
  const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
3174
3175
  const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _101 => _101.experimental, 'optionalAccess', _102 => _102.serverComponents])) === "islands";
3175
3176
  const adapterOwnsDocsRuntime = Boolean(
3176
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled]) && _optionalChain([config, 'access', _105 => _105.docs, 'access', _106 => _106.adapter, 'optionalAccess', _107 => _107.server]) && config.docs.adapter.react
3177
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled]) && _optionalChain([config, 'access', _105 => _105.docs, 'access', _106 => _106.adapter, 'optionalAccess', _107 => _107.server]) && config.docs.adapter.react
3177
3178
  );
3178
3179
  const docsEntries = _optionalChain([config, 'access', _108 => _108.docs, 'optionalAccess', _109 => _109.enabled]) ? _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs).map(
3179
3180
  (docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
@@ -3184,7 +3185,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3184
3185
  );
3185
3186
  const syntheticDocsEntry = _optionalChain([config, 'access', _110 => _110.docs, 'optionalAccess', _111 => _111.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
3186
3187
  const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
3187
- const plan = (operation) => sourceSnapshot ? _chunk46UV2E7Icjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunk46UV2E7Icjs.withFarmSourceSnapshot.call(void 0, operation);
3188
+ const plan = (operation) => sourceSnapshot ? _chunkDRO3NXA3cjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkDRO3NXA3cjs.withFarmSourceSnapshot.call(void 0, operation);
3188
3189
  const { clientLayouts, clientRouteSlots } = plan(() => {
3189
3190
  const clientLayouts2 = layoutRoutes.map((layout) => {
3190
3191
  try {
@@ -3231,7 +3232,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3231
3232
  };
3232
3233
  }
3233
3234
  });
3234
- const markdownPagePlan = _chunk46UV2E7Icjs.createMarkdownPageHydrationPlanner.call(void 0,
3235
+ const markdownPagePlan = _chunkDRO3NXA3cjs.createMarkdownPageHydrationPlanner.call(void 0,
3235
3236
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
3236
3237
  root,
3237
3238
  isolatedMode,
@@ -3247,7 +3248,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3247
3248
  pagePlanOptions
3248
3249
  )
3249
3250
  }));
3250
- _chunk46UV2E7Icjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3251
+ _chunkDRO3NXA3cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3251
3252
  clientLayouts2.map((layout) => ({
3252
3253
  pattern: layout.pattern,
3253
3254
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -3256,7 +3257,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3256
3257
  [
3257
3258
  ...routePlans.map(({ route, metadata }) => ({
3258
3259
  pattern: routeDirectory(route),
3259
- depth: _chunkOFVCWV2Dcjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3260
+ depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3260
3261
  metadata
3261
3262
  })),
3262
3263
  ...syntheticDocsPatterns.map((pattern) => ({
@@ -3281,7 +3282,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3281
3282
  const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
3282
3283
  if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
3283
3284
  _chunk7U4XF76Rcjs.logger.warn(
3284
- `\u26A0\uFE0F ${_chunk46UV2E7Icjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3285
+ `\u26A0\uFE0F ${_chunkDRO3NXA3cjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3285
3286
  );
3286
3287
  }
3287
3288
  }
@@ -3316,7 +3317,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3316
3317
  );
3317
3318
  if (metadata.suppressedAsyncHydration) {
3318
3319
  _chunk7U4XF76Rcjs.logger.warn(
3319
- `\u26A0\uFE0F ${_chunk46UV2E7Icjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3320
+ `\u26A0\uFE0F ${_chunkDRO3NXA3cjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3320
3321
  );
3321
3322
  }
3322
3323
  const slotBoundaries = serverSlotPlans.filter(
@@ -3324,7 +3325,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3324
3325
  ).flatMap(({ plan: plan2 }) => plan2.isolatedBoundaries);
3325
3326
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0 || slotBoundaries.length > 0) {
3326
3327
  const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
3327
- const islandStrategy = _chunkCL7BUGVBcjs.resolveFarmRouteRootStrategy.call(void 0,
3328
+ const islandStrategy = _chunkARORZ3MHcjs.resolveFarmRouteRootStrategy.call(void 0,
3328
3329
  route,
3329
3330
  metadata,
3330
3331
  clientLayouts2,
@@ -3343,7 +3344,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3343
3344
  ...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
3344
3345
  ],
3345
3346
  // The server renders a server tree only below a hydrating layout.
3346
- ..._chunk46UV2E7Icjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3347
+ ..._chunkDRO3NXA3cjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3347
3348
  });
3348
3349
  _chunk7U4XF76Rcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
3349
3350
  }
@@ -3380,7 +3381,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3380
3381
  }
3381
3382
  const clientRouteSlots2 = routeSlots.filter((slot) => {
3382
3383
  try {
3383
- const metadata = _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3384
+ const metadata = _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3384
3385
  return metadata.shouldHydrate && (!islandsMode || metadata.isClientComponent);
3385
3386
  } catch (error) {
3386
3387
  _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
@@ -3431,13 +3432,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3431
3432
  config.renderer,
3432
3433
  config.publicRuntimeConfig,
3433
3434
  config.trailingSlash,
3434
- _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations),
3435
+ _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, config.integrations),
3435
3436
  config.basePath,
3436
- _chunkCL7BUGVBcjs.generateClientCachePersistenceCode.call(void 0, _chunkCL7BUGVBcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3437
+ _chunkARORZ3MHcjs.generateClientCachePersistenceCode.call(void 0, _chunkARORZ3MHcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3437
3438
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
3438
3439
  _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _117 => _117.experimental, 'optionalAccess', _118 => _118.serverComponents])) === "islands",
3439
3440
  platform,
3440
- islandsMode ? _chunk46UV2E7Icjs.collectFarmServerStylesheets.call(void 0,
3441
+ islandsMode ? _chunkDRO3NXA3cjs.collectFarmServerStylesheets.call(void 0,
3441
3442
  [
3442
3443
  ...layoutRoutes.map((layout) => layout.modulePath),
3443
3444
  ...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
@@ -3456,7 +3457,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3456
3457
  await fs5.writeFile(_path2.default.join(clientEntryDir, "farm-client-router.tsx"), clientEntry.router);
3457
3458
  }
3458
3459
  const clientInput = { [entryName]: clientEntryPath };
3459
- if (platform === "web" && _chunkCL7BUGVBcjs.canBootFarmIslandsClient.call(void 0, config)) {
3460
+ if (platform === "web" && _chunkARORZ3MHcjs.canBootFarmIslandsClient.call(void 0, config)) {
3460
3461
  const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
3461
3462
  await fs5.writeFile(
3462
3463
  clientBootPath,
@@ -3467,7 +3468,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3467
3468
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
3468
3469
  let postcssSearchPath;
3469
3470
  let tailwindVitePlugin = void 0;
3470
- const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
3471
+ const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
3471
3472
  ssr: false,
3472
3473
  buildLifetime: rendererBuildLifetime
3473
3474
  });
@@ -3477,7 +3478,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3477
3478
  const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
3478
3479
  await fs5.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
3479
3480
  postcssSearchPath = clientEntryDir;
3480
- tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, {
3481
+ tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, {
3481
3482
  builder: productionVite.builder,
3482
3483
  announce: true
3483
3484
  });
@@ -3498,7 +3499,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3498
3499
  target: FARM_CLIENT_BUILD_TARGET,
3499
3500
  // Tailwind CSS 4 already requires newer browsers than that baseline. An app's own
3500
3501
  // `build.target` or `build.cssTarget` still decides, as Vite derives one from the other.
3501
- ..._optionalChain([config, 'access', _119 => _119.vite, 'optionalAccess', _120 => _120.build, 'optionalAccess', _121 => _121.target]) === void 0 && _optionalChain([config, 'access', _122 => _122.vite, 'optionalAccess', _123 => _123.build, 'optionalAccess', _124 => _124.cssTarget]) === void 0 && (_chunkZ5BANEQDcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkZ5BANEQDcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _125 => _125.vite, 'optionalAccess', _126 => _126.plugins]))) ? { cssTarget: _chunkZ5BANEQDcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3502
+ ..._optionalChain([config, 'access', _119 => _119.vite, 'optionalAccess', _120 => _120.build, 'optionalAccess', _121 => _121.target]) === void 0 && _optionalChain([config, 'access', _122 => _122.vite, 'optionalAccess', _123 => _123.build, 'optionalAccess', _124 => _124.cssTarget]) === void 0 && (_chunkDMSXZNQRcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkDMSXZNQRcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _125 => _125.vite, 'optionalAccess', _126 => _126.plugins]))) ? { cssTarget: _chunkDMSXZNQRcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3502
3503
  outDir: outputDir,
3503
3504
  emptyOutDir: platform === "web",
3504
3505
  // Never public: see resolveFarmClientSourcemap.
@@ -3531,7 +3532,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3531
3532
  }
3532
3533
  },
3533
3534
  plugins: [
3534
- _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3535
+ _chunkARORZ3MHcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3535
3536
  createFarmPrivateClientSourcemapsPlugin({
3536
3537
  outDir: _path2.default.join(
3537
3538
  _path2.default.dirname(outputDir),
@@ -3551,7 +3552,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3551
3552
  _path2.default.join(clientEntryDir, `${FARM_CLIENT_ROUTE_TABLE_MODULE}.tsx`)
3552
3553
  ],
3553
3554
  // What the islands entry loads with its first render or hydration (RFC 0010).
3554
- ...islandsMode && _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? {
3555
+ ...islandsMode && _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? {
3555
3556
  rendererImports: [
3556
3557
  "react",
3557
3558
  "react-dom/client",
@@ -3577,7 +3578,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3577
3578
  ...config.vite.plugins || [],
3578
3579
  farmServerOnlyEntriesPlugin({ platform, distDir: config.distDir || ".farm" }),
3579
3580
  farmNavigationPlugin(config.renderer),
3580
- _chunkCL7BUGVBcjs.farmDocsClientConfigPlugin.call(void 0,
3581
+ _chunkARORZ3MHcjs.farmDocsClientConfigPlugin.call(void 0,
3581
3582
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
3582
3583
  ),
3583
3584
  // Plugin to redirect @farm.js/core imports to client-only exports
@@ -3610,7 +3611,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3610
3611
  },
3611
3612
  load: {
3612
3613
  filter: {
3613
- id: _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [
3614
+ id: _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [
3614
3615
  "\0empty-module",
3615
3616
  "\0empty-api-route",
3616
3617
  "\0farm-i18n-client-bridge",
@@ -3648,7 +3649,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3648
3649
  { ...config, isolatedClientBoundaryModules, programmaticClientRoutes, sourceSnapshot },
3649
3650
  pluginManager
3650
3651
  ),
3651
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
3652
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
3652
3653
  ],
3653
3654
  mode: "production",
3654
3655
  css: postcssSearchPath ? {
@@ -3656,7 +3657,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3656
3657
  } : void 0,
3657
3658
  // Ensure React is bundled for client
3658
3659
  resolve: {
3659
- alias: _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
3660
+ alias: _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
3660
3661
  dedupe: [...config.renderer.dedupe || []]
3661
3662
  },
3662
3663
  // Optimize dependencies - exclude server-side code from client bundle
@@ -3670,7 +3671,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3670
3671
  }
3671
3672
  };
3672
3673
  await viteBuild(
3673
- _chunkCL7BUGVBcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
3674
+ _chunkARORZ3MHcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
3674
3675
  );
3675
3676
  if (platform === "mobile") {
3676
3677
  await fs5.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
@@ -3764,9 +3765,9 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
3764
3765
  return response;
3765
3766
  }
3766
3767
 
3767
- ${streamNavigations ? `${_chunkCL7BUGVBcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
3768
+ ${streamNavigations ? `${_chunkARORZ3MHcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
3768
3769
 
3769
- ${_chunkCL7BUGVBcjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
3770
+ ${_chunkARORZ3MHcjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
3770
3771
 
3771
3772
  function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
3772
3773
  if (error?.name === "FarmDeploymentMismatchError") {
@@ -4917,18 +4918,18 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
4917
4918
  secure: false
4918
4919
  },
4919
4920
  direction: {}
4920
- }, plugins = [], renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
4921
+ }, plugins = [], renderer = _chunkBCTHOQPPcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
4921
4922
  const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
4922
- const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
4923
+ const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
4923
4924
  plugins,
4924
4925
  root,
4925
4926
  srcDir,
4926
4927
  publicRuntimeConfig,
4927
4928
  platform
4928
4929
  );
4929
- const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4930
- const lazyRenderer = islandValues && platform !== "mobile" && _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
4931
- const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` : _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
4930
+ const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4931
+ const lazyRenderer = islandValues && platform !== "mobile" && _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
4932
+ const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` : _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
4932
4933
  import { createRoot, hydrateRoot } from "react-dom/client";
4933
4934
  import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : (
4934
4935
  // Named exports only, as the server entry and the development client read them. A copy
@@ -4941,7 +4942,8 @@ __farmConfigureApp(__farmAppSetup);` : `import * as __farmRendererClient from ${
4941
4942
  import { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};
4942
4943
  const React = { ...__farmRendererClient };`
4943
4944
  );
4944
- const providerClientCode = _chunkCL7BUGVBcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4945
+ const hydrateFarmRouteCall = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);";
4946
+ const providerClientCode = _chunkARORZ3MHcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4945
4947
  integrationProviders,
4946
4948
  root,
4947
4949
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -4964,18 +4966,18 @@ const React = { ...__farmRendererClient };`
4964
4966
  const layoutImportStatements = [];
4965
4967
  const layoutRegistrations = [];
4966
4968
  const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
4967
- const treeLayoutPatterns = islandValues ? _chunkOFVCWV2Dcjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
4969
+ const treeLayoutPatterns = islandValues ? _chunkNEKO3HM2cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
4968
4970
  layoutRoutes.forEach((layout, index) => {
4969
4971
  const relativePath = toImportPath(layout.modulePath);
4970
4972
  const treeLayout = treeLayoutPatterns.has(layout.pattern);
4971
4973
  const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
4972
- (pattern) => _chunkOFVCWV2Dcjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
4974
+ (pattern) => _chunkNEKO3HM2cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
4973
4975
  );
4974
4976
  if (rendersOnClient && !treeLayout) {
4975
4977
  layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
4976
4978
  }
4977
- const groupScope = _chunkOFVCWV2Dcjs.getRouteGroupScope.call(void 0, layout.pattern);
4978
- const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunkOFVCWV2Dcjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
4979
+ const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, layout.pattern);
4980
+ const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunkNEKO3HM2cjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
4979
4981
  layoutRegistrations.push(
4980
4982
  ` { pattern: ${JSON.stringify(layout.pattern)}${groupFields}, Component: ${rendersOnClient ? treeLayout ? `getFarmTreeLayoutComponent(${JSON.stringify(layout.pattern)})` : `Layout${index}` : "null"}, shouldHydrate: ${JSON.stringify(layout.shouldHydrate)}, islandStrategy: ${JSON.stringify(layout.islandStrategy)}${treeLayout ? ", serverTree: true" : ""} }`
4981
4983
  );
@@ -5062,7 +5064,7 @@ mountFarmDocsSearch();
5062
5064
 
5063
5065
  ${generateUniversalRouterStateRuntime()}
5064
5066
 
5065
- ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
5067
+ ${_chunkARORZ3MHcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
5066
5068
 
5067
5069
  // SPA Router for server-rendered pages (HTML swap)
5068
5070
  const spaRouter = {
@@ -5215,11 +5217,12 @@ ${generateUniversalRouterStateProperties()}
5215
5217
 
5216
5218
  reconcileFarmDocumentHead(doc);
5217
5219
 
5218
- // Swap root content
5220
+ // Swap root content: the parsed nodes themselves, not markup the page parses again.
5219
5221
  const newRoot = doc.getElementById("root");
5220
5222
  const currentRoot = document.getElementById("root");
5221
5223
  if (!newRoot || !currentRoot) return this.swapDocument(doc);
5222
- currentRoot.innerHTML = newRoot.innerHTML;
5224
+ adoptFarmParsedNodes(newRoot);
5225
+ currentRoot.replaceChildren(...newRoot.childNodes);
5223
5226
  return true;
5224
5227
  },
5225
5228
 
@@ -5236,7 +5239,8 @@ ${generateUniversalRouterStateProperties()}
5236
5239
  });
5237
5240
 
5238
5241
  document.head.innerHTML = doc.head ? doc.head.innerHTML : "";
5239
- document.body.innerHTML = doc.body.innerHTML;
5242
+ adoptFarmParsedNodes(doc.body);
5243
+ document.body.replaceChildren(...doc.body.childNodes);
5240
5244
  delete window.__farmDocsRuntime;
5241
5245
  delete window.__farmDocsPageActionsRuntime;
5242
5246
 
@@ -5534,7 +5538,7 @@ ${layoutImports}
5534
5538
  ${rendererClientImports}
5535
5539
  ${isolatedHydrationImport}
5536
5540
  ${providerClientCode.imports}
5537
- import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, keepFarmIslandValues, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, reconcileFarmDocumentHead, runFarmNavigationDelegates, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
5541
+ import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, keepFarmIslandValues, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, reconcileFarmDocumentHead, replayFarmQueuedInteraction, runFarmNavigationDelegates, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
5538
5542
  import { createFarmDeploymentMismatchError, createFarmDeploymentRequestHeaders, isFarmDeploymentMismatchResponse } from "@farm.js/core/deployment";
5539
5543
  import { createFarmRouter, isFarmRouteActive, matchFarmRoute } from "@farm.js/core/router";
5540
5544
  ${clientPluginEntry.imports}
@@ -5613,7 +5617,7 @@ function hasHydratableLayout(pathname) {
5613
5617
  });
5614
5618
  }
5615
5619
 
5616
- ${_chunkCL7BUGVBcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5620
+ ${_chunkARORZ3MHcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5617
5621
  // Wrap a page element with applicable layouts
5618
5622
  function wrapWithLayouts(pageElement, pathname, params) {
5619
5623
  const layouts = getApplicableLayouts(pathname);
@@ -5648,7 +5652,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
5648
5652
  return React.createElement("div", props, pageElement);
5649
5653
  }
5650
5654
  let farmLastRouteState = null;
5651
- ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkCL7BUGVBcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5655
+ ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkARORZ3MHcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5652
5656
  function farmTreeLayoutsOf(pathname) {
5653
5657
  return getApplicableLayouts(pathname).filter(function(layout) {
5654
5658
  return layout.serverTree === true;
@@ -5769,7 +5773,7 @@ async function createMatchedHydrationRoute(matched, pathname, searchParams, navi
5769
5773
 
5770
5774
  if (!pageElement) return null;
5771
5775
  if (!hydrateLayouts) {
5772
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "if (hydrationContainer) pageElement = restorePagePosition(React, hydrationContainer, pageElement);" : ""}
5776
+ ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "if (hydrationContainer) pageElement = restorePagePosition(React, hydrationContainer, pageElement);" : ""}
5773
5777
  return createFarmRouteState(pageElement, pathname, params, false);
5774
5778
  }
5775
5779
  if (matched.route.pageShouldHydrate) {
@@ -5798,7 +5802,16 @@ function createFarmRouteState(page, pathname, params, includeLayouts) {
5798
5802
 
5799
5803
  function hydrateFarmRoute(container, route) {
5800
5804
  farmLastRouteState = route;
5801
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
5805
+ ${_chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, renderer).hydrationFallback ? `try {
5806
+ ${hydrateFarmRouteCall}
5807
+ } catch (error) {
5808
+ // The renderer opted in with capabilities.hydrationFallback, as development always does. The
5809
+ // page still works, but the server's DOM, focus, and typed input are gone, so say so.
5810
+ console.error("[Farm.js] Hydration error; rendering the page on the client instead:", error);
5811
+ const root = createRoot(container);
5812
+ renderFarmRoute(root, route);
5813
+ return root;
5814
+ }` : hydrateFarmRouteCall}
5802
5815
  }
5803
5816
 
5804
5817
  function renderFarmRoute(root, route) {
@@ -5956,6 +5969,26 @@ function renderClientRouteSlot(slot, registration, mode) {
5956
5969
  return true;
5957
5970
  }
5958
5971
 
5972
+ // The document's pre-hydration hold keeps clicks and submits until what they target hydrates, as in
5973
+ // development. A hydrated route slot stops holding its own and replays what it held, as the page's
5974
+ // scheduler does for the page.
5975
+ function replayPreHydrationClicks(container) {
5976
+ container.dataset.farmIslandHydrated = "true";
5977
+ const queue = Array.isArray(window.__FARM_PREHYDRATION_CLICK_QUEUE__)
5978
+ ? window.__FARM_PREHYDRATION_CLICK_QUEUE__
5979
+ : [];
5980
+ const held = queue.filter(function(item) {
5981
+ return item && item.target instanceof Element && container.contains(item.target);
5982
+ });
5983
+ if (held.length === 0) return;
5984
+ queue.splice(0, queue.length, ...queue.filter(function(item) { return held.indexOf(item) === -1; }));
5985
+ for (const item of held) {
5986
+ setTimeout(function() {
5987
+ if (item.target.isConnected) replayFarmQueuedInteraction(item.target, item.kind);
5988
+ }, 0);
5989
+ }
5990
+ }
5991
+
5959
5992
  function hydrateInitialRouteSlots() {
5960
5993
  const slots = Array.isArray(window.__FARM_ROUTE_SLOTS__)
5961
5994
  ? window.__FARM_ROUTE_SLOTS__
@@ -5964,7 +5997,9 @@ function hydrateInitialRouteSlots() {
5964
5997
  const registration = findClientRouteSlot(slot);
5965
5998
  if (!registration) continue;
5966
5999
  try {
5967
- renderClientRouteSlot(slot, registration, "hydrate");
6000
+ if (renderClientRouteSlot(slot, registration, "hydrate")) {
6001
+ replayPreHydrationClicks(document.getElementById(slot.containerId));
6002
+ }
5968
6003
  } catch (error) {
5969
6004
  console.warn("[Farm.js] Could not hydrate route slot:", slot.name, error);
5970
6005
  }
@@ -6033,6 +6068,15 @@ function setFarmHydrated() {
6033
6068
  isHydrated = true;
6034
6069
  }
6035
6070
 
6071
+ // The document's head script holds clicks and submits until the page hydrates. Once the first
6072
+ // hydration settles it holds nothing more, as in development: each root that hydrated replayed
6073
+ // what it held, and a navigation's page renders in a React root that takes its own clicks.
6074
+ function markFarmHydrated() {
6075
+ if (window.__FARM_HYDRATED__ !== false) return;
6076
+ window.__FARM_HYDRATED__ = true;
6077
+ document.documentElement.dataset.farmHydrated = "true";
6078
+ }
6079
+
6036
6080
  ${generateUniversalRouterStateRuntime(islandValues)}
6037
6081
 
6038
6082
  function cancelPendingPageHydration() {
@@ -6237,7 +6281,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
6237
6281
  return true;
6238
6282
  }` : ""}
6239
6283
 
6240
- ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6284
+ ${_chunkARORZ3MHcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6241
6285
 
6242
6286
  function activateNavigationScripts(root) {
6243
6287
  for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
@@ -6274,9 +6318,12 @@ async function streamFarmNavigation(stream, root, isCurrent) {
6274
6318
  for (let flush = await stream.next(); flush !== null; flush = await stream.next()) {
6275
6319
  if (!isCurrent()) return stream.cancel();
6276
6320
  html += flush;
6277
- const parsed = new DOMParser().parseFromString('<div id="root">' + flush, "text/html");
6321
+ const parsed = new DOMParser()
6322
+ .parseFromString('<div id="root">' + flush, "text/html")
6323
+ .getElementById("root");
6324
+ adoptFarmParsedNodes(parsed);
6278
6325
  const fragment = document.createDocumentFragment();
6279
- for (const node of Array.from(parsed.getElementById("root").childNodes)) fragment.appendChild(node);
6326
+ for (const node of Array.from(parsed.childNodes)) fragment.appendChild(node);
6280
6327
  activateNavigationScripts(fragment);
6281
6328
  root.appendChild(fragment);
6282
6329
  }
@@ -6340,7 +6387,7 @@ function getLayoutShell(root, patterns, index) {
6340
6387
  return shell.innerHTML;
6341
6388
  }
6342
6389
 
6343
- ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6390
+ ${islandValues ? _chunkARORZ3MHcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6344
6391
  // A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
6345
6392
  if (refresh) revealFarmStreamedContent(nextRoot);
6346
6393
  const currentPatterns = getLayoutPatterns(currentRoot);
@@ -6372,6 +6419,8 @@ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function repl
6372
6419
  ${isolatedHydrationEnabled ? `${islandValues ? `// A refresh keeps the islands still on the page, with their state and new props.
6373
6420
  if (refresh) farmIsolatedHydrationRuntime.carryOver(currentTarget, nextTarget);
6374
6421
  ` : ""}disposeFarmIsolatedClientBoundaries(currentTarget);` : ""}
6422
+ // After the comparison: a noscript turned to text serializes escaped in the parsed document.
6423
+ adoptFarmParsedNodes(nextRoot);
6375
6424
  currentTarget.replaceWith(nextTarget);${islandValues ? "\n if (fields) restoreFarmServerFields(fields, nextTarget);" : ""}
6376
6425
  activateNavigationScripts(nextTarget);
6377
6426
  if (nextTreeRoot && nextTreeRoot !== nextTarget) nextTreeRoot.remove();
@@ -6784,7 +6833,9 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6784
6833
  ${islandValues ? 'if (!replacedSharedBoundary && isSegment) return "segment-mismatch";' : ""}
6785
6834
  if (!replacedSharedBoundary) {
6786
6835
  ${isolatedHydrationEnabled ? "disposeFarmIsolatedClientBoundaries(currentRoot);" : ""}
6787
- currentRoot.innerHTML = newRoot.innerHTML;
6836
+ // The parsed nodes themselves, not markup the page parses again.
6837
+ adoptFarmParsedNodes(newRoot);
6838
+ currentRoot.replaceChildren(...newRoot.childNodes);
6788
6839
  activateNavigationScripts(currentRoot);
6789
6840
  isolatedHydrationScope = currentRoot;
6790
6841
  }
@@ -6866,7 +6917,8 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6866
6917
  });
6867
6918
 
6868
6919
  document.head.innerHTML = doc.head ? doc.head.innerHTML : "";
6869
- document.body.innerHTML = doc.body.innerHTML;
6920
+ adoptFarmParsedNodes(doc.body);
6921
+ document.body.replaceChildren(...doc.body.childNodes);
6870
6922
  delete window.__farmDocsRuntime;
6871
6923
  delete window.__farmDocsPageActionsRuntime;
6872
6924
 
@@ -6985,7 +7037,7 @@ document.addEventListener("click", function(e) {
6985
7037
  if (isFarmDocsSearchPage()) {
6986
7038
  mountFarmDocsSearch();
6987
7039
  }
6988
- void hydrate();
7040
+ void hydrate().finally(markFarmHydrated);
6989
7041
  `.trim();
6990
7042
  }
6991
7043
  async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime, sourceSnapshot) {
@@ -6996,7 +7048,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6996
7048
  farmPlugin,
6997
7049
  farmServerOnlyEntriesPlugin
6998
7050
  } = await import("./vite.cjs");
6999
- const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
7051
+ const { PluginManager: PluginManager2 } = await import("./plugin-3PT7I26P.cjs");
7000
7052
  const fs5 = await import("fs/promises");
7001
7053
  const pluginManager = new PluginManager2({
7002
7054
  config,
@@ -7007,7 +7059,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7007
7059
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
7008
7060
  let postcssConfigDir;
7009
7061
  let tailwindVitePlugin = void 0;
7010
- const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
7062
+ const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
7011
7063
  ssr: true,
7012
7064
  buildLifetime: rendererBuildLifetime
7013
7065
  });
@@ -7017,7 +7069,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7017
7069
  _path2.default.join(postcssConfigDir, "postcss.config.cjs"),
7018
7070
  "module.exports = { plugins: [] };\n"
7019
7071
  );
7020
- tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, {
7072
+ tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, {
7021
7073
  builder: productionVite.builder,
7022
7074
  label: "for SSR"
7023
7075
  });
@@ -7124,7 +7176,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7124
7176
  }))
7125
7177
  );
7126
7178
  const instrumentationPath = _chunk3BTN3NP7cjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
7127
- const notFoundPath = _chunkCL7BUGVBcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
7179
+ const notFoundPath = _chunkARORZ3MHcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
7128
7180
  if (notFoundPath) _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
7129
7181
  layoutRoutes.sort((a, b) => {
7130
7182
  const depthA = a.pattern.split("/").filter(Boolean).length;
@@ -7141,14 +7193,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7141
7193
  const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
7142
7194
  (integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
7143
7195
  );
7144
- const hasIntegrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations).some(
7196
+ const hasIntegrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, config.integrations).some(
7145
7197
  (provider) => provider.component || provider.type === "clerk"
7146
7198
  );
7147
7199
  const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
7148
7200
  const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _136 => _136.mdx, 'optionalAccess', _137 => _137.components]));
7149
- const hasMiddlewareConfig = _chunkOFVCWV2Dcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7150
- const hasRouteContextConfig = _chunkMOGRRZMWcjs.hasCustomFarmRouteContext.call(void 0, config);
7151
- const hasServerRuntimePlugins = _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
7201
+ const hasMiddlewareConfig = _chunkNEKO3HM2cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7202
+ const hasRouteContextConfig = _chunkLM2ZDNDDcjs.hasCustomFarmRouteContext.call(void 0, config);
7203
+ const hasServerRuntimePlugins = _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
7152
7204
  const hasPluginRoutes = hasFarmPluginRoutes(config);
7153
7205
  const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
7154
7206
  const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasServerCacheConfig || hasFarmServerStorageConfig(config.storage) || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
@@ -7157,9 +7209,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7157
7209
  const hasConfiguredRuntimePlugins = Boolean(
7158
7210
  hasRuntimeConfigModule && (config.plugins || []).length > 0
7159
7211
  );
7160
- if (_chunkE3HBD2K3cjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
7212
+ if (_chunkHHQEKLZLcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
7161
7213
  const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
7162
- _chunkE3HBD2K3cjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
7214
+ _chunkHHQEKLZLcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
7163
7215
  config.docs,
7164
7216
  { root, srcDir: config.srcDir },
7165
7217
  (pathname) => adapterGuardedPaths.has(pathname),
@@ -7169,7 +7221,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7169
7221
  const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
7170
7222
  const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _138 => _138.docs, 'optionalAccess', _139 => _139.enabled]) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunk2RSVYJT6cjs._runWithFarmCspNonce.call(void 0,
7171
7223
  farmDocsCspNonceMarker,
7172
- async () => _optionalChain([config, 'access', _140 => _140.docs, 'access', _141 => _141.adapter, 'optionalAccess', _142 => _142.server]) ? await _chunkE3HBD2K3cjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
7224
+ async () => _optionalChain([config, 'access', _140 => _140.docs, 'access', _141 => _141.adapter, 'optionalAccess', _142 => _142.server]) ? await _chunkHHQEKLZLcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
7173
7225
  root,
7174
7226
  srcDir: config.srcDir,
7175
7227
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
@@ -7229,7 +7281,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7229
7281
  (image) => image.sourceType === "module"
7230
7282
  );
7231
7283
  const externalMetadataImageRuntime = useExternalMetadataImageRuntime && !omitCoreMetadataImageRuntime ? ["@vercel/og"] : [];
7232
- const rendererOptionalExternals = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? [] : [
7284
+ const rendererOptionalExternals = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? [] : [
7233
7285
  "react",
7234
7286
  "react/jsx-runtime",
7235
7287
  "react/jsx-dev-runtime",
@@ -7336,7 +7388,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7336
7388
  __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _148 => _148.env, 'optionalAccess', _149 => _149.public]) || {})
7337
7389
  },
7338
7390
  plugins: [
7339
- _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7391
+ _chunkARORZ3MHcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7340
7392
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
7341
7393
  ...rendererVitePlugins,
7342
7394
  ...config.vite.plugins || [],
@@ -7368,7 +7420,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7368
7420
  },
7369
7421
  pluginManager
7370
7422
  ),
7371
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7423
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7372
7424
  ...hasRuntimeConfigModule ? [
7373
7425
  farmStripPlatformConfigPlugin(
7374
7426
  [
@@ -7380,7 +7432,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7380
7432
  {
7381
7433
  name: "farm-virtual-ssr-entry",
7382
7434
  resolveId: {
7383
- filter: { id: _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7435
+ filter: { id: _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7384
7436
  handler(id) {
7385
7437
  if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
7386
7438
  return virtualEntryId;
@@ -7389,7 +7441,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7389
7441
  }
7390
7442
  },
7391
7443
  load: {
7392
- filter: { id: _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7444
+ filter: { id: _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7393
7445
  handler(id) {
7394
7446
  if (id === virtualEntryId) {
7395
7447
  return virtualEntryCode;
@@ -7421,7 +7473,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7421
7473
  resolve: {
7422
7474
  alias: [
7423
7475
  ...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
7424
- ...Object.entries(_chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
7476
+ ...Object.entries(_chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
7425
7477
  ([find, replacement]) => ({ find, replacement })
7426
7478
  )
7427
7479
  ],
@@ -7429,7 +7481,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7429
7481
  dedupe: [...config.renderer.dedupe || []]
7430
7482
  }
7431
7483
  };
7432
- await viteBuild(_chunkCL7BUGVBcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
7484
+ await viteBuild(_chunkARORZ3MHcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
7433
7485
  } finally {
7434
7486
  if (postcssConfigDir) {
7435
7487
  try {
@@ -7473,7 +7525,7 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
7473
7525
  };
7474
7526
  return _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
7475
7527
  (docsRoot) => _chunkHR5GU4UUcjs.discoverFarmDocsPages.call(void 0, _chunkHR5GU4UUcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
7476
- ).flatMap((page) => [page.href, _chunkHR5GU4UUcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
7528
+ ).flatMap((page) => [page.href, _chunkHR5GU4UUcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
7477
7529
  }
7478
7530
  function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
7479
7531
  const llmsTxt = _optionalChain([agent, 'optionalAccess', _152 => _152.llmsTxt]);
@@ -7791,7 +7843,7 @@ function getFarmBufferedPreloadMarker(html) {
7791
7843
  // Prove eligibility while Farm still owns the complete document string.
7792
7844
  // Candidate-bearing or unknown bodies must retain the full parser path.
7793
7845
  // Response.text() strips a leading UTF-8 BOM; retain that legacy behavior.
7794
- return typeof html === "string" && html.charCodeAt(0) !== 0xfeff && !/\\bpreload\\b/i.test(html) ? "none" : "1";
7846
+ return typeof html === "string" && html.charCodeAt(0) !== 0xfeff && !hasFarmHtmlPreloadToken(html) ? "none" : "1";
7795
7847
  }
7796
7848
 
7797
7849
  async function applyFarmPreloadBudget(response, pathname, request) {
@@ -7863,7 +7915,7 @@ async function applyFarmPreloadBudget(response, pathname, request) {
7863
7915
  `.trim();
7864
7916
  }
7865
7917
  function generateFarmRendererAppSetupServerCode(config) {
7866
- const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
7918
+ const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
7867
7919
  if (!appSetupPath) return "";
7868
7920
  return `
7869
7921
  import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appSetupPath))};
@@ -7873,17 +7925,17 @@ if (typeof ReactDOMServer.configureApp !== "function") {
7873
7925
  ReactDOMServer.configureApp(__farmAppSetup);`;
7874
7926
  }
7875
7927
  function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = [], farmDocsAnalyticsPages = []) {
7876
- const farmRendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer);
7928
+ const farmRendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer);
7877
7929
  const searchPreserveRoutes = pageRoutes.flatMap(
7878
7930
  (route) => route.searchPreserve ? [route.searchPreserve] : []
7879
7931
  );
7880
7932
  const searchPreserveRoutesSource = searchPreserveRoutes.length > 0 ? JSON.stringify(searchPreserveRoutes) : "";
7881
7933
  const farmIslandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _166 => _166.experimental, 'optionalAccess', _167 => _167.serverComponents])) === "islands";
7882
- const farmRendererActions = _chunkCL7BUGVBcjs.resolveFarmIslxActionsMode.call(void 0, config) === "renderer";
7883
- const farmClientBoot = _chunkCL7BUGVBcjs.canBootFarmIslandsClient.call(void 0, config);
7934
+ const farmRendererActions = _chunkARORZ3MHcjs.resolveFarmIslxActionsMode.call(void 0, config) === "renderer";
7935
+ const farmClientBoot = _chunkARORZ3MHcjs.canBootFarmIslandsClient.call(void 0, config);
7884
7936
  const farmMobileClient = shouldBuildFarmMobileClient(config);
7885
7937
  const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
7886
- const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
7938
+ const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "edge";
7887
7939
  const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _168 => _168.agent, 'optionalAccess', _169 => _169.crawlers, 'optionalAccess', _170 => _170.enabled])) && !applicationMetadataRoutes.some(
7888
7940
  (metadata) => metadata.kind === "robots" && metadata.pattern === "/"
7889
7941
  );
@@ -7894,9 +7946,10 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7894
7946
  const servesAiCatalog = _optionalChain([config, 'access', _176 => _176.agent, 'optionalAccess', _177 => _177.aiCatalog]) !== false;
7895
7947
  const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
7896
7948
  const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
7949
+ const reportsWebMCPCalls = hasInfraAnalyticsRuntime && _chunkCD5Z7RR5cjs._farmWebMCPReportsEnabled.call(void 0, config.plugins);
7897
7950
  const hasPrecompiledDocs = Boolean(farmDocsPrecompiledManifest);
7898
7951
  const adapterOwnsDocsRuntime = Boolean(
7899
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _178 => _178.docs, 'optionalAccess', _179 => _179.enabled]) && _optionalChain([config, 'access', _180 => _180.docs, 'access', _181 => _181.adapter, 'optionalAccess', _182 => _182.server]) && config.docs.adapter.react
7952
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _178 => _178.docs, 'optionalAccess', _179 => _179.enabled]) && _optionalChain([config, 'access', _180 => _180.docs, 'access', _181 => _181.adapter, 'optionalAccess', _182 => _182.server]) && config.docs.adapter.react
7900
7953
  );
7901
7954
  if (_optionalChain([config, 'access', _183 => _183.docs, 'optionalAccess', _184 => _184.enabled]) && _optionalChain([config, 'access', _185 => _185.docs, 'access', _186 => _186.roots, 'optionalAccess', _187 => _187.length]) && !adapterOwnsDocsRuntime) {
7902
7955
  throw new Error(
@@ -7905,13 +7958,13 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7905
7958
  }
7906
7959
  const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
7907
7960
  const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
7908
- const hasIsolatedClientGraphRuntime = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
7909
- const rendererStreamingCapabilities = _chunkM6DAIE4Tcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
7961
+ const hasIsolatedClientGraphRuntime = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
7962
+ const rendererStreamingCapabilities = _chunkBCTHOQPPcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
7910
7963
  config.renderer,
7911
7964
  _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset)
7912
7965
  );
7913
- const hasReactSyncRender = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer);
7914
- const rendererServerImports = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
7966
+ const hasReactSyncRender = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer);
7967
+ const rendererServerImports = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
7915
7968
  import * as ReactDOMServer from "react-dom/server";
7916
7969
  import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : (
7917
7970
  // The renderer contract is the server module's named exports, which the development
@@ -7957,18 +8010,18 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7957
8010
  (image) => image.sourceType === "module"
7958
8011
  );
7959
8012
  const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
7960
- const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkOFVCWV2Dcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
8013
+ const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkNEKO3HM2cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7961
8014
  const farmDocsFontAssets = _optionalChain([config, 'access', _188 => _188.docs, 'optionalAccess', _189 => _189.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
7962
- const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations);
8015
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, config.integrations);
7963
8016
  const renderedIntegrationProviders = integrationProviders.filter(
7964
8017
  (provider) => provider.component || provider.type === "clerk"
7965
8018
  );
7966
- if (renderedIntegrationProviders.length > 0 && !_chunkM6DAIE4Tcjs.getFarmRendererCapabilities.call(void 0, config.renderer).functionComponents) {
8019
+ if (renderedIntegrationProviders.length > 0 && !_chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, config.renderer).functionComponents) {
7967
8020
  throw new Error(
7968
8021
  `Integration provider components are not supported by the "${config.renderer.name}" renderer.`
7969
8022
  );
7970
8023
  }
7971
- const providerServerModules = _chunkCL7BUGVBcjs.generateFarmIntegrationProviderServerModules.call(void 0,
8024
+ const providerServerModules = _chunkARORZ3MHcjs.generateFarmIntegrationProviderServerModules.call(void 0,
7972
8025
  renderedIntegrationProviders,
7973
8026
  config.root,
7974
8027
  _nullishCoalesce(config.renderer.componentExtensions, () => ( []))
@@ -7988,14 +8041,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7988
8041
  const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
7989
8042
  (provider) => provider.supportsIsolatedHydration !== true
7990
8043
  );
7991
- const isolatedHydrationMode = _chunk46UV2E7Icjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
8044
+ const isolatedHydrationMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
7992
8045
  _optionalChain([config, 'access', _192 => _192.experimental, 'optionalAccess', _193 => _193.isolatedClientHydration]),
7993
8046
  {
7994
8047
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _194 => _194.experimental, 'optionalAccess', _195 => _195.serverComponents])) === "rsc",
7995
8048
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
7996
8049
  }
7997
8050
  );
7998
- const hydrationPlanOptions = _chunk46UV2E7Icjs.getFarmClientHydrationPlanOptions.call(void 0,
8051
+ const hydrationPlanOptions = _chunkDRO3NXA3cjs.getFarmClientHydrationPlanOptions.call(void 0,
7999
8052
  config.renderer,
8000
8053
  Boolean(unsupportedIntegrationProvider)
8001
8054
  );
@@ -8003,7 +8056,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8003
8056
  ...hydrationPlanOptions,
8004
8057
  serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _196 => _196.experimental, 'optionalAccess', _197 => _197.serverComponents])) === "islands"
8005
8058
  };
8006
- const { layoutHydrationPlans, pageHydrationPlans } = _chunk46UV2E7Icjs.withFarmSourceSnapshot.call(void 0, () => {
8059
+ const { layoutHydrationPlans, pageHydrationPlans } = _chunkDRO3NXA3cjs.withFarmSourceSnapshot.call(void 0, () => {
8007
8060
  const layoutHydrationPlans2 = layoutRoutes.map((layout) => ({
8008
8061
  ...layout,
8009
8062
  hydration: getCachedClientModuleHydrationPlan(
@@ -8014,7 +8067,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8014
8067
  { ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
8015
8068
  )
8016
8069
  }));
8017
- const markdownPagePlan = _chunk46UV2E7Icjs.createMarkdownPageHydrationPlanner.call(void 0,
8070
+ const markdownPagePlan = _chunkDRO3NXA3cjs.createMarkdownPageHydrationPlanner.call(void 0,
8018
8071
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
8019
8072
  config.root,
8020
8073
  isolatedHydrationMode,
@@ -8034,7 +8087,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8034
8087
  );
8035
8088
  return { layoutHydrationPlans: layoutHydrationPlans2, pageHydrationPlans: pageHydrationPlans2 };
8036
8089
  });
8037
- _chunk46UV2E7Icjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
8090
+ _chunkDRO3NXA3cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
8038
8091
  layoutHydrationPlans.map((layout) => ({
8039
8092
  pattern: layout.pattern,
8040
8093
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -8043,10 +8096,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8043
8096
  pageRoutes.map((route) => ({
8044
8097
  // Compared by directory so a grouped layout applies only inside its group.
8045
8098
  pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
8046
- depth: _chunkOFVCWV2Dcjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
8099
+ depth: _chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
8047
8100
  metadata: pageHydrationPlans.get(route.modulePath)
8048
8101
  })),
8049
- _chunkOFVCWV2Dcjs.routeBoundaryCoversDirectory,
8102
+ _chunkNEKO3HM2cjs.routeBoundaryCoversDirectory,
8050
8103
  { serverOwners: pageHydrationPlanOptions.serverOwners }
8051
8104
  );
8052
8105
  const providerServerImports = [
@@ -8078,8 +8131,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8078
8131
  orderedPageRoutes.forEach((route, index) => {
8079
8132
  const varName = `pageRoute${index}`;
8080
8133
  if (_chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
8081
- const renderingDirective2 = _chunkOUDNUFVRcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8082
- const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunk46UV2E7Icjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
8134
+ const renderingDirective2 = _chunkVMBIKDKWcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8135
+ const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkDRO3NXA3cjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
8083
8136
  pageRegistrations.push(`
8084
8137
  {
8085
8138
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
@@ -8087,14 +8140,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8087
8140
  rendering: ${JSON.stringify(renderingDirective2)},` : ""}${markdownServerTree ? "\n serverTree: true," : ""}
8088
8141
  module: createFarmMarkdownRouteModule({
8089
8142
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
8090
- filePath: ${JSON.stringify(_chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
8143
+ filePath: ${JSON.stringify(_chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
8091
8144
  components: farmMdxComponents,
8092
- config: farmMdxConfig,${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: React,"}
8145
+ config: farmMdxConfig,${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: React,"}
8093
8146
  }),
8094
8147
  markdownSource: {
8095
8148
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
8096
8149
  filePath: ${JSON.stringify(
8097
- _chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
8150
+ _chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
8098
8151
  )},
8099
8152
  },
8100
8153
  }`);
@@ -8104,7 +8157,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8104
8157
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
8105
8158
  );
8106
8159
  const clientMetadata = pageHydrationPlans.get(route.modulePath);
8107
- const renderingDirective = _chunkOUDNUFVRcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8160
+ const renderingDirective = _chunkVMBIKDKWcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8108
8161
  pageRegistrations.push(`
8109
8162
  {
8110
8163
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
@@ -8112,8 +8165,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8112
8165
  module: ${varName},
8113
8166
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
8114
8167
  clientModule: ${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
8115
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunk46UV2E7Icjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
8116
- const rootStrategy = _chunkCL7BUGVBcjs.resolveFarmRouteRootStrategy.call(void 0,
8168
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkDRO3NXA3cjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
8169
+ const rootStrategy = _chunkARORZ3MHcjs.resolveFarmRouteRootStrategy.call(void 0,
8117
8170
  route,
8118
8171
  clientMetadata,
8119
8172
  layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
@@ -8126,13 +8179,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8126
8179
  rendering: ${JSON.stringify(renderingDirective)},` : ""}
8127
8180
  ${route.source !== void 0 ? `markdownSource: {
8128
8181
  source: ${JSON.stringify(route.source)},
8129
- filePath: ${JSON.stringify(_chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
8182
+ filePath: ${JSON.stringify(_chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
8130
8183
  },` : ""}
8131
8184
  }`);
8132
8185
  });
8133
8186
  const layoutImports = [];
8134
8187
  const layoutRegistrations = [];
8135
- const treeLayoutPatterns = farmIslandsMode ? _chunkOFVCWV2Dcjs.getFarmServerTreeLayoutPatterns.call(void 0,
8188
+ const treeLayoutPatterns = farmIslandsMode ? _chunkNEKO3HM2cjs.getFarmServerTreeLayoutPatterns.call(void 0,
8136
8189
  layoutHydrationPlans.map((layout) => ({
8137
8190
  pattern: layout.pattern,
8138
8191
  shouldHydrate: layout.hydration.shouldHydrate,
@@ -8150,7 +8203,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8150
8203
  pattern: ${JSON.stringify(layout.pattern)},
8151
8204
  module: ${varName},
8152
8205
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},
8153
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkCL7BUGVBcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
8206
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkARORZ3MHcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
8154
8207
  // isolatedClientHydration, or an async layout): it wraps a docs page as an app page.
8155
8208
  clientMetadata.hasIsolatedClientBoundaries ? "\n islands: true," : ""}
8156
8209
  }`);
@@ -8178,7 +8231,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8178
8231
  containerId: ${JSON.stringify(slot.containerId)},
8179
8232
  interception: ${JSON.stringify(slot.interception)},
8180
8233
  fallback: ${JSON.stringify(slot.fallback)},
8181
- hydrates: ${!farmIslandsMode || _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
8234
+ hydrates: ${!farmIslandsMode || _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
8182
8235
  module: ${varName},
8183
8236
  }`);
8184
8237
  });
@@ -8189,12 +8242,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8189
8242
  errorImports.push(
8190
8243
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
8191
8244
  );
8192
- const groupScope = _chunkOFVCWV2Dcjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8245
+ const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8193
8246
  errorRegistrations.push(`
8194
8247
  {
8195
- pattern: ${JSON.stringify(_chunkOFVCWV2Dcjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8248
+ pattern: ${JSON.stringify(_chunkNEKO3HM2cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8196
8249
  groupScope: ${JSON.stringify(groupScope)},
8197
- directoryDepth: ${_chunkOFVCWV2Dcjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8250
+ directoryDepth: ${_chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8198
8251
  module: ${varName},
8199
8252
  }`);
8200
8253
  });
@@ -8206,12 +8259,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8206
8259
  loadingImports.push(
8207
8260
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
8208
8261
  );
8209
- const groupScope = _chunkOFVCWV2Dcjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8262
+ const groupScope = _chunkNEKO3HM2cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8210
8263
  loadingRegistrations.push(`
8211
8264
  {
8212
- pattern: ${JSON.stringify(_chunkOFVCWV2Dcjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8265
+ pattern: ${JSON.stringify(_chunkNEKO3HM2cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8213
8266
  groupScope: ${JSON.stringify(groupScope)},
8214
- directoryDepth: ${_chunkOFVCWV2Dcjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8267
+ directoryDepth: ${_chunkNEKO3HM2cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8215
8268
  module: ${varName},
8216
8269
  }`);
8217
8270
  });
@@ -8224,7 +8277,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8224
8277
  metadataImageImports.push(
8225
8278
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(image.modulePath)};`
8226
8279
  );
8227
- const component = !_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) && _chunkCL7BUGVBcjs.isRendererCompiledComponent.call(void 0, image.modulePath, _nullishCoalesce(_optionalChain([config, 'access', _201 => _201.renderer, 'optionalAccess', _202 => _202.componentExtensions]), () => ( [])));
8280
+ const component = !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) && _chunkARORZ3MHcjs.isRendererCompiledComponent.call(void 0, image.modulePath, _nullishCoalesce(_optionalChain([config, 'access', _201 => _201.renderer, 'optionalAccess', _202 => _202.componentExtensions]), () => ( [])));
8228
8281
  metadataImageRegistrations.push(`
8229
8282
  {
8230
8283
  pattern: ${JSON.stringify(image.pattern)},
@@ -8285,6 +8338,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8285
8338
  applyFarmBasePath,
8286
8339
  applyFarmCspNonceToResponse,
8287
8340
  createFarmCspNonce,
8341
+ createPreHydrationClickQueueScript,
8288
8342
  stampFarmCspNonce,
8289
8343
  isDeferred,
8290
8344
  prepareDeferredData,
@@ -8344,6 +8398,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8344
8398
  isFarmNotFoundError,
8345
8399
  isFarmRedirectError,
8346
8400
  localizeFarmHref,
8401
+ hasFarmHtmlPreloadToken,
8347
8402
  manageFarmDocumentPreloads,
8348
8403
  mergeRouteRenderingDirectiveConfig,
8349
8404
  resolveRouteSharedCacheControl,
@@ -8496,10 +8551,10 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
8496
8551
  );
8497
8552
  const nativeServerFns = (config.plugins || []).some(
8498
8553
  (plugin) => _optionalChain([plugin, 'optionalAccess', _222 => _222.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
8499
- ) ? _chunkXOGCNKB7cjs.collectFarmNativeServerFns.call(void 0, {
8554
+ ) ? _chunk6BPFIYGYcjs.collectFarmNativeServerFns.call(void 0, {
8500
8555
  root: config.root,
8501
8556
  srcDir: config.srcDir,
8502
- entries: _chunkXOGCNKB7cjs.findFarmNativeScreenFiles.call(void 0, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config))
8557
+ entries: _chunk6BPFIYGYcjs.findFarmNativeScreenFiles.call(void 0, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config))
8503
8558
  }) : void 0;
8504
8559
  const integrationImports = `
8505
8560
  ${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
@@ -8514,7 +8569,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
8514
8569
  ${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
8515
8570
  });` : ""}
8516
8571
  `;
8517
- const imageRuntime = _chunkCL7BUGVBcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
8572
+ const imageRuntime = _chunkARORZ3MHcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
8518
8573
  const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
8519
8574
  const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
8520
8575
  const apiHandlerCode = apiRoutes.length > 0 ? `
@@ -8696,7 +8751,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
8696
8751
 
8697
8752
  function renderFarmDefault404Page() {
8698
8753
  return React.createElement(React.Fragment, null,
8699
- React.createElement("style", null, ${JSON.stringify(_chunkCL7BUGVBcjs.DEFAULT_NOT_FOUND_STYLES)}),
8754
+ React.createElement("style", null, ${JSON.stringify(_chunkARORZ3MHcjs.DEFAULT_NOT_FOUND_STYLES)}),
8700
8755
  React.createElement("main", {
8701
8756
  className: "farm-default-not-found",
8702
8757
  "aria-labelledby": "farm-default-not-found-title",
@@ -8788,6 +8843,12 @@ function wrapWithFarmIntegrationProviders(element) {
8788
8843
  }
8789
8844
  return wrapped;
8790
8845
  }
8846
+ // The browser hydrates a page island or a route slot as its own root, inside the integration
8847
+ // providers, so the server renders them inside it too. React lines an island up with its tree
8848
+ // position instead, and its providers render no markup.
8849
+ function wrapFarmIslandIntegrationProviders(element) {
8850
+ return ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "element" : "wrapWithFarmIntegrationProviders(element)"};
8851
+ }
8791
8852
  const serverRuntimeIntegrations = Object.fromEntries(
8792
8853
  Object.entries(configuredIntegrations).filter(([, integration]) =>
8793
8854
  integration && typeof integration === "object" && integration.serverRuntime !== false
@@ -8797,7 +8858,14 @@ const integrationRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs, {
8797
8858
  integrations: configuredIntegrations,
8798
8859
  ${JSON.stringify(_chunkQKW6DLDTcjs.FARM_INTEGRATION_API_BASE_PATH_KEY)}: ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
8799
8860
  });
8800
- const farmInfraAnalytics = ${hasInfraAnalyticsRuntime ? hasPluginRuntime ? "createFarmInfraAnalyticsPlugin()" : "createFarmInfraAnalyticsRecorder()" : "null"};
8861
+ const farmInfraAnalytics = ${hasInfraAnalyticsRuntime ? `${hasPluginRuntime ? "createFarmInfraAnalyticsPlugin" : "createFarmInfraAnalyticsRecorder"}(${reportsWebMCPCalls ? "{ webmcp: { route: farmWebMCPCallRoute } }" : ""})` : "null"};${reportsWebMCPCalls ? `
8862
+ // A WebMCP tool call a page reports goes under that page's route, matched and labeled as a
8863
+ // request for the page is.
8864
+ function farmWebMCPCallRoute(pathname) {
8865
+ return labelFarmRequestOptions(
8866
+ getFarmPluginRequestOptions(new Request(new URL(pathname, "http://farm.invalid"))),
8867
+ ).route;
8868
+ }` : ""}
8801
8869
  const configuredPlugins = [
8802
8870
  ${hasCompressionRuntime && hasPluginRuntime ? "createCompressionPlugin()," : ""}
8803
8871
  ${hasRuntimeIntegrationConfig ? "...resolveIntegrationPlugins(serverRuntimeIntegrations)," : ""}
@@ -8856,7 +8924,7 @@ ${_optionalChain([config, 'access', _232 => _232.agent, 'optionalAccess', _233 =
8856
8924
  // to the build.
8857
8925
  const farmNoindexPreview = resolveFarmPreviewDeployment(
8858
8926
  globalThis.process?.env,
8859
- ${JSON.stringify(_chunkADQ2LATRcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
8927
+ ${JSON.stringify(_chunkRMPUEH5Tcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
8860
8928
  );` : ""}
8861
8929
  const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
8862
8930
  const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
@@ -8987,7 +9055,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _241 => _241.docs, '
8987
9055
  registerMCPServer: registerFarmMCPServer,
8988
9056
  // A page built with this keeps its HTML string, so the preload budget and the response
8989
9057
  // writer use it instead of reading and re-encoding the body. Older adapters ignore it.
8990
- createHtmlResponse: farmOwnedHtmlResponse,${_chunkE3HBD2K3cjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
9058
+ createHtmlResponse: farmOwnedHtmlResponse,${_chunkHHQEKLZLcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
8991
9059
  // The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
8992
9060
  // asks about any path its own content lists, so the guards decide here, not a page list.
8993
9061
  isPathGuarded: (pathname) =>
@@ -9048,12 +9116,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
9048
9116
  // runtime request.
9049
9117
  const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
9050
9118
  const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
9051
- ${_optionalChain([config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkFYZD7DUScjs.resolveFarmApiCatalogInput.call(void 0, config))};
9119
+ ${_optionalChain([config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkB2PGVHBGcjs.resolveFarmApiCatalogInput.call(void 0, config))};
9052
9120
  ` : ""}${_optionalChain([config, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
9053
- _chunkFYZD7DUScjs.resolveFarmAppManifestInput.call(void 0, config, {
9121
+ _chunkB2PGVHBGcjs.resolveFarmAppManifestInput.call(void 0, config, {
9054
9122
  build: config.deploymentId,
9055
- packages: _chunkCL7BUGVBcjs.resolveFarmAppPackages.call(void 0, config.root),
9056
- webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkCL7BUGVBcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
9123
+ packages: _chunkARORZ3MHcjs.resolveFarmAppPackages.call(void 0, config.root),
9124
+ webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkARORZ3MHcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
9057
9125
  })
9058
9126
  )};
9059
9127
  ${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
@@ -9841,7 +9909,7 @@ function peelFarmDocumentPrefix(markup) {
9841
9909
  let inner = markup.replace(/^\\s+/, "");
9842
9910
  let hoisted = "";
9843
9911
  const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
9844
- const hoistable = /${_chunkOFVCWV2Dcjs.HOISTED_HEAD_ELEMENT.source}/i;
9912
+ const hoistable = /${_chunkNEKO3HM2cjs.HOISTED_HEAD_ELEMENT.source}/i;
9845
9913
  let match;
9846
9914
  while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
9847
9915
  if (!/^<div/i.test(match[0])) hoisted += match[0];
@@ -9870,7 +9938,7 @@ function opensFarmFullDocument(markup) {
9870
9938
  // them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
9871
9939
  function takeFarmHoistedHead(markup) {
9872
9940
  if (opensFarmFullDocument(markup)) return { head: "", body: markup };
9873
- const hoistable = /${_chunkOFVCWV2Dcjs.HOISTED_HEAD_ELEMENT.source}/i;
9941
+ const hoistable = /${_chunkNEKO3HM2cjs.HOISTED_HEAD_ELEMENT.source}/i;
9874
9942
  let head = "";
9875
9943
  let body = markup;
9876
9944
  let match;
@@ -10356,10 +10424,10 @@ async function handleMetadataImageRequest(request, routePathname) {
10356
10424
  path: match.pagePath,
10357
10425
  };
10358
10426
 
10359
- ${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? "" : ", {\n renderer: ReactDOMServer,\n component: image.component === true,\n }"});
10427
+ ${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "" : ", {\n renderer: ReactDOMServer,\n component: image.component === true,\n }"});
10360
10428
  return createFarmMetadataImageResponse(value, imageModule, {
10361
10429
  method,
10362
- ifNoneMatch: request.headers.get("if-none-match"),${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: ReactDOMServer,"}
10430
+ ifNoneMatch: request.headers.get("if-none-match"),${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: ReactDOMServer,"}
10363
10431
  });` : 'throw new Error("Generated metadata image runtime is unavailable");'}
10364
10432
  } catch (error) {
10365
10433
  console.error("Metadata image render failed:", error);
@@ -10438,7 +10506,7 @@ function createFarmAgentRobotsResponse(request) {
10438
10506
  // its nearest layout's.
10439
10507
  const farmAgentGuardedPages = new Set(${JSON.stringify(
10440
10508
  pageRoutes.map((route) => route.pattern).filter(
10441
- (pattern) => !pattern.includes("[") && _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0,
10509
+ (pattern) => !pattern.includes("[") && _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
10442
10510
  {
10443
10511
  config: { middleware: config.middleware, integrations: config.integrations },
10444
10512
  middlewareRoutes
@@ -10493,7 +10561,7 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
10493
10561
  // aside for a page route that answers /mcp and for any MCP server published or
10494
10562
  // registered at runtime, such as the docs engine's.
10495
10563
  const farmDefaultMCPServer = ${JSON.stringify(
10496
- _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkNSLRK5DKcjs.FARM_VERSION)
10564
+ _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkJK26IMT7cjs.FARM_VERSION)
10497
10565
  )};
10498
10566
  let farmDefaultMCPRouteFree;
10499
10567
  function getFarmDefaultMCPServer() {
@@ -10687,7 +10755,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
10687
10755
  // middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
10688
10756
  const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
10689
10757
  const farmPrerendering =
10690
- typeof process !== "undefined" && process.env?.${_chunkW6C3LEXXcjs.FARM_PRERENDER_ENV} === "1";
10758
+ typeof process !== "undefined" && process.env?.${_chunkCD5Z7RR5cjs.FARM_PRERENDER_ENV} === "1";
10691
10759
  ` : ""}
10692
10760
  const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
10693
10761
  config: farmMiddlewareConfig,
@@ -10943,7 +11011,7 @@ ${hasInfraAnalyticsRuntime ? `
10943
11011
  // endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
10944
11012
  // labeled here; route.pattern keeps meaning the matched app route for plugins.
10945
11013
  const farmBuiltInRoutePaths = new Set(${JSON.stringify(
10946
- _chunkFYZD7DUScjs.listFarmBuiltInRoutePaths.call(void 0, {
11014
+ _chunkB2PGVHBGcjs.listFarmBuiltInRoutePaths.call(void 0, {
10947
11015
  agent: {
10948
11016
  ...config.agent,
10949
11017
  aiCatalog: servesAiCatalog,
@@ -11720,7 +11788,7 @@ ${hasServerRuntimeIntegrations ? `
11720
11788
  // agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
11721
11789
  // public manifest, the same document for every request.
11722
11790
  if (
11723
- [${JSON.stringify(_chunkFYZD7DUScjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkFYZD7DUScjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
11791
+ [${JSON.stringify(_chunkB2PGVHBGcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkB2PGVHBGcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
11724
11792
  normalizeRuntimePath(routePathname),
11725
11793
  )
11726
11794
  ) {
@@ -11732,7 +11800,7 @@ ${hasServerRuntimeIntegrations ? `
11732
11800
  ` : ""}
11733
11801
  ${_optionalChain([config, 'access', _279 => _279.agent, 'optionalAccess', _280 => _280.apiCatalog]) ? `
11734
11802
  // agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
11735
- if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkFYZD7DUScjs.FARM_API_CATALOG_PATH)}) {
11803
+ if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkB2PGVHBGcjs.FARM_API_CATALOG_PATH)}) {
11736
11804
  return applyProductionMiddlewareHeaders(
11737
11805
  createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
11738
11806
  middlewareHeaders,
@@ -12267,7 +12335,7 @@ ${hasServerRuntimeIntegrations ? `
12267
12335
  }
12268
12336
 
12269
12337
  if (route.shouldHydrate && !shouldHydrateLayout) {
12270
- pageElement = wrapFarmRouteClientGraph(pageElement);
12338
+ pageElement = wrapFarmRouteClientGraph(wrapFarmIslandIntegrationProviders(pageElement));
12271
12339
  } else if (shouldHydrateLayout && !route.shouldHydrate) {
12272
12340
  pageElement = route.serverTree
12273
12341
  ? await renderFarmRouteServerTree(
@@ -12292,7 +12360,7 @@ ${hasServerRuntimeIntegrations ? `
12292
12360
  pageElement,
12293
12361
  );
12294
12362
 
12295
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) pageElement = markPagePosition(React, pageElement);" : ""}
12363
+ ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) pageElement = markPagePosition(React, pageElement);" : ""}
12296
12364
  // Wrap with layouts (from innermost to outermost)
12297
12365
  // Layouts are sorted by depth (root first), so we process in reverse
12298
12366
  let wrappedElement = pageElement;
@@ -12328,7 +12396,9 @@ ${hasServerRuntimeIntegrations ? `
12328
12396
  },
12329
12397
  slot.hydrates
12330
12398
  ? wrapFarmRouteClientGraph(
12331
- React.createElement(slot.module.default, slot.props),
12399
+ wrapFarmIslandIntegrationProviders(
12400
+ React.createElement(slot.module.default, slot.props),
12401
+ ),
12332
12402
  )
12333
12403
  : React.createElement(slot.module.default, slot.props),
12334
12404
  );
@@ -12364,7 +12434,7 @@ ${hasServerRuntimeIntegrations ? `
12364
12434
  wrappedElement = wrapFarmRouteClientGraph(wrappedElement);
12365
12435
  }
12366
12436
 
12367
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) wrappedElement = markLayoutPosition(React, wrappedElement);" : ""}
12437
+ ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) wrappedElement = markLayoutPosition(React, wrappedElement);" : ""}
12368
12438
  wrappedElement = wrapWithFarmIntegrationProviders(wrappedElement);
12369
12439
  return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern, farmFlushToken);
12370
12440
  };
@@ -12542,6 +12612,18 @@ ${hasServerRuntimeIntegrations ? `
12542
12612
  // Set once the whole document is rendered: whether it starts with the boot entry, which
12543
12613
  // preloads nothing.
12544
12614
  let farmBootsClient = false;
12615
+ // A document something hydrates over holds the clicks and submits made before it hydrates,
12616
+ // for the client entry to replay, as development does. One that starts with the boot entry
12617
+ // holds its own.
12618
+ const farmHoldsInteractions =
12619
+ route.shouldHydrate ||
12620
+ shouldHydrateLayout ||
12621
+ renderedRouteSlots.some(function(slot) { return slot.hydrates; });
12622
+ const renderFarmPreHydrationHoldScript = function() {
12623
+ return farmHoldsInteractions && !farmBootsClient
12624
+ ? stampFarmCspNonce(createPreHydrationClickQueueScript()) + '\\n'
12625
+ : '';
12626
+ };
12545
12627
  // A client navigation swaps this document in without running its scripts. A route a
12546
12628
  // shared cache stores renders the same for every request.
12547
12629
  const farmNavigationRequest = ${farmIslandsMode ? `!farmSharedCacheableRoute &&
@@ -12556,7 +12638,7 @@ ${hasServerRuntimeIntegrations ? `
12556
12638
  composed = composed
12557
12639
  // Inject CSS link after opening head tag or first meta tag
12558
12640
  .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule, farmNavigationRequest)); })
12559
- .replace(/<\\/head>/i, () => renderFarmRendererHydrationScript() + '\\n</head>')
12641
+ .replace(/<\\/head>/i, () => renderFarmRendererHydrationScript() + '\\n' + renderFarmPreHydrationHoldScript() + '</head>')
12560
12642
  // Explicit metadata wins over renderer and layout titles. Without
12561
12643
  // explicit metadata, a renderer title wins over the layout title.
12562
12644
  .replace(/<head([^>]*)>([\\s\\S]*?)<\\/head>/i, (match, attrs, headContent) => {
@@ -12631,6 +12713,7 @@ ${hasServerRuntimeIntegrations ? `
12631
12713
  ' <link rel="stylesheet" href="/__farm_client_css_href__">\\n' +
12632
12714
  ' <link rel="modulepreload" href="/__farm_client_js_src__">' + renderFarmClientModulePreloads(null, route.clientModule) + '\\n' +
12633
12715
  renderFarmRendererHydrationScript() + '\\n' +
12716
+ renderFarmPreHydrationHoldScript() +
12634
12717
  '</head>\\n<body>\\n' + farmEarlyClientScripts + ' <div id="root">';
12635
12718
  const streamClientScripts = farmEarlyClientScripts ? '' : farmClientScripts();
12636
12719
  const streamSuffix = function() {
@@ -12787,7 +12870,7 @@ ${hasServerRuntimeIntegrations ? `
12787
12870
  \${suppressDefaultTitle ? "" : "<title>" + title + "</title>"}\${metaTags}\${rendererHead ? "\\n " + rendererHead : ""}
12788
12871
  <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule, farmNavigationRequest)}
12789
12872
  \${renderFarmRendererHydrationScript()}
12790
- </head>
12873
+ \${renderFarmPreHydrationHoldScript()}</head>
12791
12874
  <body>
12792
12875
  <div id="root">\${html}</div>
12793
12876
  \${renderFarmClientBootstrapScript(pageProps.__farmCanonicalPath, farmDeferredData.data.slots, farmDeferredData.data.page, routePathname)}\${renderFarmDeferredDataScript(farmDeferredData.records)}
@@ -13549,9 +13632,9 @@ function getPhysicalPrerenderBypassReason(options) {
13549
13632
  if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
13550
13633
  return "rewrite";
13551
13634
  }
13552
- if (_chunkOFVCWV2Dcjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
13553
- if (_chunkOFVCWV2Dcjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
13554
- if (_chunkMOGRRZMWcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
13635
+ if (_chunkNEKO3HM2cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
13636
+ if (_chunkNEKO3HM2cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
13637
+ if (_chunkLM2ZDNDDcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
13555
13638
  if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
13556
13639
  const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
13557
13640
  if (_optionalChain([manifestEntry, 'optionalAccess', _300 => _300.rendering]) === "dynamic") return "dynamic runtime manifest";
@@ -13575,7 +13658,7 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
13575
13658
  );
13576
13659
  return [];
13577
13660
  }
13578
- if (!_chunkE3HBD2K3cjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
13661
+ if (!_chunkHHQEKLZLcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
13579
13662
  const { pages: pages2, originDependent } = _chunkHR5GU4UUcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
13580
13663
  root,
13581
13664
  srcDir: config.srcDir
@@ -13587,13 +13670,13 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
13587
13670
  }
13588
13671
  return pages2;
13589
13672
  }
13590
- if (!_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer)) {
13673
+ if (!_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer)) {
13591
13674
  _chunk7U4XF76Rcjs.logger.warn(
13592
13675
  `The docs adapter ${JSON.stringify(config.docs.adapter.id)} renders with React; docs.prerender keeps its pages rendering on request with the "${config.renderer.name}" renderer.`
13593
13676
  );
13594
13677
  return [];
13595
13678
  }
13596
- const pages = await _chunkE3HBD2K3cjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
13679
+ const pages = await _chunkHHQEKLZLcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
13597
13680
  if (!pages) {
13598
13681
  _chunk7U4XF76Rcjs.logger.warn(
13599
13682
  `The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
@@ -13607,10 +13690,10 @@ async function listFarmDocsAnalyticsPages(config, root, preset) {
13607
13690
  return [];
13608
13691
  }
13609
13692
  try {
13610
- return await _chunkE3HBD2K3cjs.listFarmDocsPagePaths.call(void 0, config.docs, {
13693
+ return await _chunkHHQEKLZLcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
13611
13694
  root,
13612
13695
  srcDir: config.srcDir,
13613
- adapter: _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) && _chunkE3HBD2K3cjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
13696
+ adapter: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) && _chunkHHQEKLZLcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
13614
13697
  });
13615
13698
  } catch (error) {
13616
13699
  _chunk7U4XF76Rcjs.logger.warn(
@@ -13636,10 +13719,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13636
13719
  const nitroBuilder = nitroBuilderResult.value;
13637
13720
  const isVercel = preset === "vercel";
13638
13721
  const isCloudflareWorker = preset === "cloudflare-module";
13639
- const outputDir = _chunkMOGRRZMWcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
13722
+ const outputDir = _chunkLM2ZDNDDcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
13640
13723
  const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
13641
13724
  const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
13642
- const imageRuntime = _chunkCL7BUGVBcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
13725
+ const imageRuntime = _chunkARORZ3MHcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
13643
13726
  const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
13644
13727
  (image) => image.sourceType === "module"
13645
13728
  );
@@ -13665,7 +13748,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13665
13748
  const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
13666
13749
  const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
13667
13750
  const farmWorkflows = await _chunkBSX5OGSDcjs.prepareFarmWorkflowsForNitro.call(void 0, config);
13668
- const farmCron = await _chunk5ZHC6QGDcjs.prepareFarmCronForNitro.call(void 0, config);
13751
+ const farmCron = await _chunkHQKCSJEHcjs.prepareFarmCronForNitro.call(void 0, config);
13669
13752
  const [
13670
13753
  { ssg: ssgPages },
13671
13754
  middlewareRoutes,
@@ -13695,7 +13778,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13695
13778
  const edgeGuardedPrerenderRoutes = [];
13696
13779
  const addPrerenderRoute = (pathname) => {
13697
13780
  prerenderRoutes.push(pathname);
13698
- if (_chunkOFVCWV2Dcjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
13781
+ if (_chunkNEKO3HM2cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
13699
13782
  edgeGuardedPrerenderRoutes.push(pathname);
13700
13783
  }
13701
13784
  };
@@ -13754,12 +13837,12 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13754
13837
  "Cloudflare Pages does not install Cron Triggers. Use the cloudflare-module preset or an external scheduler with .farm/cron-manifest.json."
13755
13838
  );
13756
13839
  }
13757
- const portableScheduledTasks = _chunk5ZHC6QGDcjs.mergeScheduledTasks.call(void 0,
13840
+ const portableScheduledTasks = _chunkHQKCSJEHcjs.mergeScheduledTasks.call(void 0,
13758
13841
  farmWorkflows.scheduledTasks,
13759
13842
  farmCron.scheduledTasks
13760
13843
  );
13761
- const scheduledTasks = preset.startsWith("cloudflare") ? _chunk5ZHC6QGDcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
13762
- const cloudflareCronConfig = farmCron.provider === "host" ? _chunk5ZHC6QGDcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
13844
+ const scheduledTasks = preset.startsWith("cloudflare") ? _chunkHQKCSJEHcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
13845
+ const cloudflareCronConfig = farmCron.provider === "host" ? _chunkHQKCSJEHcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
13763
13846
  const [
13764
13847
  clientCssHref,
13765
13848
  clientJsSrc,
@@ -14137,7 +14220,9 @@ function toFarmNodeResponse(request, response) {
14137
14220
  ];
14138
14221
  })
14139
14222
  );
14140
- if (preset === "node-server") await writeFarmClientBrotliAssets(clientOutputDir);
14223
+ if (preset === "node-server" || preset === "bun") {
14224
+ await writeFarmClientBrotliAssets(clientOutputDir);
14225
+ }
14141
14226
  const immutableAssets = isVercel ? { publicAssets: [], routeRules: {} } : planFarmImmutableAssets({
14142
14227
  clientOutputDir,
14143
14228
  files: await listFarmClientOutputFiles(clientOutputDir),
@@ -14174,9 +14259,8 @@ function toFarmNodeResponse(request, response) {
14174
14259
  // A self-hosted Node or Bun server sends static files itself, so precompress
14175
14260
  // them with gzip and let Nitro serve that by Accept-Encoding. Brotli at Nitro's
14176
14261
  // fixed top quality on every file cost a docs app ~20 s of build CPU, so only
14177
- // client scripts and stylesheets get a brotli copy, on node-server
14178
- // (writeFarmClientBrotliAssets). Serverless and edge targets sit behind a CDN
14179
- // that compresses.
14262
+ // client scripts and stylesheets get a brotli copy (writeFarmClientBrotliAssets).
14263
+ // Serverless and edge targets sit behind a CDN that compresses.
14180
14264
  ...preset === "node-server" || preset === "bun" ? { compressPublicAssets: { gzip: true } } : {},
14181
14265
  // Nitro gzips every server output file at level 9, node_modules included, to
14182
14266
  // print sizes after the build. A self-hosted server is never shipped compressed,
@@ -14456,13 +14540,13 @@ function toFarmNodeResponse(request, response) {
14456
14540
  }
14457
14541
  if (prerenderRoutes.length > 0) {
14458
14542
  _chunk7U4XF76Rcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
14459
- const previousPrerender = process.env[_chunkW6C3LEXXcjs.FARM_PRERENDER_ENV];
14460
- process.env[_chunkW6C3LEXXcjs.FARM_PRERENDER_ENV] = "1";
14543
+ const previousPrerender = process.env[_chunkCD5Z7RR5cjs.FARM_PRERENDER_ENV];
14544
+ process.env[_chunkCD5Z7RR5cjs.FARM_PRERENDER_ENV] = "1";
14461
14545
  try {
14462
14546
  await nitroBuilder.prerender(nitroInstance);
14463
14547
  } finally {
14464
- if (previousPrerender === void 0) delete process.env[_chunkW6C3LEXXcjs.FARM_PRERENDER_ENV];
14465
- else process.env[_chunkW6C3LEXXcjs.FARM_PRERENDER_ENV] = previousPrerender;
14548
+ if (previousPrerender === void 0) delete process.env[_chunkCD5Z7RR5cjs.FARM_PRERENDER_ENV];
14549
+ else process.env[_chunkCD5Z7RR5cjs.FARM_PRERENDER_ENV] = previousPrerender;
14466
14550
  }
14467
14551
  }
14468
14552
  const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs5, preset) : Promise.resolve(null);
@@ -14679,7 +14763,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
14679
14763
  config.basePath
14680
14764
  );
14681
14765
  const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
14682
- (route) => edgeMiddleware.guardedPages.some((pathname) => _chunkOFVCWV2Dcjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
14766
+ (route) => edgeMiddleware.guardedPages.some((pathname) => _chunkNEKO3HM2cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
14683
14767
  );
14684
14768
  if (edgeMiddlewareRoutes.length > 0) {
14685
14769
  await writeFarmVercelEdgeMiddlewareFunction({
@@ -14702,7 +14786,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
14702
14786
  vercelConfig,
14703
14787
  farmWorkflows.workflows
14704
14788
  );
14705
- const vercelConfigWithCrons = _chunk5ZHC6QGDcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
14789
+ const vercelConfigWithCrons = _chunkHQKCSJEHcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
14706
14790
  await fs5.writeFile(configPath, JSON.stringify(vercelConfigWithCrons, null, 2));
14707
14791
  _chunk7U4XF76Rcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
14708
14792
  }
@@ -14817,7 +14901,7 @@ async function stageSharpRuntime(config, root, distDir, fs5, preset) {
14817
14901
  try {
14818
14902
  await copyPackage("sharp", sharpRequire);
14819
14903
  if (!copiedPackages.has("sharp")) {
14820
- throw new Error(`Farm image optimization requires sharp. ${_chunkCL7BUGVBcjs.SHARP_INSTALL_HINT}`);
14904
+ throw new Error(`Farm image optimization requires sharp. ${_chunkARORZ3MHcjs.SHARP_INSTALL_HINT}`);
14821
14905
  }
14822
14906
  } catch (error) {
14823
14907
  await fs5.rm(stageDir, { recursive: true, force: true });
@@ -15050,7 +15134,7 @@ async function createFarmProjectModuleSsrEnvironment() {
15050
15134
  // src/build/index.ts
15051
15135
  async function build(config, options = {}) {
15052
15136
  return _chunkNG2EZ6QScjs.withProductionNodeEnv.call(void 0,
15053
- () => _chunk46UV2E7Icjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
15137
+ () => _chunkDRO3NXA3cjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
15054
15138
  );
15055
15139
  }
15056
15140
  function createBuildTargetBaseline(config) {
@@ -15061,7 +15145,7 @@ function createBuildTargetBaseline(config) {
15061
15145
  preset,
15062
15146
  distDir,
15063
15147
  outputDir,
15064
- outputWasDerived: outputDir === _chunkMOGRRZMWcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
15148
+ outputWasDerived: outputDir === _chunkLM2ZDNDDcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
15065
15149
  };
15066
15150
  }
15067
15151
  function resolveBuildTargets(config, options, baseline) {
@@ -15070,8 +15154,8 @@ function resolveBuildTargets(config, options, baseline) {
15070
15154
  const distDir = config.distDir || ".farm";
15071
15155
  const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
15072
15156
  const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
15073
- const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkMOGRRZMWcjs.getDeployTargetForPreset.call(void 0, preset);
15074
- const outputDir = shouldRefreshDerivedOutput ? _chunkMOGRRZMWcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
15157
+ const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkLM2ZDNDDcjs.getDeployTargetForPreset.call(void 0, preset);
15158
+ const outputDir = shouldRefreshDerivedOutput ? _chunkLM2ZDNDDcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
15075
15159
  return {
15076
15160
  root,
15077
15161
  preset,
@@ -15079,7 +15163,7 @@ function resolveBuildTargets(config, options, baseline) {
15079
15163
  distDir,
15080
15164
  deployTarget,
15081
15165
  outputDir,
15082
- deployOutputDir: _chunkMOGRRZMWcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
15166
+ deployOutputDir: _chunkLM2ZDNDDcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
15083
15167
  };
15084
15168
  }
15085
15169
  async function buildWithProductionNodeEnv(inputConfig, options) {
@@ -15087,7 +15171,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15087
15171
  const targetBaseline = createBuildTargetBaseline(config);
15088
15172
  let targets;
15089
15173
  const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))]);
15090
- const pluginManager = new (0, _chunkTCMRLW3Kcjs.PluginManager)({
15174
+ const pluginManager = new (0, _chunkVACYUMXWcjs.PluginManager)({
15091
15175
  config,
15092
15176
  isDev: false,
15093
15177
  isProd: true
@@ -15116,7 +15200,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15116
15200
  };
15117
15201
  config = {
15118
15202
  ...config,
15119
- images: _chunkCL7BUGVBcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
15203
+ images: _chunkARORZ3MHcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
15120
15204
  root: targets.root,
15121
15205
  preset: targets.preset
15122
15206
  })
@@ -15124,7 +15208,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15124
15208
  if (_optionalChain([config, 'access', _355 => _355.docs, 'optionalAccess', _356 => _356.enabled])) await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
15125
15209
  pluginManager.updateContext({ config });
15126
15210
  const { root, preset, srcDir, distDir, deployOutputDir } = targets;
15127
- _chunk46UV2E7Icjs.usePackageClientBoundaryCacheFile.call(void 0, _chunk46UV2E7Icjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
15211
+ _chunkDRO3NXA3cjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkDRO3NXA3cjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
15128
15212
  _chunk7U4XF76Rcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
15129
15213
  await pluginManager.setupPlugins();
15130
15214
  await pluginManager.runHookParallel("beforeBundle", {
@@ -15145,12 +15229,12 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15145
15229
  root,
15146
15230
  rendererBuild.signal
15147
15231
  );
15148
- const farmApp = _chunkCL7BUGVBcjs.createFarmApp.call(void 0, config, projectModuleServer);
15232
+ const farmApp = _chunkARORZ3MHcjs.createFarmApp.call(void 0, config, projectModuleServer);
15149
15233
  if (options.universal !== false) farmApp.getRouteManager().keepBuildSourceSnapshot();
15150
15234
  await farmApp.initialize();
15151
15235
  const routeManager = farmApp.getRouteManager();
15152
15236
  const serverRenderer = farmApp.getServerRenderer();
15153
- const typeArtifacts = _chunkOUDNUFVRcjs.generateFarmTypeArtifacts.call(void 0, {
15237
+ const typeArtifacts = _chunkVMBIKDKWcjs.generateFarmTypeArtifacts.call(void 0, {
15154
15238
  root,
15155
15239
  srcDir,
15156
15240
  layers: config.layers,
@@ -15167,7 +15251,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15167
15251
  const message = error instanceof Error ? error.message : String(error);
15168
15252
  _chunk7U4XF76Rcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
15169
15253
  });
15170
- const apiRouteManager = new (0, _chunkLKIG5SM6cjs.APIRouteManager)(
15254
+ const apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(
15171
15255
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config),
15172
15256
  projectModuleServer,
15173
15257
  {
@@ -15250,11 +15334,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15250
15334
  }
15251
15335
  async function createProjectModuleServer(createViteServer, config, root, buildLifetime) {
15252
15336
  const { farmNavigationPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
15253
- const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
15337
+ const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
15254
15338
  ssr: true,
15255
15339
  buildLifetime
15256
15340
  });
15257
- const viteConfig = _chunkCL7BUGVBcjs.mergeFarmViteConfig.call(void 0,
15341
+ const viteConfig = _chunkARORZ3MHcjs.mergeFarmViteConfig.call(void 0,
15258
15342
  {
15259
15343
  root,
15260
15344
  appType: "custom",
@@ -15266,12 +15350,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
15266
15350
  },
15267
15351
  plugins: [
15268
15352
  ...rendererVitePlugins,
15269
- _chunkCL7BUGVBcjs.farmFontImportsPlugin.call(void 0, {
15353
+ _chunkARORZ3MHcjs.farmFontImportsPlugin.call(void 0, {
15270
15354
  root,
15271
15355
  basePath: config.basePath,
15272
15356
  publicDir: config.publicDir
15273
15357
  }),
15274
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
15358
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
15275
15359
  // Route modules load here at build time (rendering config, prerendering): `server-only`
15276
15360
  // resolves as it does in the server build. Module-entry packages load pre-bundled, as in
15277
15361
  // `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
@@ -15287,7 +15371,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
15287
15371
  hmr: false
15288
15372
  },
15289
15373
  resolve: {
15290
- alias: _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
15374
+ alias: _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
15291
15375
  dedupe: [...config.renderer.dedupe || []]
15292
15376
  },
15293
15377
  optimizeDeps: {
@@ -15343,7 +15427,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15343
15427
  farmPlugin,
15344
15428
  farmServerOnlyEntriesPlugin
15345
15429
  } = await import("./vite.cjs");
15346
- const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
15430
+ const { PluginManager: PluginManager2 } = await import("./plugin-3PT7I26P.cjs");
15347
15431
  const pluginManager = new PluginManager2({
15348
15432
  config,
15349
15433
  isDev: false,
@@ -15365,14 +15449,14 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15365
15449
  farmNavigationPlugin(config.renderer),
15366
15450
  farmIslandContainersPlugin(config),
15367
15451
  farmPlugin(config, pluginManager),
15368
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15452
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15369
15453
  ],
15370
15454
  mode: "production"
15371
15455
  });
15372
15456
  }
15373
15457
  async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
15374
15458
  const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
15375
- const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
15459
+ const { PluginManager: PluginManager2 } = await import("./plugin-3PT7I26P.cjs");
15376
15460
  const pluginManager = new PluginManager2({
15377
15461
  config,
15378
15462
  isDev: false,
@@ -15399,14 +15483,14 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
15399
15483
  farmI18nClientBridgePlugin(),
15400
15484
  farmIslandContainersPlugin(config),
15401
15485
  farmPlugin(config, pluginManager),
15402
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15486
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15403
15487
  ],
15404
15488
  mode: "production"
15405
15489
  });
15406
15490
  }
15407
15491
  function resolveLegacyPageEntry(config, root, srcDir) {
15408
15492
  const appDir = _path2.default.join(root, srcDir, "app");
15409
- for (const extension of _chunkM6DAIE4Tcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer)) {
15493
+ for (const extension of _chunkBCTHOQPPcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer)) {
15410
15494
  const candidate = _path2.default.join(appDir, `page${extension}`);
15411
15495
  if (_fs.existsSync.call(void 0, candidate)) return candidate;
15412
15496
  }
@@ -15414,7 +15498,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
15414
15498
  }
15415
15499
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
15416
15500
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
15417
- import("./nitro-XGIO6EQN.cjs"),
15501
+ import("./nitro-YDFMH5PY.cjs"),
15418
15502
  import("nitro/builder")
15419
15503
  ]);
15420
15504
  let nitroConfig = await createNitroConfig(
@@ -15427,7 +15511,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15427
15511
  if (pluginManager) {
15428
15512
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
15429
15513
  }
15430
- const outputDir = _chunkMOGRRZMWcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
15514
+ const outputDir = _chunkLM2ZDNDDcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
15431
15515
  const serverOutputDir = _path2.default.join(outputDir, "server");
15432
15516
  const publicOutputDir = _path2.default.join(outputDir, "public");
15433
15517
  const { mkdir, cp } = await import("fs/promises");
@@ -15498,7 +15582,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15498
15582
  root,
15499
15583
  preset,
15500
15584
  distDir,
15501
- outputDir: _chunkMOGRRZMWcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
15585
+ outputDir: _chunkLM2ZDNDDcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
15502
15586
  });
15503
15587
  }
15504
15588
  }