@farm.js/core 0.2.0-beta.4 → 0.2.1

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 (235) hide show
  1. package/README.md +1 -3
  2. package/dist/{agent-mcp.d-CAwDC9y4.d.ts → agent-mcp.d--uQgDp_Q.d.ts} +1 -1
  3. package/dist/{agent-mcp.d-BdFnjlAT.d.mts → agent-mcp.d-DpthRhqr.d.mts} +1 -1
  4. package/dist/agent-runtime.d.mts +4 -4
  5. package/dist/agent-runtime.d.ts +4 -4
  6. package/dist/{analyzer-K3S4YRAH.mjs → analyzer-GLFRODYV.mjs} +2 -2
  7. package/dist/analyzer-KBVOHASA.cjs +17 -0
  8. package/dist/api/node.d.mts +6 -6
  9. package/dist/api/node.d.ts +6 -6
  10. package/dist/api/route-manager.cjs +3 -3
  11. package/dist/api/route-manager.d.mts +6 -6
  12. package/dist/api/route-manager.d.ts +6 -6
  13. package/dist/api/route-manager.mjs +2 -2
  14. package/dist/api/runtime.d.mts +5 -5
  15. package/dist/api/runtime.d.ts +5 -5
  16. package/dist/api.cjs +4 -4
  17. package/dist/api.d.mts +7 -7
  18. package/dist/api.d.ts +7 -7
  19. package/dist/api.mjs +3 -3
  20. package/dist/{app-manifest.d-Dczk-fwt.d.ts → app-manifest.d-DMgcFuXQ.d.ts} +1 -1
  21. package/dist/{app-manifest.d-COs1wBGz.d.mts → app-manifest.d-DXAvPjMw.d.mts} +1 -1
  22. package/dist/app-markdown.d.mts +5 -5
  23. package/dist/app-markdown.d.ts +5 -5
  24. package/dist/{app.d-LepnxO-5.d.mts → app.d-DG_-nN5y.d.mts} +4 -4
  25. package/dist/{app.d-DREl_yXh.d.ts → app.d-htfGqq-d.d.ts} +4 -4
  26. package/dist/{chunk-X2SMVPLH.mjs → chunk-2FBFJO2Z.mjs} +8 -5
  27. package/dist/{chunk-Z3RM3VA2.mjs → chunk-5VXVRMXK.mjs} +11 -1
  28. package/dist/{chunk-LWQ6IESX.mjs → chunk-BOHBFBRA.mjs} +1 -1
  29. package/dist/{chunk-V5F6HN7E.mjs → chunk-CPL7WIMP.mjs} +1 -1
  30. package/dist/{chunk-APKULXZV.cjs → chunk-CS6GXE42.cjs} +91 -21
  31. package/dist/chunk-CYUTK4JP.cjs +52 -0
  32. package/dist/{chunk-T4NOMZTS.mjs → chunk-CZMMU3FP.mjs} +4 -4
  33. package/dist/{chunk-PSALMEHJ.cjs → chunk-D2OU4CX2.cjs} +23 -20
  34. package/dist/{chunk-5BZ7PR3T.cjs → chunk-D2VLHRBN.cjs} +3 -3
  35. package/dist/{chunk-D5OY5OKA.mjs → chunk-D5GFVHBV.mjs} +23 -17
  36. package/dist/{chunk-VGX75645.mjs → chunk-E7ISZK3R.mjs} +8 -5
  37. package/dist/{chunk-F5T55PYX.cjs → chunk-EIAA4W3M.cjs} +26 -21
  38. package/dist/{chunk-2PSN2PUJ.cjs → chunk-EWPH5IOC.cjs} +19 -16
  39. package/dist/{chunk-QBCR2EHA.cjs → chunk-GEZ76JXD.cjs} +3 -3
  40. package/dist/{chunk-KM7ZRKCH.cjs → chunk-GL4SPJTE.cjs} +10 -10
  41. package/dist/{chunk-IU4YTFFQ.cjs → chunk-GUYGMTWA.cjs} +12 -9
  42. package/dist/{chunk-MRDI6MTL.mjs → chunk-H6MYRZ2U.mjs} +15 -10
  43. package/dist/{chunk-P67RLOMO.mjs → chunk-HBZQIRRM.mjs} +1 -1
  44. package/dist/{chunk-NNHIV3O2.cjs → chunk-HENYWY5J.cjs} +2 -2
  45. package/dist/{chunk-HV6CYSMF.mjs → chunk-HHZURH4U.mjs} +1 -17
  46. package/dist/{chunk-E5AC7E25.cjs → chunk-JJ22OI7J.cjs} +2 -2
  47. package/dist/{chunk-XPVS4HKU.cjs → chunk-JZAGIXMB.cjs} +1 -1
  48. package/dist/{chunk-TQCDN4DV.mjs → chunk-KQXYBJES.mjs} +14 -11
  49. package/dist/{chunk-5UMPMVNF.mjs → chunk-L2KGQXFU.mjs} +1 -1
  50. package/dist/{chunk-HP7QYVST.cjs → chunk-LEZJZX4C.cjs} +1 -18
  51. package/dist/{chunk-C4DZAEVT.cjs → chunk-MR64FNW6.cjs} +4 -4
  52. package/dist/{chunk-LOQVWATF.mjs → chunk-MYJPW4XN.mjs} +2 -2
  53. package/dist/chunk-O77EKGAS.mjs +36 -0
  54. package/dist/{chunk-VS4ABIJJ.mjs → chunk-OKZHPPBX.mjs} +1 -1
  55. package/dist/{chunk-WLOIUPV2.mjs → chunk-P2THJDLH.mjs} +37 -26
  56. package/dist/{chunk-KBURN62Z.cjs → chunk-PFVNPOKN.cjs} +11 -1
  57. package/dist/{chunk-IASZIYNM.cjs → chunk-PGU4SCIU.cjs} +302 -297
  58. package/dist/chunk-PTG5BEMG.mjs +47 -0
  59. package/dist/{chunk-UBH2OARS.cjs → chunk-PVB5UYJT.cjs} +280 -274
  60. package/dist/{chunk-EBVKVDQA.mjs → chunk-PZ5ZJAAO.mjs} +1 -1
  61. package/dist/{chunk-FYVSAWJP.cjs → chunk-Q4FHYBFT.cjs} +11 -11
  62. package/dist/{chunk-AGT633OM.cjs → chunk-QI3UYN3P.cjs} +11 -11
  63. package/dist/{chunk-HFOME6I2.mjs → chunk-QJKGRUBR.mjs} +5 -5
  64. package/dist/{chunk-DFLCEMQ3.mjs → chunk-RCJAOQWW.mjs} +1 -1
  65. package/dist/{chunk-AGEBFYHF.mjs → chunk-SIJ3DREB.mjs} +1 -1
  66. package/dist/{chunk-II4ENBE4.mjs → chunk-SPVXL37B.mjs} +1 -1
  67. package/dist/{chunk-VVIO7QGN.mjs → chunk-TI4BJFYX.mjs} +32 -27
  68. package/dist/{chunk-MBDDLYT5.cjs → chunk-V6ACETKR.cjs} +4 -4
  69. package/dist/{chunk-VMIR4SUL.cjs → chunk-W34OS5CK.cjs} +383 -372
  70. package/dist/{chunk-ANKMAGFJ.mjs → chunk-WRT775N6.mjs} +92 -22
  71. package/dist/{chunk-DVXT7RLV.cjs → chunk-WXPY5FRF.cjs} +6 -6
  72. package/dist/{chunk-VQYGXWCS.cjs → chunk-XSE4XJKY.cjs} +2 -2
  73. package/dist/{chunk-2ORWY3SE.mjs → chunk-XYCB3CXM.mjs} +2 -2
  74. package/dist/{chunk-XJEOHDPN.cjs → chunk-YCGOQKVC.cjs} +21 -2
  75. package/dist/{chunk-2UV765GT.cjs → chunk-ZQOHL6TX.cjs} +2 -2
  76. package/dist/{client-component.d-BA6kXI5L.d.mts → client-component.d-D5JVDeQf.d.mts} +1 -1
  77. package/dist/{client-component.d-LSEmRhuI.d.ts → client-component.d-DDbDw2yP.d.ts} +1 -1
  78. package/dist/{client-plugins.d-CVUMc2ai.d.mts → client-plugins.d-9jr2yWR3.d.mts} +21 -16
  79. package/dist/{client-plugins.d-CQ6AGHP0.d.ts → client-plugins.d-BHqfH3DQ.d.ts} +21 -16
  80. package/dist/client-plugins.d.mts +4 -4
  81. package/dist/client-plugins.d.ts +4 -4
  82. package/dist/client.d.mts +10 -10
  83. package/dist/client.d.ts +10 -10
  84. package/dist/config.d.mts +4 -4
  85. package/dist/config.d.ts +4 -4
  86. package/dist/desktop.d.mts +5 -5
  87. package/dist/desktop.d.ts +5 -5
  88. package/dist/{devtools-OBQY3XOY.cjs → devtools-F6Z436WU.cjs} +12 -9
  89. package/dist/{devtools-RYTO2V7G.mjs → devtools-ZDBCJI44.mjs} +8 -5
  90. package/dist/docs.cjs +7 -6
  91. package/dist/docs.d.mts +6 -6
  92. package/dist/docs.d.ts +6 -6
  93. package/dist/docs.mjs +6 -5
  94. package/dist/environment/vite.cjs +6 -5
  95. package/dist/environment/vite.d.mts +2 -1
  96. package/dist/environment/vite.d.ts +2 -1
  97. package/dist/environment/vite.mjs +5 -4
  98. package/dist/{generate-route-types.d-BFOMM8Ef.d.mts → generate-route-types.d-CAiRw4N0.d.mts} +1 -1
  99. package/dist/{generate-route-types.d-C2m8myHb.d.ts → generate-route-types.d-Dz8MOQ3u.d.ts} +1 -1
  100. package/dist/{handler.d-nkrNn_0M.d.ts → handler.d-Dq_bSEKC.d.ts} +2 -2
  101. package/dist/{handler.d-DLKZDAYR.d.mts → handler.d-EtTSPkeO.d.mts} +2 -2
  102. package/dist/{headers.d-C3k520Fc.d.mts → headers.d-BKwGD_uC.d.mts} +1 -1
  103. package/dist/{headers.d-DVBrYnqP.d.ts → headers.d-CpIHLCEk.d.ts} +1 -1
  104. package/dist/index.cjs +28 -27
  105. package/dist/{index.d-e5WhoB07.d.ts → index.d-CoRZKiHA.d.ts} +1 -1
  106. package/dist/{index.d-5PDB032w.d.mts → index.d-DXtaU9OU.d.mts} +1 -1
  107. package/dist/index.d.mts +27 -27
  108. package/dist/index.d.ts +27 -27
  109. package/dist/index.mjs +23 -22
  110. package/dist/integrations/orm.d.mts +4 -4
  111. package/dist/integrations/orm.d.ts +4 -4
  112. package/dist/integrations.d.mts +4 -4
  113. package/dist/integrations.d.ts +4 -4
  114. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  115. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  116. package/dist/internal/build-runtime.cjs +23 -22
  117. package/dist/internal/build-runtime.d.mts +8 -8
  118. package/dist/internal/build-runtime.d.ts +8 -8
  119. package/dist/internal/build-runtime.mjs +22 -21
  120. package/dist/internal/cli-runtime.cjs +14 -10
  121. package/dist/internal/cli-runtime.d.mts +20 -12
  122. package/dist/internal/cli-runtime.d.ts +20 -12
  123. package/dist/internal/cli-runtime.mjs +13 -9
  124. package/dist/internal/client-error-overlay.cjs +4 -4
  125. package/dist/internal/client-error-overlay.mjs +1 -1
  126. package/dist/internal/client-runtime.d.mts +8 -8
  127. package/dist/internal/client-runtime.d.ts +8 -8
  128. package/dist/internal/compression-runtime.d.mts +4 -4
  129. package/dist/internal/compression-runtime.d.ts +4 -4
  130. package/dist/internal/config-runtime.cjs +7 -6
  131. package/dist/internal/config-runtime.d.mts +8 -8
  132. package/dist/internal/config-runtime.d.ts +8 -8
  133. package/dist/internal/config-runtime.mjs +6 -5
  134. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  136. package/dist/internal/native-server-fns.cjs +4 -4
  137. package/dist/internal/native-server-fns.mjs +3 -3
  138. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  139. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  140. package/dist/internal/production-runtime.cjs +4 -4
  141. package/dist/internal/production-runtime.d.mts +13 -13
  142. package/dist/internal/production-runtime.d.ts +13 -13
  143. package/dist/internal/production-runtime.mjs +3 -3
  144. package/dist/internal/spa-router.d.mts +6 -6
  145. package/dist/internal/spa-router.d.ts +6 -6
  146. package/dist/internal/start-manifest.d.mts +4 -4
  147. package/dist/internal/start-manifest.d.ts +4 -4
  148. package/dist/layers-6R55QDT5.cjs +26 -0
  149. package/dist/{layers-IMRXNZRB.mjs → layers-O6GUR6LT.mjs} +6 -1
  150. package/dist/{layers.d-CH0bC4QL.d.ts → layers.d-dNBkiNE9.d.mts} +1 -1
  151. package/dist/{layers.d-CH0bC4QL.d.mts → layers.d-dNBkiNE9.d.ts} +1 -1
  152. package/dist/{manager-3DFQDKJ6.cjs → manager-YRIENS63.cjs} +4 -4
  153. package/dist/{manager-GZUTAN5Q.mjs → manager-YTJOAHII.mjs} +3 -3
  154. package/dist/markdown.d.mts +4 -4
  155. package/dist/markdown.d.ts +4 -4
  156. package/dist/middleware.d.mts +4 -4
  157. package/dist/middleware.d.ts +4 -4
  158. package/dist/mobile.d.mts +4 -4
  159. package/dist/mobile.d.ts +4 -4
  160. package/dist/{mount.d-Cbz8vsSZ.d.ts → mount.d-BzK2Z1pR.d.ts} +1 -1
  161. package/dist/{mount.d-COIrFH0i.d.mts → mount.d-D-ynBlxU.d.mts} +1 -1
  162. package/dist/{navigation-delegate.d-dlnYTX-Y.d.ts → navigation-delegate.d-DtsnFnNF.d.ts} +1 -1
  163. package/dist/{navigation-delegate.d-yulG9Dp5.d.mts → navigation-delegate.d-aJh3ZmTY.d.mts} +1 -1
  164. package/dist/navigation.d.mts +7 -7
  165. package/dist/navigation.d.ts +7 -7
  166. package/dist/plugin.cjs +18 -17
  167. package/dist/plugin.d.mts +8 -8
  168. package/dist/plugin.d.ts +8 -8
  169. package/dist/plugin.mjs +17 -16
  170. package/dist/{render-plan.d-BW56oxMP.d.mts → render-plan.d-C6nUIU2m.d.mts} +1 -1
  171. package/dist/{render-plan.d-Cz7bQmcf.d.ts → render-plan.d-h8bkOQyh.d.ts} +1 -1
  172. package/dist/renderer-client.d.mts +8 -8
  173. package/dist/renderer-client.d.ts +8 -8
  174. package/dist/renderer.cjs +4 -3
  175. package/dist/renderer.d.mts +1 -1
  176. package/dist/renderer.d.ts +1 -1
  177. package/dist/renderer.mjs +3 -2
  178. package/dist/{request.d-BwgX-7Wi.d.mts → request.d-CBEdJD5R.d.mts} +1 -1
  179. package/dist/{request.d-BaFROByP.d.ts → request.d-CrriEvxy.d.ts} +1 -1
  180. package/dist/request.d.mts +5 -5
  181. package/dist/request.d.ts +5 -5
  182. package/dist/{route-rendering.d-D4kUuncg.d.ts → route-rendering.d-C-ivf31T.d.ts} +1 -1
  183. package/dist/{route-rendering.d-BzeFPYGc.d.mts → route-rendering.d-DgXpNk_c.d.mts} +1 -1
  184. package/dist/{router.d-B9qJdgjt.d.ts → router.d-BRRPd5dE.d.ts} +1 -1
  185. package/dist/{router.d-D-p8WElf.d.mts → router.d-O5LrW9mZ.d.mts} +1 -1
  186. package/dist/{routes.d-D7RWvfqL.d.ts → routes.d-CYe98R_8.d.ts} +1 -1
  187. package/dist/{routes.d-BWvpUoYu.d.mts → routes.d-DBGnKaUQ.d.mts} +1 -1
  188. package/dist/routes.d.mts +4 -4
  189. package/dist/routes.d.ts +4 -4
  190. package/dist/{rsc-pipeline-YHVEHWTU.cjs → rsc-pipeline-2DNM7UDA.cjs} +8 -7
  191. package/dist/{rsc-pipeline-Y6D6KBES.mjs → rsc-pipeline-HYINQPMW.mjs} +7 -6
  192. package/dist/{runtime-62ZIEV6U.mjs → runtime-JP7L5KI7.mjs} +11 -8
  193. package/dist/{runtime-LKEMFXHW.cjs → runtime-M6GLD4CR.cjs} +15 -12
  194. package/dist/{runtime.d-BUtDIrRJ.d.mts → runtime.d-DP8Sk9PM.d.mts} +1 -1
  195. package/dist/{runtime.d-Du64AX3R.d.ts → runtime.d-DW_1avVi.d.ts} +1 -1
  196. package/dist/{cli-runtime.d-Bvfxt4uo.d.ts → schema-dependencies.d-C__RyTvW.d.ts} +21 -13
  197. package/dist/{cli-runtime.d-BGaFPum1.d.mts → schema-dependencies.d-Cedd7QUf.d.mts} +21 -13
  198. package/dist/{schema.d-BM-uVGpx.d.mts → schema.d-HlGSe1on.d.mts} +1 -1
  199. package/dist/{schema.d-BM-uVGpx.d.ts → schema.d-HlGSe1on.d.ts} +1 -1
  200. package/dist/schema.d.mts +1 -1
  201. package/dist/schema.d.ts +1 -1
  202. package/dist/{server-components-status.d-CvFhb6-t.d.ts → server-components-status.d-CdsEQbeM.d.ts} +3 -3
  203. package/dist/{server-components-status.d-B0YP-m9A.d.mts → server-components-status.d-DN98yOT4.d.mts} +3 -3
  204. package/dist/server-plugins.d.mts +6 -6
  205. package/dist/server-plugins.d.ts +6 -6
  206. package/dist/server.cjs +56 -53
  207. package/dist/server.d.mts +15 -15
  208. package/dist/server.d.ts +15 -15
  209. package/dist/server.mjs +23 -20
  210. package/dist/{spa-router.d-D4ye2WFk.d.ts → spa-router.d-BJWZAdrV.d.ts} +2 -2
  211. package/dist/{spa-router.d-CkR14oGH.d.mts → spa-router.d-FcDbBCrK.d.mts} +2 -2
  212. package/dist/{ssg.d-DFs97VTY.d.mts → ssg.d--uut8Gya.d.mts} +3 -3
  213. package/dist/{ssg.d-BCJB_f7B.d.ts → ssg.d-Cf9mC1rZ.d.ts} +3 -3
  214. package/dist/storage.d.mts +2 -2
  215. package/dist/storage.d.ts +2 -2
  216. package/dist/{store-core.d-Vk5UDKeC.d.mts → store-core.d-DgYlAo-e.d.mts} +2 -2
  217. package/dist/{store-core.d-0W2YScl8.d.ts → store-core.d-h7o6V2kH.d.ts} +2 -2
  218. package/dist/testing.cjs +2 -2
  219. package/dist/testing.d.mts +4 -4
  220. package/dist/testing.d.ts +4 -4
  221. package/dist/testing.mjs +2 -2
  222. package/dist/{types.d-C5hlNbHa.d.mts → types.d-CRiwa0jj.d.mts} +1 -1
  223. package/dist/{types.d-C5hlNbHa.d.ts → types.d-CRiwa0jj.d.ts} +1 -1
  224. package/dist/{utils.d-Ba3N28fk.d.ts → utils.d-2lGEnyBc.d.ts} +1 -1
  225. package/dist/{utils.d-Cloiko8d.d.mts → utils.d-DjFApBfE.d.mts} +1 -1
  226. package/dist/version.cjs +2 -2
  227. package/dist/version.mjs +1 -1
  228. package/dist/vite.cjs +18 -17
  229. package/dist/vite.d.mts +9 -9
  230. package/dist/vite.d.ts +9 -9
  231. package/dist/vite.mjs +17 -16
  232. package/package.json +1 -1
  233. package/dist/analyzer-3AMJK27J.cjs +0 -17
  234. package/dist/chunk-GTHBWZUK.mjs +0 -17
  235. package/dist/layers-GP57TBE2.cjs +0 -21
@@ -9,13 +9,13 @@ var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkKM7ZRKCHcjs = require('./chunk-KM7ZRKCH.cjs');
12
+ var _chunkGL4SPJTEcjs = require('./chunk-GL4SPJTE.cjs');
13
13
 
14
14
 
15
- var _chunkDVXT7RLVcjs = require('./chunk-DVXT7RLV.cjs');
15
+ var _chunkWXPY5FRFcjs = require('./chunk-WXPY5FRF.cjs');
16
16
 
17
17
 
18
- var _chunk2PSN2PUJcjs = require('./chunk-2PSN2PUJ.cjs');
18
+ var _chunkEWPH5IOCcjs = require('./chunk-EWPH5IOC.cjs');
19
19
 
20
20
 
21
21
 
@@ -59,7 +59,7 @@ var _chunkGYH2B4YQcjs = require('./chunk-GYH2B4YQ.cjs');
59
59
  var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
60
60
 
61
61
 
62
- var _chunkC4DZAEVTcjs = require('./chunk-C4DZAEVT.cjs');
62
+ var _chunkMR64FNW6cjs = require('./chunk-MR64FNW6.cjs');
63
63
 
64
64
 
65
65
 
@@ -108,7 +108,7 @@ var _chunkYLEL4ZRQcjs = require('./chunk-YLEL4ZRQ.cjs');
108
108
 
109
109
 
110
110
 
111
- var _chunkPSALMEHJcjs = require('./chunk-PSALMEHJ.cjs');
111
+ var _chunkD2OU4CX2cjs = require('./chunk-D2OU4CX2.cjs');
112
112
 
113
113
 
114
114
 
@@ -154,7 +154,7 @@ var _chunkIEZFFXSCcjs = require('./chunk-IEZFFXSC.cjs');
154
154
 
155
155
 
156
156
 
157
- var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
157
+ var _chunkPFVNPOKNcjs = require('./chunk-PFVNPOKN.cjs');
158
158
 
159
159
 
160
160
 
@@ -168,8 +168,11 @@ var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
168
168
 
169
169
 
170
170
 
171
+ var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
171
172
 
172
- var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
173
+
174
+
175
+ var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
173
176
 
174
177
 
175
178
  var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
@@ -309,7 +312,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
309
312
  var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
310
313
 
311
314
 
312
- var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
315
+ var _chunkJZAGIXMBcjs = require('./chunk-JZAGIXMB.cjs');
313
316
 
314
317
 
315
318
  var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
@@ -511,7 +514,7 @@ var RouteManager = class _RouteManager {
511
514
  this.redirects = /* @__PURE__ */ new Map();
512
515
  this.programmaticPages = /* @__PURE__ */ new Map();
513
516
  this.programmaticLayouts = /* @__PURE__ */ new Map();
514
- this.programmaticClientRoutes = _chunkPSALMEHJcjs.mergeProgrammaticClientRoutes.call(void 0, []);
517
+ this.programmaticClientRoutes = _chunkD2OU4CX2cjs.mergeProgrammaticClientRoutes.call(void 0, []);
515
518
  // The hydration settings each route rule returned, by file.
516
519
  this.rendererRouteHydration = /* @__PURE__ */ new Map();
517
520
  this.disposeRendererHydration = () => {
@@ -605,8 +608,8 @@ var RouteManager = class _RouteManager {
605
608
  });
606
609
  }
607
610
  }
608
- this.disposeRendererHydration = _chunkPSALMEHJcjs.setFarmRendererHydrationScope.call(void 0,
609
- _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, this.config).map((source) => source.root),
611
+ this.disposeRendererHydration = _chunkD2OU4CX2cjs.setFarmRendererHydrationScope.call(void 0,
612
+ _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, this.config).map((source) => source.root),
610
613
  renderer,
611
614
  routeModules
612
615
  );
@@ -637,11 +640,11 @@ var RouteManager = class _RouteManager {
637
640
  /** Fill this manager's empty route tables. Only a fresh manager made by discoverRoutes runs it. */
638
641
  async discoverInto() {
639
642
  const programmaticClientRoutes = [];
640
- for (const source of _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, this.config)) {
643
+ for (const source of _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, this.config)) {
641
644
  await this.discoverFileRoutes(source);
642
645
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
643
646
  }
644
- this.programmaticClientRoutes = _chunkPSALMEHJcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
647
+ this.programmaticClientRoutes = _chunkD2OU4CX2cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
645
648
  for (const slot of this.routeSlots.values()) {
646
649
  if (slot.interception && !this.pageRouteShapes.has(_chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
647
650
  throw new (0, _chunkT4YCWRCJcjs.AmbiguousRouteError)(
@@ -936,7 +939,7 @@ var RouteManager = class _RouteManager {
936
939
  const cacheFile = this.packageClientBoundaryCacheFile;
937
940
  const compute = () => {
938
941
  try {
939
- return _chunkPSALMEHJcjs.withFarmSourceSnapshot.call(void 0,
942
+ return _chunkD2OU4CX2cjs.withFarmSourceSnapshot.call(void 0,
940
943
  () => this.computeClientManifest(normalizedProjectRoot),
941
944
  this.sourceSnapshot
942
945
  );
@@ -945,7 +948,7 @@ var RouteManager = class _RouteManager {
945
948
  throw error;
946
949
  }
947
950
  };
948
- return cacheFile ? _chunkPSALMEHJcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
951
+ return cacheFile ? _chunkD2OU4CX2cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
949
952
  }
950
953
  /**
951
954
  * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
@@ -954,7 +957,7 @@ var RouteManager = class _RouteManager {
954
957
  */
955
958
  trackSourceChanges() {
956
959
  this.sourceChangeTracking = true;
957
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkPSALMEHJcjs.FarmSourceSnapshotStore)())));
960
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkD2OU4CX2cjs.FarmSourceSnapshotStore)())));
958
961
  }
959
962
  /**
960
963
  * @internal A production build edits no source while it runs, so what the plan reads, parses and
@@ -963,7 +966,7 @@ var RouteManager = class _RouteManager {
963
966
  */
964
967
  keepBuildSourceSnapshot() {
965
968
  if (this.sourceChangeTracking) return;
966
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkPSALMEHJcjs.FarmSourceSnapshotStore)(false))));
969
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkD2OU4CX2cjs.FarmSourceSnapshotStore)(false))));
967
970
  }
968
971
  /**
969
972
  * @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
@@ -1023,9 +1026,9 @@ var RouteManager = class _RouteManager {
1023
1026
  */
1024
1027
  isPlanNeutralEdit(file, previous) {
1025
1028
  if (previous === void 0) return false;
1026
- return _chunkPSALMEHJcjs.withFarmSourceSnapshotAside.call(void 0,
1029
+ return _chunkD2OU4CX2cjs.withFarmSourceSnapshotAside.call(void 0,
1027
1030
  this.sourceSnapshot,
1028
- () => _chunkPSALMEHJcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous) || !file.includes(NODE_MODULES_SEGMENT) && !this.linkedSources.has(file) && _chunkPSALMEHJcjs.isFarmServerModulePlanUnchanged.call(void 0, file, previous)
1031
+ () => _chunkD2OU4CX2cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous) || !file.includes(NODE_MODULES_SEGMENT) && !this.linkedSources.has(file) && _chunkD2OU4CX2cjs.isFarmServerModulePlanUnchanged.call(void 0, file, previous)
1029
1032
  );
1030
1033
  }
1031
1034
  /**
@@ -1037,7 +1040,7 @@ var RouteManager = class _RouteManager {
1037
1040
  if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
1038
1041
  return { ...previous.plan };
1039
1042
  }
1040
- const { result, files, groups } = _chunkPSALMEHJcjs.traceFarmSourceReadGroups.call(void 0, compute);
1043
+ const { result, files, groups } = _chunkD2OU4CX2cjs.traceFarmSourceReadGroups.call(void 0, compute);
1041
1044
  const sources = /* @__PURE__ */ new Set();
1042
1045
  for (const file of files) {
1043
1046
  const source = this.planSourcePath(file);
@@ -1048,7 +1051,7 @@ var RouteManager = class _RouteManager {
1048
1051
  }
1049
1052
  if (!this.sourceChangeTracking) {
1050
1053
  for (const source of sources) {
1051
- if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkPSALMEHJcjs.getFarmSourceStamp.call(void 0, source));
1054
+ if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkD2OU4CX2cjs.getFarmSourceStamp.call(void 0, source));
1052
1055
  }
1053
1056
  }
1054
1057
  this.ownerPlans.set(key, { plan: result, files: sources, planKey });
@@ -1068,7 +1071,7 @@ var RouteManager = class _RouteManager {
1068
1071
  const isUnchanged = (file) => {
1069
1072
  let result = unchanged.get(file);
1070
1073
  if (result === void 0) {
1071
- result = this.planStamps.get(file) === _chunkPSALMEHJcjs.getFarmSourceStamp.call(void 0, file);
1074
+ result = this.planStamps.get(file) === _chunkD2OU4CX2cjs.getFarmSourceStamp.call(void 0, file);
1072
1075
  unchanged.set(file, result);
1073
1076
  }
1074
1077
  return result;
@@ -1106,7 +1109,7 @@ var RouteManager = class _RouteManager {
1106
1109
  source = file;
1107
1110
  const index = file.lastIndexOf(NODE_MODULES_SEGMENT);
1108
1111
  if (index !== -1) {
1109
- const directory = _chunkPSALMEHJcjs.getInstalledPackageDirectory.call(void 0, file, index + NODE_MODULES_SEGMENT.length);
1112
+ const directory = _chunkD2OU4CX2cjs.getInstalledPackageDirectory.call(void 0, file, index + NODE_MODULES_SEGMENT.length);
1110
1113
  let linked = this.linkedPackages.get(directory);
1111
1114
  if (linked === void 0) {
1112
1115
  linked = realPathOutsideNodeModules(directory) !== null;
@@ -1132,7 +1135,7 @@ var RouteManager = class _RouteManager {
1132
1135
  */
1133
1136
  inspectPackages(operation) {
1134
1137
  const file = this.packageClientBoundaryCacheFile;
1135
- return file ? _chunkPSALMEHJcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1138
+ return file ? _chunkD2OU4CX2cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
1136
1139
  }
1137
1140
  computeClientManifest(normalizedProjectRoot) {
1138
1141
  const toUrlPath = (absolutePath) => {
@@ -1150,24 +1153,24 @@ var RouteManager = class _RouteManager {
1150
1153
  const unsupportedIntegrationProvider = integrationProviders.find(
1151
1154
  (provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider)
1152
1155
  );
1153
- if (_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]) === "enabled" && _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
1156
+ if (_optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]) === "enabled" && _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, this.config)) !== "rsc" && unsupportedIntegrationProvider) {
1154
1157
  _chunk7ZDLE77Pcjs.logger.warn(
1155
1158
  `[Farm.js] Client components hydrate with their route, not as islands, because integration provider "${unsupportedIntegrationProvider.name}" doesn't declare \`islands: true\`.`
1156
1159
  );
1157
1160
  }
1158
- const isolatedMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1159
- _optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.isolatedClientHydration]),
1161
+ const isolatedMode = _chunkD2OU4CX2cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
1162
+ _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.isolatedClientHydration]),
1160
1163
  {
1161
- serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _30 => _30.config, 'access', _31 => _31.experimental, 'optionalAccess', _32 => _32.serverComponents])) === "rsc",
1164
+ serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, this.config)) === "rsc",
1162
1165
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
1163
1166
  }
1164
1167
  );
1165
- const planOptions = _chunkPSALMEHJcjs.getFarmClientHydrationPlanOptions.call(void 0,
1168
+ const planOptions = _chunkD2OU4CX2cjs.getFarmClientHydrationPlanOptions.call(void 0,
1166
1169
  this.config.renderer,
1167
1170
  Boolean(unsupportedIntegrationProvider)
1168
1171
  );
1169
- const islandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _33 => _33.config, 'access', _34 => _34.experimental, 'optionalAccess', _35 => _35.serverComponents])) === "islands";
1170
- const changed = _optionalChain([this, 'access', _36 => _36.sourceSnapshot, 'optionalAccess', _37 => _37.refresh, 'call', _38 => _38(_nullishCoalesce(this.editedSources, () => ( [])))]);
1172
+ const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, this.config)) === "islands";
1173
+ const changed = _optionalChain([this, 'access', _27 => _27.sourceSnapshot, 'optionalAccess', _28 => _28.refresh, 'call', _29 => _29(_nullishCoalesce(this.editedSources, () => ( [])))]);
1171
1174
  let edited = null;
1172
1175
  if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
1173
1176
  edited = /* @__PURE__ */ new Set();
@@ -1187,13 +1190,13 @@ var RouteManager = class _RouteManager {
1187
1190
  metadata: this.planRouteModule(
1188
1191
  `layout:${entry.modulePath}`,
1189
1192
  edited,
1190
- () => _chunkPSALMEHJcjs.getClientModuleHydrationPlan.call(void 0,
1193
+ () => _chunkD2OU4CX2cjs.getClientModuleHydrationPlan.call(void 0,
1191
1194
  entry.modulePath,
1192
1195
  normalizedProjectRoot,
1193
1196
  isolatedMode,
1194
1197
  layoutPlanOptions
1195
1198
  ),
1196
- _chunkPSALMEHJcjs.getClientModuleHydrationPlanKey.call(void 0,
1199
+ _chunkD2OU4CX2cjs.getClientModuleHydrationPlanKey.call(void 0,
1197
1200
  entry.modulePath,
1198
1201
  normalizedProjectRoot,
1199
1202
  isolatedMode,
@@ -1201,7 +1204,7 @@ var RouteManager = class _RouteManager {
1201
1204
  )
1202
1205
  )
1203
1206
  }));
1204
- const markdownComponentsPlan = _chunkPSALMEHJcjs.createMarkdownPageHydrationPlanner.call(void 0,
1207
+ const markdownComponentsPlan = _chunkD2OU4CX2cjs.createMarkdownPageHydrationPlanner.call(void 0,
1205
1208
  _chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
1206
1209
  normalizedProjectRoot,
1207
1210
  isolatedMode,
@@ -1217,13 +1220,13 @@ var RouteManager = class _RouteManager {
1217
1220
  metadata: _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1218
1221
  `page:${entry.modulePath}`,
1219
1222
  edited,
1220
- () => _chunkPSALMEHJcjs.getClientModuleHydrationPlan.call(void 0,
1223
+ () => _chunkD2OU4CX2cjs.getClientModuleHydrationPlan.call(void 0,
1221
1224
  entry.modulePath,
1222
1225
  normalizedProjectRoot,
1223
1226
  isolatedMode,
1224
1227
  pagePlanOptions
1225
1228
  ),
1226
- _chunkPSALMEHJcjs.getClientModuleHydrationPlanKey.call(void 0,
1229
+ _chunkD2OU4CX2cjs.getClientModuleHydrationPlanKey.call(void 0,
1227
1230
  entry.modulePath,
1228
1231
  normalizedProjectRoot,
1229
1232
  isolatedMode,
@@ -1239,9 +1242,9 @@ var RouteManager = class _RouteManager {
1239
1242
  `[Farm.js] client components in Markdown pages stay static: ${markdownFallback.metadata.fallbackReason}.`
1240
1243
  );
1241
1244
  }
1242
- const markdownStaticPackages = _optionalChain([routeEntries, 'access', _39 => _39.find, 'call', _40 => _40(
1245
+ const markdownStaticPackages = _optionalChain([routeEntries, 'access', _30 => _30.find, 'call', _31 => _31(
1243
1246
  ({ entry, metadata }) => _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
1244
- ), 'optionalAccess', _41 => _41.metadata, 'access', _42 => _42.staticPackageBoundaries]);
1247
+ ), 'optionalAccess', _32 => _32.metadata, 'access', _33 => _33.staticPackageBoundaries]);
1245
1248
  if (markdownStaticPackages) {
1246
1249
  _chunk7ZDLE77Pcjs.logger.info(
1247
1250
  `[Farm.js] Markdown pages render client components from ${markdownStaticPackages.join(", ")} as static HTML: package client components cannot be isolated yet.`
@@ -1253,7 +1256,7 @@ var RouteManager = class _RouteManager {
1253
1256
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
1254
1257
  );
1255
1258
  }
1256
- _chunkPSALMEHJcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1259
+ _chunkD2OU4CX2cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1257
1260
  layoutEntries.map(({ entry, metadata }) => ({
1258
1261
  pattern: entry.pattern,
1259
1262
  depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
@@ -1300,7 +1303,7 @@ var RouteManager = class _RouteManager {
1300
1303
  modulePath: toUrlPath(boundary.modulePath)
1301
1304
  }))
1302
1305
  } : {},
1303
- ..._chunkPSALMEHJcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1306
+ ..._chunkD2OU4CX2cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1304
1307
  renderPlan: _chunkIGBQSUT5cjs.createFarmRouteRenderPlan.call(void 0, {
1305
1308
  pageShouldHydrate: metadata.shouldHydrate,
1306
1309
  layoutShouldHydrate,
@@ -1308,7 +1311,7 @@ var RouteManager = class _RouteManager {
1308
1311
  }),
1309
1312
  suppressedAsyncHydration: metadata.suppressedAsyncHydration,
1310
1313
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {},
1311
- search: _chunkPYPHM7AScjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _43 => _43.search])),
1314
+ search: _chunkPYPHM7AScjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _34 => _34.search])),
1312
1315
  segments: entry.route.segments.map((seg) => ({
1313
1316
  segment: seg.segment,
1314
1317
  isDynamic: seg.isDynamic,
@@ -1342,7 +1345,7 @@ var RouteManager = class _RouteManager {
1342
1345
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
1343
1346
  }));
1344
1347
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
1345
- const metadata = _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1348
+ const metadata = _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1346
1349
  return {
1347
1350
  name: entry.name,
1348
1351
  ownerPattern: entry.ownerPattern,
@@ -1358,7 +1361,7 @@ var RouteManager = class _RouteManager {
1358
1361
  };
1359
1362
  });
1360
1363
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
1361
- metadata: _chunkPSALMEHJcjs.getClientModuleHydrationPlan.call(void 0,
1364
+ metadata: _chunkD2OU4CX2cjs.getClientModuleHydrationPlan.call(void 0,
1362
1365
  entry.modulePath,
1363
1366
  normalizedProjectRoot,
1364
1367
  isolatedMode,
@@ -1423,7 +1426,7 @@ var RouteManager = class _RouteManager {
1423
1426
  getIsolatedClientBoundaryModules(projectRoot = this.config.root) {
1424
1427
  const normalizedProjectRoot = path4.default.resolve(projectRoot);
1425
1428
  this.generateClientManifest(normalizedProjectRoot);
1426
- return _nullishCoalesce(_optionalChain([this, 'access', _44 => _44.clientManifestCache, 'optionalAccess', _45 => _45.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1429
+ return _nullishCoalesce(_optionalChain([this, 'access', _35 => _35.clientManifestCache, 'optionalAccess', _36 => _36.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1427
1430
  }
1428
1431
  /**
1429
1432
  * @internal Islands-mode pages with a client component that cannot become an island. Hydrating
@@ -1431,7 +1434,7 @@ var RouteManager = class _RouteManager {
1431
1434
  */
1432
1435
  getIslandsErrors(projectRoot = this.config.root) {
1433
1436
  this.generateClientManifest(path4.default.resolve(projectRoot));
1434
- return _nullishCoalesce(_optionalChain([this, 'access', _46 => _46.clientManifestCache, 'optionalAccess', _47 => _47.islandsErrors]), () => ( []));
1437
+ return _nullishCoalesce(_optionalChain([this, 'access', _37 => _37.clientManifestCache, 'optionalAccess', _38 => _38.islandsErrors]), () => ( []));
1435
1438
  }
1436
1439
  /**
1437
1440
  * Invalidate build-time route metadata after a page or layout changes in dev.
@@ -1460,7 +1463,7 @@ var RouteManager = class _RouteManager {
1460
1463
  loadModule: viteServer ? (componentModulePath) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
1461
1464
  }),
1462
1465
  config: mdxConfig,
1463
- renderer: _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
1466
+ renderer: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime
1464
1467
  });
1465
1468
  }
1466
1469
  if (this.viteServer) {
@@ -1527,18 +1530,18 @@ var RouteManager = class _RouteManager {
1527
1530
  }
1528
1531
  async discoverFileRoutes(source) {
1529
1532
  const appDir = _chunk7ZDLE77Pcjs.resolveAppPath.call(void 0, source.root, source.srcDir, "app");
1530
- const componentExtensions = _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1533
+ const componentExtensions = _chunkLEZJZX4Ccjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer).map(
1531
1534
  (extension) => extension.slice(1)
1532
1535
  );
1533
1536
  const componentGlob = componentExtensions.join(",");
1534
- const rendererRoutes = await _chunkDVXT7RLVcjs.resolveFarmRendererRoutes.call(void 0, {
1537
+ const rendererRoutes = await _chunkWXPY5FRFcjs.resolveFarmRendererRoutes.call(void 0, {
1535
1538
  renderer: this.config.renderer,
1536
1539
  root: source.root,
1537
1540
  srcDir: source.srcDir
1538
1541
  });
1539
1542
  const routeModulePaths = /* @__PURE__ */ new Map();
1540
1543
  const modulePathOf = (file) => _nullishCoalesce(routeModulePaths.get(file), () => ( path4.default.join(appDir, file)));
1541
- const rendererFiles = (kind) => (_nullishCoalesce(_optionalChain([rendererRoutes, 'optionalAccess', _48 => _48.entries]), () => ( []))).filter((entry) => entry.kind === kind).map((entry) => {
1544
+ const rendererFiles = (kind) => (_nullishCoalesce(_optionalChain([rendererRoutes, 'optionalAccess', _39 => _39.entries]), () => ( []))).filter((entry) => entry.kind === kind).map((entry) => {
1542
1545
  routeModulePaths.set(entry.routeFile, entry.modulePath);
1543
1546
  if (entry.hydration.hydrate !== void 0 || entry.hydration.strategy !== void 0) {
1544
1547
  this.rendererRouteHydration.set(entry.modulePath, entry.hydration);
@@ -1552,7 +1555,7 @@ var RouteManager = class _RouteManager {
1552
1555
  }
1553
1556
  const notFound = rendererRoutes.entries.find((entry) => entry.kind === "not-found");
1554
1557
  if (notFound || this.rendererNotFoundPath === void 0) {
1555
- this.rendererNotFoundPath = _nullishCoalesce(_optionalChain([notFound, 'optionalAccess', _49 => _49.modulePath]), () => ( null));
1558
+ this.rendererNotFoundPath = _nullishCoalesce(_optionalChain([notFound, 'optionalAccess', _40 => _40.modulePath]), () => ( null));
1556
1559
  }
1557
1560
  }
1558
1561
  const pageFiles = rendererRoutes ? [
@@ -1604,7 +1607,7 @@ var RouteManager = class _RouteManager {
1604
1607
  if (!primaryFile) continue;
1605
1608
  const modulePath = modulePathOf(primaryFile);
1606
1609
  const existing = this.routes.get(pattern);
1607
- if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
1610
+ if (_optionalChain([existing, 'optionalAccess', _41 => _41.sourceRoot]) === source.root) {
1608
1611
  throw new Error(
1609
1612
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1610
1613
  );
@@ -1631,7 +1634,7 @@ var RouteManager = class _RouteManager {
1631
1634
  const modulePath = modulePathOf(file);
1632
1635
  const pattern = _chunkIGBQSUT5cjs.createRouteDirectoryPattern.call(void 0, route);
1633
1636
  const existing = target.get(pattern);
1634
- if (_optionalChain([existing, 'optionalAccess', _51 => _51.sourceRoot]) === source.root) {
1637
+ if (_optionalChain([existing, 'optionalAccess', _42 => _42.sourceRoot]) === source.root) {
1635
1638
  throw new Error(
1636
1639
  `Duplicate ${kind} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1637
1640
  );
@@ -1654,7 +1657,7 @@ var RouteManager = class _RouteManager {
1654
1657
  const ownerDirectory = _chunkIGBQSUT5cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1655
1658
  const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
1656
1659
  const existing = this.routeSlots.get(key);
1657
- if (_optionalChain([existing, 'optionalAccess', _52 => _52.sourceRoot]) === source.root) {
1660
+ if (_optionalChain([existing, 'optionalAccess', _43 => _43.sourceRoot]) === source.root) {
1658
1661
  throw new Error(
1659
1662
  `Duplicate route slot "${slot.name}" for "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1660
1663
  );
@@ -1683,7 +1686,7 @@ var RouteManager = class _RouteManager {
1683
1686
  const key = `${kind}:${pattern}`;
1684
1687
  const existing = this.metadataImages.get(key);
1685
1688
  const sourceType = isStaticMetadataImageFile(file) ? "static" : "module";
1686
- if (_optionalChain([existing, 'optionalAccess', _53 => _53.sourceRoot]) === source.root) {
1689
+ if (_optionalChain([existing, 'optionalAccess', _44 => _44.sourceRoot]) === source.root) {
1687
1690
  throw new Error(
1688
1691
  `Duplicate ${fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one static image or module per route segment.`
1689
1692
  );
@@ -1711,7 +1714,7 @@ var RouteManager = class _RouteManager {
1711
1714
  const pattern = this.createRoutePattern(route);
1712
1715
  const key = `${descriptor.kind}:${pattern}`;
1713
1716
  const existing = this.metadataRoutes.get(key);
1714
- if (_optionalChain([existing, 'optionalAccess', _54 => _54.sourceRoot]) === source.root) {
1717
+ if (_optionalChain([existing, 'optionalAccess', _45 => _45.sourceRoot]) === source.root) {
1715
1718
  throw new Error(
1716
1719
  `Duplicate ${descriptor.fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one .ts or .js metadata route per segment.`
1717
1720
  );
@@ -1733,11 +1736,11 @@ var RouteManager = class _RouteManager {
1733
1736
  srcDir: source.srcDir,
1734
1737
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1735
1738
  });
1736
- const graph = this.viteServer ? _chunkPSALMEHJcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1739
+ const graph = this.viteServer ? _chunkD2OU4CX2cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1737
1740
  for (const { filePath, manifest } of manifests) {
1738
1741
  if (graph) {
1739
1742
  clientRoutes.push(
1740
- _chunkPSALMEHJcjs.resolveProgrammaticClientRoutes.call(void 0, {
1743
+ _chunkD2OU4CX2cjs.resolveProgrammaticClientRoutes.call(void 0, {
1741
1744
  graph,
1742
1745
  routesFile: toRealPath(filePath),
1743
1746
  routes: manifest.routes,
@@ -1750,7 +1753,7 @@ var RouteManager = class _RouteManager {
1750
1753
  const route = _chunkPYPHM7AScjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
1751
1754
  const pattern = this.createRoutePattern(route);
1752
1755
  const existing = this.routes.get(pattern);
1753
- if (_optionalChain([existing, 'optionalAccess', _55 => _55.sourceRoot]) === source.root) {
1756
+ if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
1754
1757
  throw new Error(
1755
1758
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1756
1759
  );
@@ -1770,7 +1773,7 @@ var RouteManager = class _RouteManager {
1770
1773
  const route = _chunkPYPHM7AScjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
1771
1774
  const pattern = _chunkIGBQSUT5cjs.createRouteDirectoryPattern.call(void 0, route);
1772
1775
  const existing = this.layouts.get(pattern);
1773
- if (_optionalChain([existing, 'optionalAccess', _56 => _56.sourceRoot]) === source.root) {
1776
+ if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
1774
1777
  throw new Error(
1775
1778
  `Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1776
1779
  );
@@ -1799,7 +1802,7 @@ var RouteManager = class _RouteManager {
1799
1802
  }
1800
1803
  async loadProgrammaticRoutesModule(filePath) {
1801
1804
  if (this.viteServer) {
1802
- const viteRoot = _optionalChain([this, 'access', _57 => _57.viteServer, 'access', _58 => _58.config, 'optionalAccess', _59 => _59.root]) || this.config.root || process.cwd();
1805
+ const viteRoot = _optionalChain([this, 'access', _48 => _48.viteServer, 'access', _49 => _49.config, 'optionalAccess', _50 => _50.root]) || this.config.root || process.cwd();
1803
1806
  return await _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, this.viteServer, _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, filePath, viteRoot));
1804
1807
  }
1805
1808
  return await import(
@@ -1902,7 +1905,7 @@ var RouteManager = class _RouteManager {
1902
1905
  if (!_chunkIGBQSUT5cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1903
1906
  }
1904
1907
  const depth = boundaryEntry.route.segments.length;
1905
- const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _60 => _60.route, 'access', _61 => _61.segments, 'access', _62 => _62.length]), () => ( -1));
1908
+ const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _51 => _51.route, 'access', _52 => _52.segments, 'access', _53 => _53.length]), () => ( -1));
1906
1909
  if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1907
1910
  bestMatch = boundaryEntry;
1908
1911
  }
@@ -1951,7 +1954,7 @@ var RouteManager = class _RouteManager {
1951
1954
  }));
1952
1955
  const i18n = this.getI18nConfig();
1953
1956
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1954
- const result = await _chunkKM7ZRKCHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1957
+ const result = await _chunkGL4SPJTEcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1955
1958
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1956
1959
  ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1957
1960
  });
@@ -1998,7 +2001,7 @@ var RouteManager = class _RouteManager {
1998
2001
  async isRouteSSG(modulePath) {
1999
2002
  try {
2000
2003
  const mod = await this.loadRouteModule(modulePath);
2001
- const rendering = await _chunkKM7ZRKCHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2004
+ const rendering = await _chunkGL4SPJTEcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2002
2005
  return rendering.ssg;
2003
2006
  } catch (e2) {
2004
2007
  return false;
@@ -2010,7 +2013,7 @@ var RouteManager = class _RouteManager {
2010
2013
  async hasRouteISR(modulePath) {
2011
2014
  try {
2012
2015
  const mod = await this.loadRouteModule(modulePath);
2013
- const rendering = await _chunkKM7ZRKCHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2016
+ const rendering = await _chunkGL4SPJTEcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2014
2017
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
2015
2018
  } catch (e3) {
2016
2019
  return false;
@@ -2022,7 +2025,7 @@ var RouteManager = class _RouteManager {
2022
2025
  async getRouteRevalidateInterval(modulePath) {
2023
2026
  try {
2024
2027
  const mod = await this.loadRouteModule(modulePath);
2025
- const rendering = await _chunkKM7ZRKCHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2028
+ const rendering = await _chunkGL4SPJTEcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
2026
2029
  return rendering.revalidate;
2027
2030
  } catch (e4) {
2028
2031
  return void 0;
@@ -2238,7 +2241,7 @@ function farmFontImportsPlugin(options = {}) {
2238
2241
  return;
2239
2242
  }
2240
2243
  const resource = registry.getDevResource(pathname);
2241
- if (!_optionalChain([resource, 'optionalAccess', _63 => _63.bytes])) {
2244
+ if (!_optionalChain([resource, 'optionalAccess', _54 => _54.bytes])) {
2242
2245
  next();
2243
2246
  return;
2244
2247
  }
@@ -2278,10 +2281,10 @@ function farmFontImportsPlugin(options = {}) {
2278
2281
  register: (moduleId, calls) => registry.register(moduleId, calls, production)
2279
2282
  });
2280
2283
  if (!result) registry.clearModule(id.split("?", 1)[0]);
2281
- const server = this.environment ? this.environment.config.consumer === "server" : _optionalChain([transformOptions, 'optionalAccess', _64 => _64.ssr]) === true;
2284
+ const server = this.environment ? this.environment.config.consumer === "server" : _optionalChain([transformOptions, 'optionalAccess', _55 => _55.ssr]) === true;
2282
2285
  const cleanId = id.split("?", 1)[0];
2283
- if (server && MODULE_EXTENSION_RE.test(cleanId) && _optionalChain([options, 'access', _65 => _65.isLayoutModule, 'optionalCall', _66 => _66(cleanId)])) {
2284
- const source = _nullishCoalesce(_optionalChain([result, 'optionalAccess', _67 => _67.code]), () => ( code));
2286
+ if (server && MODULE_EXTENSION_RE.test(cleanId) && _optionalChain([options, 'access', _56 => _56.isLayoutModule, 'optionalCall', _57 => _57(cleanId)])) {
2287
+ const source = _nullishCoalesce(_optionalChain([result, 'optionalAccess', _58 => _58.code]), () => ( code));
2285
2288
  const inferred = addInferredLayoutFonts(source, this.parse(source));
2286
2289
  if (inferred) return { code: inferred, map: null };
2287
2290
  }
@@ -2831,7 +2834,7 @@ function readFontOptions(code, id, call) {
2831
2834
  const declaration = call.ancestors.at(-2);
2832
2835
  const statement = call.ancestors.at(-3);
2833
2836
  const statementParent = call.ancestors.at(-4);
2834
- const isModuleScope = _optionalChain([declaration, 'optionalAccess', _68 => _68.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _69 => _69.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _70 => _70.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _71 => _71.type]) === "Program");
2837
+ const isModuleScope = _optionalChain([declaration, 'optionalAccess', _59 => _59.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _60 => _60.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _61 => _61.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _62 => _62.type]) === "Program");
2835
2838
  if (!isModuleScope || call.ancestors.some((ancestor) => isFunctionNode(ancestor))) {
2836
2839
  throw fontError(id, `${call.kind}() must be declared directly at module scope`);
2837
2840
  }
@@ -3400,17 +3403,17 @@ function resolveProviderModule(moduleId, root) {
3400
3403
  // src/server-actions-mode.ts
3401
3404
  _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
3402
3405
  function resolveFarmIslxActionsMode(config) {
3403
- if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _72 => _72.experimental, 'optionalAccess', _73 => _73.serverComponents])) === "islands") {
3406
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands") {
3404
3407
  return "islands";
3405
3408
  }
3406
- if (_optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverActions]) !== true) return null;
3409
+ if (_optionalChain([config, 'access', _63 => _63.experimental, 'optionalAccess', _64 => _64.serverActions]) !== true) return null;
3407
3410
  const renderer = config.renderer;
3408
3411
  if (renderer === void 0 || renderer === false) return null;
3409
- if (_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, renderer) || _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer)) return null;
3412
+ if (_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, renderer) || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer)) return null;
3410
3413
  return "renderer";
3411
3414
  }
3412
3415
  function farmBrowserServerFnsEnabled(config) {
3413
- return _optionalChain([config, 'access', _76 => _76.experimental, 'optionalAccess', _77 => _77.serverActions]) === true && resolveFarmIslxActionsMode(config) !== null;
3416
+ return _optionalChain([config, 'access', _65 => _65.experimental, 'optionalAccess', _66 => _66.serverActions]) === true && resolveFarmIslxActionsMode(config) !== null;
3414
3417
  }
3415
3418
 
3416
3419
  // src/island-inference.ts
@@ -3454,7 +3457,7 @@ function inferFarmIslandStrategy(filePath, root) {
3454
3457
  const result = _compiler.inferStrategy.call(void 0, file, code, {
3455
3458
  parse: parseFarmIslandSource,
3456
3459
  resolve: (specifier, importer) => {
3457
- const resolved = _chunkPSALMEHJcjs.resolveImportedModule.call(void 0, importer, specifier, root);
3460
+ const resolved = _chunkD2OU4CX2cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3458
3461
  return resolved.local ? resolved.path : null;
3459
3462
  }
3460
3463
  });
@@ -3490,7 +3493,7 @@ function inferFarmRouteRootStrategy(owners, root) {
3490
3493
  if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3491
3494
  return cached.result;
3492
3495
  }
3493
- const { result, files } = _chunkPSALMEHJcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3496
+ const { result, files } = _chunkD2OU4CX2cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3494
3497
  const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3495
3498
  routeRootInferences.set(key, {
3496
3499
  stamps: [...read].map((file) => [file, modifiedAt(file)]),
@@ -3507,7 +3510,7 @@ function inferRouteRoot(owners, root) {
3507
3510
  const files = [];
3508
3511
  const modules = [];
3509
3512
  for (const owner of owners) {
3510
- const rendered = _chunkPSALMEHJcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3513
+ const rendered = _chunkD2OU4CX2cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3511
3514
  if (!rendered) {
3512
3515
  return {
3513
3516
  strategy: null,
@@ -3523,7 +3526,7 @@ function inferRouteRoot(owners, root) {
3523
3526
  source = fs2.default.readFileSync(module, "utf8");
3524
3527
  } catch (e12) {
3525
3528
  }
3526
- if (_chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3529
+ if (_chunkD2OU4CX2cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3527
3530
  }
3528
3531
  for (const module of modules) {
3529
3532
  const result = inferFarmIslandStrategy(module, root);
@@ -3569,8 +3572,8 @@ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
3569
3572
 
3570
3573
 
3571
3574
  function resolveFarmNotFoundComponentPath(config, appDirs, discovered) {
3572
- const extensions = _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3573
- const configuredPath = _optionalChain([config, 'access', _78 => _78.notFound, 'optionalAccess', _79 => _79.component, 'optionalAccess', _80 => _80.trim, 'call', _81 => _81()]);
3575
+ const extensions = _chunkLEZJZX4Ccjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3576
+ const configuredPath = _optionalChain([config, 'access', _67 => _67.notFound, 'optionalAccess', _68 => _68.component, 'optionalAccess', _69 => _69.trim, 'call', _70 => _70()]);
3574
3577
  if (configuredPath) {
3575
3578
  const componentPath = path4.default.isAbsolute(configuredPath) ? path4.default.normalize(configuredPath) : path4.default.resolve(config.root, configuredPath);
3576
3579
  if (!extensions.some((extension) => componentPath.endsWith(extension))) {
@@ -3872,7 +3875,7 @@ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
3872
3875
  function canBootFarmIslandsClient(config) {
3873
3876
  const docs = config.docs;
3874
3877
  const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
3875
- return _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) === "islands" && !docsEnabled && _chunkADCVSTFVcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkADCVSTFVcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3878
+ return _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands" && !docsEnabled && _chunkADCVSTFVcjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkADCVSTFVcjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3876
3879
  }
3877
3880
 
3878
3881
  // src/islands-kept-layouts.ts
@@ -3921,7 +3924,7 @@ var DECLARATION_STATEMENTS = /* @__PURE__ */ new Set([
3921
3924
  function parse(code, file) {
3922
3925
  const extension = path4.default.extname(file).slice(1);
3923
3926
  const lang = extension === "ts" || extension === "mts" || extension === "cts" ? "ts" : extension === "js" || extension === "mjs" || extension === "cjs" || extension === "jsx" ? "jsx" : "tsx";
3924
- return _chunkPSALMEHJcjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3927
+ return _chunkD2OU4CX2cjs.memoizeInFarmSourceSnapshot.call(void 0, `ast:${lang}`, code, () => {
3925
3928
  try {
3926
3929
  return _parseAst.parseAst.call(void 0, code, { lang });
3927
3930
  } catch (e15) {
@@ -4011,11 +4014,11 @@ function findFarmRequestDecidingConstruct(code, file) {
4011
4014
  reason = "import.meta";
4012
4015
  return;
4013
4016
  case "CallExpression":
4014
- if (_optionalChain([current, 'access', _84 => _84.callee, 'optionalAccess', _85 => _85.type]) === "Identifier" && current.callee.name === "use") {
4017
+ if (_optionalChain([current, 'access', _71 => _71.callee, 'optionalAccess', _72 => _72.type]) === "Identifier" && current.callee.name === "use") {
4015
4018
  reason = "a use() call";
4016
4019
  return;
4017
4020
  }
4018
- if (_optionalChain([current, 'access', _86 => _86.callee, 'optionalAccess', _87 => _87.type]) === "MemberExpression" && !current.callee.computed && _optionalChain([current, 'access', _88 => _88.callee, 'access', _89 => _89.object, 'optionalAccess', _90 => _90.type]) === "Identifier" && current.callee.object.name === "Math" && _optionalChain([current, 'access', _91 => _91.callee, 'access', _92 => _92.property, 'optionalAccess', _93 => _93.name]) === "random") {
4021
+ if (_optionalChain([current, 'access', _73 => _73.callee, 'optionalAccess', _74 => _74.type]) === "MemberExpression" && !current.callee.computed && _optionalChain([current, 'access', _75 => _75.callee, 'access', _76 => _76.object, 'optionalAccess', _77 => _77.type]) === "Identifier" && current.callee.object.name === "Math" && _optionalChain([current, 'access', _78 => _78.callee, 'access', _79 => _79.property, 'optionalAccess', _80 => _80.name]) === "random") {
4019
4022
  reason = "Math.random()";
4020
4023
  return;
4021
4024
  }
@@ -4056,14 +4059,14 @@ function isReference(node, parent, key) {
4056
4059
  }
4057
4060
  function readSource(file) {
4058
4061
  try {
4059
- _chunkPSALMEHJcjs.noteFarmSourceRead.call(void 0, file);
4062
+ _chunkD2OU4CX2cjs.noteFarmSourceRead.call(void 0, file);
4060
4063
  return fs2.default.readFileSync(file, "utf8");
4061
4064
  } catch (e16) {
4062
4065
  return null;
4063
4066
  }
4064
4067
  }
4065
4068
  function explainFarmKeptLayoutRender(modulePath, root) {
4066
- const entry = _chunkPSALMEHJcjs.resolveModuleSourcePath.call(void 0, modulePath, root);
4069
+ const entry = _chunkD2OU4CX2cjs.resolveModuleSourcePath.call(void 0, modulePath, root);
4067
4070
  if (!entry) return `${modulePath} does not resolve`;
4068
4071
  const visited = /* @__PURE__ */ new Set();
4069
4072
  const check = (file) => {
@@ -4073,7 +4076,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
4073
4076
  if (!SCRIPT_SOURCE.test(file)) return `${path4.default.relative(root, file)} is not a script`;
4074
4077
  const code = readSource(file);
4075
4078
  if (code === null) return `${path4.default.relative(root, file)} cannot be read`;
4076
- const { reason, imports } = _chunkPSALMEHJcjs.memoizeInFarmSourceSnapshot.call(void 0,
4079
+ const { reason, imports } = _chunkD2OU4CX2cjs.memoizeInFarmSourceSnapshot.call(void 0,
4077
4080
  "kept-layout-module",
4078
4081
  code,
4079
4082
  () => findFarmRequestDecidingConstruct(code, file)
@@ -4086,7 +4089,7 @@ function explainFarmKeptLayoutRender(modulePath, root) {
4086
4089
  return `${path4.default.relative(root, file)} imports ${imported.names.join(", ")} from ${imported.source}`;
4087
4090
  }
4088
4091
  if (ASSET_SOURCE.test(imported.source.split("?")[0])) continue;
4089
- const resolved = _chunkPSALMEHJcjs.resolveImportedModule.call(void 0, file, imported.source, root);
4092
+ const resolved = _chunkD2OU4CX2cjs.resolveImportedModule.call(void 0, file, imported.source, root);
4090
4093
  if (!resolved.path || !resolved.local) {
4091
4094
  return `${path4.default.relative(root, file)} imports ${imported.source}`;
4092
4095
  }
@@ -4101,15 +4104,15 @@ var answers = /* @__PURE__ */ new Map();
4101
4104
  function canFarmSkipKeptLayoutRender(modulePath, root) {
4102
4105
  const key = `${root}\0${modulePath}`;
4103
4106
  const known = answers.get(key);
4104
- if (known && known.stamps.every(([file, stamp]) => _chunkPSALMEHJcjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
4107
+ if (known && known.stamps.every(([file, stamp]) => _chunkD2OU4CX2cjs.getFarmSourceStamp.call(void 0, file) === stamp)) {
4105
4108
  return known.skip;
4106
4109
  }
4107
- const { result, files } = _chunkPSALMEHJcjs.traceFarmSourceReads.call(void 0,
4110
+ const { result, files } = _chunkD2OU4CX2cjs.traceFarmSourceReads.call(void 0,
4108
4111
  () => explainFarmKeptLayoutRender(modulePath, root) === null
4109
4112
  );
4110
4113
  answers.set(key, {
4111
4114
  skip: result,
4112
- stamps: files.map((file) => [file, _chunkPSALMEHJcjs.getFarmSourceStamp.call(void 0, file)])
4115
+ stamps: files.map((file) => [file, _chunkD2OU4CX2cjs.getFarmSourceStamp.call(void 0, file)])
4113
4116
  });
4114
4117
  return result;
4115
4118
  }
@@ -4144,7 +4147,7 @@ function pipeFarmRendererWebStream(runtime) {
4144
4147
  source.once("error", (error) => {
4145
4148
  if (settleShell(error)) return;
4146
4149
  callbacks.onError(error);
4147
- _optionalChain([destination, 'optionalAccess', _94 => _94.end, 'call', _95 => _95()]);
4150
+ _optionalChain([destination, 'optionalAccess', _81 => _81.end, 'call', _82 => _82()]);
4148
4151
  });
4149
4152
  },
4150
4153
  (error) => settleShell(error)
@@ -4152,12 +4155,12 @@ function pipeFarmRendererWebStream(runtime) {
4152
4155
  return {
4153
4156
  pipe(target) {
4154
4157
  destination = target;
4155
- _optionalChain([source, 'optionalAccess', _96 => _96.pipe, 'call', _97 => _97(target)]);
4158
+ _optionalChain([source, 'optionalAccess', _83 => _83.pipe, 'call', _84 => _84(target)]);
4156
4159
  },
4157
4160
  abort() {
4158
4161
  aborted = true;
4159
- _optionalChain([source, 'optionalAccess', _98 => _98.destroy, 'call', _99 => _99()]);
4160
- _optionalChain([destination, 'optionalAccess', _100 => _100.end, 'call', _101 => _101()]);
4162
+ _optionalChain([source, 'optionalAccess', _85 => _85.destroy, 'call', _86 => _86()]);
4163
+ _optionalChain([destination, 'optionalAccess', _87 => _87.end, 'call', _88 => _88()]);
4161
4164
  }
4162
4165
  };
4163
4166
  };
@@ -4237,7 +4240,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
4237
4240
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
4238
4241
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
4239
4242
  warnedSuppressedAsyncHydrationModules.add(modulePath);
4240
- _chunk7ZDLE77Pcjs.logger.warn(_chunkPSALMEHJcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
4243
+ _chunk7ZDLE77Pcjs.logger.warn(_chunkD2OU4CX2cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
4241
4244
  }
4242
4245
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
4243
4246
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -4274,7 +4277,7 @@ function appendResponseHeader(res, name, value) {
4274
4277
  }
4275
4278
  }
4276
4279
  function requestHeader(req, name) {
4277
- const value = _optionalChain([req, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103[name]]);
4280
+ const value = _optionalChain([req, 'access', _89 => _89.headers, 'optionalAccess', _90 => _90[name]]);
4278
4281
  return Array.isArray(value) ? value[0] : value;
4279
4282
  }
4280
4283
  function appendResponseVary(res, value) {
@@ -4379,12 +4382,12 @@ async function parseRouteModuleProps(routeModule, input) {
4379
4382
  }
4380
4383
  const schemas = routeModule.__farmRouteSchemas;
4381
4384
  const params = parseRouteModuleSchema(
4382
- _optionalChain([schemas, 'optionalAccess', _104 => _104.params]),
4385
+ _optionalChain([schemas, 'optionalAccess', _91 => _91.params]),
4383
4386
  input.props.params,
4384
4387
  "params",
4385
4388
  input.routePath
4386
4389
  );
4387
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _105 => _105.search]), input.search, "search", input.routePath);
4390
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _92 => _92.search]), input.search, "search", input.routePath);
4388
4391
  return {
4389
4392
  ...input.props,
4390
4393
  params,
@@ -4444,26 +4447,26 @@ var ServerRenderer = class {
4444
4447
  } else {
4445
4448
  _chunkYLEL4ZRQcjs.uninstallFarmIslandValues.call(void 0, );
4446
4449
  }
4447
- if (_optionalChain([this, 'access', _106 => _106.config, 'access', _107 => _107.notFound, 'optionalAccess', _108 => _108.component, 'optionalAccess', _109 => _109.trim, 'call', _110 => _110()])) {
4448
- resolveFarmNotFoundComponentPath(this.config, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, this.config));
4450
+ if (_optionalChain([this, 'access', _93 => _93.config, 'access', _94 => _94.notFound, 'optionalAccess', _95 => _95.component, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()])) {
4451
+ resolveFarmNotFoundComponentPath(this.config, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, this.config));
4449
4452
  }
4450
- const loaded = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer) ? this.reactRenderer = await import("./renderer/react/server.cjs") : _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
4451
- _chunkHP7QYVSTcjs.resolveFarmRendererModule.call(void 0,
4453
+ const loaded = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer) ? this.reactRenderer = await import("./renderer/react/server.cjs") : _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
4454
+ _chunkLEZJZX4Ccjs.resolveFarmRendererModule.call(void 0,
4452
4455
  this.config.root || process.cwd(),
4453
4456
  this.config.renderer.server
4454
4457
  )
4455
4458
  ).href);
4456
- this.rendererServerModuleCurrent = this.viteServer && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer) && !_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? _chunkVB7P66Q4cjs.createFarmDevModuleCheck.call(void 0, this.viteServer, loaded) : () => true;
4459
+ this.rendererServerModuleCurrent = this.viteServer && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer) && !_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? _chunkVB7P66Q4cjs.createFarmDevModuleCheck.call(void 0, this.viteServer, loaded) : () => true;
4457
4460
  const runtime = loaded;
4458
- _chunkHP7QYVSTcjs.assertFarmRendererServerModule.call(void 0, runtime, this.config.renderer);
4459
- _chunkHP7QYVSTcjs.assertFarmRendererStreamingRuntime.call(void 0,
4461
+ _chunkLEZJZX4Ccjs.assertFarmRendererServerModule.call(void 0, runtime, this.config.renderer);
4462
+ _chunkLEZJZX4Ccjs.assertFarmRendererStreamingRuntime.call(void 0,
4460
4463
  this.config.renderer.name,
4461
4464
  this.config.renderer,
4462
4465
  runtime,
4463
4466
  "node"
4464
4467
  );
4465
4468
  this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
4466
- _optionalChain([this, 'access', _111 => _111.routeManager, 'access', _112 => _112.setRendererRuntime, 'optionalCall', _113 => _113(this.rendererRuntime)]);
4469
+ _optionalChain([this, 'access', _98 => _98.routeManager, 'access', _99 => _99.setRendererRuntime, 'optionalCall', _100 => _100(this.rendererRuntime)]);
4467
4470
  await this.applyRendererAppSetup();
4468
4471
  }
4469
4472
  /**
@@ -4472,7 +4475,7 @@ var ServerRenderer = class {
4472
4475
  * re-applied on the next request without restarting.
4473
4476
  */
4474
4477
  async applyRendererAppSetup() {
4475
- const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0,
4478
+ const appSetupPath = _chunkLEZJZX4Ccjs.resolveFarmRendererAppSetup.call(void 0,
4476
4479
  this.config.root || process.cwd(),
4477
4480
  this.config.renderer
4478
4481
  );
@@ -4533,7 +4536,7 @@ var ServerRenderer = class {
4533
4536
  /// Stylesheets the app imported through JS (fontsource packages, component
4534
4537
  /// CSS) that the document must link alongside globals.css — see #658.
4535
4538
  collectDevStyleHrefs() {
4536
- const graph = _optionalChain([this, 'access', _114 => _114.viteServer, 'optionalAccess', _115 => _115.moduleGraph]);
4539
+ const graph = _optionalChain([this, 'access', _101 => _101.viteServer, 'optionalAccess', _102 => _102.moduleGraph]);
4537
4540
  if (!graph) return [];
4538
4541
  return collectDevStylesheetUrls(
4539
4542
  graph.idToModuleMap.values(),
@@ -4584,7 +4587,7 @@ var ServerRenderer = class {
4584
4587
  "data-farm-layout-boundary": "true",
4585
4588
  "data-farm-layout-pattern": pattern,
4586
4589
  ...segment ? { "data-farm-layout-key": segment.key } : {},
4587
- ..._optionalChain([segment, 'optionalAccess', _116 => _116.kept]) ? { "data-farm-layout-kept": "true" } : {},
4590
+ ..._optionalChain([segment, 'optionalAccess', _103 => _103.kept]) ? { "data-farm-layout-kept": "true" } : {},
4588
4591
  style: { display: "contents" }
4589
4592
  },
4590
4593
  layoutElement
@@ -4615,10 +4618,10 @@ var ServerRenderer = class {
4615
4618
  return serverTree && this.rendererRuntime.renderServerTreePage ? this.rendererRuntime.renderServerTreePage(element, { values: false }) : this.rendererRuntime.isolateServerPageGraph(element);
4616
4619
  }
4617
4620
  async renderElementToCompleteHTML(element, options = {}) {
4618
- const streaming = _chunkHP7QYVSTcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4621
+ const streaming = _chunkLEZJZX4Ccjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node");
4619
4622
  const renderToPipeableStream = streaming.node ? this.rendererRuntime.renderToPipeableStream : void 0;
4620
4623
  if (renderToPipeableStream) {
4621
- const inlineBoundaries = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer);
4624
+ const inlineBoundaries = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer);
4622
4625
  return await new Promise((resolve3, reject) => {
4623
4626
  const chunks = [];
4624
4627
  let shellReady = false;
@@ -4664,7 +4667,7 @@ var ServerRenderer = class {
4664
4667
  element,
4665
4668
  rendererRenderOptions()
4666
4669
  );
4667
- return await _chunkHP7QYVSTcjs.readFarmRendererWebStream.call(void 0, stream);
4670
+ return await _chunkLEZJZX4Ccjs.readFarmRendererWebStream.call(void 0, stream);
4668
4671
  }
4669
4672
  return await this.rendererRuntime.renderToString(element, rendererRenderOptions());
4670
4673
  }
@@ -4688,7 +4691,7 @@ var ServerRenderer = class {
4688
4691
  }
4689
4692
  /** Islands mode sends large prop values once, keyed by content (RFC 0003). */
4690
4693
  islandValues() {
4691
- return _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _117 => _117.config, 'access', _118 => _118.experimental, 'optionalAccess', _119 => _119.serverComponents])) === "islands";
4694
+ return _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, this.config)) === "islands";
4692
4695
  }
4693
4696
  /**
4694
4697
  * The page's element. Only React renders an async component, so for any other renderer Farm
@@ -4697,7 +4700,7 @@ var ServerRenderer = class {
4697
4700
  */
4698
4701
  async createPageElement(PageComponent, pageProps) {
4699
4702
  const runtime = this.rendererRuntime;
4700
- if (_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer) || typeof PageComponent !== "function" || _optionalChain([PageComponent, 'access', _120 => _120.constructor, 'optionalAccess', _121 => _121.name]) !== "AsyncFunction") {
4703
+ if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer) || typeof PageComponent !== "function" || _optionalChain([PageComponent, 'access', _104 => _104.constructor, 'optionalAccess', _105 => _105.name]) !== "AsyncFunction") {
4701
4704
  return runtime.createElement(PageComponent, pageProps);
4702
4705
  }
4703
4706
  const result = await PageComponent(pageProps);
@@ -4806,7 +4809,7 @@ var ServerRenderer = class {
4806
4809
  * Any other docs response is sent as it is.
4807
4810
  */
4808
4811
  async wrapDocsResponseWithLayouts(request2, response) {
4809
- if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _122 => _122.headers, 'access', _123 => _123.get, 'call', _124 => _124("content-type"), 'optionalAccess', _125 => _125.toLowerCase, 'call', _126 => _126(), 'access', _127 => _127.includes, 'call', _128 => _128("text/html")])) {
4812
+ if (request2.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _106 => _106.headers, 'access', _107 => _107.get, 'call', _108 => _108("content-type"), 'optionalAccess', _109 => _109.toLowerCase, 'call', _110 => _110(), 'access', _111 => _111.includes, 'call', _112 => _112("text/html")])) {
4810
4813
  return response;
4811
4814
  }
4812
4815
  await this.initialize();
@@ -4821,11 +4824,11 @@ var ServerRenderer = class {
4821
4824
  return {
4822
4825
  pattern: layout.pattern,
4823
4826
  modulePath: layout.modulePath,
4824
- shouldHydrate: _optionalChain([entry, 'optionalAccess', _129 => _129.shouldHydrate]) === true,
4825
- islandStrategy: _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _130 => _130.islandStrategy]), () => ( null)),
4826
- hasIsolatedClientBoundaries: _optionalChain([entry, 'optionalAccess', _131 => _131.hasIsolatedClientBoundaries]) === true,
4827
- serverTree: _optionalChain([entry, 'optionalAccess', _132 => _132.serverTree]) === true,
4828
- islands: _optionalChain([entry, 'optionalAccess', _133 => _133.hasIsolatedClientBoundaries]) === true
4827
+ shouldHydrate: _optionalChain([entry, 'optionalAccess', _113 => _113.shouldHydrate]) === true,
4828
+ islandStrategy: _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _114 => _114.islandStrategy]), () => ( null)),
4829
+ hasIsolatedClientBoundaries: _optionalChain([entry, 'optionalAccess', _115 => _115.hasIsolatedClientBoundaries]) === true,
4830
+ serverTree: _optionalChain([entry, 'optionalAccess', _116 => _116.serverTree]) === true,
4831
+ islands: _optionalChain([entry, 'optionalAccess', _117 => _117.hasIsolatedClientBoundaries]) === true
4829
4832
  };
4830
4833
  });
4831
4834
  if (!_chunkIGBQSUT5cjs.farmDocsLayoutsWrapPage.call(void 0, layouts)) return response;
@@ -4847,7 +4850,7 @@ var ServerRenderer = class {
4847
4850
  );
4848
4851
  const treeLayouts = layouts.map((layout, index) => ({
4849
4852
  ...layout,
4850
- Component: _optionalChain([modules, 'access', _134 => _134[index], 'optionalAccess', _135 => _135.default])
4853
+ Component: _optionalChain([modules, 'access', _118 => _118[index], 'optionalAccess', _119 => _119.default])
4851
4854
  }));
4852
4855
  const islandStrategy = _chunkIGBQSUT5cjs.resolveFarmDocsLayoutIslandStrategy.call(void 0, treeLayouts);
4853
4856
  const tree = await _chunkIGBQSUT5cjs.createFarmDocsLayoutTree.call(void 0, this.rendererRuntime, {
@@ -4913,7 +4916,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4913
4916
  const head = [
4914
4917
  ...this.collectDevStyleLinks(),
4915
4918
  `<script type="module" src="/@vite/client"></script>`,
4916
- source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _136 => _136.rendererRuntime, 'access', _137 => _137.generateHydrationScript, 'optionalCall', _138 => _138()]),
4919
+ source.includes("window._$HY") ? "" : _optionalChain([this, 'access', _120 => _120.rendererRuntime, 'access', _121 => _121.generateHydrationScript, 'optionalCall', _122 => _122()]),
4917
4920
  bootstrapScript
4918
4921
  ].filter(Boolean).map((markup) => _chunkIEZFFXSCcjs.stampFarmCspNonce.call(void 0, markup)).concat(rendered.head || []).join("\n ");
4919
4922
  const clientScript = source.includes('src="/@farm/client.js"') ? "" : `
@@ -4932,7 +4935,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4932
4935
  async runWithRequestContext(request2, fn) {
4933
4936
  return _chunkIBZW57NWcjs._runWithCurrentRequest.call(void 0,
4934
4937
  request2,
4935
- () => _optionalChain([this, 'access', _139 => _139.i18nRuntime, 'optionalAccess', _140 => _140.config, 'access', _141 => _141.enabled]) ? _chunkYCIFGYBYcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4938
+ () => _optionalChain([this, 'access', _123 => _123.i18nRuntime, 'optionalAccess', _124 => _124.config, 'access', _125 => _125.enabled]) ? _chunkYCIFGYBYcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4936
4939
  redirect: false
4937
4940
  }) : fn()
4938
4941
  );
@@ -4963,7 +4966,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
4963
4966
  * Check if a path should be served from SSG cache
4964
4967
  */
4965
4968
  async shouldServeSSG(pathname) {
4966
- const ssgPage = _chunkKM7ZRKCHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4969
+ const ssgPage = _chunkGL4SPJTEcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4967
4970
  if (!ssgPage) return null;
4968
4971
  const cached = await this.getCachedSSGPage(pathname);
4969
4972
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -5081,7 +5084,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5081
5084
  setImmediate(async () => {
5082
5085
  try {
5083
5086
  const mod = await this.routeManager.loadRouteModule(page.filePath);
5084
- if (!_optionalChain([mod, 'optionalAccess', _142 => _142.default])) return;
5087
+ if (!_optionalChain([mod, 'optionalAccess', _126 => _126.default])) return;
5085
5088
  const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
5086
5089
  const layoutModules = await Promise.all(
5087
5090
  layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
@@ -5095,7 +5098,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5095
5098
  };
5096
5099
  let pageElement = await this.createPageElement(PageComponent, pageProps);
5097
5100
  const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
5098
- (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _143 => _143.pattern])
5101
+ (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _127 => _127.pattern])
5099
5102
  ), () => ( {
5100
5103
  shouldHydrate: false,
5101
5104
  islandStrategy: null
@@ -5203,7 +5206,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5203
5206
  * such as a partial test double, has none.
5204
5207
  */
5205
5208
  publishSearchPreserveRoutes() {
5206
- _chunkXSJYXUY6cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.routeManager, 'access', _145 => _145.getSearchPreserveRoutes, 'optionalCall', _146 => _146()]), () => ( [])));
5209
+ _chunkXSJYXUY6cjs._setFarmSearchPreserveRoutes.call(void 0, _nullishCoalesce(_optionalChain([this, 'access', _128 => _128.routeManager, 'access', _129 => _129.getSearchPreserveRoutes, 'optionalCall', _130 => _130()]), () => ( [])));
5207
5210
  }
5208
5211
  async renderPage(req, res) {
5209
5212
  await this.initialize();
@@ -5219,7 +5222,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5219
5222
  }
5220
5223
  const request2 = this.createPageRequest(req, res);
5221
5224
  const runtime = this.i18nRuntime;
5222
- if (_optionalChain([runtime, 'optionalAccess', _147 => _147.config, 'access', _148 => _148.enabled])) {
5225
+ if (_optionalChain([runtime, 'optionalAccess', _131 => _131.config, 'access', _132 => _132.enabled])) {
5223
5226
  const resolution = runtime.resolveRequest(request2);
5224
5227
  const varyHeaders = _chunkXXBWKAJFcjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
5225
5228
  for (const header of varyHeaders) appendResponseVary(res, header);
@@ -5258,7 +5261,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5258
5261
  createPageRequestOnce(req, res) {
5259
5262
  const observable = typeof req.once === "function" && typeof res.once === "function";
5260
5263
  return _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5261
- trustProxy: _optionalChain([this, 'access', _149 => _149.config, 'access', _150 => _150.server, 'optionalAccess', _151 => _151.trustProxy]),
5264
+ trustProxy: _optionalChain([this, 'access', _133 => _133.config, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.trustProxy]),
5262
5265
  signal: observable ? _chunk7GKZDRY2cjs.createFarmNodeRequestAbortSignal.call(void 0,
5263
5266
  req,
5264
5267
  res
@@ -5288,7 +5291,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5288
5291
  };
5289
5292
  let pprShellWrite;
5290
5293
  try {
5291
- const url = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _152 => _152.config, 'access', _153 => _153.server, 'optionalAccess', _154 => _154.trustProxy]) });
5294
+ const url = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _136 => _136.config, 'access', _137 => _137.server, 'optionalAccess', _138 => _138.trustProxy]) });
5292
5295
  pathname = url.pathname;
5293
5296
  _chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
5294
5297
  searchParamsObject = _chunkK6LZMZNBcjs.searchParamsToObject.call(void 0, url.searchParams);
@@ -5451,11 +5454,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5451
5454
  searchParams: _chunkK6LZMZNBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
5452
5455
  error
5453
5456
  };
5454
- if (_chunk7MQMWGTLcjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _155 => _155.notFound])) {
5457
+ if (_chunk7MQMWGTLcjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _139 => _139.notFound])) {
5455
5458
  res.statusCode = 404;
5456
5459
  PageComponent = programmaticRouteComponents.notFound;
5457
5460
  pageProps = routeStateProps;
5458
- } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _156 => _156.error])) {
5461
+ } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _140 => _140.error])) {
5459
5462
  res.statusCode = 500;
5460
5463
  PageComponent = programmaticRouteComponents.error;
5461
5464
  pageProps = routeStateProps;
@@ -5463,10 +5466,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5463
5466
  throw error;
5464
5467
  }
5465
5468
  }
5466
- const renderingConfig = await _chunkKM7ZRKCHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5469
+ const renderingConfig = await _chunkGL4SPJTEcjs.resolveRouteRenderingConfigFromFile.call(void 0,
5467
5470
  routeModule,
5468
5471
  route.modulePath,
5469
- { experimentalPPR: _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.experimental, 'optionalAccess', _159 => _159.ppr]) === true }
5472
+ { experimentalPPR: _optionalChain([this, 'access', _141 => _141.config, 'access', _142 => _142.experimental, 'optionalAccess', _143 => _143.ppr]) === true }
5470
5473
  );
5471
5474
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
5472
5475
  const islandsNavigationRequest = Boolean(
@@ -5477,7 +5480,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5477
5480
  let pprShellOptions = canCachePPRShell ? {
5478
5481
  pathname,
5479
5482
  search: url.search,
5480
- locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _160 => _160.locale]), () => ( "")),
5483
+ locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _144 => _144.locale]), () => ( "")),
5481
5484
  origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
5482
5485
  revalidate: renderingConfig.revalidate
5483
5486
  } : void 0;
@@ -5555,7 +5558,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5555
5558
  const routeManifestEntry = routeManifest.routes.find(
5556
5559
  (entry) => entry.pattern === route.pattern
5557
5560
  );
5558
- const moduleMetadata = routeManifestEntry || _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5561
+ const moduleMetadata = routeManifestEntry || _chunkD2OU4CX2cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
5559
5562
  const isClientComponent = moduleMetadata.isClientComponent;
5560
5563
  const renderedRouteSlots = await Promise.all(
5561
5564
  routeSlots.map(async (slot) => {
@@ -5606,20 +5609,20 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5606
5609
  if (moduleMetadata.suppressedAsyncHydration) {
5607
5610
  warnSuppressedAsyncHydrationOnce(
5608
5611
  route.modulePath,
5609
- _optionalChain([routeManifestEntry, 'optionalAccess', _161 => _161.suppressedAsyncHydrationReason])
5612
+ _optionalChain([routeManifestEntry, 'optionalAccess', _145 => _145.suppressedAsyncHydrationReason])
5610
5613
  );
5611
5614
  }
5612
5615
  const layoutHydrationMetadata = layouts.map((layout) => {
5613
5616
  const manifestEntry = routeManifest.layouts.find(
5614
5617
  (entry) => entry.pattern === layout.pattern
5615
5618
  );
5616
- if (_optionalChain([manifestEntry, 'optionalAccess', _162 => _162.suppressedAsyncHydration])) {
5619
+ if (_optionalChain([manifestEntry, 'optionalAccess', _146 => _146.suppressedAsyncHydration])) {
5617
5620
  warnSuppressedAsyncHydrationOnce(
5618
5621
  layout.modulePath,
5619
5622
  manifestEntry.suppressedAsyncHydrationReason
5620
5623
  );
5621
5624
  }
5622
- if (typeof _optionalChain([manifestEntry, 'optionalAccess', _163 => _163.shouldHydrate]) === "boolean") {
5625
+ if (typeof _optionalChain([manifestEntry, 'optionalAccess', _147 => _147.shouldHydrate]) === "boolean") {
5623
5626
  return {
5624
5627
  isClientComponent: manifestEntry.isClientComponent === true,
5625
5628
  shouldHydrate: manifestEntry.shouldHydrate,
@@ -5640,11 +5643,11 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5640
5643
  const clientLayouts = layouts.map((layout, index) => ({
5641
5644
  pattern: layout.pattern,
5642
5645
  modulePath: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
5643
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _164 => _164[index], 'optionalAccess', _165 => _165.shouldHydrate]) === true,
5644
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _166 => _166[index], 'optionalAccess', _167 => _167.islandStrategy]), () => ( null)),
5645
- ..._optionalChain([layoutHydrationMetadata, 'access', _168 => _168[index], 'optionalAccess', _169 => _169.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
5646
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _148 => _148[index], 'optionalAccess', _149 => _149.shouldHydrate]) === true,
5647
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _150 => _150[index], 'optionalAccess', _151 => _151.islandStrategy]), () => ( null)),
5648
+ ..._optionalChain([layoutHydrationMetadata, 'access', _152 => _152[index], 'optionalAccess', _153 => _153.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
5646
5649
  // Islands mode: the browser rebuilds this layout from its tree, not its module.
5647
- ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _170 => _170[index], 'optionalAccess', _171 => _171.serverTree]) === true ? { serverTree: true } : {}
5650
+ ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _154 => _154[index], 'optionalAccess', _155 => _155.serverTree]) === true ? { serverTree: true } : {}
5648
5651
  }));
5649
5652
  const hydrationStrategies = [
5650
5653
  ...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
@@ -5658,9 +5661,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5658
5661
  layouts.map((layout, index) => ({
5659
5662
  pattern: layout.pattern,
5660
5663
  modulePath: layout.modulePath,
5661
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _172 => _172[index], 'optionalAccess', _173 => _173.shouldHydrate]) === true,
5662
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _174 => _174[index], 'optionalAccess', _175 => _175.hasIsolatedClientBoundaries]) === true,
5663
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _176 => _176[index], 'optionalAccess', _177 => _177.islandStrategy]), () => ( null))
5664
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _156 => _156[index], 'optionalAccess', _157 => _157.shouldHydrate]) === true,
5665
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _158 => _158[index], 'optionalAccess', _159 => _159.hasIsolatedClientBoundaries]) === true,
5666
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _160 => _160[index], 'optionalAccess', _161 => _161.islandStrategy]), () => ( null))
5664
5667
  })),
5665
5668
  this.config.root || process.cwd(),
5666
5669
  true
@@ -5668,10 +5671,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5668
5671
  const hasHydratableRouteSlots = renderedRouteSlots.some(
5669
5672
  (slot) => slot.isClientComponent || slot.shouldHydrate
5670
5673
  );
5671
- const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _178 => _178.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5674
+ const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _162 => _162.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
5672
5675
  req.__FARM_PAGE_PATH__ = route.modulePath;
5673
5676
  req.__FARM_ROUTE__ = pathname;
5674
- req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _179 => _179[0], 'optionalAccess', _180 => _180.modulePath]);
5677
+ req.__FARM_ROOT_LAYOUT_PATH__ = _optionalChain([layouts, 'access', _163 => _163[0], 'optionalAccess', _164 => _164.modulePath]);
5675
5678
  req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
5676
5679
  req.__FARM_PAGE_SHOULD_HYDRATE__ = shouldHydrate;
5677
5680
  req.__FARM_LAYOUT_SHOULD_HYDRATE__ = shouldHydrateLayout;
@@ -5682,7 +5685,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5682
5685
  req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
5683
5686
  req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
5684
5687
  req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
5685
- req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _181 => _181.modulePath]) ? _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5688
+ req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _165 => _165.modulePath]) ? _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
5686
5689
  req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
5687
5690
  name: slot.name,
5688
5691
  ownerPattern: slot.ownerPattern,
@@ -5754,7 +5757,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5754
5757
  } else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
5755
5758
  pageElement = await this.isolateServerPage(
5756
5759
  pageElement,
5757
- _optionalChain([routeManifestEntry, 'optionalAccess', _182 => _182.serverTree]) === true
5760
+ _optionalChain([routeManifestEntry, 'optionalAccess', _166 => _166.serverTree]) === true
5758
5761
  );
5759
5762
  }
5760
5763
  pageElement = await this.createPageBoundary(pageElement, {
@@ -5769,7 +5772,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5769
5772
  if (keptLayouts > 0 && !layouts.slice(0, keptLayouts).every((layout) => canFarmSkipKeptLayoutRender(layout.modulePath, keptRoot))) {
5770
5773
  let keptElement = null;
5771
5774
  for (let i = keptLayouts - 1; i >= 0; i--) {
5772
- const KeptLayout = _optionalChain([layoutModules, 'access', _183 => _183[i], 'optionalAccess', _184 => _184.default]);
5775
+ const KeptLayout = _optionalChain([layoutModules, 'access', _167 => _167[i], 'optionalAccess', _168 => _168.default]);
5773
5776
  if (KeptLayout) {
5774
5777
  keptElement = this.rendererRuntime.createElement(KeptLayout, {
5775
5778
  children: keptElement,
@@ -5822,7 +5825,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
5822
5825
  );
5823
5826
  slotProps[slot.name] = slotElement;
5824
5827
  }
5825
- wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _185 => _185[i], 'optionalAccess', _186 => _186.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5828
+ wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _169 => _169[i], 'optionalAccess', _170 => _170.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
5826
5829
  LayoutComponent,
5827
5830
  { params },
5828
5831
  { children: wrappedElement, ...slotProps },
@@ -6000,7 +6003,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6000
6003
  }
6001
6004
  await this.renderError(req, res, error, errorStatus);
6002
6005
  } finally {
6003
- _optionalChain([pprShellWrite, 'optionalAccess', _187 => _187.release, 'call', _188 => _188()]);
6006
+ _optionalChain([pprShellWrite, 'optionalAccess', _171 => _171.release, 'call', _172 => _172()]);
6004
6007
  }
6005
6008
  }
6006
6009
  async wrapWithIntegrationProviders(element) {
@@ -6009,13 +6012,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6009
6012
  for (let i = providers.length - 1; i >= 0; i--) {
6010
6013
  const provider = providers[i];
6011
6014
  if (provider.component || provider.type === "clerk") {
6012
- const rendererCapabilities = _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
6015
+ const rendererCapabilities = _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
6013
6016
  if (!rendererCapabilities.functionComponents) {
6014
6017
  throw new Error(
6015
- `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _189 => _189.config, 'access', _190 => _190.renderer, 'optionalAccess', _191 => _191.name]), () => ( "the configured renderer"))}\` cannot.`
6018
+ `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _173 => _173.config, 'access', _174 => _174.renderer, 'optionalAccess', _175 => _175.name]), () => ( "the configured renderer"))}\` cannot.`
6016
6019
  );
6017
6020
  }
6018
- if (provider.type === "clerk" && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer)) {
6021
+ if (provider.type === "clerk" && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer)) {
6019
6022
  throw new Error(
6020
6023
  `Integration provider \`${provider.name}\` uses Clerk's React components, which require the React renderer.`
6021
6024
  );
@@ -6051,7 +6054,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6051
6054
  }
6052
6055
  if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
6053
6056
  _nullishCoalesce(providerSourceModule, () => ( "")),
6054
- _chunkHP7QYVSTcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _192 => _192.config, 'access', _193 => _193.renderer, 'optionalAccess', _194 => _194.componentExtensions]))
6057
+ _chunkLEZJZX4Ccjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _176 => _176.config, 'access', _177 => _177.renderer, 'optionalAccess', _178 => _178.componentExtensions]))
6055
6058
  )) {
6056
6059
  ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
6057
6060
  }
@@ -6180,7 +6183,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6180
6183
  );
6181
6184
  }
6182
6185
  const request2 = _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, {
6183
- trustProxy: _optionalChain([this, 'access', _195 => _195.config, 'access', _196 => _196.server, 'optionalAccess', _197 => _197.trustProxy])
6186
+ trustProxy: _optionalChain([this, 'access', _179 => _179.config, 'access', _180 => _180.server, 'optionalAccess', _181 => _181.trustProxy])
6184
6187
  });
6185
6188
  const url = new URL(request2.url);
6186
6189
  const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
@@ -6216,7 +6219,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6216
6219
  }
6217
6220
  /** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
6218
6221
  getGeneratedLlmsKind(pathname) {
6219
- const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _198 => _198.config, 'access', _199 => _199.agent, 'optionalAccess', _200 => _200.llmsTxt]));
6222
+ const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _182 => _182.config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.llmsTxt]));
6220
6223
  if (!config.enabled) return null;
6221
6224
  if (pathname === "/llms.txt") return "llms";
6222
6225
  return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
@@ -6224,9 +6227,9 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6224
6227
  async renderGeneratedLlmsTxt(req, res, kind) {
6225
6228
  try {
6226
6229
  const request2 = _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, {
6227
- trustProxy: _optionalChain([this, 'access', _201 => _201.config, 'access', _202 => _202.server, 'optionalAccess', _203 => _203.trustProxy])
6230
+ trustProxy: _optionalChain([this, 'access', _185 => _185.config, 'access', _186 => _186.server, 'optionalAccess', _187 => _187.trustProxy])
6228
6231
  });
6229
- const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _204 => _204.config, 'access', _205 => _205.agent, 'optionalAccess', _206 => _206.llmsTxt]));
6232
+ const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _188 => _188.config, 'access', _189 => _189.agent, 'optionalAccess', _190 => _190.llmsTxt]));
6230
6233
  const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
6231
6234
  const body = kind === "llms-full" ? await _chunk25CHWAZYcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
6232
6235
  origin: await this.getAgentOrigin(request2),
@@ -6253,18 +6256,18 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6253
6256
  }
6254
6257
  }
6255
6258
  getAgentCrawlers() {
6256
- return _chunkERSLQ4C7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _207 => _207.config, 'access', _208 => _208.agent, 'optionalAccess', _209 => _209.crawlers]));
6259
+ return _chunkERSLQ4C7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _191 => _191.config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.crawlers]));
6257
6260
  }
6258
6261
  /** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
6259
6262
  async renderGeneratedRobotsTxt(req, res) {
6260
6263
  try {
6261
- const sitemapPath = _optionalChain([this, 'access', _210 => _210.routeManager, 'access', _211 => _211.matchMetadataRoute, 'call', _212 => _212("/sitemap.xml"), 'optionalAccess', _213 => _213.metadata, 'access', _214 => _214.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
6264
+ const sitemapPath = _optionalChain([this, 'access', _194 => _194.routeManager, 'access', _195 => _195.matchMetadataRoute, 'call', _196 => _196("/sitemap.xml"), 'optionalAccess', _197 => _197.metadata, 'access', _198 => _198.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
6262
6265
  const rootLayout = this.routeManager.getLayouts().get("/");
6263
6266
  const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
6264
6267
  const robots = _chunkERSLQ4C7cjs.createFarmAgentRobots.call(void 0, {
6265
6268
  crawlers: this.getAgentCrawlers(),
6266
6269
  sitemapPath,
6267
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _215 => _215.metadataBase]),
6270
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _199 => _199.metadataBase]),
6268
6271
  basePath: this.config.basePath
6269
6272
  });
6270
6273
  await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
@@ -6283,13 +6286,13 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6283
6286
  }
6284
6287
  }
6285
6288
  getAgentSitemap() {
6286
- return _chunkERSLQ4C7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _216 => _216.config, 'access', _217 => _217.agent, 'optionalAccess', _218 => _218.sitemap]));
6289
+ return _chunkERSLQ4C7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _200 => _200.config, 'access', _201 => _201.agent, 'optionalAccess', _202 => _202.sitemap]));
6287
6290
  }
6288
6291
  /** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
6289
6292
  async renderGeneratedSitemap(req, res) {
6290
6293
  try {
6291
6294
  const request2 = _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, {
6292
- trustProxy: _optionalChain([this, 'access', _219 => _219.config, 'access', _220 => _220.server, 'optionalAccess', _221 => _221.trustProxy])
6295
+ trustProxy: _optionalChain([this, 'access', _203 => _203.config, 'access', _204 => _204.server, 'optionalAccess', _205 => _205.trustProxy])
6293
6296
  });
6294
6297
  const sources = await Promise.all(
6295
6298
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -6300,8 +6303,8 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6300
6303
  }),
6301
6304
  fs7.promises.stat(route.modulePath).catch(() => void 0)
6302
6305
  ]);
6303
- if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _222 => _222.metadata]))) return null;
6304
- return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _223 => _223.mtime, 'access', _224 => _224.toISOString, 'call', _225 => _225()]) };
6306
+ if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _206 => _206.metadata]))) return null;
6307
+ return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _207 => _207.mtime, 'access', _208 => _208.toISOString, 'call', _209 => _209()]) };
6305
6308
  })
6306
6309
  );
6307
6310
  const rootLayout = this.routeManager.getLayouts().get("/");
@@ -6311,10 +6314,10 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6311
6314
  {
6312
6315
  origin: new URL(request2.url).origin,
6313
6316
  config: this.getAgentSitemap(),
6314
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _226 => _226.metadataBase]),
6317
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _210 => _210.metadataBase]),
6315
6318
  basePath: this.config.basePath,
6316
6319
  trailingSlash: this.config.trailingSlash,
6317
- i18n: _optionalChain([this, 'access', _227 => _227.i18nRuntime, 'optionalAccess', _228 => _228.config])
6320
+ i18n: _optionalChain([this, 'access', _211 => _211.i18nRuntime, 'optionalAccess', _212 => _212.config])
6318
6321
  }
6319
6322
  );
6320
6323
  await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0,
@@ -6346,7 +6349,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6346
6349
  * matcher) covers, as the production build decides.
6347
6350
  */
6348
6351
  getAgentListedRoutes() {
6349
- const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _229 => _229.middlewareRoutes, 'optionalCall', _230 => _230()]), () => ( [])) };
6352
+ const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _213 => _213.middlewareRoutes, 'optionalCall', _214 => _214()]), () => ( [])) };
6350
6353
  return [...this.routeManager.getRoutes()].filter(
6351
6354
  ([pattern]) => !pattern.includes("[") && !_chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
6352
6355
  );
@@ -6372,22 +6375,22 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6372
6375
  * or a registered server such as the docs engine's. Production applies the same rules.
6373
6376
  */
6374
6377
  getDefaultMCPServer() {
6375
- if (_optionalChain([this, 'access', _231 => _231.config, 'access', _232 => _232.agent, 'optionalAccess', _233 => _233.mcp]) !== true || _chunkR6GOH5CHcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
6376
- if (_optionalChain([this, 'access', _234 => _234.apiRouteExists, 'optionalCall', _235 => _235("/api/mcp")])) return void 0;
6378
+ if (_optionalChain([this, 'access', _215 => _215.config, 'access', _216 => _216.agent, 'optionalAccess', _217 => _217.mcp]) !== true || _chunkR6GOH5CHcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
6379
+ if (_optionalChain([this, 'access', _218 => _218.apiRouteExists, 'optionalCall', _219 => _219("/api/mcp")])) return void 0;
6377
6380
  if (this.routeManager.matchRoute(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
6378
6381
  _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkR6GOH5CHcjs.createFarmDefaultMCPServer.call(void 0,
6379
6382
  readAppPackageIdentity(this.config.root),
6380
- _chunkXPVS4HKUcjs.FARM_VERSION
6383
+ _chunkJZAGIXMBcjs.FARM_VERSION
6381
6384
  ))));
6382
6385
  return _chunkR6GOH5CHcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
6383
6386
  }
6384
6387
  async renderDefaultMCP(req, res) {
6385
6388
  const server = this.getDefaultMCPServer();
6386
- const request2 = _nullishCoalesce(_chunkIBZW57NWcjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _236 => _236.config, 'access', _237 => _237.server, 'optionalAccess', _238 => _238.trustProxy]) })));
6389
+ const request2 = _nullishCoalesce(_chunkIBZW57NWcjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkIBZW57NWcjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _220 => _220.config, 'access', _221 => _221.server, 'optionalAccess', _222 => _222.trustProxy]) })));
6387
6390
  try {
6388
6391
  const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-S4UTE7NO.cjs");
6389
6392
  const origin = new URL(request2.url).origin;
6390
- const i18n = _optionalChain([this, 'access', _239 => _239.i18nRuntime, 'optionalAccess', _240 => _240.config]);
6393
+ const i18n = _optionalChain([this, 'access', _223 => _223.i18nRuntime, 'optionalAccess', _224 => _224.config]);
6391
6394
  const metadataBase = await this.getRootMetadataBase();
6392
6395
  const response = await handleFarmDefaultMCPRequest(request2, {
6393
6396
  server,
@@ -6435,7 +6438,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6435
6438
  }
6436
6439
  /** Same inputs the production server gives llms.txt: static pages and root metadata. */
6437
6440
  async createLlmsTxtContext(request2, options = {}) {
6438
- const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _241 => _241.config, 'access', _242 => _242.agent, 'optionalAccess', _243 => _243.llmsTxt]));
6441
+ const config = _chunk25CHWAZYcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _225 => _225.config, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.llmsTxt]));
6439
6442
  const origin = await this.getAgentOrigin(request2);
6440
6443
  const sources = await Promise.all(
6441
6444
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -6461,7 +6464,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6461
6464
  include: config.include,
6462
6465
  exclude: config.exclude,
6463
6466
  trailingSlash: this.config.trailingSlash,
6464
- i18n: _optionalChain([this, 'access', _244 => _244.i18nRuntime, 'optionalAccess', _245 => _245.config])
6467
+ i18n: _optionalChain([this, 'access', _228 => _228.i18nRuntime, 'optionalAccess', _229 => _229.config])
6465
6468
  }
6466
6469
  );
6467
6470
  return {
@@ -6471,7 +6474,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6471
6474
  pages,
6472
6475
  config,
6473
6476
  rootMetadata,
6474
- mcp: _optionalChain([this, 'access', _246 => _246.config, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.aiCatalog]) === false ? [] : _chunkC4DZAEVTcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6477
+ mcp: _optionalChain([this, 'access', _230 => _230.config, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.aiCatalog]) === false ? [] : _chunkMR64FNW6cjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
6475
6478
  basePath: this.config.basePath,
6476
6479
  apiServerBasePath: _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0,
6477
6480
  _chunkG5KGLMPNcjs.normalizeFarmAPIConfig.call(void 0,
@@ -6501,7 +6504,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6501
6504
  async getRootMetadataBase() {
6502
6505
  const rootLayout = this.routeManager.getLayouts().get("/");
6503
6506
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
6504
- return _optionalChain([rootMetadata, 'optionalAccess', _249 => _249.metadataBase]);
6507
+ return _optionalChain([rootMetadata, 'optionalAccess', _233 => _233.metadataBase]);
6505
6508
  }
6506
6509
  /**
6507
6510
  * Reads page mirrors back through this dev server, the way its .md handler
@@ -6513,8 +6516,8 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6513
6516
  * body is discarded.
6514
6517
  */
6515
6518
  createDevMarkdownReader(req) {
6516
- const socket = _optionalChain([req, 'optionalAccess', _250 => _250.socket]);
6517
- if (_optionalChain([req, 'optionalAccess', _251 => _251.method, 'optionalAccess', _252 => _252.toUpperCase, 'call', _253 => _253()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _254 => _254.localAddress]) || !socket.localPort) {
6519
+ const socket = _optionalChain([req, 'optionalAccess', _234 => _234.socket]);
6520
+ if (_optionalChain([req, 'optionalAccess', _235 => _235.method, 'optionalAccess', _236 => _236.toUpperCase, 'call', _237 => _237()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _238 => _238.localAddress]) || !socket.localPort) {
6518
6521
  return async () => null;
6519
6522
  }
6520
6523
  if (socket.encrypted) {
@@ -6562,7 +6565,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6562
6565
  renderer: this.getMetadataImageRenderer(),
6563
6566
  component: isRendererCompiledComponent(
6564
6567
  options.image.modulePath,
6565
- _nullishCoalesce(_optionalChain([this, 'access', _255 => _255.config, 'access', _256 => _256.renderer, 'optionalAccess', _257 => _257.componentExtensions]), () => ( []))
6568
+ _nullishCoalesce(_optionalChain([this, 'access', _239 => _239.config, 'access', _240 => _240.renderer, 'optionalAccess', _241 => _241.componentExtensions]), () => ( []))
6566
6569
  )
6567
6570
  });
6568
6571
  await this.writeMetadataImageResponse(req, res, handlerResult, imageModule);
@@ -6578,7 +6581,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6578
6581
  }
6579
6582
  /** The renderer that draws a metadata image: none for React, whose elements Satori reads directly. */
6580
6583
  getMetadataImageRenderer() {
6581
- return _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime;
6584
+ return _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, this.config.renderer) ? void 0 : this.rendererRuntime;
6582
6585
  }
6583
6586
  async writeStaticMetadataImageResponse(req, res, image) {
6584
6587
  const method = (req.method || "GET").toUpperCase();
@@ -6590,7 +6593,7 @@ window.__FARM_I18N__ = ${i18nSnapshot ? serializeInlineValue(i18nSnapshot) : "nu
6590
6593
  }
6591
6594
  const etag = `"${image.staticInfo.hash}"`;
6592
6595
  const requestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
6593
- trustProxy: _optionalChain([this, 'access', _258 => _258.config, 'access', _259 => _259.server, 'optionalAccess', _260 => _260.trustProxy])
6596
+ trustProxy: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.server, 'optionalAccess', _244 => _244.trustProxy])
6594
6597
  });
6595
6598
  const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
6596
6599
  res.setHeader("Content-Type", image.staticInfo.contentType);
@@ -6745,7 +6748,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6745
6748
  </script>`);
6746
6749
  const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
6747
6750
  const rendererHydrationScript = farmScripts(
6748
- _optionalChain([this, 'access', _261 => _261.rendererRuntime, 'access', _262 => _262.generateHydrationScript, 'optionalCall', _263 => _263()]) || ""
6751
+ _optionalChain([this, 'access', _245 => _245.rendererRuntime, 'access', _246 => _246.generateHydrationScript, 'optionalCall', _247 => _247()]) || ""
6749
6752
  );
6750
6753
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
6751
6754
  const farmClientScript = farmScripts(
@@ -6756,7 +6759,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6756
6759
  element,
6757
6760
  {
6758
6761
  rejectLateNavigation: _chunkU2HFXURZcjs._isFarmMarkdownPageCheck.call(void 0,
6759
- _optionalChain([req, 'access', _264 => _264.headers, 'optionalAccess', _265 => _265[_chunkU2HFXURZcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6762
+ _optionalChain([req, 'access', _248 => _248.headers, 'optionalAccess', _249 => _249[_chunkU2HFXURZcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
6760
6763
  )
6761
6764
  }
6762
6765
  );
@@ -6768,7 +6771,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6768
6771
  viewport: viewportTags
6769
6772
  } = _chunkO7B6LJWEcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6770
6773
  pathname: getFarmMetadataPathname(req),
6771
- jsonLd: _optionalChain([this, 'access', _266 => _266.config, 'access', _267 => _267.agent, 'optionalAccess', _268 => _268.jsonLd])
6774
+ jsonLd: _optionalChain([this, 'access', _250 => _250.config, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.jsonLd])
6772
6775
  });
6773
6776
  const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
6774
6777
  const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
@@ -6817,7 +6820,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6817
6820
  });
6818
6821
  } else {
6819
6822
  html = `<!DOCTYPE html>
6820
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _269 => _269.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6823
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _253 => _253.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6821
6824
  <head>
6822
6825
  ${themeDocument.head}
6823
6826
  <meta charset="utf-8">
@@ -6849,7 +6852,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6849
6852
  const securedHtml = this.secureDocumentHTML(req, html);
6850
6853
  if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
6851
6854
  res.end();
6852
- if (!options.captureStaticShell) await _optionalChain([options, 'access', _270 => _270.onComplete, 'optionalCall', _271 => _271(securedHtml)]);
6855
+ if (!options.captureStaticShell) await _optionalChain([options, 'access', _254 => _254.onComplete, 'optionalCall', _255 => _255(securedHtml)]);
6853
6856
  _chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
6854
6857
  type: "render.stream.complete",
6855
6858
  route,
@@ -6859,7 +6862,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6859
6862
  emitFarmRenderError(req, route, error);
6860
6863
  throw error;
6861
6864
  } finally {
6862
- _optionalChain([clearMiddlewareData, 'optionalCall', _272 => _272()]);
6865
+ _optionalChain([clearMiddlewareData, 'optionalCall', _256 => _256()]);
6863
6866
  }
6864
6867
  }
6865
6868
  /**
@@ -6869,11 +6872,11 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6869
6872
  * call (async, a class, or one using hooks) falls back to detection from the stream.
6870
6873
  */
6871
6874
  async rootLayoutRendersDocument(req) {
6872
- const modulePath = _nullishCoalesce(req.__FARM_ROOT_LAYOUT_PATH__, () => ( (typeof this.routeManager.getLayouts === "function" ? _optionalChain([this, 'access', _273 => _273.routeManager, 'access', _274 => _274.getLayouts, 'call', _275 => _275(), 'access', _276 => _276.get, 'call', _277 => _277("/"), 'optionalAccess', _278 => _278.modulePath]) : void 0)));
6875
+ const modulePath = _nullishCoalesce(req.__FARM_ROOT_LAYOUT_PATH__, () => ( (typeof this.routeManager.getLayouts === "function" ? _optionalChain([this, 'access', _257 => _257.routeManager, 'access', _258 => _258.getLayouts, 'call', _259 => _259(), 'access', _260 => _260.get, 'call', _261 => _261("/"), 'optionalAccess', _262 => _262.modulePath]) : void 0)));
6873
6876
  if (!modulePath) return false;
6874
6877
  try {
6875
6878
  const Layout = (await this.routeManager.loadLayoutModule(modulePath)).default;
6876
- if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _279 => _279.prototype, 'optionalAccess', _280 => _280.isReactComponent]) || _optionalChain([Layout, 'access', _281 => _281.constructor, 'optionalAccess', _282 => _282.name]) === "AsyncFunction") {
6879
+ if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _263 => _263.prototype, 'optionalAccess', _264 => _264.isReactComponent]) || _optionalChain([Layout, 'access', _265 => _265.constructor, 'optionalAccess', _266 => _266.name]) === "AsyncFunction") {
6877
6880
  return false;
6878
6881
  }
6879
6882
  const cached = documentLayouts.get(Layout);
@@ -6896,10 +6899,10 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6896
6899
  }
6897
6900
  async renderWithSSR(element, req, res, clearMiddlewareData, options = {}) {
6898
6901
  const runtime = this.rendererRuntime;
6899
- const renderToPipeableStream = _nullishCoalesce(runtime.renderToPipeableStream, () => ( (_chunkHP7QYVSTcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0)));
6902
+ const renderToPipeableStream = _nullishCoalesce(runtime.renderToPipeableStream, () => ( (_chunkLEZJZX4Ccjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0, this.config.renderer, "node").web && runtime.renderToReadableStream ? pipeFarmRendererWebStream(runtime) : void 0)));
6900
6903
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
6901
6904
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument(req);
6902
- if (!renderToPipeableStream || _chunkU2HFXURZcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _283 => _283.headers, 'optionalAccess', _284 => _284[_chunkU2HFXURZcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && options.captureStaticShell) {
6905
+ if (!renderToPipeableStream || _chunkU2HFXURZcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _267 => _267.headers, 'optionalAccess', _268 => _268[_chunkU2HFXURZcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && options.captureStaticShell) {
6903
6906
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
6904
6907
  }
6905
6908
  return new Promise((resolve3, reject) => {
@@ -6977,7 +6980,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6977
6980
  const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
6978
6981
  const bootClient = (islandsOnlyPage || waitingRoot !== null) && !staticShellParts && _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ) !== "mobile" && canBootFarmIslandsClient(this.config);
6979
6982
  const hydrationClickQueueScript = this.renderPreHydrationHold(req, bootClient);
6980
- const rendererHydrationScript = _optionalChain([this, 'access', _285 => _285.rendererRuntime, 'access', _286 => _286.generateHydrationScript, 'optionalCall', _287 => _287()]) || "";
6983
+ const rendererHydrationScript = _optionalChain([this, 'access', _269 => _269.rendererRuntime, 'access', _270 => _270.generateHydrationScript, 'optionalCall', _271 => _271()]) || "";
6981
6984
  const {
6982
6985
  title,
6983
6986
  tags: metaTags,
@@ -6986,7 +6989,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
6986
6989
  viewport: viewportTags
6987
6990
  } = _chunkO7B6LJWEcjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6988
6991
  pathname: getFarmMetadataPathname(req),
6989
- jsonLd: _optionalChain([this, 'access', _288 => _288.config, 'access', _289 => _289.agent, 'optionalAccess', _290 => _290.jsonLd])
6992
+ jsonLd: _optionalChain([this, 'access', _272 => _272.config, 'access', _273 => _273.agent, 'optionalAccess', _274 => _274.jsonLd])
6990
6993
  });
6991
6994
  const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
6992
6995
  const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
@@ -7014,7 +7017,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7014
7017
  formState: _chunk4USE4SEUcjs.getFarmFormState.call(void 0, ),
7015
7018
  onShellReady() {
7016
7019
  if (pendingNavigationError) {
7017
- _optionalChain([abort, 'optionalCall', _291 => _291(pendingNavigationError)]);
7020
+ _optionalChain([abort, 'optionalCall', _275 => _275(pendingNavigationError)]);
7018
7021
  if (clearMiddlewareData) {
7019
7022
  clearMiddlewareData();
7020
7023
  }
@@ -7032,7 +7035,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7032
7035
  console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
7033
7036
  }
7034
7037
  const shell = `<!DOCTYPE html>
7035
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _292 => _292.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7038
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _276 => _276.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7036
7039
  <head>
7037
7040
  ${themeDocument.head}
7038
7041
  <meta charset="utf-8">
@@ -7061,7 +7064,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7061
7064
  pendingShell = "";
7062
7065
  heldHead = "";
7063
7066
  htmlParts.push(opened);
7064
- _optionalChain([staticShellParts, 'optionalAccess', _293 => _293.push, 'call', _294 => _294(opened)]);
7067
+ _optionalChain([staticShellParts, 'optionalAccess', _277 => _277.push, 'call', _278 => _278(opened)]);
7065
7068
  res.write(opened);
7066
7069
  return split.body;
7067
7070
  };
@@ -7137,7 +7140,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7137
7140
  staticShellClosed = true;
7138
7141
  if (!suspenseHoleEmitted) {
7139
7142
  suspenseHoleEmitted = true;
7140
- _optionalChain([options, 'access', _295 => _295.onSuspenseHoleDetected, 'optionalCall', _296 => _296()]);
7143
+ _optionalChain([options, 'access', _279 => _279.onSuspenseHoleDetected, 'optionalCall', _280 => _280()]);
7141
7144
  }
7142
7145
  } else {
7143
7146
  staticShellParts.push(chunkText);
@@ -7189,7 +7192,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7189
7192
  const body = releaseShell(true);
7190
7193
  if (body) {
7191
7194
  htmlParts.push(body);
7192
- _optionalChain([staticShellParts, 'optionalAccess', _297 => _297.push, 'call', _298 => _298(body)]);
7195
+ _optionalChain([staticShellParts, 'optionalAccess', _281 => _281.push, 'call', _282 => _282(body)]);
7193
7196
  res.write(body);
7194
7197
  }
7195
7198
  }
@@ -7221,8 +7224,8 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7221
7224
  recordRenderedChunk(tail, rewritten);
7222
7225
  if (tail) res.write(tail);
7223
7226
  }
7224
- const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _299 => _299.end, 'call', _300 => _300()]);
7225
- if (_optionalChain([documentEnd, 'optionalAccess', _301 => _301.text])) {
7227
+ const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _283 => _283.end, 'call', _284 => _284()]);
7228
+ if (_optionalChain([documentEnd, 'optionalAccess', _285 => _285.text])) {
7226
7229
  recordRenderedChunk(documentEnd.text, "");
7227
7230
  res.write(documentEnd.text);
7228
7231
  }
@@ -7233,7 +7236,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7233
7236
  deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
7234
7237
  earlyClient,
7235
7238
  // A full document: Farm's #root closes only where Farm opened it.
7236
- ..._optionalChain([documentEnd, 'optionalAccess', _302 => _302.document]) ? { closeRoot: documentEnd.rootOpened } : {}
7239
+ ..._optionalChain([documentEnd, 'optionalAccess', _286 => _286.document]) ? { closeRoot: documentEnd.rootOpened } : {}
7237
7240
  })
7238
7241
  );
7239
7242
  htmlParts.push(footer);
@@ -7340,20 +7343,20 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7340
7343
  * rules and the not-found lookup scans `src/app` as before.
7341
7344
  */
7342
7345
  getRendererNotFoundPath() {
7343
- return _optionalChain([this, 'access', _303 => _303.config, 'access', _304 => _304.renderer, 'optionalAccess', _305 => _305.routes]) ? this.routeManager.getRendererNotFoundPath() : void 0;
7346
+ return _optionalChain([this, 'access', _287 => _287.config, 'access', _288 => _288.renderer, 'optionalAccess', _289 => _289.routes]) ? this.routeManager.getRendererNotFoundPath() : void 0;
7344
7347
  }
7345
7348
  /** The app's not-found component, or null when it relies on the built-in page. */
7346
7349
  async loadNotFoundModule() {
7347
7350
  const notFoundPath = resolveFarmNotFoundComponentPath(
7348
7351
  this.config,
7349
- _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, this.config),
7352
+ _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, this.config),
7350
7353
  this.getRendererNotFoundPath()
7351
7354
  );
7352
7355
  if (!notFoundPath) return null;
7353
7356
  return await this.routeManager.loadRouteModule(notFoundPath);
7354
7357
  }
7355
7358
  async loadNotFoundComponent() {
7356
- return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _306 => _306.default]), async () => ( null));
7359
+ return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _290 => _290.default]), async () => ( null));
7357
7360
  }
7358
7361
  /** The not-found document's head: layout and not-found metadata, as production renders it. */
7359
7362
  async notFoundMetadataHead(layoutModule, notFoundModule) {
@@ -7382,7 +7385,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7382
7385
  );
7383
7386
  }
7384
7387
  const pathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
7385
- trustProxy: _optionalChain([this, 'access', _307 => _307.config, 'access', _308 => _308.server, 'optionalAccess', _309 => _309.trustProxy])
7388
+ trustProxy: _optionalChain([this, 'access', _291 => _291.config, 'access', _292 => _292.server, 'optionalAccess', _293 => _293.trustProxy])
7386
7389
  }).pathname;
7387
7390
  let content = this.defaultNotFoundContent();
7388
7391
  const NotFoundComponent = await this.loadNotFoundComponent();
@@ -7402,9 +7405,9 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7402
7405
  async render404(req, res) {
7403
7406
  res.statusCode = 404;
7404
7407
  const pathname = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
7405
- trustProxy: _optionalChain([this, 'access', _310 => _310.config, 'access', _311 => _311.server, 'optionalAccess', _312 => _312.trustProxy])
7408
+ trustProxy: _optionalChain([this, 'access', _294 => _294.config, 'access', _295 => _295.server, 'optionalAccess', _296 => _296.trustProxy])
7406
7409
  }).pathname;
7407
- if (_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7410
+ if (_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7408
7411
  res.setHeader("Content-Type", "application/json");
7409
7412
  res.end(JSON.stringify({ error: "Not found", pathname }));
7410
7413
  return;
@@ -7427,9 +7430,9 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7427
7430
  return;
7428
7431
  }
7429
7432
  const appDir = path10.join(this.config.root, this.config.srcDir, "app");
7430
- const notFoundExtensions = _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7433
+ const notFoundExtensions = _chunkLEZJZX4Ccjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7431
7434
  let layoutModule = null;
7432
- const rendererRootLayout = _optionalChain([this, 'access', _313 => _313.config, 'access', _314 => _314.renderer, 'optionalAccess', _315 => _315.routes]) ? _optionalChain([this, 'access', _316 => _316.routeManager, 'access', _317 => _317.getLayouts, 'call', _318 => _318(), 'access', _319 => _319.get, 'call', _320 => _320("/"), 'optionalAccess', _321 => _321.modulePath]) : void 0;
7435
+ const rendererRootLayout = _optionalChain([this, 'access', _297 => _297.config, 'access', _298 => _298.renderer, 'optionalAccess', _299 => _299.routes]) ? _optionalChain([this, 'access', _300 => _300.routeManager, 'access', _301 => _301.getLayouts, 'call', _302 => _302(), 'access', _303 => _303.get, 'call', _304 => _304("/"), 'optionalAccess', _305 => _305.modulePath]) : void 0;
7433
7436
  try {
7434
7437
  for (const layoutPath of rendererRootLayout ? [rendererRootLayout] : notFoundExtensions.map((ext) => path10.join(appDir, `layout${ext}`))) {
7435
7438
  if (fs7.existsSync(layoutPath)) {
@@ -7439,14 +7442,14 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7439
7442
  }
7440
7443
  const notFoundPath = resolveFarmNotFoundComponentPath(
7441
7444
  this.config,
7442
- _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, this.config),
7445
+ _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, this.config),
7443
7446
  this.getRendererNotFoundPath()
7444
7447
  );
7445
7448
  if (notFoundPath) {
7446
7449
  const notFoundModule = await this.loadNotFoundModule();
7447
- const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _322 => _322.default]), () => ( null));
7450
+ const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _306 => _306.default]), () => ( null));
7448
7451
  if (NotFoundComponent) {
7449
- const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _323 => _323.default]), () => ( null));
7452
+ const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _307 => _307.default]), () => ( null));
7450
7453
  let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
7451
7454
  if (LayoutComponent) {
7452
7455
  element = this.rendererRuntime.createElement(LayoutComponent, {
@@ -7483,7 +7486,7 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7483
7486
  res.statusCode = statusCode;
7484
7487
  const isDev = process.env.NODE_ENV === "development";
7485
7488
  const requestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
7486
- trustProxy: _optionalChain([this, 'access', _324 => _324.config, 'access', _325 => _325.server, 'optionalAccess', _326 => _326.trustProxy])
7489
+ trustProxy: _optionalChain([this, 'access', _308 => _308.config, 'access', _309 => _309.server, 'optionalAccess', _310 => _310.trustProxy])
7487
7490
  });
7488
7491
  const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
7489
7492
  const statusText = _chunkIGBQSUT5cjs.getDefaultErrorStatusText.call(void 0, statusCode);
@@ -7494,12 +7497,12 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7494
7497
  statusText,
7495
7498
  requestPath: requestUrl.pathname,
7496
7499
  method: req.method || "GET",
7497
- message: _optionalChain([diagnostics, 'optionalAccess', _327 => _327.message]),
7498
- errorName: _optionalChain([diagnostics, 'optionalAccess', _328 => _328.name]),
7499
- stack: _optionalChain([diagnostics, 'optionalAccess', _329 => _329.stack]),
7500
- sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _330 => _330.sourceFrame]),
7500
+ message: _optionalChain([diagnostics, 'optionalAccess', _311 => _311.message]),
7501
+ errorName: _optionalChain([diagnostics, 'optionalAccess', _312 => _312.name]),
7502
+ stack: _optionalChain([diagnostics, 'optionalAccess', _313 => _313.stack]),
7503
+ sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _314 => _314.sourceFrame]),
7501
7504
  development: isDev,
7502
- farmVersion: _chunkXPVS4HKUcjs.FARM_VERSION,
7505
+ farmVersion: _chunkJZAGIXMBcjs.FARM_VERSION,
7503
7506
  nodeVersion: process.version,
7504
7507
  mode: isDev ? "development" : "production"
7505
7508
  })
@@ -7525,9 +7528,9 @@ window.__FARM_I18N__ = ${_chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0
7525
7528
  */
7526
7529
  getI18nAlternateOptions(req, metadata) {
7527
7530
  return {
7528
- metadataBase: _optionalChain([metadata, 'optionalAccess', _331 => _331.metadataBase]),
7529
- origin: req ? _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _332 => _332.config, 'access', _333 => _333.server, 'optionalAccess', _334 => _334.trustProxy]) }).origin : void 0,
7530
- languages: _optionalChain([metadata, 'optionalAccess', _335 => _335.alternates, 'optionalAccess', _336 => _336.languages])
7531
+ metadataBase: _optionalChain([metadata, 'optionalAccess', _315 => _315.metadataBase]),
7532
+ origin: req ? _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _316 => _316.config, 'access', _317 => _317.server, 'optionalAccess', _318 => _318.trustProxy]) }).origin : void 0,
7533
+ languages: _optionalChain([metadata, 'optionalAccess', _319 => _319.alternates, 'optionalAccess', _320 => _320.languages])
7531
7534
  };
7532
7535
  }
7533
7536
  createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
@@ -7553,9 +7556,9 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7553
7556
  );
7554
7557
  themeDocument.head = farmScripts(themeDocument.head);
7555
7558
  const rendererHydrationScript = farmScripts(
7556
- _optionalChain([this, 'access', _337 => _337.rendererRuntime, 'access', _338 => _338.generateHydrationScript, 'optionalCall', _339 => _339()]) || ""
7559
+ _optionalChain([this, 'access', _321 => _321.rendererRuntime, 'access', _322 => _322.generateHydrationScript, 'optionalCall', _323 => _323()]) || ""
7557
7560
  );
7558
- const viewportTags = _chunkO7B6LJWEcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _340 => _340.metadata, 'optionalAccess', _341 => _341.viewport]));
7561
+ const viewportTags = _chunkO7B6LJWEcjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _324 => _324.metadata, 'optionalAccess', _325 => _325.viewport]));
7559
7562
  const fullDocument = _chunkIGBQSUT5cjs.extractFarmFullDocument.call(void 0, _chunkIGBQSUT5cjs.markFarmDocumentLayouts.call(void 0, content));
7560
7563
  if (fullDocument) {
7561
7564
  return _chunkIGBQSUT5cjs.composeFarmFullDocument.call(void 0,
@@ -7585,7 +7588,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
7585
7588
  );
7586
7589
  }
7587
7590
  return `<!DOCTYPE html>
7588
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _342 => _342.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7591
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _326 => _326.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
7589
7592
  <head>
7590
7593
  ${themeDocument.head}
7591
7594
  <meta charset="utf-8">
@@ -7626,7 +7629,7 @@ ${clientScript}
7626
7629
  const deploymentId = this.getDeploymentId();
7627
7630
  res.setHeader(_chunkVIDUNAQEcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
7628
7631
  if ((req.method || "GET").toUpperCase() !== "GET") return;
7629
- const isSecure = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _343 => _343.config, 'access', _344 => _344.server, 'optionalAccess', _345 => _345.trustProxy]) }).protocol === "https:";
7632
+ const isSecure = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _327 => _327.config, 'access', _328 => _328.server, 'optionalAccess', _329 => _329.trustProxy]) }).protocol === "https:";
7630
7633
  const cookie = _chunkVIDUNAQEcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
7631
7634
  const existing = res.getHeader("Set-Cookie");
7632
7635
  if (Array.isArray(existing)) {
@@ -7690,7 +7693,7 @@ var FarmApp = class {
7690
7693
  await this.serverRenderer.initialize();
7691
7694
  await this.verifyAppStructure();
7692
7695
  await this.routeManager.discoverRoutes();
7693
- if (_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7696
+ if (_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) this.assertNoPageRoutes();
7694
7697
  this.routeManager.generateClientManifest(this.config.root);
7695
7698
  if (process.env.FARM_VERBOSE) {
7696
7699
  _chunk7ZDLE77Pcjs.logger.success("Farm.js application initialized successfully!");
@@ -7711,6 +7714,7 @@ var FarmApp = class {
7711
7714
  normalizeConfig(config) {
7712
7715
  const root = config.root || process.cwd();
7713
7716
  const basePath = _chunkTFCBJFP7cjs.normalizeFarmConfigBasePath.call(void 0, config.basePath);
7717
+ const serverComponents = _nullishCoalesce(_chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config), () => ( false));
7714
7718
  return {
7715
7719
  root,
7716
7720
  srcDir: config.srcDir || "src",
@@ -7719,7 +7723,7 @@ var FarmApp = class {
7719
7723
  outDir: config.outDir || "dist",
7720
7724
  basePath,
7721
7725
  trailingSlash: _nullishCoalesce(config.trailingSlash, () => ( false)),
7722
- renderer: _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer),
7726
+ renderer: _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer),
7723
7727
  preset: _nullishCoalesce(config.preset, () => ( "node-server")),
7724
7728
  deploy: config.deploy || {},
7725
7729
  storage: config.storage || {},
@@ -7740,7 +7744,7 @@ var FarmApp = class {
7740
7744
  security: _chunkIEZFFXSCcjs.resolveFarmSecurityConfig.call(void 0, config.security),
7741
7745
  images: _chunkJ2JMESBJcjs.resolveFarmImageConfig.call(void 0,
7742
7746
  config.images,
7743
- _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7747
+ _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
7744
7748
  ),
7745
7749
  performance: _chunkERSLQ4C7cjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
7746
7750
  theme: _chunkEGMJ5KEUcjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
@@ -7769,12 +7773,14 @@ var FarmApp = class {
7769
7773
  ),
7770
7774
  env: config.env || { server: {}, public: {} },
7771
7775
  suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
7776
+ serverComponents,
7772
7777
  experimental: {
7773
- serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _346 => _346.experimental, 'optionalAccess', _347 => _347.serverComponents]), () => ( false)),
7774
- serverActions: _nullishCoalesce(_optionalChain([config, 'access', _348 => _348.experimental, 'optionalAccess', _349 => _349.serverActions]), () => ( false)),
7775
- isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _350 => _350.experimental, 'optionalAccess', _351 => _351.isolatedClientHydration]), () => ( "off")),
7776
- ppr: _nullishCoalesce(_optionalChain([config, 'access', _352 => _352.experimental, 'optionalAccess', _353 => _353.ppr]), () => ( false)),
7777
- ...config.experimental
7778
+ serverActions: _nullishCoalesce(_optionalChain([config, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverActions]), () => ( false)),
7779
+ isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _332 => _332.experimental, 'optionalAccess', _333 => _333.isolatedClientHydration]), () => ( "off")),
7780
+ ppr: _nullishCoalesce(_optionalChain([config, 'access', _334 => _334.experimental, 'optionalAccess', _335 => _335.ppr]), () => ( false)),
7781
+ ...config.experimental,
7782
+ // The deprecated spelling mirrors `serverComponents` for code that still reads it.
7783
+ serverComponents
7778
7784
  },
7779
7785
  agent: _nullishCoalesce(config.agent, () => ( {})),
7780
7786
  vite: config.vite || {}
@@ -7793,13 +7799,13 @@ var FarmApp = class {
7793
7799
  );
7794
7800
  }
7795
7801
  async verifyAppStructure() {
7796
- if (typeof _optionalChain([this, 'access', _354 => _354.config, 'access', _355 => _355.renderer, 'optionalAccess', _356 => _356.routes]) === "function") return;
7797
- const appDirs = _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, this.config);
7802
+ if (typeof _optionalChain([this, 'access', _336 => _336.config, 'access', _337 => _337.renderer, 'optionalAccess', _338 => _338.routes]) === "function") return;
7803
+ const appDirs = _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, this.config);
7798
7804
  const hasAppDirectory = (await Promise.all(appDirs.map((appDir) => _chunk7ZDLE77Pcjs.fileExists.call(void 0, appDir)))).some(
7799
7805
  Boolean
7800
7806
  );
7801
7807
  if (!hasAppDirectory) {
7802
- const routeFiles = _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7808
+ const routeFiles = _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
7803
7809
  (source) => _chunkPRKFECGTcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
7804
7810
  );
7805
7811
  if (routeFiles.length > 0) {
@@ -7810,14 +7816,14 @@ var FarmApp = class {
7810
7816
  `App directory not found at ${appDir}. Please create a src/app directory or extend a Farm layer containing routes.`
7811
7817
  );
7812
7818
  }
7813
- const componentExtensions = _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7819
+ const componentExtensions = _chunkLEZJZX4Ccjs.getFarmRendererComponentExtensions.call(void 0, this.config.renderer);
7814
7820
  const rootLayoutPaths = appDirs.flatMap(
7815
7821
  (appDir) => componentExtensions.map((extension) => path4.default.join(appDir, `layout${extension}`))
7816
7822
  );
7817
7823
  const hasRootLayout = await Promise.all(rootLayoutPaths.map((p) => _chunk7ZDLE77Pcjs.fileExists.call(void 0, p))).then(
7818
7824
  (results) => results.some(Boolean)
7819
7825
  );
7820
- if (!hasRootLayout && !_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7826
+ if (!hasRootLayout && !_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
7821
7827
  _chunk7ZDLE77Pcjs.logger.warn(
7822
7828
  `No root layout found. Consider creating src/app/layout${componentExtensions[0]} for consistent page structure.`
7823
7829
  );
@@ -7833,7 +7839,7 @@ function isResolvedAuthConfig(value) {
7833
7839
  );
7834
7840
  }
7835
7841
  function normalizeFarmAppAPIConfig(config) {
7836
- if (typeof _optionalChain([config, 'optionalAccess', _357 => _357.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _358 => _358.basePath]) === "function") {
7842
+ if (typeof _optionalChain([config, 'optionalAccess', _339 => _339.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _340 => _340.basePath]) === "function") {
7837
7843
  throw new Error(
7838
7844
  "Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
7839
7845
  );
@@ -7849,7 +7855,7 @@ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
7849
7855
  var SHARP_INSTALL_HINT = _chunkIDUGG7VRcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
7850
7856
  var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
7851
7857
  function resolveFarmImageProviderForRuntime(images, options) {
7852
- const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _359 => _359.provider]), () => ( "auto"));
7858
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _341 => _341.provider]), () => ( "auto"));
7853
7859
  if (provider === "none") return images;
7854
7860
  const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
7855
7861
  if (!usesSharp || _chunkIDUGG7VRcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
@@ -7993,9 +7999,9 @@ function staticValue(node) {
7993
7999
  }
7994
8000
  }
7995
8001
  function property(object, name) {
7996
- return _optionalChain([object, 'access', _360 => _360.properties, 'access', _361 => _361.find, 'call', _362 => _362(
8002
+ return _optionalChain([object, 'access', _342 => _342.properties, 'access', _343 => _343.find, 'call', _344 => _344(
7997
8003
  (entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
7998
- ), 'optionalAccess', _363 => _363.value]);
8004
+ ), 'optionalAccess', _345 => _345.value]);
7999
8005
  }
8000
8006
  function toolFromObject(object) {
8001
8007
  const name = staticValue(property(object, "name"));
@@ -8041,7 +8047,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
8041
8047
  if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
8042
8048
  continue;
8043
8049
  for (const specifier of statement.specifiers) {
8044
- const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _364 => _364.imported, 'optionalAccess', _365 => _365.name]), () => ( _optionalChain([specifier, 'access', _366 => _366.imported, 'optionalAccess', _367 => _367.value])));
8050
+ const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _346 => _346.imported, 'optionalAccess', _347 => _347.name]), () => ( _optionalChain([specifier, 'access', _348 => _348.imported, 'optionalAccess', _349 => _349.value])));
8045
8051
  if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
8046
8052
  locals.set(specifier.local.name, imported);
8047
8053
  }
@@ -8057,7 +8063,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
8057
8063
  const [argument] = current.arguments;
8058
8064
  if (definer && argument) {
8059
8065
  const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
8060
- (element) => _optionalChain([element, 'optionalAccess', _368 => _368.type]) === "ObjectExpression"
8066
+ (element) => _optionalChain([element, 'optionalAccess', _350 => _350.type]) === "ObjectExpression"
8061
8067
  ) : [] : argument.type === "ObjectExpression" ? [argument] : [];
8062
8068
  for (const object of objects) {
8063
8069
  const tool = toolFromObject(object);
@@ -8119,8 +8125,8 @@ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
8119
8125
 
8120
8126
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
8121
8127
  function resolveFarmClientCacheAdapterEntry(root, cache2) {
8122
- const client = _optionalChain([cache2, 'optionalAccess', _369 => _369.client]);
8123
- const adapter = _optionalChain([client, 'optionalAccess', _370 => _370.adapter]);
8128
+ const client = _optionalChain([cache2, 'optionalAccess', _351 => _351.client]);
8129
+ const adapter = _optionalChain([client, 'optionalAccess', _352 => _352.adapter]);
8124
8130
  if (adapter === void 0) return void 0;
8125
8131
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
8126
8132
  throw new Error(
@@ -8135,8 +8141,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
8135
8141
  );
8136
8142
  }
8137
8143
  const options = {};
8138
- if (_optionalChain([client, 'optionalAccess', _371 => _371.version]) !== void 0) options.version = client.version;
8139
- if (_optionalChain([client, 'optionalAccess', _372 => _372.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
8144
+ if (_optionalChain([client, 'optionalAccess', _353 => _353.version]) !== void 0) options.version = client.version;
8145
+ if (_optionalChain([client, 'optionalAccess', _354 => _354.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
8140
8146
  return { importPath: found.replace(/\\/g, "/"), options };
8141
8147
  }
8142
8148
  function resolveAdapterFile(resolved) {
@@ -8600,7 +8606,7 @@ function redactFarmDocsClientConfig(code, filename) {
8600
8606
  const current = node;
8601
8607
  if (current.type === "Property") {
8602
8608
  const name = propertyKeyName(current);
8603
- const valueType = _optionalChain([current, 'access', _373 => _373.value, 'optionalAccess', _374 => _374.type]);
8609
+ const valueType = _optionalChain([current, 'access', _355 => _355.value, 'optionalAccess', _356 => _356.type]);
8604
8610
  const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkP4ZLFUNBcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
8605
8611
  if (name && credential) {
8606
8612
  edits.push(
@@ -8643,7 +8649,7 @@ function farmDocsClientConfigPlugin(configModule) {
8643
8649
  // Never matches without a docs config module, so the bundler never calls the handler.
8644
8650
  filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
8645
8651
  handler(code, id, options) {
8646
- if (_optionalChain([options, 'optionalAccess', _375 => _375.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8652
+ if (_optionalChain([options, 'optionalAccess', _357 => _357.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
8647
8653
  const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
8648
8654
  return redacted === null ? null : { code: redacted, map: null };
8649
8655
  }
@@ -8758,27 +8764,27 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
8758
8764
  function isInstalledPackage(root, specifier) {
8759
8765
  const parts = specifier.split("/");
8760
8766
  const name = specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
8761
- const directory = _chunk2PSN2PUJcjs.findFarmAppPackageDir.call(void 0, root, name);
8767
+ const directory = _chunkEWPH5IOCcjs.findFarmAppPackageDir.call(void 0, root, name);
8762
8768
  return directory !== void 0 && directory.split(path4.default.sep).includes("node_modules");
8763
8769
  }
8764
8770
  function getFarmClientOptimizeDepsInclude(renderer, root) {
8765
8771
  return Array.from(
8766
8772
  /* @__PURE__ */ new Set([
8767
8773
  ...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE,
8768
- ..._optionalChain([renderer, 'optionalAccess', _376 => _376.optimizeDeps]) || [],
8774
+ ..._optionalChain([renderer, 'optionalAccess', _358 => _358.optimizeDeps]) || [],
8769
8775
  // Farm's browser entry imports a renderer's client module, and no app file does, so Vite's
8770
8776
  // scan never sees it and finds it only on the first page request, then bundles again. The
8771
8777
  // React entry imports `react-dom/client` instead, which is already listed. A linked
8772
8778
  // renderer stays source: pre-bundling it would copy the packages it shares with the app's
8773
8779
  // components into the bundle, so a hook would read a different copy than the renderer set.
8774
- ...renderer && root && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkLVYUTMW4cjs.isPackageSpecifier.call(void 0, renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : [],
8780
+ ...renderer && root && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLVYUTMW4cjs.isPackageSpecifier.call(void 0, renderer.client) && isInstalledPackage(root, renderer.client) ? [renderer.client] : [],
8775
8781
  // Farm's renderer API, which a renderer's bindings import. An app's components reach it only
8776
8782
  // through them, from files Vite's scan may not read, such as a custom renderer's own format.
8777
8783
  // Served as source from a linked renderer, its imports were found on the first page request,
8778
8784
  // and Vite bundled again and reloaded the page while it loaded.
8779
- ...renderer && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? ["@farm.js/core/renderer-client"] : [],
8785
+ ...renderer && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? ["@farm.js/core/renderer-client"] : [],
8780
8786
  // The islands runtime of a renderer that declares `islands`, which only Farm's entry imports.
8781
- ...renderer && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands ? [
8787
+ ...renderer && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands ? [
8782
8788
  "@farm.js/core/internal/renderer-islands",
8783
8789
  "@farm.js/core > @farm.js/islx/islands/client"
8784
8790
  ] : []
@@ -8794,7 +8800,7 @@ function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
8794
8800
  });
8795
8801
  }
8796
8802
  function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8797
- if (_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8803
+ if (_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, renderer)) return { noDiscovery: true, include: [] };
8798
8804
  const jsxImportSource = renderer ? renderer.jsxImportSource : void 0;
8799
8805
  return {
8800
8806
  // Keep normal application dependency discovery for CJS-only packages, but
@@ -8807,7 +8813,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer, root) {
8807
8813
  // Farm's HTML boots through a virtual module and imports route UI lazily.
8808
8814
  // Explicit entries let Vite finish that crawl before a navigation can
8809
8815
  // rotate the optimizer hash underneath a hydrated React runtime.
8810
- ..._optionalChain([entries, 'optionalAccess', _377 => _377.length]) ? { entries: [...entries] } : {},
8816
+ ..._optionalChain([entries, 'optionalAccess', _359 => _359.length]) ? { entries: [...entries] } : {},
8811
8817
  // Vite's dependency scan compiles JSX on its own: with the app tsconfig's `jsxImportSource`
8812
8818
  // when there is one, otherwise as React, whatever the renderer's plugin set for its own
8813
8819
  // transforms. React is the default already, and naming it here would override a tsconfig
@@ -8848,8 +8854,8 @@ function mergeFarmViteAlias(farmValue, userValue) {
8848
8854
  return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
8849
8855
  }
8850
8856
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8851
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _378 => _378.optimizeDeps, 'optionalAccess', _379 => _379.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _380 => _380.optimizeDeps, 'optionalAccess', _381 => _381.noDiscovery])));
8852
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _382 => _382.optimizeDeps, 'optionalAccess', _383 => _383.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _384 => _384.optimizeDeps, 'optionalAccess', _385 => _385.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _386 => _386.optimizeDeps, 'optionalAccess', _387 => _387.holdUntilCrawlEnd]))));
8857
+ const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _360 => _360.optimizeDeps, 'optionalAccess', _361 => _361.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _362 => _362.optimizeDeps, 'optionalAccess', _363 => _363.noDiscovery])));
8858
+ const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _364 => _364.optimizeDeps, 'optionalAccess', _365 => _365.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _366 => _366.optimizeDeps, 'optionalAccess', _367 => _367.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _368 => _368.optimizeDeps, 'optionalAccess', _369 => _369.holdUntilCrawlEnd]))));
8853
8859
  return {
8854
8860
  ...farmConfig,
8855
8861
  ...userConfig,
@@ -8861,9 +8867,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8861
8867
  resolve: {
8862
8868
  ...farmConfig.resolve,
8863
8869
  ...userConfig.resolve,
8864
- alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _388 => _388.resolve, 'optionalAccess', _389 => _389.alias]), _optionalChain([userConfig, 'access', _390 => _390.resolve, 'optionalAccess', _391 => _391.alias])),
8870
+ alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _370 => _370.resolve, 'optionalAccess', _371 => _371.alias]), _optionalChain([userConfig, 'access', _372 => _372.resolve, 'optionalAccess', _373 => _373.alias])),
8865
8871
  dedupe: Array.from(
8866
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _392 => _392.resolve, 'optionalAccess', _393 => _393.dedupe]) || [], ..._optionalChain([userConfig, 'access', _394 => _394.resolve, 'optionalAccess', _395 => _395.dedupe]) || []])
8872
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _374 => _374.resolve, 'optionalAccess', _375 => _375.dedupe]) || [], ..._optionalChain([userConfig, 'access', _376 => _376.resolve, 'optionalAccess', _377 => _377.dedupe]) || []])
8867
8873
  )
8868
8874
  },
8869
8875
  optimizeDeps: {
@@ -8873,21 +8879,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
8873
8879
  holdUntilCrawlEnd,
8874
8880
  include: Array.from(
8875
8881
  /* @__PURE__ */ new Set([
8876
- ..._optionalChain([farmConfig, 'access', _396 => _396.optimizeDeps, 'optionalAccess', _397 => _397.include]) || [],
8877
- ..._optionalChain([userConfig, 'access', _398 => _398.optimizeDeps, 'optionalAccess', _399 => _399.include]) || []
8882
+ ..._optionalChain([farmConfig, 'access', _378 => _378.optimizeDeps, 'optionalAccess', _379 => _379.include]) || [],
8883
+ ..._optionalChain([userConfig, 'access', _380 => _380.optimizeDeps, 'optionalAccess', _381 => _381.include]) || []
8878
8884
  ])
8879
8885
  ),
8880
8886
  exclude: Array.from(
8881
8887
  /* @__PURE__ */ new Set([
8882
- ..._optionalChain([farmConfig, 'access', _400 => _400.optimizeDeps, 'optionalAccess', _401 => _401.exclude]) || [],
8883
- ..._optionalChain([userConfig, 'access', _402 => _402.optimizeDeps, 'optionalAccess', _403 => _403.exclude]) || []
8888
+ ..._optionalChain([farmConfig, 'access', _382 => _382.optimizeDeps, 'optionalAccess', _383 => _383.exclude]) || [],
8889
+ ..._optionalChain([userConfig, 'access', _384 => _384.optimizeDeps, 'optionalAccess', _385 => _385.exclude]) || []
8884
8890
  ])
8885
8891
  )
8886
8892
  },
8887
8893
  ssr: {
8888
8894
  ...farmConfig.ssr,
8889
8895
  ...userConfig.ssr,
8890
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _404 => _404.ssr, 'optionalAccess', _405 => _405.noExternal]), _optionalChain([userConfig, 'access', _406 => _406.ssr, 'optionalAccess', _407 => _407.noExternal]))
8896
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _386 => _386.ssr, 'optionalAccess', _387 => _387.noExternal]), _optionalChain([userConfig, 'access', _388 => _388.ssr, 'optionalAccess', _389 => _389.noExternal]))
8891
8897
  }
8892
8898
  };
8893
8899
  }
@@ -8958,8 +8964,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8958
8964
  ...userRolldownOptions
8959
8965
  };
8960
8966
  const merged = mergeFarmViteConfig(farmConfig, shared);
8961
- const farmBundlerOptions = _optionalChain([farmConfig, 'access', _408 => _408.build, 'optionalAccess', _409 => _409.rollupOptions]);
8962
- const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _410 => _410.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _411 => _411.output]);
8967
+ const farmBundlerOptions = _optionalChain([farmConfig, 'access', _390 => _390.build, 'optionalAccess', _391 => _391.rollupOptions]);
8968
+ const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _392 => _392.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _393 => _393.output]);
8963
8969
  return {
8964
8970
  ...merged,
8965
8971
  build: {
@@ -8976,7 +8982,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
8976
8982
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
8977
8983
  ssr: {
8978
8984
  ...merged.ssr,
8979
- external: mergeExternal(_optionalChain([farmConfig, 'access', _412 => _412.ssr, 'optionalAccess', _413 => _413.external]), _optionalChain([userConfig, 'access', _414 => _414.ssr, 'optionalAccess', _415 => _415.external]))
8985
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _394 => _394.ssr, 'optionalAccess', _395 => _395.external]), _optionalChain([userConfig, 'access', _396 => _396.ssr, 'optionalAccess', _397 => _397.external]))
8980
8986
  }
8981
8987
  };
8982
8988
  }