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

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 (218) hide show
  1. package/README.md +1 -3
  2. package/dist/{agent-mcp.d-BdFnjlAT.d.mts → agent-mcp.d-DhZf5-v0.d.mts} +1 -1
  3. package/dist/{agent-mcp.d-CAwDC9y4.d.ts → agent-mcp.d-xPua9Zdz.d.ts} +1 -1
  4. package/dist/agent-runtime.d.mts +1 -1
  5. package/dist/agent-runtime.d.ts +1 -1
  6. package/dist/{analyzer-K3S4YRAH.mjs → analyzer-LQ4LVDCW.mjs} +2 -2
  7. package/dist/analyzer-ZFC2L6NZ.cjs +17 -0
  8. package/dist/api/node.d.mts +3 -3
  9. package/dist/api/node.d.ts +3 -3
  10. package/dist/api/route-manager.cjs +3 -3
  11. package/dist/api/route-manager.d.mts +3 -3
  12. package/dist/api/route-manager.d.ts +3 -3
  13. package/dist/api/route-manager.mjs +2 -2
  14. package/dist/api/runtime.d.mts +2 -2
  15. package/dist/api/runtime.d.ts +2 -2
  16. package/dist/api.cjs +4 -4
  17. package/dist/api.d.mts +4 -4
  18. package/dist/api.d.ts +4 -4
  19. package/dist/api.mjs +3 -3
  20. package/dist/{app-manifest.d-COs1wBGz.d.mts → app-manifest.d-Bq9VWtpk.d.mts} +1 -1
  21. package/dist/{app-manifest.d-Dczk-fwt.d.ts → app-manifest.d-D6l1Wkn6.d.ts} +1 -1
  22. package/dist/app-markdown.d.mts +2 -2
  23. package/dist/app-markdown.d.ts +2 -2
  24. package/dist/{app.d-LepnxO-5.d.mts → app.d-Bn1bqBkf.d.mts} +4 -4
  25. package/dist/{app.d-DREl_yXh.d.ts → app.d-gnTrW72o.d.ts} +4 -4
  26. package/dist/{chunk-X2SMVPLH.mjs → chunk-2FBFJO2Z.mjs} +8 -5
  27. package/dist/{chunk-VQYGXWCS.cjs → chunk-2LHO4HTP.cjs} +2 -2
  28. package/dist/{chunk-QBCR2EHA.cjs → chunk-4ER5KYSC.cjs} +3 -3
  29. package/dist/{chunk-WLOIUPV2.mjs → chunk-54INSSWI.mjs} +25 -22
  30. package/dist/{chunk-Z3RM3VA2.mjs → chunk-5VXVRMXK.mjs} +11 -1
  31. package/dist/chunk-CYUTK4JP.cjs +52 -0
  32. package/dist/{chunk-AGEBFYHF.mjs → chunk-D7KBMJ7L.mjs} +1 -1
  33. package/dist/{chunk-FYVSAWJP.cjs → chunk-DNERKYN4.cjs} +11 -11
  34. package/dist/{chunk-2PSN2PUJ.cjs → chunk-EWPH5IOC.cjs} +19 -16
  35. package/dist/{chunk-5UMPMVNF.mjs → chunk-FFROR7QD.mjs} +1 -1
  36. package/dist/{chunk-HFOME6I2.mjs → chunk-GAD63TH7.mjs} +5 -5
  37. package/dist/{chunk-DFLCEMQ3.mjs → chunk-GK2RCRT2.mjs} +1 -1
  38. package/dist/{chunk-IU4YTFFQ.cjs → chunk-GUYGMTWA.cjs} +12 -9
  39. package/dist/{chunk-HV6CYSMF.mjs → chunk-HHZURH4U.mjs} +1 -17
  40. package/dist/{chunk-II4ENBE4.mjs → chunk-HYYOVRED.mjs} +1 -1
  41. package/dist/{chunk-VMIR4SUL.cjs → chunk-J6JAUJPC.cjs} +373 -370
  42. package/dist/{chunk-AGT633OM.cjs → chunk-JKNQMGZE.cjs} +11 -11
  43. package/dist/{chunk-ANKMAGFJ.mjs → chunk-KJW6KEOZ.mjs} +1 -1
  44. package/dist/{chunk-LOQVWATF.mjs → chunk-KKXGBQ2K.mjs} +2 -2
  45. package/dist/{chunk-TQCDN4DV.mjs → chunk-KQXYBJES.mjs} +14 -11
  46. package/dist/{chunk-HP7QYVST.cjs → chunk-LEZJZX4C.cjs} +1 -18
  47. package/dist/{chunk-E5AC7E25.cjs → chunk-LGL5QKUJ.cjs} +2 -2
  48. package/dist/{chunk-LWQ6IESX.mjs → chunk-MEIZIRMK.mjs} +1 -1
  49. package/dist/{chunk-T4NOMZTS.mjs → chunk-MLMDOIBY.mjs} +3 -3
  50. package/dist/{chunk-XJEOHDPN.cjs → chunk-MNBFSAWF.cjs} +1 -1
  51. package/dist/{chunk-NNHIV3O2.cjs → chunk-MUQP2APN.cjs} +2 -2
  52. package/dist/{chunk-VVIO7QGN.mjs → chunk-MX4G24YS.mjs} +29 -26
  53. package/dist/{chunk-C4DZAEVT.cjs → chunk-MZG5M4JS.cjs} +4 -4
  54. package/dist/{chunk-MBDDLYT5.cjs → chunk-O47IT4CS.cjs} +4 -4
  55. package/dist/{chunk-F5T55PYX.cjs → chunk-OAAVIFOJ.cjs} +26 -21
  56. package/dist/{chunk-GTHBWZUK.mjs → chunk-OZAVCLXY.mjs} +1 -1
  57. package/dist/{chunk-2UV765GT.cjs → chunk-PATIHHC7.cjs} +2 -2
  58. package/dist/{chunk-KBURN62Z.cjs → chunk-PFVNPOKN.cjs} +11 -1
  59. package/dist/chunk-PTG5BEMG.mjs +47 -0
  60. package/dist/{chunk-EBVKVDQA.mjs → chunk-PZ5ZJAAO.mjs} +1 -1
  61. package/dist/{chunk-D5OY5OKA.mjs → chunk-RDT2LJES.mjs} +23 -17
  62. package/dist/{chunk-APKULXZV.cjs → chunk-RMLXUVR5.cjs} +2 -2
  63. package/dist/{chunk-VGX75645.mjs → chunk-RP55BUJM.mjs} +8 -5
  64. package/dist/{chunk-P67RLOMO.mjs → chunk-SIHHYNX4.mjs} +1 -1
  65. package/dist/{chunk-KM7ZRKCH.cjs → chunk-T4VF6BYV.cjs} +10 -10
  66. package/dist/{chunk-IASZIYNM.cjs → chunk-VFZQXADS.cjs} +299 -296
  67. package/dist/{chunk-UBH2OARS.cjs → chunk-VWPGK6UV.cjs} +280 -274
  68. package/dist/{chunk-V5F6HN7E.mjs → chunk-WOPQQCP3.mjs} +1 -1
  69. package/dist/{chunk-DVXT7RLV.cjs → chunk-WXPY5FRF.cjs} +6 -6
  70. package/dist/{chunk-XPVS4HKU.cjs → chunk-Z7YIQ7AJ.cjs} +1 -1
  71. package/dist/{chunk-PSALMEHJ.cjs → chunk-ZCT6B5PQ.cjs} +23 -20
  72. package/dist/{chunk-2ORWY3SE.mjs → chunk-ZF7N222A.mjs} +2 -2
  73. package/dist/{chunk-MRDI6MTL.mjs → chunk-ZRTBDHO2.mjs} +15 -10
  74. package/dist/{chunk-5BZ7PR3T.cjs → chunk-ZTNU4XCC.cjs} +3 -3
  75. package/dist/{chunk-VS4ABIJJ.mjs → chunk-ZVEKOMZS.mjs} +1 -1
  76. package/dist/{cli-runtime.d-BGaFPum1.d.mts → cli-runtime.d-LwIb0swO.d.mts} +5 -5
  77. package/dist/{cli-runtime.d-Bvfxt4uo.d.ts → cli-runtime.d-Vvxf-Z8a.d.ts} +5 -5
  78. package/dist/{client-component.d-BA6kXI5L.d.mts → client-component.d-34DDMZcl.d.mts} +1 -1
  79. package/dist/{client-component.d-LSEmRhuI.d.ts → client-component.d-DT5OKBZu.d.ts} +1 -1
  80. package/dist/{client-plugins.d-CVUMc2ai.d.mts → client-plugins.d-D7k9t9Ge.d.mts} +17 -12
  81. package/dist/{client-plugins.d-CQ6AGHP0.d.ts → client-plugins.d-D9CnUvZ5.d.ts} +17 -12
  82. package/dist/client-plugins.d.mts +1 -1
  83. package/dist/client-plugins.d.ts +1 -1
  84. package/dist/client.d.mts +7 -7
  85. package/dist/client.d.ts +7 -7
  86. package/dist/config.d.mts +1 -1
  87. package/dist/config.d.ts +1 -1
  88. package/dist/desktop.d.mts +2 -2
  89. package/dist/desktop.d.ts +2 -2
  90. package/dist/{devtools-OBQY3XOY.cjs → devtools-IUU4SWQL.cjs} +12 -9
  91. package/dist/{devtools-RYTO2V7G.mjs → devtools-R77KAJA4.mjs} +8 -5
  92. package/dist/docs.cjs +7 -6
  93. package/dist/docs.d.mts +3 -3
  94. package/dist/docs.d.ts +3 -3
  95. package/dist/docs.mjs +6 -5
  96. package/dist/environment/vite.cjs +6 -5
  97. package/dist/environment/vite.d.mts +1 -0
  98. package/dist/environment/vite.d.ts +1 -0
  99. package/dist/environment/vite.mjs +5 -4
  100. package/dist/{handler.d-nkrNn_0M.d.ts → handler.d-DbZvbwNi.d.ts} +1 -1
  101. package/dist/{handler.d-DLKZDAYR.d.mts → handler.d-fxTjv3Nn.d.mts} +1 -1
  102. package/dist/{headers.d-C3k520Fc.d.mts → headers.d-OBHpGTF_.d.mts} +1 -1
  103. package/dist/{headers.d-DVBrYnqP.d.ts → headers.d-oeWybIk8.d.ts} +1 -1
  104. package/dist/index.cjs +28 -27
  105. package/dist/{index.d-e5WhoB07.d.ts → index.d-BM-dKdzH.d.ts} +1 -1
  106. package/dist/{index.d-5PDB032w.d.mts → index.d-CRrPQwlO.d.mts} +1 -1
  107. package/dist/index.d.mts +22 -22
  108. package/dist/index.d.ts +22 -22
  109. package/dist/index.mjs +23 -22
  110. package/dist/integrations/orm.d.mts +1 -1
  111. package/dist/integrations/orm.d.ts +1 -1
  112. package/dist/integrations.d.mts +1 -1
  113. package/dist/integrations.d.ts +1 -1
  114. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  115. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  116. package/dist/internal/build-runtime.cjs +23 -22
  117. package/dist/internal/build-runtime.d.mts +5 -5
  118. package/dist/internal/build-runtime.d.ts +5 -5
  119. package/dist/internal/build-runtime.mjs +22 -21
  120. package/dist/internal/cli-runtime.cjs +11 -10
  121. package/dist/internal/cli-runtime.d.mts +7 -7
  122. package/dist/internal/cli-runtime.d.ts +7 -7
  123. package/dist/internal/cli-runtime.mjs +10 -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 +5 -5
  127. package/dist/internal/client-runtime.d.ts +5 -5
  128. package/dist/internal/compression-runtime.d.mts +1 -1
  129. package/dist/internal/compression-runtime.d.ts +1 -1
  130. package/dist/internal/config-runtime.cjs +7 -6
  131. package/dist/internal/config-runtime.d.mts +3 -3
  132. package/dist/internal/config-runtime.d.ts +3 -3
  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 +10 -10
  142. package/dist/internal/production-runtime.d.ts +10 -10
  143. package/dist/internal/production-runtime.mjs +3 -3
  144. package/dist/internal/spa-router.d.mts +3 -3
  145. package/dist/internal/spa-router.d.ts +3 -3
  146. package/dist/internal/start-manifest.d.mts +1 -1
  147. package/dist/internal/start-manifest.d.ts +1 -1
  148. package/dist/layers-6R55QDT5.cjs +26 -0
  149. package/dist/{layers-IMRXNZRB.mjs → layers-O6GUR6LT.mjs} +6 -1
  150. package/dist/{manager-GZUTAN5Q.mjs → manager-EFPBRS3U.mjs} +3 -3
  151. package/dist/{manager-3DFQDKJ6.cjs → manager-STAB5TVZ.cjs} +4 -4
  152. package/dist/markdown.d.mts +1 -1
  153. package/dist/markdown.d.ts +1 -1
  154. package/dist/middleware.d.mts +1 -1
  155. package/dist/middleware.d.ts +1 -1
  156. package/dist/{mount.d-COIrFH0i.d.mts → mount.d-B7RiwjiO.d.mts} +1 -1
  157. package/dist/{mount.d-Cbz8vsSZ.d.ts → mount.d-TnD-Mebk.d.ts} +1 -1
  158. package/dist/{navigation-delegate.d-yulG9Dp5.d.mts → navigation-delegate.d-Boz2511c.d.mts} +1 -1
  159. package/dist/{navigation-delegate.d-dlnYTX-Y.d.ts → navigation-delegate.d-VBCF0EeN.d.ts} +1 -1
  160. package/dist/navigation.d.mts +4 -4
  161. package/dist/navigation.d.ts +4 -4
  162. package/dist/plugin.cjs +18 -17
  163. package/dist/plugin.d.mts +5 -5
  164. package/dist/plugin.d.ts +5 -5
  165. package/dist/plugin.mjs +17 -16
  166. package/dist/{render-plan.d-Cz7bQmcf.d.ts → render-plan.d-BrumV_ZE.d.ts} +1 -1
  167. package/dist/{render-plan.d-BW56oxMP.d.mts → render-plan.d-BwnmyfNk.d.mts} +1 -1
  168. package/dist/renderer-client.d.mts +5 -5
  169. package/dist/renderer-client.d.ts +5 -5
  170. package/dist/renderer.cjs +4 -3
  171. package/dist/renderer.d.mts +1 -1
  172. package/dist/renderer.d.ts +1 -1
  173. package/dist/renderer.mjs +3 -2
  174. package/dist/{request.d-BwgX-7Wi.d.mts → request.d-Dd5nRTO5.d.mts} +1 -1
  175. package/dist/{request.d-BaFROByP.d.ts → request.d-NUi01-5e.d.ts} +1 -1
  176. package/dist/request.d.mts +2 -2
  177. package/dist/request.d.ts +2 -2
  178. package/dist/{route-rendering.d-BzeFPYGc.d.mts → route-rendering.d-BK0Pf7_k.d.mts} +1 -1
  179. package/dist/{route-rendering.d-D4kUuncg.d.ts → route-rendering.d-CJR5BPXV.d.ts} +1 -1
  180. package/dist/{router.d-B9qJdgjt.d.ts → router.d-C-JSFCPU.d.ts} +1 -1
  181. package/dist/{router.d-D-p8WElf.d.mts → router.d-CNUS3x1j.d.mts} +1 -1
  182. package/dist/routes.d.mts +1 -1
  183. package/dist/routes.d.ts +1 -1
  184. package/dist/{rsc-pipeline-Y6D6KBES.mjs → rsc-pipeline-DHISDFT7.mjs} +7 -6
  185. package/dist/{rsc-pipeline-YHVEHWTU.cjs → rsc-pipeline-UBWVU3NF.cjs} +8 -7
  186. package/dist/{runtime-62ZIEV6U.mjs → runtime-VUKMY44G.mjs} +11 -8
  187. package/dist/{runtime-LKEMFXHW.cjs → runtime-XKRQW3YT.cjs} +15 -12
  188. package/dist/{runtime.d-Du64AX3R.d.ts → runtime.d-B2T4bM5_.d.ts} +1 -1
  189. package/dist/{runtime.d-BUtDIrRJ.d.mts → runtime.d-CsOpO6yQ.d.mts} +1 -1
  190. package/dist/{server-components-status.d-CvFhb6-t.d.ts → server-components-status.d-Cc5rir0l.d.mts} +2 -2
  191. package/dist/{server-components-status.d-B0YP-m9A.d.mts → server-components-status.d-DOYt4E_Q.d.ts} +2 -2
  192. package/dist/server-plugins.d.mts +3 -3
  193. package/dist/server-plugins.d.ts +3 -3
  194. package/dist/server.cjs +56 -53
  195. package/dist/server.d.mts +12 -12
  196. package/dist/server.d.ts +12 -12
  197. package/dist/server.mjs +23 -20
  198. package/dist/{spa-router.d-D4ye2WFk.d.ts → spa-router.d-C7FcpLxU.d.ts} +2 -2
  199. package/dist/{spa-router.d-CkR14oGH.d.mts → spa-router.d-Cq5UFJvq.d.mts} +2 -2
  200. package/dist/{ssg.d-DFs97VTY.d.mts → ssg.d-BzNZemk7.d.mts} +2 -2
  201. package/dist/{ssg.d-BCJB_f7B.d.ts → ssg.d-DUhacIxj.d.ts} +2 -2
  202. package/dist/{store-core.d-0W2YScl8.d.ts → store-core.d-BX3yXrxA.d.ts} +2 -2
  203. package/dist/{store-core.d-Vk5UDKeC.d.mts → store-core.d-DbUAtSBK.d.mts} +2 -2
  204. package/dist/testing.cjs +2 -2
  205. package/dist/testing.d.mts +1 -1
  206. package/dist/testing.d.ts +1 -1
  207. package/dist/testing.mjs +2 -2
  208. package/dist/{utils.d-Ba3N28fk.d.ts → utils.d-BhJJEXzo.d.ts} +1 -1
  209. package/dist/{utils.d-Cloiko8d.d.mts → utils.d-NOMkLFpC.d.mts} +1 -1
  210. package/dist/version.cjs +2 -2
  211. package/dist/version.mjs +1 -1
  212. package/dist/vite.cjs +18 -17
  213. package/dist/vite.d.mts +6 -6
  214. package/dist/vite.d.ts +6 -6
  215. package/dist/vite.mjs +17 -16
  216. package/package.json +1 -1
  217. package/dist/analyzer-3AMJK27J.cjs +0 -17
  218. package/dist/layers-GP57TBE2.cjs +0 -21
@@ -44,7 +44,7 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkUBH2OARScjs = require('./chunk-UBH2OARS.cjs');
47
+ var _chunkVWPGK6UVcjs = require('./chunk-VWPGK6UV.cjs');
48
48
 
49
49
 
50
50
 
@@ -59,10 +59,10 @@ var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
59
59
 
60
60
 
61
61
 
62
- var _chunkKM7ZRKCHcjs = require('./chunk-KM7ZRKCH.cjs');
62
+ var _chunkT4VF6BYVcjs = require('./chunk-T4VF6BYV.cjs');
63
63
 
64
64
 
65
- var _chunkMBDDLYT5cjs = require('./chunk-MBDDLYT5.cjs');
65
+ var _chunkO47IT4CScjs = require('./chunk-O47IT4CS.cjs');
66
66
 
67
67
 
68
68
 
@@ -89,13 +89,13 @@ var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
89
89
 
90
90
 
91
91
 
92
- var _chunkC4DZAEVTcjs = require('./chunk-C4DZAEVT.cjs');
92
+ var _chunkMZG5M4JScjs = require('./chunk-MZG5M4JS.cjs');
93
93
 
94
94
 
95
95
  var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
96
96
 
97
97
 
98
- var _chunkNNHIV3O2cjs = require('./chunk-NNHIV3O2.cjs');
98
+ var _chunkMUQP2APNcjs = require('./chunk-MUQP2APN.cjs');
99
99
 
100
100
 
101
101
 
@@ -148,7 +148,7 @@ var _chunkSIQPXYBBcjs = require('./chunk-SIQPXYBB.cjs');
148
148
 
149
149
 
150
150
 
151
- var _chunkPSALMEHJcjs = require('./chunk-PSALMEHJ.cjs');
151
+ var _chunkZCT6B5PQcjs = require('./chunk-ZCT6B5PQ.cjs');
152
152
 
153
153
 
154
154
 
@@ -172,7 +172,7 @@ var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
172
172
  var _chunkRQSPBWXJcjs = require('./chunk-RQSPBWXJ.cjs');
173
173
 
174
174
 
175
- var _chunkIU4YTFFQcjs = require('./chunk-IU4YTFFQ.cjs');
175
+ var _chunkGUYGMTWAcjs = require('./chunk-GUYGMTWA.cjs');
176
176
 
177
177
 
178
178
 
@@ -185,7 +185,7 @@ var _chunk25CHWAZYcjs = require('./chunk-25CHWAZY.cjs');
185
185
 
186
186
 
187
187
 
188
- var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
188
+ var _chunkPFVNPOKNcjs = require('./chunk-PFVNPOKN.cjs');
189
189
 
190
190
 
191
191
 
@@ -195,8 +195,11 @@ var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
195
195
 
196
196
 
197
197
 
198
+ var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
198
199
 
199
- var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
200
+
201
+
202
+ var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
200
203
 
201
204
 
202
205
  var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
@@ -250,11 +253,11 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
250
253
  var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
251
254
 
252
255
 
253
- var _chunk5BZ7PR3Tcjs = require('./chunk-5BZ7PR3T.cjs');
256
+ var _chunkZTNU4XCCcjs = require('./chunk-ZTNU4XCC.cjs');
254
257
 
255
258
 
256
259
 
257
- var _chunkXJEOHDPNcjs = require('./chunk-XJEOHDPN.cjs');
260
+ var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
258
261
 
259
262
 
260
263
  var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
@@ -317,7 +320,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
317
320
  var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
318
321
 
319
322
 
320
- var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
323
+ var _chunkZ7YIQ7AJcjs = require('./chunk-Z7YIQ7AJ.cjs');
321
324
 
322
325
 
323
326
  var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
@@ -734,7 +737,7 @@ function findClientServerFnViolation(code, id) {
734
737
  return null;
735
738
  }
736
739
  function createServerFnBoundaryDiagnostic(violation, id, location) {
737
- return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
740
+ return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
738
741
  "CLIENT_SERVER_FUNCTION",
739
742
  id,
740
743
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -994,21 +997,21 @@ function readPropertyKey(property) {
994
997
  function createClientBoundaryDiagnostic(file, finding, location) {
995
998
  switch (finding.kind) {
996
999
  case "server-env":
997
- return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
1000
+ return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
998
1001
  "CLIENT_SERVER_ENV",
999
1002
  file,
1000
1003
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
1001
1004
  location
1002
1005
  );
1003
1006
  case "public-env":
1004
- return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
1007
+ return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1005
1008
  "CLIENT_PROCESS_ENV_PUBLIC",
1006
1009
  file,
1007
1010
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
1008
1011
  location
1009
1012
  );
1010
1013
  case "builtin":
1011
- return _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
1014
+ return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1012
1015
  "CLIENT_NODE_BUILTIN",
1013
1016
  file,
1014
1017
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1309,13 +1312,13 @@ function loadFarmDocsSearchDevRuntime() {
1309
1312
  return import("./search-client-Z7KDVD4C.cjs");
1310
1313
  }
1311
1314
  function loadFarmOpenAPIDevRuntime() {
1312
- return import("./manager-3DFQDKJ6.cjs");
1315
+ return import("./manager-STAB5TVZ.cjs");
1313
1316
  }
1314
1317
  function loadFarmWorkflowsDevRuntime() {
1315
1318
  return import("./workflows.cjs");
1316
1319
  }
1317
1320
  function loadFarmDevtoolsSnapshotRuntime() {
1318
- return import("./devtools-OBQY3XOY.cjs");
1321
+ return import("./devtools-IUU4SWQL.cjs");
1319
1322
  }
1320
1323
  function loadFarmDevtoolsUIRuntime() {
1321
1324
  return import("./devtools-ui-TPBPQEEB.cjs");
@@ -1340,7 +1343,7 @@ function farmI18nClientBridgePlugin() {
1340
1343
  };
1341
1344
  }
1342
1345
  function farmNavigationPlugin(renderer) {
1343
- const otherRenderer = !_chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1346
+ const otherRenderer = !_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1344
1347
  return {
1345
1348
  name: "farm:navigation",
1346
1349
  config() {
@@ -1365,16 +1368,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1365
1368
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1366
1369
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1367
1370
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1368
- _chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1369
- new RegExp(`^${_chunkPSALMEHJcjs.FARM_RESOLVE_FROM_PREFIX}`),
1371
+ _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1372
+ new RegExp(`^${_chunkZCT6B5PQcjs.FARM_RESOLVE_FROM_PREFIX}`),
1370
1373
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1371
1374
  // included.
1372
1375
  /^node:/,
1373
- _chunkUBH2OARScjs.exactIdPattern.call(void 0, _module.builtinModules)
1376
+ _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, _module.builtinModules)
1374
1377
  ];
1375
1378
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1376
- _chunkUBH2OARScjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1377
- new RegExp(`^${_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1379
+ _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1380
+ new RegExp(`^${_chunkZCT6B5PQcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1378
1381
  ];
1379
1382
  function createFarmPlatformClientModule(platform) {
1380
1383
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1410,29 +1413,29 @@ function farmIslandContainersPlugin(config) {
1410
1413
  // without calling into JavaScript.
1411
1414
  filter: {
1412
1415
  id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
1413
- code: _chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG
1416
+ code: _chunkZCT6B5PQcjs.FARM_ISLAND_CONTAINER_TAG
1414
1417
  },
1415
1418
  handler(code, id) {
1416
- if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverComponents])) !== "islands") {
1419
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
1417
1420
  return null;
1418
1421
  }
1419
1422
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1420
1423
  return null;
1421
1424
  }
1422
- if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) return null;
1423
- if (!_chunkPSALMEHJcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1425
+ if (_chunkZCT6B5PQcjs.hasUseClientDirective.call(void 0, code)) return null;
1426
+ if (!_chunkZCT6B5PQcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1424
1427
  const file = id.split("?", 1)[0];
1425
- const inspect = () => _chunkPSALMEHJcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1428
+ const inspect = () => _chunkZCT6B5PQcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1426
1429
  const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
1427
1430
  if (bindings.length === 0) return null;
1428
- const grown = _chunkPSALMEHJcjs.wrapFarmIslandContainers.call(void 0, {
1431
+ const grown = _chunkZCT6B5PQcjs.wrapFarmIslandContainers.call(void 0, {
1429
1432
  code,
1430
1433
  file,
1431
1434
  bindings,
1432
- reference: _chunkPSALMEHJcjs.farmIslandContainerReferencePath.call(void 0, root)
1435
+ reference: _chunkZCT6B5PQcjs.farmIslandContainerReferencePath.call(void 0, root)
1433
1436
  });
1434
1437
  if (grown === null) return null;
1435
- _chunkPSALMEHJcjs.ensureFarmIslandContainerReference.call(void 0, root);
1438
+ _chunkZCT6B5PQcjs.ensureFarmIslandContainerReference.call(void 0, root);
1436
1439
  return { code: grown, map: null };
1437
1440
  }
1438
1441
  }
@@ -1447,18 +1450,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1447
1450
  config(config) {
1448
1451
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1449
1452
  if (options.distDir) {
1450
- _chunkPSALMEHJcjs.usePackageScanCacheFile.call(void 0,
1453
+ _chunkZCT6B5PQcjs.usePackageScanCacheFile.call(void 0,
1451
1454
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1452
1455
  );
1453
1456
  }
1454
- const bundledPackages = _chunkPSALMEHJcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1457
+ const bundledPackages = _chunkZCT6B5PQcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1455
1458
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1456
- _chunkPSALMEHJcjs.persistPackageScanCache.call(void 0, );
1459
+ _chunkZCT6B5PQcjs.persistPackageScanCache.call(void 0, );
1457
1460
  return {
1458
1461
  optimizeDeps: {
1459
1462
  // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1460
1463
  exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1461
- rolldownOptions: { plugins: [_chunkPSALMEHJcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1464
+ rolldownOptions: { plugins: [_chunkZCT6B5PQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1462
1465
  },
1463
1466
  ssr: {
1464
1467
  noExternal: [
@@ -1478,14 +1481,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1478
1481
  resolveId: {
1479
1482
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1480
1483
  handler(id, importer, options2) {
1481
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _76 => _76.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1484
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1482
1485
  if (id === SERVER_ONLY_PACKAGE) {
1483
- if (_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) || _optionalChain([options2, 'optionalAccess', _78 => _78.scan])) {
1486
+ if (_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) || _optionalChain([options2, 'optionalAccess', _76 => _76.scan])) {
1484
1487
  return FARM_SERVER_ONLY_PACKAGE_ID;
1485
1488
  }
1486
1489
  this.error(
1487
- _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
1488
- _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
1490
+ _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
1491
+ _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1489
1492
  "CLIENT_SERVER_ONLY_IMPORT",
1490
1493
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1491
1494
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1494,10 +1497,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1494
1497
  )
1495
1498
  );
1496
1499
  }
1497
- if (!_optionalChain([options2, 'optionalAccess', _79 => _79.ssr]) && _module.isBuiltin.call(void 0, id)) {
1498
- return _chunkPSALMEHJcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1500
+ if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
1501
+ return _chunkZCT6B5PQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1499
1502
  }
1500
- const resolveFrom = importer ? _chunkPSALMEHJcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1503
+ const resolveFrom = importer ? _chunkZCT6B5PQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1501
1504
  if (resolveFrom) {
1502
1505
  const directory = path6.dirname(resolveFrom.importer);
1503
1506
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1512,10 +1515,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1512
1515
  }
1513
1516
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1514
1517
  const importedBy = importer ? ` (imported by ${importer})` : "";
1515
- if (!_optionalChain([options2, 'optionalAccess', _80 => _80.ssr])) {
1518
+ if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
1516
1519
  this.error(
1517
- _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
1518
- _chunkPSALMEHJcjs.createFarmDiagnostic.call(void 0,
1520
+ _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
1521
+ _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1519
1522
  "CLIENT_SERVER_ONLY_ENTRY",
1520
1523
  _nullishCoalesce(importer, () => ( id)),
1521
1524
  `${id} is server-only and cannot be imported into client code.`
@@ -1540,7 +1543,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1540
1543
  if (id === FARM_PLATFORM_CLIENT_ID) {
1541
1544
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
1542
1545
  }
1543
- return _nullishCoalesce(_chunkPSALMEHJcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1546
+ return _nullishCoalesce(_chunkZCT6B5PQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1544
1547
  }
1545
1548
  }
1546
1549
  };
@@ -1576,7 +1579,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1576
1579
  return `${_chunkIGBQSUT5cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1577
1580
  }
1578
1581
  function getPublicEnvDefine(config) {
1579
- const publicEnv = _optionalChain([config, 'access', _81 => _81.env, 'optionalAccess', _82 => _82.public]);
1582
+ const publicEnv = _optionalChain([config, 'access', _79 => _79.env, 'optionalAccess', _80 => _80.public]);
1580
1583
  if (!isResolvedEnvScope(publicEnv)) {
1581
1584
  return {};
1582
1585
  }
@@ -1615,7 +1618,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1615
1618
  return;
1616
1619
  }
1617
1620
  if (res.headersSent) {
1618
- _optionalChain([res, 'access', _83 => _83.destroy, 'optionalCall', _84 => _84(error instanceof Error ? error : new Error(String(error)))]);
1621
+ _optionalChain([res, 'access', _81 => _81.destroy, 'optionalCall', _82 => _82(error instanceof Error ? error : new Error(String(error)))]);
1619
1622
  return;
1620
1623
  }
1621
1624
  res.statusCode = 500;
@@ -1751,7 +1754,7 @@ function interceptFarmDevPageResponse(options) {
1751
1754
  const originalWrite = res.write.bind(res);
1752
1755
  const originalEnd = res.end.bind(res);
1753
1756
  const originalWriteHead = res.writeHead.bind(res);
1754
- const originalFlushHeaders = _optionalChain([res, 'access', _85 => _85.flushHeaders, 'optionalAccess', _86 => _86.bind, 'call', _87 => _87(res)]);
1757
+ const originalFlushHeaders = _optionalChain([res, 'access', _83 => _83.flushHeaders, 'optionalAccess', _84 => _84.bind, 'call', _85 => _85(res)]);
1755
1758
  let afterResponseCalled = false;
1756
1759
  let interceptedEnd = false;
1757
1760
  const restore = () => {
@@ -1813,7 +1816,7 @@ function interceptFarmDevPageResponse(options) {
1813
1816
  ).then(async (runtimeResponse) => {
1814
1817
  applyWebResponseToNodeResponse(runtimeResponse, res);
1815
1818
  if (!res.headersSent) originalWriteHead(res.statusCode);
1816
- _optionalChain([originalFlushHeaders, 'optionalCall', _88 => _88()]);
1819
+ _optionalChain([originalFlushHeaders, 'optionalCall', _86 => _86()]);
1817
1820
  if (!runtimeResponse.body) return;
1818
1821
  const reader = runtimeResponse.body.getReader();
1819
1822
  for (; ; ) {
@@ -1862,7 +1865,7 @@ function interceptFarmDevPageResponse(options) {
1862
1865
  if (streamsThroughRuntime()) {
1863
1866
  streamRuntimeChunk(bufferChunk);
1864
1867
  const callback = args.find((arg) => typeof arg === "function");
1865
- _optionalChain([callback, 'optionalCall', _89 => _89()]);
1868
+ _optionalChain([callback, 'optionalCall', _87 => _87()]);
1866
1869
  return true;
1867
1870
  }
1868
1871
  if (isHtmlResponse && bufferChunk) {
@@ -1874,7 +1877,7 @@ function interceptFarmDevPageResponse(options) {
1874
1877
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1875
1878
  if (shouldBufferResponse) {
1876
1879
  const callback = args.find((arg) => typeof arg === "function");
1877
- _optionalChain([callback, 'optionalCall', _90 => _90()]);
1880
+ _optionalChain([callback, 'optionalCall', _88 => _88()]);
1878
1881
  return true;
1879
1882
  }
1880
1883
  const writeResult = originalWrite(chunk, ...args);
@@ -2021,18 +2024,18 @@ function getEnvDefines(config, configEnv) {
2021
2024
  _chunkJ2JMESBJcjs.getPublicFarmImageConfig.call(void 0,
2022
2025
  _chunkJ2JMESBJcjs.resolveFarmImageConfig.call(void 0,
2023
2026
  config.images,
2024
- _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
2027
+ _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
2025
2028
  )
2026
2029
  )
2027
2030
  )
2028
2031
  };
2029
- if (_optionalChain([configEnv, 'optionalAccess', _91 => _91.isSsrBuild])) {
2032
+ if (_optionalChain([configEnv, 'optionalAccess', _89 => _89.isSsrBuild])) {
2030
2033
  defines.__FARM_ENV__ = JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
2031
2034
  }
2032
2035
  return defines;
2033
2036
  }
2034
2037
  function getFarmAPIBaseURLDefine(config) {
2035
- const baseURL = _optionalChain([config, 'access', _92 => _92.api, 'optionalAccess', _93 => _93.baseURL]);
2038
+ const baseURL = _optionalChain([config, 'access', _90 => _90.api, 'optionalAccess', _91 => _91.baseURL]);
2036
2039
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkG5KGLMPNcjs.DEFAULT_FARM_API_BASE_PATH;
2037
2040
  }
2038
2041
  function isResolvedEnvScope(value) {
@@ -2154,7 +2157,7 @@ function transformIsolatedClientBoundaryModule(options) {
2154
2157
  return null;
2155
2158
  }
2156
2159
  const body = Array.isArray(ast.body) ? ast.body : [];
2157
- const everyExportIsComponent = options.code.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2160
+ const everyExportIsComponent = options.code.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2158
2161
  const replacements = [];
2159
2162
  const wrapperStatements = [];
2160
2163
  const originalEntries = [];
@@ -2173,9 +2176,9 @@ function transformIsolatedClientBoundaryModule(options) {
2173
2176
  transformedExports++;
2174
2177
  };
2175
2178
  for (const node of body) {
2176
- if (_optionalChain([node, 'optionalAccess', _94 => _94.type]) === "ExportDefaultDeclaration" && node.declaration) {
2179
+ if (_optionalChain([node, 'optionalAccess', _92 => _92.type]) === "ExportDefaultDeclaration" && node.declaration) {
2177
2180
  const declaration2 = node.declaration;
2178
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _95 => _95.id, 'optionalAccess', _96 => _96.name])) {
2181
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _93 => _93.id, 'optionalAccess', _94 => _94.name])) {
2179
2182
  replacements.push({
2180
2183
  start: node.start,
2181
2184
  end: node.end,
@@ -2193,11 +2196,11 @@ function transformIsolatedClientBoundaryModule(options) {
2193
2196
  }
2194
2197
  continue;
2195
2198
  }
2196
- if (_optionalChain([node, 'optionalAccess', _97 => _97.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2199
+ if (_optionalChain([node, 'optionalAccess', _95 => _95.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2197
2200
  const specifiers = (node.specifiers || []).filter(
2198
2201
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
2199
2202
  );
2200
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _98 => _98.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _99 => _99.value]), () => ( "")))));
2203
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _96 => _96.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _97 => _97.value]), () => ( "")))));
2201
2204
  const isComponentExport = (specifier) => {
2202
2205
  const exported = specifierName(specifier.exported);
2203
2206
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -2224,14 +2227,14 @@ function transformIsolatedClientBoundaryModule(options) {
2224
2227
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
2225
2228
  continue;
2226
2229
  }
2227
- if (_optionalChain([node, 'optionalAccess', _100 => _100.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2230
+ if (_optionalChain([node, 'optionalAccess', _98 => _98.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2228
2231
  const declaration = node.declaration;
2229
2232
  const declaredNames = [];
2230
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _101 => _101.id, 'optionalAccess', _102 => _102.name])) {
2233
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.name])) {
2231
2234
  declaredNames.push(declaration.id.name);
2232
2235
  } else if (declaration.type === "VariableDeclaration") {
2233
2236
  for (const declarator of declaration.declarations || []) {
2234
- if (_optionalChain([declarator, 'access', _103 => _103.id, 'optionalAccess', _104 => _104.type]) === "Identifier") declaredNames.push(declarator.id.name);
2237
+ if (_optionalChain([declarator, 'access', _101 => _101.id, 'optionalAccess', _102 => _102.type]) === "Identifier") declaredNames.push(declarator.id.name);
2235
2238
  }
2236
2239
  }
2237
2240
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -2304,21 +2307,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2304
2307
  } catch (e20) {
2305
2308
  return;
2306
2309
  }
2307
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _105 => _105.env, 'optionalAccess', _106 => _106.public]), () => ( {}))));
2310
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _103 => _103.env, 'optionalAccess', _104 => _104.public]), () => ( {}))));
2308
2311
  const findings = [];
2309
2312
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2310
2313
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2311
2314
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2312
- if (!_optionalChain([resolved, 'optionalAccess', _107 => _107.id, 'access', _108 => _108.startsWith, 'call', _109 => _109(_chunkPSALMEHJcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2315
+ if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkZCT6B5PQcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2313
2316
  }
2314
2317
  findings.push(finding);
2315
2318
  }
2316
2319
  if (findings.length === 0) return;
2317
2320
  warnedClientBoundaryIds.add(id);
2318
- const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2321
+ const locate = _chunkZCT6B5PQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2319
2322
  _chunk7ZDLE77Pcjs.logger.warn(
2320
2323
  findings.map(
2321
- (finding) => _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
2324
+ (finding) => _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
2322
2325
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2323
2326
  config.root
2324
2327
  )
@@ -2335,10 +2338,10 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2335
2338
  );
2336
2339
  }
2337
2340
  function shouldEmitFarmClientRootHmr(renderer) {
2338
- return _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2341
+ return _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2339
2342
  }
2340
2343
  function reachesSharedFarmRendererIsland(graph, file, islandModules) {
2341
- const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _110 => _110.getModulesByFile, 'call', _111 => _111(file)]), () => ( [])));
2344
+ const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _108 => _108.getModulesByFile, 'call', _109 => _109(file)]), () => ( [])));
2342
2345
  const seen = new Set(queue);
2343
2346
  for (const node of queue) {
2344
2347
  if (node.file && islandModules.has(path6.resolve(node.file))) {
@@ -2382,25 +2385,25 @@ function hasFarmSourceAliasOverride(alias) {
2382
2385
  );
2383
2386
  }
2384
2387
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2385
- const rendererDisabled = _chunkHP7QYVSTcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2388
+ const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
2386
2389
  const imageImports = farmImageImportsPlugin();
2387
- const fontImports = _chunkUBH2OARScjs.farmFontImportsPlugin.call(void 0, {
2390
+ const fontImports = _chunkVWPGK6UVcjs.farmFontImportsPlugin.call(void 0, {
2388
2391
  root: options.root,
2389
2392
  basePath: options.basePath,
2390
2393
  publicDir: options.publicDir,
2391
2394
  // A production build never starts the app, so it reads the directories from these options.
2392
- isLayoutModule: (id) => _chunkUBH2OARScjs.isFarmLayoutModule.call(void 0, id, _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113()]), () => ( options))))
2395
+ isLayoutModule: (id) => _chunkVWPGK6UVcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
2393
2396
  });
2394
2397
  let farmApp;
2395
2398
  const isFarmGeneratedOutput = (file) => {
2396
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _114 => _114.getConfig, 'call', _115 => _115(), 'access', _116 => _116.root]), () => ( options.root));
2399
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113(), 'access', _114 => _114.root]), () => ( options.root));
2397
2400
  if (!root) return file.includes("/.farm/");
2398
2401
  const output = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2399
2402
  return file === output || file.startsWith(`${output}/`);
2400
2403
  };
2401
2404
  let serverFnTransformActive = false;
2402
2405
  const getFarmRenderedServerModules = () => {
2403
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _117 => _117.getRouteManager, 'call', _118 => _118()]);
2406
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116()]);
2404
2407
  if (!routeManager) return /* @__PURE__ */ new Set();
2405
2408
  const files = /* @__PURE__ */ new Set();
2406
2409
  for (const entries of [
@@ -2420,8 +2423,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2420
2423
  if (mdxComponents) files.add(mdxComponents);
2421
2424
  return files;
2422
2425
  };
2423
- const islxActionsMode = () => _chunkUBH2OARScjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2424
- const islandsServerFns = () => _chunkUBH2OARScjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _121 => _121.getConfig, 'call', _122 => _122()]), () => ( options)));
2426
+ const islxActionsMode = () => _chunkVWPGK6UVcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2427
+ const islandsServerFns = () => _chunkVWPGK6UVcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2425
2428
  let reactRefreshActive = false;
2426
2429
  let server;
2427
2430
  let deferredGates;
@@ -2450,16 +2453,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2450
2453
  ].join(" ");
2451
2454
  console.log(log);
2452
2455
  };
2453
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _123 => _123.getRouteManager, 'call', _124 => _124(), 'access', _125 => _125.getProgrammaticClientRoutes, 'call', _126 => _126()])));
2454
- const inBuildPackageCache = _chunkPSALMEHJcjs.bindPackageClientBoundaryCache.call(void 0, );
2456
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _121 => _121.getRouteManager, 'call', _122 => _122(), 'access', _123 => _123.getProgrammaticClientRoutes, 'call', _124 => _124()])));
2457
+ const inBuildPackageCache = _chunkZCT6B5PQcjs.bindPackageClientBoundaryCache.call(void 0, );
2455
2458
  const inspectPackages = (operation) => {
2456
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getRouteManager, 'call', _128 => _128()]);
2459
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
2457
2460
  return inBuildPackageCache(
2458
2461
  () => routeManager ? routeManager.inspectPackages(operation) : operation()
2459
2462
  );
2460
2463
  };
2461
2464
  const isOutsideAppRoot = (file) => {
2462
- const root = _optionalChain([farmApp, 'optionalAccess', _129 => _129.getConfig, 'call', _130 => _130(), 'access', _131 => _131.root]) || _optionalChain([server, 'optionalAccess', _132 => _132.config, 'access', _133 => _133.root]) || options.root;
2465
+ const root = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getConfig, 'call', _128 => _128(), 'access', _129 => _129.root]) || _optionalChain([server, 'optionalAccess', _130 => _130.config, 'access', _131 => _131.root]) || options.root;
2463
2466
  if (!root) return false;
2464
2467
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2465
2468
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2473,15 +2476,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2473
2476
  config(userConfig, configEnv) {
2474
2477
  isBuild = configEnv.command === "build";
2475
2478
  const farmAliases = {
2476
- ..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, options.layers),
2477
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _134 => _134.resolve, 'optionalAccess', _135 => _135.alias])) ? {} : _chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2479
+ ..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, options.layers),
2480
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2478
2481
  };
2479
2482
  if (Object.keys(farmAliases).length > 0) {
2480
2483
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2481
- userConfig.resolve.alias = _chunkUBH2OARScjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2484
+ userConfig.resolve.alias = _chunkVWPGK6UVcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2482
2485
  }
2483
2486
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2484
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.cors]) === void 0;
2487
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
2485
2488
  return {
2486
2489
  // Honor Farm's publicDir so the dev server serves the same static
2487
2490
  // directory the production client build emits.
@@ -2494,13 +2497,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2494
2497
  ...farmOwnsDevCors ? { cors: false } : {},
2495
2498
  fs: {
2496
2499
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2497
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _138 => _138.server, 'optionalAccess', _139 => _139.fs, 'optionalAccess', _140 => _140.deny]), options)
2500
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.fs, 'optionalAccess', _138 => _138.deny]), options)
2498
2501
  }
2499
2502
  }
2500
2503
  };
2501
2504
  },
2502
2505
  configEnvironment(name, environmentConfig, env) {
2503
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _141 => _141.dev, 'optionalAccess', _142 => _142.createEnvironment])) {
2506
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _139 => _139.dev, 'optionalAccess', _140 => _140.createEnvironment])) {
2504
2507
  return;
2505
2508
  }
2506
2509
  return {
@@ -2519,7 +2522,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2519
2522
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2520
2523
  );
2521
2524
  reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
2522
- if (_optionalChain([options, 'access', _143 => _143.experimental, 'optionalAccess', _144 => _144.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2525
+ if (_optionalChain([options, 'access', _141 => _141.experimental, 'optionalAccess', _142 => _142.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2523
2526
  _chunk7ZDLE77Pcjs.logger.warn(
2524
2527
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2525
2528
  );
@@ -2528,20 +2531,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2528
2531
  async configureServer(viteServer) {
2529
2532
  viteServer.middlewares.use(
2530
2533
  createFarmDevPreviewGuard(viteServer, {
2531
- getSourceRoots: () => _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _145 => _145.getConfig, 'call', _146 => _146()]), () => ( options)))
2534
+ getSourceRoots: () => _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _143 => _143.getConfig, 'call', _144 => _144()]), () => ( options)))
2532
2535
  })
2533
2536
  );
2534
2537
  if (typeof fontImports.configureServer === "function") {
2535
2538
  await fontImports.configureServer.call(this, viteServer);
2536
2539
  }
2537
2540
  server = viteServer;
2538
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _147 => _147.pre, 'access', _148 => _148.target]), () => ( viteServer.middlewares));
2539
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _149 => _149.post, 'access', _150 => _150.target]), () => ( viteServer.middlewares));
2541
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _145 => _145.pre, 'access', _146 => _146.target]), () => ( viteServer.middlewares));
2542
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _147 => _147.post, 'access', _148 => _148.target]), () => ( viteServer.middlewares));
2540
2543
  const pm = initialPluginManager;
2541
2544
  const configRoutePlugins = new Set(
2542
- _optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152(), 'access', _153 => _153.filter, 'call', _154 => _154(isFarmConfigRoutePlugin), 'access', _155 => _155.map, 'call', _156 => _156((plugin2) => plugin2.name)])
2545
+ _optionalChain([pm, 'optionalAccess', _149 => _149.getPlugins, 'call', _150 => _150(), 'access', _151 => _151.filter, 'call', _152 => _152(isFarmConfigRoutePlugin), 'access', _153 => _153.map, 'call', _154 => _154((plugin2) => plugin2.name)])
2543
2546
  );
2544
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _157 => _157.getPlugins, 'call', _158 => _158()]), () => ( []))).flatMap((plugin2) => {
2547
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _155 => _155.getPlugins, 'call', _156 => _156()]), () => ( []))).flatMap((plugin2) => {
2545
2548
  const matcher = _chunkQBMMQS25cjs.getConfigRedirectMatcher.call(void 0, plugin2);
2546
2549
  return matcher ? [matcher] : [];
2547
2550
  });
@@ -2552,7 +2555,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2552
2555
  } catch (e21) {
2553
2556
  }
2554
2557
  };
2555
- farmApp = new (0, _chunkUBH2OARScjs.FarmApp)(
2558
+ farmApp = new (0, _chunkVWPGK6UVcjs.FarmApp)(
2556
2559
  {
2557
2560
  ...options,
2558
2561
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2560,7 +2563,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2560
2563
  server
2561
2564
  );
2562
2565
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2563
- _chunkPSALMEHJcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2566
+ _chunkZCT6B5PQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2564
2567
  farmApp.getConfig().root,
2565
2568
  options.distDir || ".farm"
2566
2569
  )
@@ -2569,9 +2572,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2569
2572
  await farmApp.initialize();
2570
2573
  const farmConfig = farmApp.getConfig();
2571
2574
  let farmAppPackages;
2572
- if (_optionalChain([farmConfig, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.noindexPreviews])) {
2575
+ if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
2573
2576
  farmMiddlewares.use((_req, res, next) => {
2574
- if (_chunkNNHIV3O2cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2577
+ if (_chunkMUQP2APNcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2575
2578
  res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
2576
2579
  }
2577
2580
  next();
@@ -2579,7 +2582,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2579
2582
  }
2580
2583
  const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2581
2584
  const devBuiltInRoutePaths = new Set(
2582
- _chunkC4DZAEVTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2585
+ _chunkMZG5M4JScjs.listFarmBuiltInRoutePaths.call(void 0, {
2583
2586
  agent: {
2584
2587
  apiCatalog: true,
2585
2588
  mcp: true,
@@ -2601,7 +2604,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2601
2604
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2602
2605
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2603
2606
  // a caller-controlled Host header.
2604
- trustedLocalOrigin: () => _optionalChain([server, 'access', _161 => _161.resolvedUrls, 'optionalAccess', _162 => _162.local, 'access', _163 => _163[0]]),
2607
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _159 => _159.resolvedUrls, 'optionalAccess', _160 => _160.local, 'access', _161 => _161[0]]),
2605
2608
  onError(error) {
2606
2609
  _chunk7ZDLE77Pcjs.logger.error(
2607
2610
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2609,7 +2612,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2609
2612
  }
2610
2613
  });
2611
2614
  }
2612
- const sourceRoots = _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, farmConfig);
2615
+ const sourceRoots = _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, farmConfig);
2613
2616
  server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
2614
2617
  if (farmConfig.i18n.enabled) {
2615
2618
  server.watcher.add(
@@ -2621,15 +2624,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2621
2624
  const workflowConfig = farmConfig.workflows;
2622
2625
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2623
2626
  const getExtraRouteTypes = () => [
2624
- ..._optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2625
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _166 => _166.getFarmDocsRouteTypeEntries, 'call', _167 => _167(farmConfig.docs)]), () => ( []))
2627
+ ..._optionalChain([options, 'access', _162 => _162.openapi, 'optionalAccess', _163 => _163.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2628
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _164 => _164.getFarmDocsRouteTypeEntries, 'call', _165 => _165(farmConfig.docs)]), () => ( []))
2626
2629
  ];
2627
2630
  const appDirSlugs = sourceRoots.map(
2628
2631
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2629
2632
  );
2630
2633
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2631
2634
  try {
2632
- const result = await _chunkKM7ZRKCHcjs.generateFarmTypeArtifacts.call(void 0, {
2635
+ const result = await _chunkT4VF6BYVcjs.generateFarmTypeArtifacts.call(void 0, {
2633
2636
  root: farmConfig.root,
2634
2637
  srcDir: farmConfig.srcDir,
2635
2638
  layers: farmConfig.layers,
@@ -2671,10 +2674,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2671
2674
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2672
2675
  );
2673
2676
  const layerConfigFiles = new Set(
2674
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _168 => _168.configFile, 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\\/g, "/")])).filter((file) => Boolean(file))
2677
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _166 => _166.configFile, 'optionalAccess', _167 => _167.replace, 'call', _168 => _168(/\\/g, "/")])).filter((file) => Boolean(file))
2675
2678
  );
2676
2679
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2677
- ..._chunkHP7QYVSTcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2680
+ ..._chunkLEZJZX4Ccjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2678
2681
  ".md",
2679
2682
  ".mdx"
2680
2683
  ]);
@@ -2683,10 +2686,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2683
2686
  const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2684
2687
  return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
2685
2688
  };
2686
- const polyroute = _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2689
+ const polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2687
2690
  const isApiRouteFile = (file) => {
2688
2691
  const normalized = file.replace(/\\/g, "/");
2689
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2692
+ return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2690
2693
  };
2691
2694
  const isProgrammaticRouteFile = (file) => {
2692
2695
  const normalized = file.replace(/\\/g, "/");
@@ -2699,7 +2702,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2699
2702
  );
2700
2703
  };
2701
2704
  const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2702
- const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _171 => _171.getRouteManager, 'call', _172 => _172(), 'access', _173 => _173.isRendererRouteFile, 'call', _174 => _174(file)]) === true;
2705
+ const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _169 => _169.getRouteManager, 'call', _170 => _170(), 'access', _171 => _171.isRendererRouteFile, 'call', _172 => _172(file)]) === true;
2703
2706
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2704
2707
  file.replace(/\\/g, "/")
2705
2708
  );
@@ -2746,7 +2749,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2746
2749
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2747
2750
  }
2748
2751
  if (isI18nCatalogFile(file)) {
2749
- _optionalChain([farmApp, 'optionalAccess', _175 => _175.getI18nRuntime, 'call', _176 => _176(), 'access', _177 => _177.reload, 'call', _178 => _178(), 'access', _179 => _179.then, 'call', _180 => _180(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _181 => _181.catch, 'call', _182 => _182((error) => _chunk7ZDLE77Pcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2752
+ _optionalChain([farmApp, 'optionalAccess', _173 => _173.getI18nRuntime, 'call', _174 => _174(), 'access', _175 => _175.reload, 'call', _176 => _176(), 'access', _177 => _177.then, 'call', _178 => _178(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _179 => _179.catch, 'call', _180 => _180((error) => _chunk7ZDLE77Pcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2750
2753
  }
2751
2754
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2752
2755
  if (isRouteRefreshEvent) {
@@ -2758,8 +2761,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2758
2761
  queuedRouteFiles = void 0;
2759
2762
  try {
2760
2763
  await Promise.all([
2761
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _183 => _183(`${ev} ${file}`)]),
2762
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _184 => _184.reload, 'call', _185 => _185()]) : void 0
2764
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _181 => _181(`${ev} ${file}`)]),
2765
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _182 => _182.reload, 'call', _183 => _183()]) : void 0
2763
2766
  ]);
2764
2767
  if (pendingRouteReloads.size === 1)
2765
2768
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2776,7 +2779,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2776
2779
  }
2777
2780
  });
2778
2781
  });
2779
- const appDirs = _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, farmConfig);
2782
+ const appDirs = _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, farmConfig);
2780
2783
  const routeManager = farmApp.getRouteManager();
2781
2784
  const discoveredRoutes = [];
2782
2785
  for (const [pattern, entry] of routeManager.getRoutes()) {
@@ -2808,14 +2811,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2808
2811
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2809
2812
  const load = (file) => _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, file);
2810
2813
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2811
- _optionalChain([server, 'access', _186 => _186.httpServer, 'optionalAccess', _187 => _187.once, 'call', _188 => _188("close", () => {
2814
+ _optionalChain([server, 'access', _184 => _184.httpServer, 'optionalAccess', _185 => _185.once, 'call', _186 => _186("close", () => {
2812
2815
  const globals = globalThis;
2813
2816
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2814
2817
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2815
2818
  }
2816
2819
  })]);
2817
2820
  }
2818
- apiRouteManager = new (0, _chunk5BZ7PR3Tcjs.APIRouteManager)(appDirs, server, {
2821
+ apiRouteManager = new (0, _chunkZTNU4XCCcjs.APIRouteManager)(appDirs, server, {
2819
2822
  plugins: farmConfig.plugins,
2820
2823
  i18n: farmApp.getI18nRuntime(),
2821
2824
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2882,11 +2885,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2882
2885
  });
2883
2886
  }
2884
2887
  }
2885
- if (_optionalChain([options, 'access', _189 => _189.openapi, 'optionalAccess', _190 => _190.enabled])) {
2888
+ if (_optionalChain([options, 'access', _187 => _187.openapi, 'optionalAccess', _188 => _188.enabled])) {
2886
2889
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2887
2890
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2888
2891
  mode: "development",
2889
- apiBaseURL: typeof _optionalChain([options, 'access', _191 => _191.api, 'optionalAccess', _192 => _192.baseURL]) === "string" ? options.api.baseURL : void 0,
2892
+ apiBaseURL: typeof _optionalChain([options, 'access', _189 => _189.api, 'optionalAccess', _190 => _190.baseURL]) === "string" ? options.api.baseURL : void 0,
2890
2893
  routes: () => apiRouteManager.getRoutes().values(),
2891
2894
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2892
2895
  });
@@ -2931,20 +2934,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2931
2934
  rendererServer: farmConfig.renderer.server,
2932
2935
  resolveLayoutFonts: resolveDocsLayoutFonts,
2933
2936
  fontStylesheetHref: "/@farm/fonts.css",
2934
- globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
2937
+ globalStylesheetHref: _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
2935
2938
  farmConfig.root,
2936
2939
  farmConfig.srcDir
2937
2940
  ),
2938
2941
  loadModule: async (specifier) => {
2939
2942
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2940
- if (specifier === _optionalChain([farmConfig, 'access', _193 => _193.docs, 'access', _194 => _194.adapter, 'optionalAccess', _195 => _195.server]) && _optionalChain([resolved, 'optionalAccess', _196 => _196.id])) {
2943
+ if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
2941
2944
  const file = resolved.id.split("?", 1)[0];
2942
2945
  return import(
2943
2946
  /* @vite-ignore */
2944
2947
  _url.pathToFileURL.call(void 0, file).href
2945
2948
  );
2946
2949
  }
2947
- return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _197 => _197.id]), () => ( specifier)));
2950
+ return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
2948
2951
  },
2949
2952
  registerMCPServer: (mcpServer) => {
2950
2953
  const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2962,7 +2965,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2962
2965
  fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2963
2966
  resolveLayoutFonts: resolveDocsLayoutFonts,
2964
2967
  fontStylesheetHref: "/@farm/fonts.css",
2965
- globalStylesheetHref: _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
2968
+ globalStylesheetHref: _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
2966
2969
  farmConfig.root,
2967
2970
  farmConfig.srcDir
2968
2971
  ),
@@ -2970,7 +2973,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2970
2973
  basePath: farmConfig.basePath
2971
2974
  }) : null;
2972
2975
  const farmDocsListsPages = Boolean(
2973
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _198 => _198.getPlugins, 'call', _199 => _199(), 'access', _200 => _200.some, 'call', _201 => _201((plugin2) => plugin2.name === "farm:infra-analytics")])
2976
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.some, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")])
2974
2977
  );
2975
2978
  let farmDocsPagePaths;
2976
2979
  const getFarmDocsPagePaths = () => {
@@ -2997,22 +3000,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2997
3000
  });
2998
3001
  }
2999
3002
  }
3000
- const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
3003
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _200 => _200.getPlugins, 'call', _201 => _201(), 'access', _202 => _202.find, 'call', _203 => _203((plugin2) => plugin2.name === "farm:infra-analytics")]);
3001
3004
  if (farmInfraAnalyticsPlugin) {
3002
- _chunkMBDDLYT5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3005
+ _chunkO47IT4CScjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3003
3006
  if (farmDocsDevRuntime) {
3004
- const label = _chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0,
3007
+ const label = _chunkMZG5M4JScjs.resolveFarmDocsRouteLabel.call(void 0,
3005
3008
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
3006
3009
  {
3007
- path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
3008
- roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
3010
+ path: _optionalChain([farmConfig, 'access', _204 => _204.docs, 'optionalAccess', _205 => _205.entry]) || "/docs",
3011
+ roots: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.roots, 'optionalAccess', _208 => _208.map, 'call', _209 => _209((root) => root.entry)]),
3009
3012
  pages: await getFarmDocsPagePaths()
3010
3013
  }
3011
3014
  );
3012
- if (label) return _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3015
+ if (label) return _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3013
3016
  }
3014
3017
  const match = farmApp.getRouteManager().matchRoute(pathname);
3015
- return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
3018
+ return { pathname, pattern: _optionalChain([match, 'access', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null };
3016
3019
  });
3017
3020
  }
3018
3021
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3087,7 +3090,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3087
3090
  }
3088
3091
  },
3089
3092
  (request) => {
3090
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3093
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _212 => _212.getConfig, 'call', _213 => _213()]), () => ( options));
3091
3094
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3092
3095
  return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
3093
3096
  trustProxy: currentServerConfig.trustProxy
@@ -3103,7 +3106,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3103
3106
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3104
3107
  const requestUrl = req.url || "/";
3105
3108
  const requestMethod = req.method || "GET";
3106
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
3109
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3107
3110
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3108
3111
  const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
3109
3112
  trustProxy: currentServerConfig.trustProxy
@@ -3173,7 +3176,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3173
3176
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
3174
3177
  res.statusCode = 200;
3175
3178
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3176
- res.end(requestMethod === "HEAD" ? void 0 : _chunkUBH2OARScjs.FARM_VIDEO_PLAYER_HTML);
3179
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkVWPGK6UVcjs.FARM_VIDEO_PLAYER_HTML);
3177
3180
  return;
3178
3181
  }
3179
3182
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3228,7 +3231,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3228
3231
  openapi: options.openapi
3229
3232
  },
3230
3233
  workflows: discoveredWorkflows,
3231
- plugins: _optionalChain([pm, 'optionalAccess', _218 => _218.getSortedPlugins, 'call', _219 => _219()])
3234
+ plugins: _optionalChain([pm, 'optionalAccess', _216 => _216.getSortedPlugins, 'call', _217 => _217()])
3232
3235
  });
3233
3236
  res.statusCode = 200;
3234
3237
  res.setHeader(
@@ -3263,10 +3266,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3263
3266
  render: {
3264
3267
  pathname: pathname2,
3265
3268
  method: requestMethod,
3266
- routePattern: _optionalChain([match, 'optionalAccess', _220 => _220.route, 'optionalAccess', _221 => _221.pattern]) || null,
3267
- params: _optionalChain([match, 'optionalAccess', _222 => _222.params]) || {}
3269
+ routePattern: _optionalChain([match, 'optionalAccess', _218 => _218.route, 'optionalAccess', _219 => _219.pattern]) || null,
3270
+ params: _optionalChain([match, 'optionalAccess', _220 => _220.params]) || {}
3268
3271
  },
3269
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _223 => _223.layouts]) || []).map((layout) => layout.pattern)
3272
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _221 => _221.layouts]) || []).map((layout) => layout.pattern)
3270
3273
  };
3271
3274
  return pageHookRouteMatch;
3272
3275
  };
@@ -3354,7 +3357,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3354
3357
  }
3355
3358
  }
3356
3359
  const runAppMiddlewareForContentRoute = async () => {
3357
- if (!_optionalChain([middlewareManager, 'optionalAccess', _224 => _224.hasMiddleware, 'call', _225 => _225()])) return false;
3360
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()])) return false;
3358
3361
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3359
3362
  return runFarmMiddlewareWithNavigation(
3360
3363
  farmApp.getServerRenderer(),
@@ -3392,7 +3395,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3392
3395
  return response.status;
3393
3396
  };
3394
3397
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3395
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeHook, 'call', _227 => _227("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _228 => _228.hasMiddleware, 'call', _229 => _229()]) ? interceptFarmDevPageResponse({
3398
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _224 => _224.hasRuntimeHook, 'call', _225 => _225("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _226 => _226.hasMiddleware, 'call', _227 => _227()]) ? interceptFarmDevPageResponse({
3396
3399
  req,
3397
3400
  res,
3398
3401
  pm,
@@ -3405,7 +3408,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3405
3408
  urlPath: requestUrl,
3406
3409
  pathname: requestPathname,
3407
3410
  startTime: Date.now(),
3408
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _230 => _230(status)]),
3411
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _228 => _228(status)]),
3409
3412
  // The runtime reports a runtime.after failure itself.
3410
3413
  emitError: async () => {
3411
3414
  },
@@ -3416,7 +3419,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3416
3419
  handled = await runAppMiddlewareForContentRoute();
3417
3420
  } catch (error) {
3418
3421
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3419
- _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3422
+ _optionalChain([interceptor, 'optionalAccess', _229 => _229.release, 'call', _230 => _230()]);
3420
3423
  throw error;
3421
3424
  }
3422
3425
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3424,10 +3427,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3424
3427
  return true;
3425
3428
  }
3426
3429
  if (!handled) {
3427
- _optionalChain([interceptor, 'optionalAccess', _233 => _233.release, 'call', _234 => _234()]);
3430
+ _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3428
3431
  return false;
3429
3432
  }
3430
- if (!_optionalChain([interceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) _optionalChain([logResponse2, 'optionalCall', _237 => _237(res.statusCode || 200)]);
3433
+ if (!_optionalChain([interceptor, 'optionalAccess', _233 => _233.isEnded, 'call', _234 => _234()])) _optionalChain([logResponse2, 'optionalCall', _235 => _235(res.statusCode || 200)]);
3431
3434
  return true;
3432
3435
  };
3433
3436
  const serveBuiltInRoute = async (respond, {
@@ -3436,7 +3439,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3436
3439
  label
3437
3440
  } = {}) => {
3438
3441
  const discard = async () => {
3439
- await _optionalChain([computed, 'optionalAccess', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240(), 'access', _241 => _241.catch, 'call', _242 => _242(() => {
3442
+ await _optionalChain([computed, 'optionalAccess', _236 => _236.body, 'optionalAccess', _237 => _237.cancel, 'call', _238 => _238(), 'access', _239 => _239.catch, 'call', _240 => _240(() => {
3440
3443
  })]);
3441
3444
  };
3442
3445
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3453,9 +3456,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3453
3456
  if (pm && opensFarmDevRuntimeSession(pm)) {
3454
3457
  try {
3455
3458
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3456
- const route = _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
3459
+ const route = _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
3457
3460
  { pathname: requestPathname },
3458
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3461
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkMZG5M4JScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3459
3462
  );
3460
3463
  runtimeSession2 = await pm.beginRuntimeRequest(
3461
3464
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3493,7 +3496,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3493
3496
  }
3494
3497
  responding = true;
3495
3498
  response = await respond(
3496
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _243 => _243.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3499
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _241 => _241.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3497
3500
  );
3498
3501
  } catch (error) {
3499
3502
  if (!responding && !res.headersSent) {
@@ -3513,7 +3516,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3513
3516
  else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
3514
3517
  };
3515
3518
  const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3516
- if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3519
+ if (openAPIManager && _optionalChain([options, 'access', _242 => _242.openapi, 'optionalAccess', _243 => _243.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3517
3520
  const specManager = openAPIManager;
3518
3521
  await serveBuiltInRoute(async () => {
3519
3522
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3533,7 +3536,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3533
3536
  });
3534
3537
  return;
3535
3538
  }
3536
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _246 => _246.openapi, 'optionalAccess', _247 => _247.route])) {
3539
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.route])) {
3537
3540
  const docsManager = openAPIManager;
3538
3541
  await serveBuiltInRoute(
3539
3542
  async () => {
@@ -3544,7 +3547,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3544
3547
  );
3545
3548
  return;
3546
3549
  }
3547
- if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkC4DZAEVTcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3550
+ if (_optionalChain([options, 'access', _246 => _246.agent, 'optionalAccess', _247 => _247.manifest]) !== false && _chunkMZG5M4JScjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3548
3551
  const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
3549
3552
  {
3550
3553
  config: farmConfig,
@@ -3554,18 +3557,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3554
3557
  apiServerBasePath
3555
3558
  );
3556
3559
  await serveBuiltInRoute(async () => {
3557
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkUBH2OARScjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3558
- const manifest = await _chunkC4DZAEVTcjs.createFarmAppManifestResponse.call(void 0,
3560
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkVWPGK6UVcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3561
+ const manifest = await _chunkMZG5M4JScjs.createFarmAppManifestResponse.call(void 0,
3559
3562
  new Request(parsedRequestUrl, {
3560
3563
  method: requestMethod,
3561
3564
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3562
3565
  }),
3563
3566
  {
3564
- ..._chunkC4DZAEVTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3567
+ ..._chunkMZG5M4JScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3565
3568
  build: "development",
3566
3569
  packages: farmAppPackages,
3567
3570
  // Read again on each request; unchanged files come from a cache.
3568
- webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkUBH2OARScjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3571
+ webmcpTools: _optionalChain([farmConfig, 'access', _248 => _248.plugins, 'optionalAccess', _249 => _249.some, 'call', _250 => _250(({ name }) => name === "farm:webmcp")]) ? _chunkVWPGK6UVcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3569
3572
  }),
3570
3573
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3571
3574
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3583,11 +3586,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3583
3586
  });
3584
3587
  return;
3585
3588
  }
3586
- if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkC4DZAEVTcjs.FARM_API_CATALOG_PATH) {
3589
+ if (_optionalChain([options, 'access', _251 => _251.agent, 'optionalAccess', _252 => _252.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkMZG5M4JScjs.FARM_API_CATALOG_PATH) {
3587
3590
  await serveBuiltInRoute(
3588
- () => _chunkC4DZAEVTcjs.createFarmApiCatalogResponse.call(void 0,
3591
+ () => _chunkMZG5M4JScjs.createFarmApiCatalogResponse.call(void 0,
3589
3592
  requestMethod,
3590
- _chunkC4DZAEVTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3593
+ _chunkMZG5M4JScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3591
3594
  new Request(parsedRequestUrl, {
3592
3595
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3593
3596
  })
@@ -3595,8 +3598,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3595
3598
  );
3596
3599
  return;
3597
3600
  }
3598
- if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
3599
- const aiCatalog = _chunkC4DZAEVTcjs.createFarmAiCatalogResponse.call(void 0,
3601
+ if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.aiCatalog]) !== false) {
3602
+ const aiCatalog = _chunkMZG5M4JScjs.createFarmAiCatalogResponse.call(void 0,
3600
3603
  new Request(parsedRequestUrl, {
3601
3604
  method: requestMethod,
3602
3605
  headers: {
@@ -3644,7 +3647,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3644
3647
  );
3645
3648
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3646
3649
  if (docsResponse) {
3647
- const docsPage = _optionalChain([docsResponse, 'access', _257 => _257.headers, 'access', _258 => _258.get, 'call', _259 => _259("content-type"), 'optionalAccess', _260 => _260.toLowerCase, 'call', _261 => _261(), 'access', _262 => _262.includes, 'call', _263 => _263("text/html")]);
3650
+ const docsPage = _optionalChain([docsResponse, 'access', _255 => _255.headers, 'access', _256 => _256.get, 'call', _257 => _257("content-type"), 'optionalAccess', _258 => _258.toLowerCase, 'call', _259 => _259(), 'access', _260 => _260.includes, 'call', _261 => _261("text/html")]);
3648
3651
  await serveBuiltInRoute(
3649
3652
  async (request) => {
3650
3653
  if (!docsPage) {
@@ -3662,7 +3665,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3662
3665
  farmConfig.deploymentId
3663
3666
  );
3664
3667
  if (deploymentMismatch) {
3665
- await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
3668
+ await _optionalChain([docsResponse, 'access', _262 => _262.body, 'optionalAccess', _263 => _263.cancel, 'call', _264 => _264()]);
3666
3669
  return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3667
3670
  }
3668
3671
  const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
@@ -3683,11 +3686,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3683
3686
  {
3684
3687
  kind: "docs",
3685
3688
  computed: docsResponse,
3686
- label: _chunkC4DZAEVTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3689
+ label: _chunkMZG5M4JScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3687
3690
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3688
3691
  {
3689
- path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
3690
- roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
3692
+ path: _optionalChain([farmConfig, 'access', _265 => _265.docs, 'optionalAccess', _266 => _266.entry]) || "/docs",
3693
+ roots: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.roots, 'optionalAccess', _269 => _269.map, 'call', _270 => _270((root) => root.entry)]),
3691
3694
  pages: await getFarmDocsPagePaths()
3692
3695
  }
3693
3696
  )
@@ -3696,7 +3699,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3696
3699
  return;
3697
3700
  }
3698
3701
  }
3699
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3702
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _271 => _271.headers, 'access', _272 => _272.accept, 'optionalAccess', _273 => _273.includes, 'call', _274 => _274(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3700
3703
  const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
3701
3704
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3702
3705
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3714,15 +3717,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3714
3717
  });
3715
3718
  await serveBuiltInRoute(() => treeResponse, {
3716
3719
  computed: treeResponse,
3717
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern]), () => ( null))
3720
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _275 => _275.getRouteManager, 'call', _276 => _276(), 'access', _277 => _277.matchRoute, 'call', _278 => _278(_chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _279 => _279.route, 'optionalAccess', _280 => _280.pattern]), () => ( null))
3718
3721
  });
3719
3722
  return;
3720
3723
  }
3721
3724
  const markdownRouteLabel = () => (
3722
3725
  // On the route path, as production labels it: /fr/index.md is /index.md.
3723
- _chunkC4DZAEVTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3726
+ _chunkMZG5M4JScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3724
3727
  toRoutePathname(requestPathname),
3725
- (page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
3728
+ (page) => _optionalChain([farmApp, 'access', _281 => _281.getRouteManager, 'call', _282 => _282(), 'access', _283 => _283.matchRoute, 'call', _284 => _284(page), 'access', _285 => _285.route, 'optionalAccess', _286 => _286.pattern])
3726
3729
  )
3727
3730
  );
3728
3731
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3734,14 +3737,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3734
3737
  routePathname: toRoutePathname,
3735
3738
  resolveSource: async (pathname2) => {
3736
3739
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3737
- const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3740
+ const sourcePath = _optionalChain([match, 'access', _287 => _287.route, 'optionalAccess', _288 => _288.markdownSourcePath]) || (match.route && _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3738
3741
  if (!sourcePath) {
3739
3742
  return null;
3740
3743
  }
3741
3744
  return {
3742
3745
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3743
3746
  // Project-relative, as production sends it: never the machine's path.
3744
- filePath: _chunkUBH2OARScjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3747
+ filePath: _chunkVWPGK6UVcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3745
3748
  };
3746
3749
  },
3747
3750
  // The anonymous check goes through this server, so its guards and
@@ -3891,7 +3894,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3891
3894
  "beforeRequest",
3892
3895
  (plugin2) => {
3893
3896
  const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3894
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3897
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _289 => _289.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3895
3898
  },
3896
3899
  req,
3897
3900
  res
@@ -3928,7 +3931,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3928
3931
  isProd: false
3929
3932
  },
3930
3933
  request,
3931
- { clientAddress: _optionalChain([req, 'access', _292 => _292.socket, 'optionalAccess', _293 => _293.remoteAddress]) }
3934
+ { clientAddress: _optionalChain([req, 'access', _290 => _290.socket, 'optionalAccess', _291 => _291.remoteAddress]) }
3932
3935
  );
3933
3936
  if (!result) {
3934
3937
  throw new Error(`Matched integration route did not return a response`);
@@ -3936,7 +3939,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3936
3939
  return result;
3937
3940
  } catch (error) {
3938
3941
  _chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
3939
- await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
3942
+ await _optionalChain([runtime, 'optionalAccess', _292 => _292.reportError, 'call', _293 => _293(error)]);
3940
3943
  return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
3941
3944
  }
3942
3945
  };
@@ -3990,7 +3993,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3990
3993
  _chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3991
3994
  pathname: requestPathname,
3992
3995
  method: requestMethod
3993
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3996
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _294 => _294.isFarmDocsAPIRequest, 'call', _295 => _295(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3994
3997
  );
3995
3998
  };
3996
3999
  try {
@@ -4080,15 +4083,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4080
4083
  );
4081
4084
  };
4082
4085
  const isDocsAPIRequest = Boolean(
4083
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _298 => _298.isFarmDocsAPIRequest, 'call', _299 => _299(pathname2)])
4086
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(pathname2)])
4084
4087
  );
4085
4088
  const docsRuntimeOptions = () => ({
4086
4089
  kind: "docs",
4087
- route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
4090
+ route: _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
4088
4091
  { pathname: pathname2, pattern: urlPath2 },
4089
- _chunkC4DZAEVTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4090
- path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
4091
- roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
4092
+ _chunkMZG5M4JScjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4093
+ path: _optionalChain([farmConfig, 'access', _298 => _298.docs, 'optionalAccess', _299 => _299.entry]) || "/docs",
4094
+ roots: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.roots, 'optionalAccess', _302 => _302.map, 'call', _303 => _303((root) => root.entry)])
4092
4095
  })
4093
4096
  )
4094
4097
  });
@@ -4170,7 +4173,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4170
4173
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4171
4174
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4172
4175
  if (apiHandler && hasExplicitAPIRoute) {
4173
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
4176
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _304 => _304.route, 'access', _305 => _305.path]) || urlPath2;
4174
4177
  _chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
4175
4178
  type: "route.matched",
4176
4179
  pathname: pathname2,
@@ -4220,7 +4223,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4220
4223
  error
4221
4224
  });
4222
4225
  _chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
4223
- await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
4226
+ await _optionalChain([runtime, 'optionalAccess', _306 => _306.reportError, 'call', _307 => _307(error)]);
4224
4227
  response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
4225
4228
  }
4226
4229
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4325,12 +4328,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4325
4328
  }
4326
4329
  return;
4327
4330
  }
4328
- if (_optionalChain([req, 'access', _310 => _310.url, 'optionalAccess', _311 => _311.startsWith, 'call', _312 => _312("/@")]) || _optionalChain([req, 'access', _313 => _313.url, 'optionalAccess', _314 => _314.startsWith, 'call', _315 => _315("/node_modules")])) {
4331
+ if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/@")]) || _optionalChain([req, 'access', _311 => _311.url, 'optionalAccess', _312 => _312.startsWith, 'call', _313 => _313("/node_modules")])) {
4329
4332
  return next();
4330
4333
  }
4331
4334
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4332
4335
  requestPathname,
4333
- _optionalChain([farmApp, 'optionalAccess', _316 => _316.getRouteManager, 'call', _317 => _317()]),
4336
+ _optionalChain([farmApp, 'optionalAccess', _314 => _314.getRouteManager, 'call', _315 => _315()]),
4334
4337
  [server.config.publicDir, server.config.root],
4335
4338
  farmAgentGeneratedPaths(farmConfig),
4336
4339
  requestMethod
@@ -4338,7 +4341,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4338
4341
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4339
4342
  return next();
4340
4343
  }
4341
- if (_optionalChain([req, 'access', _318 => _318.url, 'optionalAccess', _319 => _319.startsWith, 'call', _320 => _320("/__farm/page-data")])) {
4344
+ if (_optionalChain([req, 'access', _316 => _316.url, 'optionalAccess', _317 => _317.startsWith, 'call', _318 => _318("/__farm/page-data")])) {
4342
4345
  const urlObj = parsedRequestUrl;
4343
4346
  const targetPath = urlObj.searchParams.get("path") || "/";
4344
4347
  let renderedRequest;
@@ -4368,7 +4371,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4368
4371
  renderedRequest = targetRequest;
4369
4372
  let middlewareMap = /* @__PURE__ */ new Map();
4370
4373
  let middlewareContext = /* @__PURE__ */ new Map();
4371
- if (_optionalChain([middlewareManager, 'optionalAccess', _321 => _321.hasMiddleware, 'call', _322 => _322()])) {
4374
+ if (_optionalChain([middlewareManager, 'optionalAccess', _319 => _319.hasMiddleware, 'call', _320 => _320()])) {
4372
4375
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4373
4376
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4374
4377
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4402,10 +4405,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4402
4405
  if (pm) {
4403
4406
  await pm.runHookParallel("afterRouteMatch", {
4404
4407
  pathname: targetPath,
4405
- matched: !!_optionalChain([match, 'optionalAccess', _323 => _323.route]),
4406
- routePattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
4407
- params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {},
4408
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _327 => _327.layouts]) || []).map((l) => l.pattern)
4408
+ matched: !!_optionalChain([match, 'optionalAccess', _321 => _321.route]),
4409
+ routePattern: _optionalChain([match, 'optionalAccess', _322 => _322.route, 'optionalAccess', _323 => _323.pattern]) || null,
4410
+ params: _optionalChain([match, 'optionalAccess', _324 => _324.params]) || {},
4411
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _325 => _325.layouts]) || []).map((l) => l.pattern)
4409
4412
  });
4410
4413
  }
4411
4414
  if (!match) {
@@ -4440,7 +4443,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4440
4443
  );
4441
4444
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4442
4445
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4443
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4446
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4444
4447
  const isClientComponent = moduleMetadata.isClientComponent;
4445
4448
  const shouldHydrate = moduleMetadata.shouldHydrate;
4446
4449
  let mergedMetadata = {};
@@ -4451,7 +4454,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4451
4454
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4452
4455
  (entry) => entry.pattern === layout.pattern
4453
4456
  ), () => ( {
4454
- ..._chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4457
+ ..._chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4455
4458
  serverTree: false
4456
4459
  }))
4457
4460
  );
@@ -4464,18 +4467,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4464
4467
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
4465
4468
  )
4466
4469
  ];
4467
- const hydrationIslandStrategy = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0,
4468
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options))), 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])
4469
- ) === "islands" ? _chunkUBH2OARScjs.resolveFarmRouteRootStrategy.call(void 0,
4470
+ const hydrationIslandStrategy = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0,
4471
+ _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _326 => _326.getConfig, 'call', _327 => _327()]), () => ( options)))
4472
+ ) === "islands" ? _chunkVWPGK6UVcjs.resolveFarmRouteRootStrategy.call(void 0,
4470
4473
  route,
4471
4474
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4472
4475
  layouts.map((layout, index) => ({
4473
4476
  pattern: layout.pattern,
4474
4477
  modulePath: layout.modulePath,
4475
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.shouldHydrate]) === true,
4478
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.shouldHydrate]) === true,
4476
4479
  // Manifest entries carry it; metadata read from source does not.
4477
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _334 => _334[index], 'optionalAccess', _335 => _335.hasIsolatedClientBoundaries]) === true,
4478
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _336 => _336[index], 'optionalAccess', _337 => _337.islandStrategy]), () => ( null))
4480
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.hasIsolatedClientBoundaries]) === true,
4481
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.islandStrategy]), () => ( null))
4479
4482
  })),
4480
4483
  server.config.root,
4481
4484
  true
@@ -4532,7 +4535,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4532
4535
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4533
4536
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4534
4537
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4535
- ), () => ( _chunkPSALMEHJcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4538
+ ), () => ( _chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4536
4539
  const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4537
4540
  request: targetRequest,
4538
4541
  params: slot.params,
@@ -4582,7 +4585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4582
4585
  pageShouldHydrate: shouldHydrate,
4583
4586
  layoutShouldHydrate: shouldHydrateLayout,
4584
4587
  islandStrategy: hydrationIslandStrategy,
4585
- rendering: _chunkKM7ZRKCHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4588
+ rendering: _chunkT4VF6BYVcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4586
4589
  });
4587
4590
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4588
4591
  const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
@@ -4596,13 +4599,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4596
4599
  middlewareContext,
4597
4600
  () => renderer.renderNavigationFragment({
4598
4601
  PageComponent: routeModule.default,
4599
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _338 => _338.default]),
4602
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _334 => _334.default]),
4600
4603
  pageProps: routeProps,
4601
4604
  params,
4602
4605
  layouts: layouts.map((layout, index) => ({
4603
4606
  pattern: layout.pattern,
4604
4607
  module: layoutModules[index],
4605
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _339 => _339[index], 'optionalAccess', _340 => _340.serverTree])
4608
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _335 => _335[index], 'optionalAccess', _336 => _336.serverTree])
4606
4609
  })),
4607
4610
  layoutStartIndex,
4608
4611
  slots: routeSlots.map((slot) => ({
@@ -4710,14 +4713,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4710
4713
  trustProxy: currentServerConfig.trustProxy
4711
4714
  }).pathname;
4712
4715
  const routeManager2 = farmApp.getRouteManager();
4713
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("beforeRequest")]), () => ( false));
4714
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterResponse")]), () => ( false));
4715
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasHook, 'call', _346 => _346("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasHook, 'call', _348 => _348("afterRender")]), () => ( false)));
4716
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("beforeRequest")]), () => ( false));
4717
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("afterResponse")]), () => ( false));
4718
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterRender")]), () => ( false)));
4716
4719
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4717
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _349 => _349.hasRuntimeHook, 'call', _350 => _350("after")]), () => ( false));
4720
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasRuntimeHook, 'call', _346 => _346("after")]), () => ( false));
4718
4721
  const pageBuiltInRouteLabel = (pathname2) => {
4719
4722
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4720
- const mcpLabel = _chunkC4DZAEVTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4723
+ const mcpLabel = _chunkMZG5M4JScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4721
4724
  if (mcpLabel) return mcpLabel;
4722
4725
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4723
4726
  return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4726,13 +4729,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4726
4729
  const match = routeManager2.matchRoute(pathname2);
4727
4730
  return {
4728
4731
  kind: "page",
4729
- route: _chunkC4DZAEVTcjs.setFarmRouteLabel.call(void 0,
4732
+ route: _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
4730
4733
  {
4731
4734
  pathname: pathname2,
4732
- pattern: _optionalChain([match, 'optionalAccess', _351 => _351.route, 'optionalAccess', _352 => _352.pattern]) || null,
4733
- params: _optionalChain([match, 'optionalAccess', _353 => _353.params]) || {}
4735
+ pattern: _optionalChain([match, 'optionalAccess', _347 => _347.route, 'optionalAccess', _348 => _348.pattern]) || null,
4736
+ params: _optionalChain([match, 'optionalAccess', _349 => _349.params]) || {}
4734
4737
  },
4735
- _optionalChain([match, 'optionalAccess', _354 => _354.route]) ? null : pageBuiltInRouteLabel(pathname2)
4738
+ _optionalChain([match, 'optionalAccess', _350 => _350.route]) ? null : pageBuiltInRouteLabel(pathname2)
4736
4739
  )
4737
4740
  };
4738
4741
  };
@@ -4812,7 +4815,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4812
4815
  }) : void 0;
4813
4816
  let middlewareFailed = false;
4814
4817
  try {
4815
- if (_optionalChain([middlewareManager, 'optionalAccess', _355 => _355.hasMiddleware, 'call', _356 => _356()])) {
4818
+ if (_optionalChain([middlewareManager, 'optionalAccess', _351 => _351.hasMiddleware, 'call', _352 => _352()])) {
4816
4819
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4817
4820
  const handled = await runFarmMiddlewareWithNavigation(
4818
4821
  farmApp.getServerRenderer(),
@@ -4825,7 +4828,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4825
4828
  throw error;
4826
4829
  });
4827
4830
  if (handled) {
4828
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4831
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4829
4832
  const duration = Date.now() - startTime;
4830
4833
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4831
4834
  }
@@ -4840,8 +4843,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4840
4843
  res
4841
4844
  );
4842
4845
  }
4843
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4844
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.isEnded, 'call', _362 => _362()])) {
4846
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4847
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4845
4848
  const duration = Date.now() - startTime;
4846
4849
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4847
4850
  }
@@ -4860,8 +4863,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4860
4863
  await pm.reportRuntimeRequestError(runtimeSession, error);
4861
4864
  } else {
4862
4865
  await pm.failRuntimeRequest(runtimeSession, error);
4863
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _363 => _363.isEnded, 'call', _364 => _364()])) {
4864
- _optionalChain([responseInterceptor, 'optionalAccess', _365 => _365.release, 'call', _366 => _366()]);
4866
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4867
+ _optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.release, 'call', _362 => _362()]);
4865
4868
  console.error("[FARM] Page error:", error);
4866
4869
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4867
4870
  return;
@@ -4878,7 +4881,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4878
4881
  }
4879
4882
  })
4880
4883
  );
4881
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _367 => _367.stack, 'access', _368 => _368.at, 'call', _369 => _369(-1), 'optionalAccess', _370 => _370.handle]);
4884
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _363 => _363.stack, 'access', _364 => _364.at, 'call', _365 => _365(-1), 'optionalAccess', _366 => _366.handle]);
4882
4885
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4883
4886
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4884
4887
  }
@@ -4907,7 +4910,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4907
4910
  });
4908
4911
  }
4909
4912
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4910
- const root = _optionalChain([farmApp, 'optionalAccess', _371 => _371.getConfig, 'call', _372 => _372(), 'access', _373 => _373.root]) || _optionalChain([server, 'optionalAccess', _374 => _374.config, 'access', _375 => _375.root]) || options.root;
4913
+ const root = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.root]) || _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4911
4914
  return this.resolve(id, path6.join(root, "package.json"), {
4912
4915
  ...resolveOptions,
4913
4916
  skipSelf: true
@@ -4935,7 +4938,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4935
4938
  }
4936
4939
  },
4937
4940
  async load(id, loadOptions) {
4938
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _376 => _376.ssr]) && !farmSetupContext.getStore()) {
4941
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _372 => _372.ssr]) && !farmSetupContext.getStore()) {
4939
4942
  await pendingClientSetup;
4940
4943
  }
4941
4944
  if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4953,8 +4956,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4953
4956
  if (imageModule) return imageModule;
4954
4957
  }
4955
4958
  if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4956
- const renderer = _optionalChain([farmApp, 'optionalAccess', _377 => _377.getConfig, 'call', _378 => _378(), 'access', _379 => _379.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
4957
- const root = _optionalChain([server, 'optionalAccess', _380 => _380.config, 'access', _381 => _381.root]) || options.root;
4959
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _373 => _373.getConfig, 'call', _374 => _374(), 'access', _375 => _375.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4960
+ const root = _optionalChain([server, 'optionalAccess', _376 => _376.config, 'access', _377 => _377.root]) || options.root;
4958
4961
  if (isClientEnvironment(this, loadOptions)) {
4959
4962
  return generateProgrammaticClientRouteModuleForId(
4960
4963
  id,
@@ -4970,19 +4973,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4970
4973
  return FARM_DEV_CLIENT_BOOT_MODULE;
4971
4974
  }
4972
4975
  if (isFarmClientVirtualId(id)) {
4973
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _382 => _382.getConfig, 'call', _383 => _383()]);
4974
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.renderer]) || _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, options.renderer);
4975
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.integrations]) || options.integrations;
4976
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.root]) || _optionalChain([server, 'optionalAccess', _387 => _387.config, 'access', _388 => _388.root]) || process.cwd();
4977
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.docs]);
4976
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _378 => _378.getConfig, 'call', _379 => _379()]);
4977
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4978
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.integrations]) || options.integrations;
4979
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.root]) || _optionalChain([server, 'optionalAccess', _383 => _383.config, 'access', _384 => _384.root]) || process.cwd();
4980
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.docs]);
4978
4981
  const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4979
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4982
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4980
4983
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4981
- _optionalChain([docs, 'optionalAccess', _391 => _391.enabled]) ? loadFarmDocsDevRuntime() : null,
4982
- _optionalChain([docs, 'optionalAccess', _392 => _392.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4984
+ _optionalChain([docs, 'optionalAccess', _387 => _387.enabled]) ? loadFarmDocsDevRuntime() : null,
4985
+ _optionalChain([docs, 'optionalAccess', _388 => _388.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4983
4986
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4984
4987
  ]);
4985
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _393 => _393.isFarmDocsSearchEnabled, 'call', _394 => _394(docs)]), () => ( false));
4988
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _389 => _389.isFarmDocsSearchEnabled, 'call', _390 => _390(docs)]), () => ( false));
4986
4989
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4987
4990
  docsSearchEnabled,
4988
4991
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -4990,10 +4993,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4990
4993
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4991
4994
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4992
4995
  const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
4993
- const isolatedHydrationMode = _chunkPSALMEHJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4994
- _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.experimental, 'optionalAccess', _396 => _396.isolatedClientHydration]),
4996
+ const isolatedHydrationMode = _chunkZCT6B5PQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4997
+ _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.isolatedClientHydration]),
4995
4998
  {
4996
- serverComponents: _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.experimental, 'optionalAccess', _398 => _398.serverComponents])) === "rsc",
4999
+ serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
4997
5000
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
4998
5001
  }
4999
5002
  );
@@ -5001,32 +5004,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
5001
5004
  integrationProviders,
5002
5005
  [
5003
5006
  ..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
5004
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _399 => _399.getFarmDocsDocumentNavigationMatchers, 'call', _400 => _400(docs)]), () => ( []))
5007
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
5005
5008
  ],
5006
5009
  generatedDocsSearchRuntime,
5007
5010
  `${generatedDevtoolsClientRuntime}
5008
5011
  ${generatedDevIndicatorsClientRuntime}`,
5009
- _optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.plugins]) || [],
5012
+ _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
5010
5013
  root,
5011
- _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.srcDir]) || options.srcDir || "src",
5012
- _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.publicRuntimeConfig]) || options.publicRuntimeConfig,
5013
- adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _404 => _404.adapter])) : void 0,
5014
+ _optionalChain([resolvedConfig, 'optionalAccess', _396 => _396.srcDir]) || options.srcDir || "src",
5015
+ _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.publicRuntimeConfig]) || options.publicRuntimeConfig,
5016
+ adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _398 => _398.adapter])) : void 0,
5014
5017
  renderer,
5015
- isolatedHydrationMode === "enabled" || _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406(), 'access', _407 => _407.getIsolatedClientBoundaryModules, 'call', _408 => _408(root)])))), 'optionalAccess', _409 => _409.size]) > 0,
5016
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _410 => _410.trailingSlash]), () => ( false)),
5017
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _411 => _411.basePath]), () => ( "/")),
5018
- _chunkUBH2OARScjs.generateClientCachePersistenceCode.call(void 0,
5019
- _chunkUBH2OARScjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _412 => _412.cache]))
5018
+ isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
5019
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
5020
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
5021
+ _chunkVWPGK6UVcjs.generateClientCachePersistenceCode.call(void 0,
5022
+ _chunkVWPGK6UVcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
5020
5023
  ),
5021
5024
  adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
5022
- _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands"
5025
+ _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
5023
5026
  );
5024
5027
  }
5025
5028
  if (id === "/@farm/server") {
5026
5029
  return generateServerCode();
5027
5030
  }
5028
5031
  if (id === "/@farm/manifest") {
5029
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _415 => _415.getRouteManager, 'call', _416 => _416()]);
5032
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
5030
5033
  if (!routeManager) {
5031
5034
  return `
5032
5035
  export const getManifest = () => ({
@@ -5038,11 +5041,11 @@ export const getManifest = () => ({
5038
5041
  });
5039
5042
  `;
5040
5043
  }
5041
- const globalStylesheetHref = _chunkUBH2OARScjs.resolveDevGlobalStylesheetHref.call(void 0,
5044
+ const globalStylesheetHref = _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
5042
5045
  server.config.root,
5043
- _optionalChain([farmApp, 'optionalAccess', _417 => _417.getConfig, 'call', _418 => _418(), 'access', _419 => _419.srcDir])
5046
+ _optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'access', _411 => _411.srcDir])
5044
5047
  );
5045
- const fullManifest = _chunkUBH2OARScjs.createFarmDevClientManifest.call(void 0,
5048
+ const fullManifest = _chunkVWPGK6UVcjs.createFarmDevClientManifest.call(void 0,
5046
5049
  routeManager.generateClientManifest(server.config.root),
5047
5050
  {
5048
5051
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -5058,51 +5061,51 @@ export { manifest };
5058
5061
  }
5059
5062
  },
5060
5063
  async transform(code, id, transformOptions) {
5061
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) && !farmSetupContext.getStore()) {
5064
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) && !farmSetupContext.getStore()) {
5062
5065
  await pendingClientSetup;
5063
5066
  }
5064
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5065
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _422 => _422.getConfig, 'call', _423 => _423()]), () => ( options));
5067
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5068
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _414 => _414.getConfig, 'call', _415 => _415()]), () => ( options));
5066
5069
  let rewrotePackageImports = false;
5067
- if (_chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _424 => _424.experimental, 'optionalAccess', _425 => _425.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, code)) {
5070
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkZCT6B5PQcjs.hasUseClientDirective.call(void 0, code)) {
5068
5071
  const file = id.split("?", 1)[0];
5069
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _427 => _427.config, 'access', _428 => _428.root]) || process.cwd();
5072
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
5070
5073
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
5071
5074
  const rewrite = () => {
5072
- if (_optionalChain([transformOptions, 'optionalAccess', _429 => _429.ssr]) === true) {
5075
+ if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
5073
5076
  if (farmReactServerFiles.has(file)) {
5074
- for (const child of _chunkPSALMEHJcjs.farmRelativeImportFiles.call(void 0, code, file))
5077
+ for (const child of _chunkZCT6B5PQcjs.farmRelativeImportFiles.call(void 0, code, file))
5075
5078
  farmReactServerFiles.add(child);
5076
5079
  }
5077
- const serverModule = farmReactServerFiles.has(file) || !_chunkPSALMEHJcjs.getFarmClientReachableModules.call(void 0,
5080
+ const serverModule = farmReactServerFiles.has(file) || !_chunkZCT6B5PQcjs.getFarmClientReachableModules.call(void 0,
5078
5081
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
5079
5082
  projectRoot
5080
5083
  ).has(path6.resolve(file));
5081
- const reactServer = !serverModule ? null : _chunkPSALMEHJcjs.rewriteFarmReactServerImports.call(void 0, {
5084
+ const reactServer = !serverModule ? null : _chunkZCT6B5PQcjs.rewriteFarmReactServerImports.call(void 0, {
5082
5085
  code,
5083
5086
  file,
5084
- reference: (specifier, exportName) => _chunkPSALMEHJcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5087
+ reference: (specifier, exportName) => _chunkZCT6B5PQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5085
5088
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5086
5089
  });
5087
5090
  if (reactServer !== null) {
5088
5091
  code = reactServer;
5089
5092
  rewrotePackageImports = true;
5090
5093
  }
5091
- const internal = farmReactServerFiles.has(file) ? _chunkPSALMEHJcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5094
+ const internal = farmReactServerFiles.has(file) ? _chunkZCT6B5PQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5092
5095
  code,
5093
5096
  file,
5094
- reference: (clientFile) => _chunkPSALMEHJcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5097
+ reference: (clientFile) => _chunkZCT6B5PQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5095
5098
  }) : null;
5096
5099
  if (internal !== null) {
5097
5100
  code = internal;
5098
5101
  rewrotePackageImports = true;
5099
5102
  }
5100
5103
  }
5101
- const rewritePackageImports = (source2) => _chunkPSALMEHJcjs.rewriteFarmPackageClientImports.call(void 0, {
5104
+ const rewritePackageImports = (source2) => _chunkZCT6B5PQcjs.rewriteFarmPackageClientImports.call(void 0, {
5102
5105
  code: source2,
5103
5106
  file,
5104
5107
  root: projectRoot,
5105
- isClientPackage: (specifier) => _chunkPSALMEHJcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5108
+ isClientPackage: (specifier) => _chunkZCT6B5PQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5106
5109
  });
5107
5110
  const source = code;
5108
5111
  const referenced = inspectPackages(() => rewritePackageImports(source));
@@ -5110,11 +5113,11 @@ export { manifest };
5110
5113
  code = referenced;
5111
5114
  rewrotePackageImports = true;
5112
5115
  }
5113
- if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) === true) {
5116
+ if (_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true) {
5114
5117
  const cached = rewriteFarmReactCacheImport(
5115
5118
  code,
5116
5119
  file,
5117
- _optionalChain([runtimeModule, 'optionalCall', _431 => _431(FARM_REACT_CACHE_MODULE)])
5120
+ _optionalChain([runtimeModule, 'optionalCall', _421 => _421(FARM_REACT_CACHE_MODULE)])
5118
5121
  );
5119
5122
  if (cached !== null) {
5120
5123
  code = cached;
@@ -5122,12 +5125,12 @@ export { manifest };
5122
5125
  }
5123
5126
  }
5124
5127
  };
5125
- if (buildSnapshot) _chunkPSALMEHJcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5128
+ if (buildSnapshot) _chunkZCT6B5PQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5126
5129
  else rewrite();
5127
5130
  }
5128
5131
  if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5129
5132
  const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
5130
- environment: _optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr]) === true ? "rsc" : "client"
5133
+ environment: _optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true ? "rsc" : "client"
5131
5134
  });
5132
5135
  if (serverFns) {
5133
5136
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5140,8 +5143,8 @@ export { manifest };
5140
5143
  const actionModule = transformFarmFormActionModule({
5141
5144
  code,
5142
5145
  id,
5143
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd(),
5144
- ssr: _optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) === true,
5146
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _423 => _423.config, 'access', _424 => _424.root]) || process.cwd(),
5147
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _425 => _425.ssr]) === true,
5145
5148
  // Parsed by file type: page components are TSX.
5146
5149
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5147
5150
  runtimeModule,
@@ -5149,21 +5152,21 @@ export { manifest };
5149
5152
  });
5150
5153
  if (actionModule) return { code: actionModule, map: null };
5151
5154
  }
5152
- if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
5153
- const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438(), 'optionalAccess', _439 => _439.docs]));
5154
- if (_chunkUBH2OARScjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5155
- const redacted = _chunkUBH2OARScjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5155
+ if (!_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr])) {
5156
+ const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _427 => _427.getConfig, 'call', _428 => _428(), 'optionalAccess', _429 => _429.docs]));
5157
+ if (_chunkVWPGK6UVcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5158
+ const redacted = _chunkVWPGK6UVcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5156
5159
  if (redacted !== null) return { code: redacted, map: null };
5157
5160
  }
5158
5161
  }
5159
- if (!_optionalChain([transformOptions, 'optionalAccess', _440 => _440.ssr])) {
5160
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _441 => _441.getConfig, 'call', _442 => _442()]), () => ( options));
5161
- if ((_optionalChain([currentConfig, 'access', _443 => _443.experimental, 'optionalAccess', _444 => _444.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5162
+ if (!_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr])) {
5163
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5164
+ if ((_optionalChain([currentConfig, 'access', _433 => _433.experimental, 'optionalAccess', _434 => _434.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5162
5165
  const violation = findClientServerFnViolation(code, id);
5163
5166
  if (violation) {
5164
- const locate = _chunkPSALMEHJcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5167
+ const locate = _chunkZCT6B5PQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5165
5168
  this.error(
5166
- _chunkPSALMEHJcjs.formatFarmDiagnostic.call(void 0,
5169
+ _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
5167
5170
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5168
5171
  currentConfig.root
5169
5172
  )
@@ -5171,8 +5174,8 @@ export { manifest };
5171
5174
  }
5172
5175
  }
5173
5176
  }
5174
- if (!_optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) && shouldInspectClientBoundary(id, code)) {
5175
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _446 => _446.getConfig, 'call', _447 => _447()]), () => ( options)));
5177
+ if (!_optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) && shouldInspectClientBoundary(id, code)) {
5178
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _436 => _436.getConfig, 'call', _437 => _437()]), () => ( options)));
5176
5179
  }
5177
5180
  if (typeof imageImports.transform === "function") {
5178
5181
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5187,13 +5190,13 @@ export { manifest };
5187
5190
  id,
5188
5191
  transformOptions
5189
5192
  );
5190
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _448 => _448.code, 'optionalAccess', _449 => _449.toString, 'call', _450 => _450()]);
5193
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _438 => _438.code, 'optionalAccess', _439 => _439.toString, 'call', _440 => _440()]);
5191
5194
  if (fontCode) {
5192
5195
  transformedCode = fontCode;
5193
5196
  transformed = true;
5194
5197
  }
5195
5198
  }
5196
- if (_optionalChain([transformOptions, 'optionalAccess', _451 => _451.ssr]) && server) {
5199
+ if (_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && server) {
5197
5200
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5198
5201
  code: transformedCode,
5199
5202
  id,
@@ -5205,27 +5208,27 @@ export { manifest };
5205
5208
  transformed = true;
5206
5209
  }
5207
5210
  }
5208
- if (_chunkPSALMEHJcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5211
+ if (_chunkZCT6B5PQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5209
5212
  const clientBoundarySource = transformedCode;
5210
5213
  const moduleInfo = this.getModuleInfo(id);
5211
5214
  if (moduleInfo) {
5212
5215
  moduleInfo.isClientComponent = true;
5213
5216
  }
5214
- transformedCode = _chunkPSALMEHJcjs.stripUseClientDirective.call(void 0, transformedCode);
5217
+ transformedCode = _chunkZCT6B5PQcjs.stripUseClientDirective.call(void 0, transformedCode);
5215
5218
  transformed = true;
5216
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _452 => _452.getConfig, 'call', _453 => _453()]), () => ( options));
5219
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options));
5217
5220
  let isolatedModuleReference = null;
5218
5221
  let rendererIslandModule = false;
5219
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _454 => _454.config, 'access', _455 => _455.root]) || process.cwd();
5222
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _444 => _444.config, 'access', _445 => _445.root]) || process.cwd();
5220
5223
  const cleanId = id.split("?", 1)[0];
5221
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _456 => _456.getRouteManager, 'call', _457 => _457(), 'access', _458 => _458.getIsolatedClientBoundaryModules, 'call', _459 => _459(root)])));
5222
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _460 => _460.has, 'call', _461 => _461(path6.resolve(cleanId))]) === true;
5223
- if (_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5224
- cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5224
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _446 => _446.getRouteManager, 'call', _447 => _447(), 'access', _448 => _448.getIsolatedClientBoundaryModules, 'call', _449 => _449(root)])));
5225
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _450 => _450.has, 'call', _451 => _451(path6.resolve(cleanId))]) === true;
5226
+ if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkZCT6B5PQcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5227
+ cleanId.replace(/\\/g, "/").includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5225
5228
  isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
5226
- const islandsMode = _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _462 => _462.experimental, 'optionalAccess', _463 => _463.serverComponents])) === "islands";
5227
- const explicitStrategy = _chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5228
- const inference = islandsMode && explicitStrategy === null ? _chunkUBH2OARScjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5229
+ const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, currentConfig)) === "islands";
5230
+ const explicitStrategy = _chunkZCT6B5PQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5231
+ const inference = islandsMode && explicitStrategy === null ? _chunkVWPGK6UVcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5229
5232
  if (inference) {
5230
5233
  for (const file of inference.files) {
5231
5234
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5238,8 +5241,8 @@ export { manifest };
5238
5241
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5239
5242
  parse: (source) => this.parse(source),
5240
5243
  slots: islandsMode,
5241
- browser: _optionalChain([transformOptions, 'optionalAccess', _464 => _464.ssr]) !== true,
5242
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _465 => _465.strategy]) === "interaction",
5244
+ browser: _optionalChain([transformOptions, 'optionalAccess', _452 => _452.ssr]) !== true,
5245
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _453 => _453.strategy]) === "interaction",
5243
5246
  runtimeModule
5244
5247
  });
5245
5248
  if (!transformedBoundary) {
@@ -5248,14 +5251,14 @@ export { manifest };
5248
5251
  );
5249
5252
  }
5250
5253
  transformedCode = transformedBoundary;
5251
- } else if (selectedForIsolatedHydration && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkPSALMEHJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5254
+ } else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkZCT6B5PQcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5252
5255
  rendererIslandModule = true;
5253
- if (_optionalChain([transformOptions, 'optionalAccess', _466 => _466.ssr]) === true) {
5254
- const renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5256
+ if (_optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) === true) {
5257
+ const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5255
5258
  const transformedBoundary = transformIsolatedClientBoundaryModule({
5256
5259
  code: transformedCode,
5257
5260
  moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
5258
- islandStrategy: _nullishCoalesce(_chunkPSALMEHJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5261
+ islandStrategy: _nullishCoalesce(_chunkZCT6B5PQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5259
5262
  parse: (source) => this.parse(source),
5260
5263
  withIsland: renderer.server
5261
5264
  });
@@ -5288,7 +5291,7 @@ export { manifest };
5288
5291
  );
5289
5292
  return;
5290
5293
  }` : "";
5291
- const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _467 => _467.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5294
+ const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5292
5295
  const hmrCode = rendererIslandHmr ? `
5293
5296
  if (import.meta.hot) {
5294
5297
  import.meta.hot.accept((newModule) => {
@@ -5298,7 +5301,7 @@ if (import.meta.hot) {
5298
5301
  }
5299
5302
  });
5300
5303
  }
5301
- ` : _optionalChain([transformOptions, 'optionalAccess', _468 => _468.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5304
+ ` : _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5302
5305
  if (import.meta.hot) {
5303
5306
  import.meta.hot.accept((newModule) => {
5304
5307
  ${isolatedHmrUpdate}
@@ -5354,14 +5357,14 @@ if (import.meta.hot) {
5354
5357
  }
5355
5358
  _chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5356
5359
  _chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
5357
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _469 => _469.config, 'access', _470 => _470.root]) || process.cwd(), options.outDir || "dist");
5360
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _457 => _457.config, 'access', _458 => _458.root]) || process.cwd(), options.outDir || "dist");
5358
5361
  const clientDir = path6.join(outDir, "client");
5359
5362
  for (const page of ssgPages) {
5360
5363
  try {
5361
5364
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5362
5365
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5363
5366
  const mod = await routeManager.loadRouteModule(page.filePath);
5364
- if (!_optionalChain([mod, 'optionalAccess', _471 => _471.default])) return;
5367
+ if (!_optionalChain([mod, 'optionalAccess', _459 => _459.default])) return;
5365
5368
  const { layouts } = routeManager.matchRoute(page.urlPath);
5366
5369
  const layoutModules = await Promise.all(
5367
5370
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5393,7 +5396,7 @@ if (import.meta.hot) {
5393
5396
  const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
5394
5397
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5395
5398
  const fullHtml = `<!DOCTYPE html>
5396
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _472 => _472.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5399
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _460 => _460.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5397
5400
  <head>
5398
5401
  <meta charset="utf-8">
5399
5402
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5438,11 +5441,11 @@ if (import.meta.hot) {
5438
5441
  watchChange(id, change) {
5439
5442
  const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
5440
5443
  const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
5441
- if (appSource) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.noteSourceChange, 'call', _476 => _476(id, change.event)]);
5442
- _chunkPSALMEHJcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5443
- _chunkPSALMEHJcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5444
- _chunkUBH2OARScjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5445
- _chunkPSALMEHJcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5444
+ if (appSource) _optionalChain([farmApp, 'optionalAccess', _461 => _461.getRouteManager, 'call', _462 => _462(), 'access', _463 => _463.noteSourceChange, 'call', _464 => _464(id, change.event)]);
5445
+ _chunkZCT6B5PQcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5446
+ _chunkZCT6B5PQcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5447
+ _chunkVWPGK6UVcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5448
+ _chunkZCT6B5PQcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5446
5449
  },
5447
5450
  async handleHotUpdate(ctx) {
5448
5451
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5467,7 +5470,7 @@ if (import.meta.hot) {
5467
5470
  server2.moduleGraph.invalidateModule(mod);
5468
5471
  }
5469
5472
  }
5470
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getConfig, 'call', _478 => _478()]);
5473
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _465 => _465.getConfig, 'call', _466 => _466()]);
5471
5474
  const normalizedFile = file.replace(/\\/g, "/");
5472
5475
  const reloadAfterEdit = () => {
5473
5476
  for (const files of pendingRouteReloads) {
@@ -5475,31 +5478,31 @@ if (import.meta.hot) {
5475
5478
  }
5476
5479
  server2.ws.send({ type: "full-reload", path: "*" });
5477
5480
  };
5478
- if (normalizedFile.includes(_chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5481
+ if (normalizedFile.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5479
5482
  path6.posix.join(
5480
- _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.root]) || options.root || server2.config.root),
5481
- _chunkPSALMEHJcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5483
+ _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _467 => _467.root]) || options.root || server2.config.root),
5484
+ _chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5482
5485
  )
5483
5486
  ))
5484
5487
  return modules;
5485
- if (currentFarmConfig && _chunkXJEOHDPNcjs.isFarmAPIRouteFileName.call(void 0,
5488
+ if (currentFarmConfig && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0,
5486
5489
  path6.posix.basename(normalizedFile),
5487
- _chunkXJEOHDPNcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5488
- ) && _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5490
+ _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5491
+ ) && _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5489
5492
  (appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
5490
5493
  )) {
5491
5494
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5492
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _480 => _480(`updated ${file}`)]);
5495
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _468 => _468(`updated ${file}`)]);
5493
5496
  reloadAfterEdit();
5494
5497
  return [];
5495
5498
  }
5496
- const currentSrcRoot = currentFarmConfig ? _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5499
+ const currentSrcRoot = currentFarmConfig ? _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5497
5500
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5498
5501
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5499
5502
  for (const mod of modules) {
5500
5503
  server2.moduleGraph.invalidateModule(mod);
5501
5504
  }
5502
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _481 => _481(`updated ${file}`)]);
5505
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5503
5506
  reloadAfterEdit();
5504
5507
  return [];
5505
5508
  }
@@ -5509,22 +5512,22 @@ if (import.meta.hot) {
5509
5512
  for (const mod of modules) {
5510
5513
  server2.moduleGraph.invalidateModule(mod);
5511
5514
  }
5512
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _482 => _482(`updated ${file}`)]);
5515
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5513
5516
  reloadAfterEdit();
5514
5517
  return [];
5515
5518
  }
5516
5519
  if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5517
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _483 => _483(`updated ${file}`)]);
5520
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5518
5521
  }
5519
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.experimental, 'optionalAccess', _485 => _485.isolatedClientHydration]);
5520
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _486 => _486.getRouteManager, 'call', _487 => _487()]);
5522
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _472 => _472.experimental, 'optionalAccess', _473 => _473.isolatedClientHydration]);
5523
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _474 => _474.getRouteManager, 'call', _475 => _475()]);
5521
5524
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5522
- const tracksAsyncOwnerIslands = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _488 => _488.renderer])) && planRouteManager !== void 0;
5525
+ const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _476 => _476.renderer])) && planRouteManager !== void 0;
5523
5526
  let clientPlanCurrent = false;
5524
5527
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5525
5528
  const routeManager = planRouteManager;
5526
- await _optionalChain([ctx, 'access', _489 => _489.read, 'optionalCall', _490 => _490()]);
5527
- if (_optionalChain([routeManager, 'optionalAccess', _491 => _491.isEditPlanNeutral, 'call', _492 => _492(file)])) {
5529
+ await _optionalChain([ctx, 'access', _477 => _477.read, 'optionalCall', _478 => _478()]);
5530
+ if (_optionalChain([routeManager, 'optionalAccess', _479 => _479.isEditPlanNeutral, 'call', _480 => _480(file)])) {
5528
5531
  clientPlanCurrent = true;
5529
5532
  } else if (routeManager) {
5530
5533
  routeManager.noteSourceChange(file, "update");
@@ -5568,7 +5571,7 @@ if (import.meta.hot) {
5568
5571
  }
5569
5572
  }
5570
5573
  }
5571
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _493 => _493.getRouteManager, 'call', _494 => _494(), 'access', _495 => _495.isRendererRouteModule, 'call', _496 => _496(normalizedFile)]) === true;
5574
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _481 => _481.getRouteManager, 'call', _482 => _482(), 'access', _483 => _483.isRendererRouteModule, 'call', _484 => _484(normalizedFile)]) === true;
5572
5575
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5573
5576
  if (normalizedFile.includes("middleware.")) {
5574
5577
  if (middlewareManager) {
@@ -5586,7 +5589,7 @@ if (import.meta.hot) {
5586
5589
  }
5587
5590
  return [];
5588
5591
  }
5589
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _497 => _497.getRouteManager, 'call', _498 => _498(), 'access', _499 => _499.invalidateClientManifest, 'call', _500 => _500()]);
5592
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _485 => _485.getRouteManager, 'call', _486 => _486(), 'access', _487 => _487.invalidateClientManifest, 'call', _488 => _488()]);
5590
5593
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5591
5594
  if (manifestModule) {
5592
5595
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5601,15 +5604,15 @@ if (import.meta.hot) {
5601
5604
  return [];
5602
5605
  }
5603
5606
  }
5604
- if (currentFarmConfig && planRouteManager && _chunkIU4YTFFQcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5605
- _optionalChain([server2, 'access', _501 => _501.environments, 'access', _502 => _502.client, 'optionalAccess', _503 => _503.moduleGraph]),
5607
+ if (currentFarmConfig && planRouteManager && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5608
+ _optionalChain([server2, 'access', _489 => _489.environments, 'access', _490 => _490.client, 'optionalAccess', _491 => _491.moduleGraph]),
5606
5609
  normalizedFile,
5607
5610
  planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5608
5611
  )) {
5609
5612
  reloadAfterEdit();
5610
5613
  return [];
5611
5614
  }
5612
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _504 => _504.environments, 'access', _505 => _505.client, 'optionalAccess', _506 => _506.moduleGraph, 'access', _507 => _507.getModulesByFile, 'call', _508 => _508(normalizedFile), 'optionalAccess', _509 => _509.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5615
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph, 'access', _495 => _495.getModulesByFile, 'call', _496 => _496(normalizedFile), 'optionalAccess', _497 => _497.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5613
5616
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5614
5617
  reloadAfterEdit();
5615
5618
  return [];
@@ -5707,7 +5710,7 @@ function createPageDataMiddlewareResponse(res) {
5707
5710
  return (...args) => {
5708
5711
  if (captures(target.statusCode, target.getHeader("location"))) {
5709
5712
  const callback = args.find((arg) => typeof arg === "function");
5710
- _optionalChain([callback, 'optionalCall', _510 => _510()]);
5713
+ _optionalChain([callback, 'optionalCall', _498 => _498()]);
5711
5714
  return property === "write" ? true : response;
5712
5715
  }
5713
5716
  return target[property](...args);
@@ -5771,12 +5774,12 @@ function isFarmClientVirtualId(id) {
5771
5774
  }
5772
5775
  function isClientEnvironment(context, loadOptions) {
5773
5776
  const environment = context.environment;
5774
- if (_optionalChain([environment, 'optionalAccess', _511 => _511.config, 'optionalAccess', _512 => _512.consumer])) return environment.config.consumer === "client";
5775
- if (_optionalChain([environment, 'optionalAccess', _513 => _513.name])) return environment.name === "client";
5776
- return _optionalChain([loadOptions, 'optionalAccess', _514 => _514.ssr]) !== true;
5777
+ if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5778
+ if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5779
+ return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5777
5780
  }
5778
5781
  function invalidateProgrammaticClientRouteModules(server) {
5779
- const graph = _optionalChain([server, 'access', _515 => _515.environments, 'optionalAccess', _516 => _516.client, 'optionalAccess', _517 => _517.moduleGraph]);
5782
+ const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5780
5783
  if (!graph) return;
5781
5784
  for (const [id, module] of graph.idToModuleMap) {
5782
5785
  if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5786,27 +5789,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5786
5789
  const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5787
5790
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5788
5791
  watchFile(routesFile);
5789
- return _chunkPSALMEHJcjs.generateProgrammaticClientRouteModule.call(void 0, {
5792
+ return _chunkZCT6B5PQcjs.generateProgrammaticClientRouteModule.call(void 0, {
5790
5793
  kind: parsed.kind,
5791
5794
  routePath: parsed.routePath,
5792
5795
  routesFile,
5793
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _518 => _518.routes, 'access', _519 => _519.get, 'call', _520 => _520(
5794
- _chunkPSALMEHJcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5796
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5797
+ _chunkZCT6B5PQcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5795
5798
  )]),
5796
5799
  // React's client module exports no createElement; the main client entry imports React too.
5797
- rendererClient: _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5800
+ rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5798
5801
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5799
5802
  });
5800
5803
  }
5801
5804
  function resolveRealModuleFile(filePath, root) {
5802
- const resolved = _nullishCoalesce(_chunkPSALMEHJcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5805
+ const resolved = _nullishCoalesce(_chunkZCT6B5PQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5803
5806
  try {
5804
5807
  return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5805
5808
  } catch (e29) {
5806
5809
  return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolved);
5807
5810
  }
5808
5811
  }
5809
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER) {
5812
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER) {
5810
5813
  const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5811
5814
  if (!parsed) {
5812
5815
  return "";
@@ -6113,12 +6116,12 @@ async function parseRouteModuleProps(routeModule, input) {
6113
6116
  }
6114
6117
  const schemas = routeModule.__farmRouteSchemas;
6115
6118
  const params = parseRouteModuleSchema(
6116
- _optionalChain([schemas, 'optionalAccess', _521 => _521.params]),
6119
+ _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
6117
6120
  input.props.params,
6118
6121
  "params",
6119
6122
  input.routePath
6120
6123
  );
6121
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _522 => _522.search]), input.search, "search", input.routePath);
6124
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6122
6125
  return {
6123
6126
  ...input.props,
6124
6127
  params,
@@ -6137,8 +6140,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6137
6140
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
6138
6141
  }
6139
6142
  }
6140
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkHP7QYVSTcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6141
- const providerClientCode = _chunkUBH2OARScjs.generateFarmIntegrationProviderClientCode.call(void 0,
6143
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6144
+ const providerClientCode = _chunkVWPGK6UVcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6142
6145
  integrationProviders,
6143
6146
  root,
6144
6147
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -6149,8 +6152,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
6149
6152
  srcDir,
6150
6153
  publicRuntimeConfig
6151
6154
  );
6152
- const appSetupPath = _chunkHP7QYVSTcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6153
- const rendererClientImports = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6155
+ const appSetupPath = _chunkLEZJZX4Ccjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6156
+ const rendererClientImports = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6154
6157
  import { hydrateRoot, createRoot } from 'react-dom/client'
6155
6158
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
6156
6159
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6164,13 +6167,13 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
6164
6167
  import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
6165
6168
  const React = { ...__farmRendererClient }`
6166
6169
  );
6167
- const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && _chunkHP7QYVSTcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
6170
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
6168
6171
  const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
6169
6172
  const docsAdapterImportBlock = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6170
6173
  docsAdapterUI,
6171
6174
  docsConfigModule,
6172
6175
  // Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
6173
- _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6176
+ _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6174
6177
  );
6175
6178
  const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
6176
6179
  renderer: React,
@@ -6236,7 +6239,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6236
6239
  return null;
6237
6240
  }
6238
6241
  }
6239
- ${islandValues ? `${_chunkUBH2OARScjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6242
+ ${islandValues ? `${_chunkVWPGK6UVcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6240
6243
  let farmLastRouteState = null;
6241
6244
 
6242
6245
  // A hot update to a layout tree's client module renders the route again.
@@ -7077,7 +7080,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
7077
7080
  return loadedLayouts;
7078
7081
  }
7079
7082
 
7080
- ${_chunkUBH2OARScjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7083
+ ${_chunkVWPGK6UVcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7081
7084
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
7082
7085
  let wrapped = element;
7083
7086
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7156,7 +7159,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
7156
7159
 
7157
7160
  function hydrateFarmRoute(container, route) {
7158
7161
  farmLastRouteState = route;
7159
- ${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7162
+ ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7160
7163
  }
7161
7164
 
7162
7165
  function renderFarmRoute(root, route) {
@@ -7300,7 +7303,7 @@ async function tryHydrateImportedPage(
7300
7303
  wrap: wrapFarmClientRouteGraph,
7301
7304
  };
7302
7305
  } else if (useHydrate && container?.id === '__farm_page__') {
7303
- wrappedElement = wrapFarmClientRouteGraph(${_chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7306
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7304
7307
  } else {
7305
7308
  wrappedElement = await buildWrappedHydrationElement(
7306
7309
  currentPageComponent,
@@ -7377,7 +7380,7 @@ function readActiveLayoutPatterns() {
7377
7380
  );
7378
7381
  }
7379
7382
 
7380
- ${_chunkUBH2OARScjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7383
+ ${_chunkVWPGK6UVcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7381
7384
 
7382
7385
  function activateFragmentScripts(root) {
7383
7386
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7436,7 +7439,7 @@ function getLayoutShell(root, patterns, index, find) {
7436
7439
  return shell.innerHTML;
7437
7440
  }
7438
7441
 
7439
- ${islandValues ? _chunkUBH2OARScjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7442
+ ${islandValues ? _chunkVWPGK6UVcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7440
7443
  container,
7441
7444
  fragment,
7442
7445
  currentPatterns,
@@ -7511,9 +7514,9 @@ ${islandValues ? `
7511
7514
  return nextTarget;
7512
7515
  }
7513
7516
 
7514
- ${islandValues ? `${_chunkUBH2OARScjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7517
+ ${islandValues ? `${_chunkVWPGK6UVcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7515
7518
 
7516
- ${_chunkUBH2OARScjs.FARM_EARLY_NAVIGATION_SOURCE}
7519
+ ${_chunkVWPGK6UVcjs.FARM_EARLY_NAVIGATION_SOURCE}
7517
7520
 
7518
7521
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7519
7522
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -8219,8 +8222,8 @@ function generateClientManifest(bundle) {
8219
8222
  async function defineConfig(config = {}) {
8220
8223
  const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
8221
8224
  const appRoot = path6.resolve(config.root || process.cwd());
8222
- if (_optionalChain([config, 'access', _523 => _523.extends, 'optionalAccess', _524 => _524.length])) {
8223
- const { config: layeredConfig } = await import("./layers-GP57TBE2.cjs").then(
8225
+ if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8226
+ const { config: layeredConfig } = await import("./layers-6R55QDT5.cjs").then(
8224
8227
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8225
8228
  root: appRoot,
8226
8229
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -8228,12 +8231,12 @@ async function defineConfig(config = {}) {
8228
8231
  );
8229
8232
  config = layeredConfig;
8230
8233
  }
8231
- config.renderer = _chunkHP7QYVSTcjs.resolveFarmRenderer.call(void 0, config.renderer);
8232
- config.images = _chunkUBH2OARScjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8233
- const rendererVitePlugins = await _chunkHP7QYVSTcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8234
+ config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
8235
+ config.images = _chunkVWPGK6UVcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8236
+ const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8234
8237
  ssr: true
8235
8238
  });
8236
- const reactRefreshPlugins = _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8239
+ const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8237
8240
  const nodeBuiltinStubs = {
8238
8241
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8239
8242
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8321,13 +8324,13 @@ async function defineConfig(config = {}) {
8321
8324
  if (!serverStarted) {
8322
8325
  serverStarted = true;
8323
8326
  const elapsed = Date.now() - startTime;
8324
- const address = _optionalChain([server, 'access', _525 => _525.httpServer, 'optionalAccess', _526 => _526.address, 'call', _527 => _527()]);
8327
+ const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8325
8328
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8326
8329
  const hostConfig = server.config.server.host;
8327
8330
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8328
8331
  console.log("");
8329
8332
  console.log(
8330
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkXPVS4HKUcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8333
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkZ7YIQ7AJcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8331
8334
  );
8332
8335
  console.log("");
8333
8336
  console.log(
@@ -8361,7 +8364,7 @@ async function defineConfig(config = {}) {
8361
8364
  plugins: [
8362
8365
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8363
8366
  _chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8364
- _chunkUBH2OARScjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8367
+ _chunkVWPGK6UVcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8365
8368
  tailwindVitePlugin,
8366
8369
  ...rendererVitePlugins,
8367
8370
  ...reactRefreshPlugins,
@@ -8371,16 +8374,16 @@ async function defineConfig(config = {}) {
8371
8374
  farmNavigationPlugin(config.renderer),
8372
8375
  farmIslandContainersPlugin(config),
8373
8376
  farmPlugin(config),
8374
- _chunkPSALMEHJcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8377
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8375
8378
  farmBrandingPlugin
8376
8379
  ],
8377
8380
  customLogger: farmLogger,
8378
8381
  clearScreen: false,
8379
8382
  optimizeDeps: {
8380
- ..._chunkUBH2OARScjs.createFarmClientOptimizeDepsConfig.call(void 0,
8381
- _chunkUBH2OARScjs.createFarmClientOptimizeDepsEntries.call(void 0,
8383
+ ..._chunkVWPGK6UVcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8384
+ _chunkVWPGK6UVcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8382
8385
  appRoot,
8383
- _chunkKBURN62Zcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8386
+ _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8384
8387
  ),
8385
8388
  config.renderer,
8386
8389
  appRoot
@@ -8421,8 +8424,8 @@ async function defineConfig(config = {}) {
8421
8424
  dedupe: [...config.renderer.dedupe || []],
8422
8425
  // Stub out problematic server-only modules during dev mode
8423
8426
  alias: {
8424
- ..._chunkKBURN62Zcjs.getFarmLayerAliases.call(void 0, config.layers),
8425
- ..._chunkUBH2OARScjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8427
+ ..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
8428
+ ..._chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8426
8429
  // Nitro internals that should not be resolved in browser
8427
8430
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8428
8431
  "@poppinss/dumper": "data:text/javascript,export default {};",