@farm.js/core 0.2.0 → 0.2.3

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 (237) hide show
  1. package/dist/{agent-mcp.d-xPua9Zdz.d.ts → agent-mcp.d-DuZjglYX.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DhZf5-v0.d.mts → agent-mcp.d-gI3ahrF6.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +4 -4
  4. package/dist/agent-runtime.d.ts +4 -4
  5. package/dist/analyzer-5RSMYPWD.cjs +17 -0
  6. package/dist/{analyzer-LQ4LVDCW.mjs → analyzer-7TNBOI3J.mjs} +2 -2
  7. package/dist/api/node.d.mts +6 -6
  8. package/dist/api/node.d.ts +6 -6
  9. package/dist/api/route-manager.cjs +5 -5
  10. package/dist/api/route-manager.d.mts +6 -6
  11. package/dist/api/route-manager.d.ts +6 -6
  12. package/dist/api/route-manager.mjs +4 -4
  13. package/dist/api/runtime.d.mts +5 -5
  14. package/dist/api/runtime.d.ts +5 -5
  15. package/dist/api.cjs +6 -6
  16. package/dist/api.d.mts +7 -7
  17. package/dist/api.d.ts +7 -7
  18. package/dist/api.mjs +5 -5
  19. package/dist/{app-manifest.d-D6l1Wkn6.d.ts → app-manifest.d-B3h89j6a.d.ts} +1 -1
  20. package/dist/{app-manifest.d-Bq9VWtpk.d.mts → app-manifest.d-bHK9EGPI.d.mts} +1 -1
  21. package/dist/app-markdown.d.mts +5 -5
  22. package/dist/app-markdown.d.ts +5 -5
  23. package/dist/{app.d-gnTrW72o.d.ts → app.d-C3uyET_L.d.ts} +4 -4
  24. package/dist/{app.d-Bn1bqBkf.d.mts → app.d-Cr7fXGvJ.d.mts} +4 -4
  25. package/dist/{chunk-MEIZIRMK.mjs → chunk-2FKGY2ZS.mjs} +1 -1
  26. package/dist/{chunk-YOVSWY2E.mjs → chunk-2XDRRAAD.mjs} +1 -1
  27. package/dist/{chunk-GAD63TH7.mjs → chunk-4WCEWA22.mjs} +4 -4
  28. package/dist/{chunk-YQXLBYY2.cjs → chunk-5B2Y4EVS.cjs} +32 -8
  29. package/dist/{chunk-QCVP22KW.cjs → chunk-5RYBQKBY.cjs} +3 -3
  30. package/dist/{chunk-VFZQXADS.cjs → chunk-6QWBZGGP.cjs} +139 -137
  31. package/dist/{chunk-DVL3UVYT.mjs → chunk-6XABTMXR.mjs} +2 -2
  32. package/dist/{chunk-RDT2LJES.mjs → chunk-6YOMQ4GX.mjs} +9 -9
  33. package/dist/chunk-7QGA6UX6.cjs +26 -0
  34. package/dist/{chunk-LGL5QKUJ.cjs → chunk-A4WDDASS.cjs} +2 -2
  35. package/dist/{chunk-V36K4TSU.mjs → chunk-ADKPJZPP.mjs} +1 -1
  36. package/dist/{chunk-LQZXCSYG.mjs → chunk-B6K2ZM3C.mjs} +5 -3
  37. package/dist/{chunk-Z7YIQ7AJ.cjs → chunk-C2J5LMH6.cjs} +1 -1
  38. package/dist/{chunk-D7KBMJ7L.mjs → chunk-CIRC2LRP.mjs} +1 -1
  39. package/dist/{chunk-RMLXUVR5.cjs → chunk-CS6GXE42.cjs} +91 -21
  40. package/dist/{chunk-DNERKYN4.cjs → chunk-CSCORWIQ.cjs} +15 -15
  41. package/dist/{chunk-GK2RCRT2.mjs → chunk-CTHQE7DO.mjs} +1 -1
  42. package/dist/{chunk-PRKFECGT.cjs → chunk-DZWX7FDX.cjs} +6 -4
  43. package/dist/{chunk-ZVEKOMZS.mjs → chunk-ERY4VYUH.mjs} +1 -1
  44. package/dist/{chunk-4ER5KYSC.cjs → chunk-F6JSVP5C.cjs} +3 -3
  45. package/dist/chunk-G7LNCHTS.mjs +21 -0
  46. package/dist/{chunk-ZCT6B5PQ.cjs → chunk-GWFNJLDN.cjs} +11 -11
  47. package/dist/{chunk-O47IT4CS.cjs → chunk-H7DAFRYR.cjs} +4 -4
  48. package/dist/{chunk-MX4G24YS.mjs → chunk-HOBCEE5J.mjs} +17 -15
  49. package/dist/{chunk-ZF7N222A.mjs → chunk-IPKL7L6B.mjs} +2 -2
  50. package/dist/{chunk-54INSSWI.mjs → chunk-IQQ3SWH6.mjs} +99 -56
  51. package/dist/{chunk-MUQP2APN.cjs → chunk-JJUHUPRB.cjs} +2 -2
  52. package/dist/{chunk-2LHO4HTP.cjs → chunk-K7RXZ77U.cjs} +2 -2
  53. package/dist/{chunk-SIHHYNX4.mjs → chunk-KJMRW3IP.mjs} +1 -1
  54. package/dist/{chunk-PYPHM7AS.cjs → chunk-LH7S7FI3.cjs} +5 -1
  55. package/dist/chunk-O77EKGAS.mjs +36 -0
  56. package/dist/{chunk-WXPY5FRF.cjs → chunk-P2PF5FUW.cjs} +2 -2
  57. package/dist/{chunk-WOPQQCP3.mjs → chunk-P3UT3OLV.mjs} +3 -3
  58. package/dist/{chunk-PZ5ZJAAO.mjs → chunk-POCWXRXW.mjs} +1 -1
  59. package/dist/{chunk-Z23OCU33.cjs → chunk-RF3VCNV7.cjs} +6 -6
  60. package/dist/{chunk-MLMDOIBY.mjs → chunk-RS4QZOFK.mjs} +3 -3
  61. package/dist/{chunk-MZG5M4JS.cjs → chunk-SO4USIKL.cjs} +4 -4
  62. package/dist/{chunk-HYYOVRED.mjs → chunk-SPVXL37B.mjs} +1 -1
  63. package/dist/{chunk-VWPGK6UV.cjs → chunk-TAXZQNFZ.cjs} +74 -74
  64. package/dist/{chunk-KKXGBQ2K.mjs → chunk-UKGAP2OK.mjs} +4 -4
  65. package/dist/{chunk-DZXD6CYJ.mjs → chunk-V2RXBDV6.mjs} +4 -0
  66. package/dist/{chunk-FFROR7QD.mjs → chunk-VZRY3CL5.mjs} +1 -1
  67. package/dist/{chunk-LO5BNR6Y.mjs → chunk-W5T3ZAFU.mjs} +25 -1
  68. package/dist/{chunk-ADCVSTFV.cjs → chunk-WAQIO2VD.cjs} +2 -2
  69. package/dist/{chunk-JKNQMGZE.cjs → chunk-WFL7CD5C.cjs} +12 -12
  70. package/dist/{chunk-KJW6KEOZ.mjs → chunk-WRT775N6.mjs} +92 -22
  71. package/dist/{chunk-RP55BUJM.mjs → chunk-XGBDRC5B.mjs} +2 -2
  72. package/dist/{chunk-J6JAUJPC.cjs → chunk-XLJ2REOI.cjs} +385 -342
  73. package/dist/{chunk-ZTNU4XCC.cjs → chunk-Y3MTKPLN.cjs} +7 -7
  74. package/dist/{chunk-MNBFSAWF.cjs → chunk-YCGOQKVC.cjs} +20 -1
  75. package/dist/{chunk-T4VF6BYV.cjs → chunk-YPPAYYSX.cjs} +6 -6
  76. package/dist/{chunk-PATIHHC7.cjs → chunk-ZQOHL6TX.cjs} +2 -2
  77. package/dist/{client-component.d-DT5OKBZu.d.ts → client-component.d-BavTzqsn.d.ts} +1 -1
  78. package/dist/{client-component.d-34DDMZcl.d.mts → client-component.d-X3j9FOZ2.d.mts} +1 -1
  79. package/dist/{client-plugins.d-D9CnUvZ5.d.ts → client-plugins.d-CqTr5IrQ.d.ts} +64 -4
  80. package/dist/{client-plugins.d-D7k9t9Ge.d.mts → client-plugins.d-DnnAopKG.d.mts} +64 -4
  81. package/dist/client-plugins.d.mts +4 -4
  82. package/dist/client-plugins.d.ts +4 -4
  83. package/dist/client.d.mts +10 -10
  84. package/dist/client.d.ts +10 -10
  85. package/dist/config.d.mts +4 -4
  86. package/dist/config.d.ts +4 -4
  87. package/dist/desktop.cjs +5 -1
  88. package/dist/desktop.d.mts +11 -7
  89. package/dist/desktop.d.ts +11 -7
  90. package/dist/desktop.mjs +4 -0
  91. package/dist/{dev-guard-M3ZCDWCK.cjs → dev-guard-5NUIX6IZ.cjs} +4 -3
  92. package/dist/{dev-guard-TFVWJNIB.mjs → dev-guard-L42ZZRCZ.mjs} +2 -1
  93. package/dist/{devtools-R77KAJA4.mjs → devtools-VPFBH6I2.mjs} +1 -1
  94. package/dist/{devtools-IUU4SWQL.cjs → devtools-YTND2OWT.cjs} +2 -2
  95. package/dist/docs.cjs +3 -3
  96. package/dist/docs.d.mts +6 -6
  97. package/dist/docs.d.ts +6 -6
  98. package/dist/docs.mjs +2 -2
  99. package/dist/environment/vite.cjs +4 -4
  100. package/dist/environment/vite.d.mts +1 -1
  101. package/dist/environment/vite.d.ts +1 -1
  102. package/dist/environment/vite.mjs +3 -3
  103. package/dist/{generate-route-types.d-BFOMM8Ef.d.mts → generate-route-types.d-CAiRw4N0.d.mts} +1 -1
  104. package/dist/{generate-route-types.d-C2m8myHb.d.ts → generate-route-types.d-Dz8MOQ3u.d.ts} +1 -1
  105. package/dist/{handler.d-fxTjv3Nn.d.mts → handler.d-BSlpYCDB.d.mts} +2 -2
  106. package/dist/{handler.d-DbZvbwNi.d.ts → handler.d-DgX7gPO6.d.ts} +2 -2
  107. package/dist/{headers.d-OBHpGTF_.d.mts → headers.d-Cf8l5LMo.d.mts} +1 -1
  108. package/dist/{headers.d-oeWybIk8.d.ts → headers.d-CmxW42R2.d.ts} +1 -1
  109. package/dist/index.cjs +29 -28
  110. package/dist/{index.d-CRrPQwlO.d.mts → index.d-7xoJqKRZ.d.mts} +1 -1
  111. package/dist/{index.d-BM-dKdzH.d.ts → index.d-BZZt7kxO.d.ts} +1 -1
  112. package/dist/index.d.mts +27 -27
  113. package/dist/index.d.ts +27 -27
  114. package/dist/index.mjs +24 -23
  115. package/dist/integrations/orm.d.mts +4 -4
  116. package/dist/integrations/orm.d.ts +4 -4
  117. package/dist/integrations.d.mts +4 -4
  118. package/dist/integrations.d.ts +4 -4
  119. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  120. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  121. package/dist/internal/build-runtime.cjs +24 -23
  122. package/dist/internal/build-runtime.d.mts +7 -7
  123. package/dist/internal/build-runtime.d.ts +7 -7
  124. package/dist/internal/build-runtime.mjs +23 -22
  125. package/dist/internal/cli-runtime.cjs +12 -9
  126. package/dist/internal/cli-runtime.d.mts +20 -12
  127. package/dist/internal/cli-runtime.d.ts +20 -12
  128. package/dist/internal/cli-runtime.mjs +11 -8
  129. package/dist/internal/client-error-overlay.cjs +4 -4
  130. package/dist/internal/client-error-overlay.mjs +1 -1
  131. package/dist/internal/client-runtime.d.mts +8 -8
  132. package/dist/internal/client-runtime.d.ts +8 -8
  133. package/dist/internal/compression-runtime.d.mts +4 -4
  134. package/dist/internal/compression-runtime.d.ts +4 -4
  135. package/dist/internal/config-runtime.cjs +5 -4
  136. package/dist/internal/config-runtime.d.mts +8 -8
  137. package/dist/internal/config-runtime.d.ts +8 -8
  138. package/dist/internal/config-runtime.mjs +4 -3
  139. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  140. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  141. package/dist/internal/native-server-fns.cjs +4 -4
  142. package/dist/internal/native-server-fns.mjs +3 -3
  143. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  144. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  145. package/dist/internal/production-runtime.cjs +4 -4
  146. package/dist/internal/production-runtime.d.mts +13 -13
  147. package/dist/internal/production-runtime.d.ts +13 -13
  148. package/dist/internal/production-runtime.mjs +3 -3
  149. package/dist/internal/spa-router.d.mts +6 -6
  150. package/dist/internal/spa-router.d.ts +6 -6
  151. package/dist/internal/start-manifest.d.mts +4 -4
  152. package/dist/internal/start-manifest.d.ts +4 -4
  153. package/dist/{layers.d-CH0bC4QL.d.mts → layers.d-dNBkiNE9.d.mts} +1 -1
  154. package/dist/{layers.d-CH0bC4QL.d.ts → layers.d-dNBkiNE9.d.ts} +1 -1
  155. package/dist/{manager-STAB5TVZ.cjs → manager-YRIENS63.cjs} +4 -4
  156. package/dist/{manager-EFPBRS3U.mjs → manager-YTJOAHII.mjs} +3 -3
  157. package/dist/markdown.d.mts +4 -4
  158. package/dist/markdown.d.ts +4 -4
  159. package/dist/middleware.d.mts +4 -4
  160. package/dist/middleware.d.ts +4 -4
  161. package/dist/mobile.d.mts +4 -4
  162. package/dist/mobile.d.ts +4 -4
  163. package/dist/{mount.d-TnD-Mebk.d.ts → mount.d-CD-xVBu7.d.ts} +1 -1
  164. package/dist/{mount.d-B7RiwjiO.d.mts → mount.d-Dd0xeRMl.d.mts} +1 -1
  165. package/dist/{navigation-delegate.d-VBCF0EeN.d.ts → navigation-delegate.d-Bses_F-y.d.ts} +1 -1
  166. package/dist/{navigation-delegate.d-Boz2511c.d.mts → navigation-delegate.d-dBNg976E.d.mts} +1 -1
  167. package/dist/navigation.d.mts +7 -7
  168. package/dist/navigation.d.ts +7 -7
  169. package/dist/plugin.cjs +19 -18
  170. package/dist/plugin.d.mts +8 -8
  171. package/dist/plugin.d.ts +8 -8
  172. package/dist/plugin.mjs +18 -17
  173. package/dist/{render-plan.d-BrumV_ZE.d.ts → render-plan.d-DaIwnRK2.d.ts} +1 -1
  174. package/dist/{render-plan.d-BwnmyfNk.d.mts → render-plan.d-vOdZHHLI.d.mts} +1 -1
  175. package/dist/renderer-client.d.mts +8 -8
  176. package/dist/renderer-client.d.ts +8 -8
  177. package/dist/{request.d-Dd5nRTO5.d.mts → request.d-B8U4pVFP.d.mts} +1 -1
  178. package/dist/{request.d-NUi01-5e.d.ts → request.d-CgXp3EEc.d.ts} +1 -1
  179. package/dist/request.d.mts +5 -5
  180. package/dist/request.d.ts +5 -5
  181. package/dist/{route-rendering.d-BK0Pf7_k.d.mts → route-rendering.d-BQvNYQqu.d.mts} +1 -1
  182. package/dist/{route-rendering.d-CJR5BPXV.d.ts → route-rendering.d-Di0AxFix.d.ts} +1 -1
  183. package/dist/{router.d-C-JSFCPU.d.ts → router.d-BJVGhSAJ.d.ts} +1 -1
  184. package/dist/{router.d-CNUS3x1j.d.mts → router.d-hNedVdoB.d.mts} +1 -1
  185. package/dist/routes.cjs +3 -3
  186. package/dist/{routes.d-D7RWvfqL.d.ts → routes.d-CYe98R_8.d.ts} +1 -1
  187. package/dist/{routes.d-BWvpUoYu.d.mts → routes.d-DBGnKaUQ.d.mts} +1 -1
  188. package/dist/routes.d.mts +4 -4
  189. package/dist/routes.d.ts +4 -4
  190. package/dist/routes.mjs +2 -2
  191. package/dist/{rsc-pipeline-DHISDFT7.mjs → rsc-pipeline-2JSNRVIL.mjs} +6 -5
  192. package/dist/{rsc-pipeline-UBWVU3NF.cjs → rsc-pipeline-WTKDMTE2.cjs} +7 -6
  193. package/dist/{runtime-XKRQW3YT.cjs → runtime-I4GV4CDP.cjs} +8 -8
  194. package/dist/{runtime-VUKMY44G.mjs → runtime-RNSTQY27.mjs} +5 -5
  195. package/dist/{runtime.d-B2T4bM5_.d.ts → runtime.d-0R8nHCM6.d.ts} +1 -1
  196. package/dist/{runtime.d-CsOpO6yQ.d.mts → runtime.d-DpeuF_T-.d.mts} +1 -1
  197. package/dist/{cli-runtime.d-LwIb0swO.d.mts → schema-dependencies.d-_Wyey4Wv.d.mts} +21 -13
  198. package/dist/{cli-runtime.d-Vvxf-Z8a.d.ts → schema-dependencies.d-tkUHREqz.d.ts} +21 -13
  199. package/dist/{schema.d-BM-uVGpx.d.mts → schema.d-HlGSe1on.d.mts} +1 -1
  200. package/dist/{schema.d-BM-uVGpx.d.ts → schema.d-HlGSe1on.d.ts} +1 -1
  201. package/dist/schema.d.mts +1 -1
  202. package/dist/schema.d.ts +1 -1
  203. package/dist/{server-components-status.d-DOYt4E_Q.d.ts → server-components-status.d-B2Z5WvO5.d.ts} +2 -2
  204. package/dist/{server-components-status.d-Cc5rir0l.d.mts → server-components-status.d-sN7ju-ie.d.mts} +2 -2
  205. package/dist/server-plugins.d.mts +6 -6
  206. package/dist/server-plugins.d.ts +6 -6
  207. package/dist/server.cjs +46 -45
  208. package/dist/server.d.mts +14 -14
  209. package/dist/server.d.ts +14 -14
  210. package/dist/server.mjs +20 -19
  211. package/dist/{spa-router.d-Cq5UFJvq.d.mts → spa-router.d-D3AtR2Bc.d.mts} +2 -2
  212. package/dist/{spa-router.d-C7FcpLxU.d.ts → spa-router.d-MjT6sGb9.d.ts} +2 -2
  213. package/dist/{ssg.d-BzNZemk7.d.mts → ssg.d-B32Cp_XW.d.mts} +3 -3
  214. package/dist/{ssg.d-DUhacIxj.d.ts → ssg.d-C1SNuPz5.d.ts} +3 -3
  215. package/dist/storage.d.mts +2 -2
  216. package/dist/storage.d.ts +2 -2
  217. package/dist/{store-core.d-BX3yXrxA.d.ts → store-core.d-BZ3YXs70.d.ts} +2 -2
  218. package/dist/{store-core.d-DbUAtSBK.d.mts → store-core.d-BbVdaoA0.d.mts} +2 -2
  219. package/dist/testing.cjs +6 -6
  220. package/dist/testing.d.mts +4 -4
  221. package/dist/testing.d.ts +4 -4
  222. package/dist/testing.mjs +5 -5
  223. package/dist/{types.d-C5hlNbHa.d.mts → types.d-CRiwa0jj.d.mts} +1 -1
  224. package/dist/{types.d-C5hlNbHa.d.ts → types.d-CRiwa0jj.d.ts} +1 -1
  225. package/dist/{utils.d-BhJJEXzo.d.ts → utils.d-Bjbm44fP.d.ts} +1 -1
  226. package/dist/{utils.d-NOMkLFpC.d.mts → utils.d-CoLozp7-.d.mts} +1 -1
  227. package/dist/version.cjs +2 -2
  228. package/dist/version.mjs +1 -1
  229. package/dist/vite.cjs +19 -18
  230. package/dist/vite.d.mts +9 -9
  231. package/dist/vite.d.ts +9 -9
  232. package/dist/vite.mjs +18 -17
  233. package/package.json +1 -1
  234. package/dist/analyzer-ZFC2L6NZ.cjs +0 -17
  235. package/dist/chunk-OZAVCLXY.mjs +0 -17
  236. /package/dist/{chunk-OAAVIFOJ.cjs → chunk-2LGM5WIK.cjs} +0 -0
  237. /package/dist/{chunk-ZRTBDHO2.mjs → chunk-MVNIAD6O.mjs} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkQCVP22KWcjs = require('./chunk-QCVP22KW.cjs');
5
+ var _chunk5RYBQKBYcjs = require('./chunk-5RYBQKBY.cjs');
6
6
 
7
7
 
8
8
 
@@ -44,25 +44,25 @@ var _chunk6QWCFVGLcjs = require('./chunk-6QWCFVGL.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkVWPGK6UVcjs = require('./chunk-VWPGK6UV.cjs');
47
+ var _chunkTAXZQNFZcjs = require('./chunk-TAXZQNFZ.cjs');
48
48
 
49
49
 
50
50
 
51
51
 
52
- var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
52
+ var _chunkWAQIO2VDcjs = require('./chunk-WAQIO2VD.cjs');
53
53
 
54
54
 
55
55
  var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
56
56
 
57
57
 
58
- var _chunkYQXLBYY2cjs = require('./chunk-YQXLBYY2.cjs');
58
+ var _chunk5B2Y4EVScjs = require('./chunk-5B2Y4EVS.cjs');
59
59
 
60
60
 
61
61
 
62
- var _chunkT4VF6BYVcjs = require('./chunk-T4VF6BYV.cjs');
62
+ var _chunkYPPAYYSXcjs = require('./chunk-YPPAYYSX.cjs');
63
63
 
64
64
 
65
- var _chunkO47IT4CScjs = require('./chunk-O47IT4CS.cjs');
65
+ var _chunkH7DAFRYRcjs = require('./chunk-H7DAFRYR.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 _chunkMZG5M4JScjs = require('./chunk-MZG5M4JS.cjs');
92
+ var _chunkSO4USIKLcjs = require('./chunk-SO4USIKL.cjs');
93
93
 
94
94
 
95
95
  var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
96
96
 
97
97
 
98
- var _chunkMUQP2APNcjs = require('./chunk-MUQP2APN.cjs');
98
+ var _chunkJJUHUPRBcjs = require('./chunk-JJUHUPRB.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 _chunkZCT6B5PQcjs = require('./chunk-ZCT6B5PQ.cjs');
151
+ var _chunkGWFNJLDNcjs = require('./chunk-GWFNJLDN.cjs');
152
152
 
153
153
 
154
154
 
@@ -253,11 +253,12 @@ var _chunkIVEV44O2cjs = require('./chunk-IVEV44O2.cjs');
253
253
  var _chunkKSRWTQ6Jcjs = require('./chunk-KSRWTQ6J.cjs');
254
254
 
255
255
 
256
- var _chunkZTNU4XCCcjs = require('./chunk-ZTNU4XCC.cjs');
256
+ var _chunkY3MTKPLNcjs = require('./chunk-Y3MTKPLN.cjs');
257
257
 
258
258
 
259
259
 
260
- var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
260
+
261
+ var _chunkYCGOQKVCcjs = require('./chunk-YCGOQKVC.cjs');
261
262
 
262
263
 
263
264
  var _chunkYCIFGYBYcjs = require('./chunk-YCIFGYBY.cjs');
@@ -277,7 +278,8 @@ var _chunk3ACTVXZGcjs = require('./chunk-3ACTVXZG.cjs');
277
278
 
278
279
 
279
280
 
280
- var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
281
+
282
+ var _chunkLH7S7FI3cjs = require('./chunk-LH7S7FI3.cjs');
281
283
 
282
284
 
283
285
  var _chunkCH2JX3CMcjs = require('./chunk-CH2JX3CM.cjs');
@@ -320,7 +322,7 @@ var _chunkK6LZMZNBcjs = require('./chunk-K6LZMZNB.cjs');
320
322
  var _chunkRFKPIAOFcjs = require('./chunk-RFKPIAOF.cjs');
321
323
 
322
324
 
323
- var _chunkZ7YIQ7AJcjs = require('./chunk-Z7YIQ7AJ.cjs');
325
+ var _chunkC2J5LMH6cjs = require('./chunk-C2J5LMH6.cjs');
324
326
 
325
327
 
326
328
  var _chunkG5KGLMPNcjs = require('./chunk-G5KGLMPN.cjs');
@@ -737,7 +739,7 @@ function findClientServerFnViolation(code, id) {
737
739
  return null;
738
740
  }
739
741
  function createServerFnBoundaryDiagnostic(violation, id, location) {
740
- return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
742
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
741
743
  "CLIENT_SERVER_FUNCTION",
742
744
  id,
743
745
  `${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.`,
@@ -997,21 +999,21 @@ function readPropertyKey(property) {
997
999
  function createClientBoundaryDiagnostic(file, finding, location) {
998
1000
  switch (finding.kind) {
999
1001
  case "server-env":
1000
- return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1002
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1001
1003
  "CLIENT_SERVER_ENV",
1002
1004
  file,
1003
1005
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
1004
1006
  location
1005
1007
  );
1006
1008
  case "public-env":
1007
- return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1009
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1008
1010
  "CLIENT_PROCESS_ENV_PUBLIC",
1009
1011
  file,
1010
1012
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
1011
1013
  location
1012
1014
  );
1013
1015
  case "builtin":
1014
- return _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1016
+ return _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1015
1017
  "CLIENT_NODE_BUILTIN",
1016
1018
  file,
1017
1019
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1312,13 +1314,13 @@ function loadFarmDocsSearchDevRuntime() {
1312
1314
  return import("./search-client-Z7KDVD4C.cjs");
1313
1315
  }
1314
1316
  function loadFarmOpenAPIDevRuntime() {
1315
- return import("./manager-STAB5TVZ.cjs");
1317
+ return import("./manager-YRIENS63.cjs");
1316
1318
  }
1317
1319
  function loadFarmWorkflowsDevRuntime() {
1318
1320
  return import("./workflows.cjs");
1319
1321
  }
1320
1322
  function loadFarmDevtoolsSnapshotRuntime() {
1321
- return import("./devtools-IUU4SWQL.cjs");
1323
+ return import("./devtools-YTND2OWT.cjs");
1322
1324
  }
1323
1325
  function loadFarmDevtoolsUIRuntime() {
1324
1326
  return import("./devtools-ui-TPBPQEEB.cjs");
@@ -1368,16 +1370,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1368
1370
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1369
1371
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1370
1372
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1371
- _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1372
- new RegExp(`^${_chunkZCT6B5PQcjs.FARM_RESOLVE_FROM_PREFIX}`),
1373
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1374
+ new RegExp(`^${_chunkGWFNJLDNcjs.FARM_RESOLVE_FROM_PREFIX}`),
1373
1375
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1374
1376
  // included.
1375
1377
  /^node:/,
1376
- _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, _module.builtinModules)
1378
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, _module.builtinModules)
1377
1379
  ];
1378
1380
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1379
- _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1380
- new RegExp(`^${_chunkZCT6B5PQcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1381
+ _chunkTAXZQNFZcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1382
+ new RegExp(`^${_chunkGWFNJLDNcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1381
1383
  ];
1382
1384
  function createFarmPlatformClientModule(platform) {
1383
1385
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1413,7 +1415,7 @@ function farmIslandContainersPlugin(config) {
1413
1415
  // without calling into JavaScript.
1414
1416
  filter: {
1415
1417
  id: { include: /\.[jt]sx(?:$|\?)/, exclude: /\/node_modules\// },
1416
- code: _chunkZCT6B5PQcjs.FARM_ISLAND_CONTAINER_TAG
1418
+ code: _chunkGWFNJLDNcjs.FARM_ISLAND_CONTAINER_TAG
1417
1419
  },
1418
1420
  handler(code, id) {
1419
1421
  if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "islands") {
@@ -1422,20 +1424,20 @@ function farmIslandContainersPlugin(config) {
1422
1424
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1423
1425
  return null;
1424
1426
  }
1425
- if (_chunkZCT6B5PQcjs.hasUseClientDirective.call(void 0, code)) return null;
1426
- if (!_chunkZCT6B5PQcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1427
+ if (_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, code)) return null;
1428
+ if (!_chunkGWFNJLDNcjs.FARM_ISLAND_CONTAINER_TAG.test(code)) return null;
1427
1429
  const file = id.split("?", 1)[0];
1428
- const inspect = () => _chunkZCT6B5PQcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1430
+ const inspect = () => _chunkGWFNJLDNcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1429
1431
  const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
1430
1432
  if (bindings.length === 0) return null;
1431
- const grown = _chunkZCT6B5PQcjs.wrapFarmIslandContainers.call(void 0, {
1433
+ const grown = _chunkGWFNJLDNcjs.wrapFarmIslandContainers.call(void 0, {
1432
1434
  code,
1433
1435
  file,
1434
1436
  bindings,
1435
- reference: _chunkZCT6B5PQcjs.farmIslandContainerReferencePath.call(void 0, root)
1437
+ reference: _chunkGWFNJLDNcjs.farmIslandContainerReferencePath.call(void 0, root)
1436
1438
  });
1437
1439
  if (grown === null) return null;
1438
- _chunkZCT6B5PQcjs.ensureFarmIslandContainerReference.call(void 0, root);
1440
+ _chunkGWFNJLDNcjs.ensureFarmIslandContainerReference.call(void 0, root);
1439
1441
  return { code: grown, map: null };
1440
1442
  }
1441
1443
  }
@@ -1450,18 +1452,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1450
1452
  config(config) {
1451
1453
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1452
1454
  if (options.distDir) {
1453
- _chunkZCT6B5PQcjs.usePackageScanCacheFile.call(void 0,
1455
+ _chunkGWFNJLDNcjs.usePackageScanCacheFile.call(void 0,
1454
1456
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1455
1457
  );
1456
1458
  }
1457
- const bundledPackages = _chunkZCT6B5PQcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1459
+ const bundledPackages = _chunkGWFNJLDNcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1458
1460
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1459
- _chunkZCT6B5PQcjs.persistPackageScanCache.call(void 0, );
1461
+ _chunkGWFNJLDNcjs.persistPackageScanCache.call(void 0, );
1460
1462
  return {
1461
1463
  optimizeDeps: {
1462
1464
  // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1463
1465
  exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1464
- rolldownOptions: { plugins: [_chunkZCT6B5PQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1466
+ rolldownOptions: { plugins: [_chunkGWFNJLDNcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1465
1467
  },
1466
1468
  ssr: {
1467
1469
  noExternal: [
@@ -1487,8 +1489,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1487
1489
  return FARM_SERVER_ONLY_PACKAGE_ID;
1488
1490
  }
1489
1491
  this.error(
1490
- _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
1491
- _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1492
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
1493
+ _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1492
1494
  "CLIENT_SERVER_ONLY_IMPORT",
1493
1495
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1494
1496
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1498,9 +1500,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1498
1500
  );
1499
1501
  }
1500
1502
  if (!_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) && _module.isBuiltin.call(void 0, id)) {
1501
- return _chunkZCT6B5PQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1503
+ return _chunkGWFNJLDNcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1502
1504
  }
1503
- const resolveFrom = importer ? _chunkZCT6B5PQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1505
+ const resolveFrom = importer ? _chunkGWFNJLDNcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1504
1506
  if (resolveFrom) {
1505
1507
  const directory = path6.dirname(resolveFrom.importer);
1506
1508
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1517,8 +1519,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1517
1519
  const importedBy = importer ? ` (imported by ${importer})` : "";
1518
1520
  if (!_optionalChain([options2, 'optionalAccess', _78 => _78.ssr])) {
1519
1521
  this.error(
1520
- _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
1521
- _chunkZCT6B5PQcjs.createFarmDiagnostic.call(void 0,
1522
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
1523
+ _chunkGWFNJLDNcjs.createFarmDiagnostic.call(void 0,
1522
1524
  "CLIENT_SERVER_ONLY_ENTRY",
1523
1525
  _nullishCoalesce(importer, () => ( id)),
1524
1526
  `${id} is server-only and cannot be imported into client code.`
@@ -1541,9 +1543,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1541
1543
  handler(id) {
1542
1544
  if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
1543
1545
  if (id === FARM_PLATFORM_CLIENT_ID) {
1544
- return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkYQXLBYY2cjs.resolveFarmPlatform.call(void 0, ))));
1546
+ return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunk5B2Y4EVScjs.resolveFarmPlatform.call(void 0, ))));
1545
1547
  }
1546
- return _nullishCoalesce(_chunkZCT6B5PQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1548
+ return _nullishCoalesce(_chunkGWFNJLDNcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1547
1549
  }
1548
1550
  }
1549
1551
  };
@@ -1649,7 +1651,7 @@ function sendFarmDevRuntimeHookError(res, json) {
1649
1651
  res.end(json ? _chunk5P3TZGS3cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1650
1652
  }
1651
1653
  function opensFarmDevRuntimeSession(pm) {
1652
- return pm.hasRuntimeRequestHooks() || _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1654
+ return pm.hasRuntimeRequestHooks() || _chunkWAQIO2VDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1653
1655
  }
1654
1656
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1655
1657
  _chunkQBMMQS25cjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -2047,14 +2049,16 @@ function isResolvedEnvScope(value) {
2047
2049
  );
2048
2050
  }
2049
2051
  function isPotentialProgrammaticRouteSourceFile(normalizedFile, srcDirSlug) {
2050
- return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) && !normalizedFile.endsWith(".d.ts") && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts");
2052
+ return normalizedFile.startsWith(`${srcDirSlug}/`) && /\.(ts|tsx|js|jsx)$/.test(normalizedFile) && // A declaration file, including TypeScript's `.d.<ext>.ts` form such as a
2053
+ // Polyroute `route.d.rs.ts`, has no runtime code to register a route.
2054
+ !/\.d(\.[^./]+)?\.ts$/.test(normalizedFile) && !normalizedFile.endsWith("/farm-routes.d.ts") && !normalizedFile.endsWith("/farm-env.d.ts") && !normalizedFile.endsWith("/lib/api.generated.ts") && !_chunkLH7S7FI3cjs.isTestSourceFile.call(void 0, normalizedFile.slice(srcDirSlug.length));
2051
2055
  }
2052
2056
  function fileContainsProgrammaticPageRoute(file) {
2053
2057
  if (!fs2.existsSync(file)) {
2054
2058
  return false;
2055
2059
  }
2056
2060
  try {
2057
- return _chunkPYPHM7AScjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
2061
+ return _chunkLH7S7FI3cjs.scanProgrammaticPagePaths.call(void 0, fs2.readFileSync(file, "utf8")).length > 0;
2058
2062
  } catch (e15) {
2059
2063
  return false;
2060
2064
  }
@@ -2157,7 +2161,7 @@ function transformIsolatedClientBoundaryModule(options) {
2157
2161
  return null;
2158
2162
  }
2159
2163
  const body = Array.isArray(ast.body) ? ast.body : [];
2160
- const everyExportIsComponent = options.code.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2164
+ const everyExportIsComponent = options.code.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2161
2165
  const replacements = [];
2162
2166
  const wrapperStatements = [];
2163
2167
  const originalEntries = [];
@@ -2312,16 +2316,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2312
2316
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2313
2317
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2314
2318
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2315
- if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkZCT6B5PQcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2319
+ if (!_optionalChain([resolved, 'optionalAccess', _105 => _105.id, 'access', _106 => _106.startsWith, 'call', _107 => _107(_chunkGWFNJLDNcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2316
2320
  }
2317
2321
  findings.push(finding);
2318
2322
  }
2319
2323
  if (findings.length === 0) return;
2320
2324
  warnedClientBoundaryIds.add(id);
2321
- const locate = _chunkZCT6B5PQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2325
+ const locate = _chunkGWFNJLDNcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2322
2326
  _chunk7ZDLE77Pcjs.logger.warn(
2323
2327
  findings.map(
2324
- (finding) => _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
2328
+ (finding) => _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
2325
2329
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2326
2330
  config.root
2327
2331
  )
@@ -2363,6 +2367,11 @@ function toFarmRuntimeModuleId(specifier) {
2363
2367
  function getFarmCoreFile() {
2364
2368
  return typeof __filename === "string" ? __filename : _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url);
2365
2369
  }
2370
+ var farmCoreModuleDirectory;
2371
+ function isFarmCoreModule(id) {
2372
+ _nullishCoalesce(farmCoreModuleDirectory, () => ( (farmCoreModuleDirectory = `${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.dirname(getFarmCoreFile()))}/`)));
2373
+ return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id.split("?", 1)[0]).startsWith(farmCoreModuleDirectory);
2374
+ }
2366
2375
  var FARM_SOURCE_ALIAS_PROBES = [
2367
2376
  "@/x",
2368
2377
  "@/index.ts",
@@ -2387,12 +2396,12 @@ function hasFarmSourceAliasOverride(alias) {
2387
2396
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2388
2397
  const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, options.renderer);
2389
2398
  const imageImports = farmImageImportsPlugin();
2390
- const fontImports = _chunkVWPGK6UVcjs.farmFontImportsPlugin.call(void 0, {
2399
+ const fontImports = _chunkTAXZQNFZcjs.farmFontImportsPlugin.call(void 0, {
2391
2400
  root: options.root,
2392
2401
  basePath: options.basePath,
2393
2402
  publicDir: options.publicDir,
2394
2403
  // A production build never starts the app, so it reads the directories from these 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))))
2404
+ isLayoutModule: (id) => _chunkTAXZQNFZcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options))))
2396
2405
  });
2397
2406
  let farmApp;
2398
2407
  const isFarmGeneratedOutput = (file) => {
@@ -2423,8 +2432,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2423
2432
  if (mdxComponents) files.add(mdxComponents);
2424
2433
  return files;
2425
2434
  };
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)));
2435
+ const islxActionsMode = () => _chunkTAXZQNFZcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2436
+ const islandsServerFns = () => _chunkTAXZQNFZcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2428
2437
  let reactRefreshActive = false;
2429
2438
  let server;
2430
2439
  let deferredGates;
@@ -2434,6 +2443,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2434
2443
  let openAPIManager = null;
2435
2444
  let middlewareManager;
2436
2445
  let refreshRouteDiscovery = null;
2446
+ let refreshFarmDocsConfig = null;
2437
2447
  const pendingRouteReloads = /* @__PURE__ */ new Set();
2438
2448
  let workflowHandler = null;
2439
2449
  let isBuild = false;
@@ -2454,7 +2464,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2454
2464
  console.log(log);
2455
2465
  };
2456
2466
  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, );
2467
+ const inBuildPackageCache = _chunkGWFNJLDNcjs.bindPackageClientBoundaryCache.call(void 0, );
2458
2468
  const inspectPackages = (operation) => {
2459
2469
  const routeManager = _optionalChain([farmApp, 'optionalAccess', _125 => _125.getRouteManager, 'call', _126 => _126()]);
2460
2470
  return inBuildPackageCache(
@@ -2477,11 +2487,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2477
2487
  isBuild = configEnv.command === "build";
2478
2488
  const farmAliases = {
2479
2489
  ..._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)
2490
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _132 => _132.resolve, 'optionalAccess', _133 => _133.alias])) ? {} : _chunkTAXZQNFZcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2481
2491
  };
2482
2492
  if (Object.keys(farmAliases).length > 0) {
2483
2493
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2484
- userConfig.resolve.alias = _chunkVWPGK6UVcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2494
+ userConfig.resolve.alias = _chunkTAXZQNFZcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2485
2495
  }
2486
2496
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2487
2497
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.cors]) === void 0;
@@ -2521,7 +2531,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2521
2531
  serverFnTransformActive = config.plugins.some(
2522
2532
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2523
2533
  );
2524
- reactRefreshActive = _chunkQCVP22KWcjs.isFarmReactRefreshActive.call(void 0, config);
2534
+ reactRefreshActive = _chunk5RYBQKBYcjs.isFarmReactRefreshActive.call(void 0, config);
2525
2535
  if (_optionalChain([options, 'access', _141 => _141.experimental, 'optionalAccess', _142 => _142.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2526
2536
  _chunk7ZDLE77Pcjs.logger.warn(
2527
2537
  "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."
@@ -2529,11 +2539,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2529
2539
  }
2530
2540
  },
2531
2541
  async configureServer(viteServer) {
2532
- viteServer.middlewares.use(
2533
- createFarmDevPreviewGuard(viteServer, {
2542
+ viteServer.middlewares.stack.unshift({
2543
+ route: "",
2544
+ handle: createFarmDevPreviewGuard(viteServer, {
2534
2545
  getSourceRoots: () => _chunkPFVNPOKNcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _143 => _143.getConfig, 'call', _144 => _144()]), () => ( options)))
2535
2546
  })
2536
- );
2547
+ });
2537
2548
  if (typeof fontImports.configureServer === "function") {
2538
2549
  await fontImports.configureServer.call(this, viteServer);
2539
2550
  }
@@ -2555,7 +2566,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2555
2566
  } catch (e21) {
2556
2567
  }
2557
2568
  };
2558
- farmApp = new (0, _chunkVWPGK6UVcjs.FarmApp)(
2569
+ farmApp = new (0, _chunkTAXZQNFZcjs.FarmApp)(
2559
2570
  {
2560
2571
  ...options,
2561
2572
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2563,7 +2574,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2563
2574
  server
2564
2575
  );
2565
2576
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2566
- _chunkZCT6B5PQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2577
+ _chunkGWFNJLDNcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2567
2578
  farmApp.getConfig().root,
2568
2579
  options.distDir || ".farm"
2569
2580
  )
@@ -2574,7 +2585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2574
2585
  let farmAppPackages;
2575
2586
  if (_optionalChain([farmConfig, 'access', _157 => _157.agent, 'optionalAccess', _158 => _158.noindexPreviews])) {
2576
2587
  farmMiddlewares.use((_req, res, next) => {
2577
- if (_chunkMUQP2APNcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2588
+ if (_chunkJJUHUPRBcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2578
2589
  res.setHeader("X-Robots-Tag", _chunkERSLQ4C7cjs.FARM_PREVIEW_ROBOTS_TAG);
2579
2590
  }
2580
2591
  next();
@@ -2582,7 +2593,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2582
2593
  }
2583
2594
  const apiServerBasePath = _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2584
2595
  const devBuiltInRoutePaths = new Set(
2585
- _chunkMZG5M4JScjs.listFarmBuiltInRoutePaths.call(void 0, {
2596
+ _chunkSO4USIKLcjs.listFarmBuiltInRoutePaths.call(void 0, {
2586
2597
  agent: {
2587
2598
  apiCatalog: true,
2588
2599
  mcp: true,
@@ -2630,9 +2641,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2630
2641
  const appDirSlugs = sourceRoots.map(
2631
2642
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2632
2643
  );
2644
+ const polyroute = _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2633
2645
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2634
2646
  try {
2635
- const result = await _chunkT4VF6BYVcjs.generateFarmTypeArtifacts.call(void 0, {
2647
+ const result = await _chunkYPPAYYSXcjs.generateFarmTypeArtifacts.call(void 0, {
2636
2648
  root: farmConfig.root,
2637
2649
  srcDir: farmConfig.srcDir,
2638
2650
  layers: farmConfig.layers,
@@ -2643,6 +2655,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2643
2655
  componentExtensions: farmConfig.renderer.componentExtensions,
2644
2656
  renderer: farmConfig.renderer,
2645
2657
  i18nConfig: farmConfig.i18n,
2658
+ polyroute,
2646
2659
  ...selection
2647
2660
  });
2648
2661
  if (log) {
@@ -2686,14 +2699,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2686
2699
  const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2687
2700
  return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
2688
2701
  };
2689
- const polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2690
2702
  const isApiRouteFile = (file) => {
2691
2703
  const normalized = file.replace(/\\/g, "/");
2692
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2704
+ return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2705
+ };
2706
+ const isApiRouteDeclarationFile = (file) => {
2707
+ const normalized = file.replace(/\\/g, "/");
2708
+ return polyroute && appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkYCGOQKVCcjs.isPolyrouteRouteDeclarationFileName.call(void 0, path6.posix.basename(normalized));
2693
2709
  };
2694
2710
  const isProgrammaticRouteFile = (file) => {
2695
2711
  const normalized = file.replace(/\\/g, "/");
2696
- return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalized);
2712
+ return srcDirSlugs.some((srcDir) => normalized.startsWith(`${srcDir}/`)) && _chunkLH7S7FI3cjs.isProgrammaticRoutesFileName.call(void 0, normalized);
2697
2713
  };
2698
2714
  const isProgrammaticRouteSourceFile = (file) => {
2699
2715
  const normalized = file.replace(/\\/g, "/");
@@ -2740,7 +2756,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2740
2756
  const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
2741
2757
  const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
2742
2758
  routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
2743
- api: isApiRouteFile(file) || programmaticRouteChanged,
2759
+ api: isApiRouteFile(file) || isApiRouteDeclarationFile(file) || programmaticRouteChanged,
2744
2760
  env: false,
2745
2761
  images: false,
2746
2762
  i18n: isI18nCatalogFile(file)
@@ -2818,7 +2834,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2818
2834
  }
2819
2835
  })]);
2820
2836
  }
2821
- apiRouteManager = new (0, _chunkZTNU4XCCcjs.APIRouteManager)(appDirs, server, {
2837
+ apiRouteManager = new (0, _chunkY3MTKPLNcjs.APIRouteManager)(appDirs, server, {
2822
2838
  plugins: farmConfig.plugins,
2823
2839
  i18n: farmApp.getI18nRuntime(),
2824
2840
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2927,45 +2943,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2927
2943
  },
2928
2944
  href
2929
2945
  );
2930
- const farmDocsHandler = farmDocsDevRuntime ? farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs) ? await farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2931
- root: farmConfig.root,
2932
- srcDir: farmConfig.srcDir,
2933
- clientEntry: "/@farm/client.js",
2934
- rendererServer: farmConfig.renderer.server,
2935
- resolveLayoutFonts: resolveDocsLayoutFonts,
2936
- fontStylesheetHref: "/@farm/fonts.css",
2937
- globalStylesheetHref: _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
2938
- farmConfig.root,
2939
- farmConfig.srcDir
2940
- ),
2941
- loadModule: async (specifier) => {
2942
- const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2943
- if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
2944
- const file = resolved.id.split("?", 1)[0];
2945
- return import(
2946
- /* @vite-ignore */
2947
- _url.pathToFileURL.call(void 0, file).href
2948
- );
2946
+ let farmDocsRuntimeGeneration = 0;
2947
+ const createFarmDocsAdapterHandler = () => {
2948
+ const generation = ++farmDocsRuntimeGeneration;
2949
+ return farmDocsDevRuntime.createFarmDocsAdapterHandler(farmConfig.docs, {
2950
+ root: farmConfig.root,
2951
+ srcDir: farmConfig.srcDir,
2952
+ clientEntry: "/@farm/client.js",
2953
+ rendererServer: farmConfig.renderer.server,
2954
+ resolveLayoutFonts: resolveDocsLayoutFonts,
2955
+ fontStylesheetHref: "/@farm/fonts.css",
2956
+ globalStylesheetHref: _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0, farmConfig.root, farmConfig.srcDir),
2957
+ loadModule: async (specifier) => {
2958
+ const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2959
+ if (specifier === _optionalChain([farmConfig, 'access', _191 => _191.docs, 'access', _192 => _192.adapter, 'optionalAccess', _193 => _193.server]) && _optionalChain([resolved, 'optionalAccess', _194 => _194.id])) {
2960
+ const file = resolved.id.split("?", 1)[0];
2961
+ return import(
2962
+ /* @vite-ignore */
2963
+ _url.pathToFileURL.call(void 0, file).href
2964
+ );
2965
+ }
2966
+ return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
2967
+ },
2968
+ registerMCPServer: (mcpServer) => {
2969
+ if (generation !== farmDocsRuntimeGeneration) return () => {
2970
+ };
2971
+ const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
2972
+ docsMCPServerDisposers.add(dispose);
2973
+ return () => {
2974
+ docsMCPServerDisposers.delete(dispose);
2975
+ dispose();
2976
+ };
2977
+ },
2978
+ isPathGuarded: isFarmDocsPathGuarded
2979
+ });
2980
+ };
2981
+ let farmDocsAdapterHandler = _optionalChain([farmDocsDevRuntime, 'optionalAccess', _196 => _196.hasFarmDocsRuntimeAdapter, 'call', _197 => _197(farmConfig.docs)]) ? createFarmDocsAdapterHandler() : void 0;
2982
+ if (farmDocsAdapterHandler) await farmDocsAdapterHandler;
2983
+ const farmDocsConfigModule = farmDocsAdapterHandler ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, farmConfig.docs) : void 0;
2984
+ if (farmDocsConfigModule) {
2985
+ const configFile = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, path6.resolve(farmConfig.root, farmDocsConfigModule));
2986
+ refreshFarmDocsConfig = (file) => {
2987
+ if (_chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server, file, /* @__PURE__ */ new Set([configFile])).length === 0) {
2988
+ return false;
2949
2989
  }
2950
- return _chunkVB7P66Q4cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _195 => _195.id]), () => ( specifier)));
2951
- },
2952
- registerMCPServer: (mcpServer) => {
2953
- const dispose = _chunk3ACTVXZGcjs.registerFarmMCPServer.call(void 0, mcpServer);
2954
- docsMCPServerDisposers.add(dispose);
2955
- return () => {
2956
- docsMCPServerDisposers.delete(dispose);
2957
- dispose();
2958
- };
2959
- },
2960
- isPathGuarded: isFarmDocsPathGuarded
2961
- }) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2990
+ releaseDocsMCPServers();
2991
+ farmDocsAdapterHandler = createFarmDocsAdapterHandler();
2992
+ farmDocsAdapterHandler.catch(() => {
2993
+ });
2994
+ return true;
2995
+ };
2996
+ }
2997
+ const farmDocsHandler = farmDocsDevRuntime ? farmDocsAdapterHandler ? (request) => farmDocsAdapterHandler.then((handle) => handle(request)) : farmDocsDevRuntime.createFarmDocsHandler(farmConfig.docs, {
2962
2998
  root: farmConfig.root,
2963
2999
  srcDir: farmConfig.srcDir,
2964
3000
  clientEntry: "/@farm/client.js",
2965
3001
  fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2966
3002
  resolveLayoutFonts: resolveDocsLayoutFonts,
2967
3003
  fontStylesheetHref: "/@farm/fonts.css",
2968
- globalStylesheetHref: _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
3004
+ globalStylesheetHref: _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0,
2969
3005
  farmConfig.root,
2970
3006
  farmConfig.srcDir
2971
3007
  ),
@@ -2973,7 +3009,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2973
3009
  basePath: farmConfig.basePath
2974
3010
  }) : null;
2975
3011
  const farmDocsListsPages = Boolean(
2976
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.some, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")])
3012
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _198 => _198.getPlugins, 'call', _199 => _199(), 'access', _200 => _200.some, 'call', _201 => _201((plugin2) => plugin2.name === "farm:infra-analytics")])
2977
3013
  );
2978
3014
  let farmDocsPagePaths;
2979
3015
  const getFarmDocsPagePaths = () => {
@@ -3000,22 +3036,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3000
3036
  });
3001
3037
  }
3002
3038
  }
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")]);
3039
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
3004
3040
  if (farmInfraAnalyticsPlugin) {
3005
- _chunkO47IT4CScjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3041
+ _chunkH7DAFRYRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
3006
3042
  if (farmDocsDevRuntime) {
3007
- const label = _chunkMZG5M4JScjs.resolveFarmDocsRouteLabel.call(void 0,
3043
+ const label = _chunkSO4USIKLcjs.resolveFarmDocsRouteLabel.call(void 0,
3008
3044
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
3009
3045
  {
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)]),
3046
+ path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
3047
+ roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
3012
3048
  pages: await getFarmDocsPagePaths()
3013
3049
  }
3014
3050
  );
3015
- if (label) return _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3051
+ if (label) return _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
3016
3052
  }
3017
3053
  const match = farmApp.getRouteManager().matchRoute(pathname);
3018
- return { pathname, pattern: _optionalChain([match, 'access', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null };
3054
+ return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
3019
3055
  });
3020
3056
  }
3021
3057
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3090,7 +3126,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3090
3126
  }
3091
3127
  },
3092
3128
  (request) => {
3093
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _212 => _212.getConfig, 'call', _213 => _213()]), () => ( options));
3129
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3094
3130
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3095
3131
  return _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, request, {
3096
3132
  trustProxy: currentServerConfig.trustProxy
@@ -3106,7 +3142,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3106
3142
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3107
3143
  const requestUrl = req.url || "/";
3108
3144
  const requestMethod = req.method || "GET";
3109
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3145
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
3110
3146
  const currentServerConfig = _chunk7GKZDRY2cjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3111
3147
  const parsedRequestUrl = _chunkIBZW57NWcjs.resolveFarmRequestURL.call(void 0, req, {
3112
3148
  trustProxy: currentServerConfig.trustProxy
@@ -3176,7 +3212,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3176
3212
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH) {
3177
3213
  res.statusCode = 200;
3178
3214
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3179
- res.end(requestMethod === "HEAD" ? void 0 : _chunkVWPGK6UVcjs.FARM_VIDEO_PLAYER_HTML);
3215
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkTAXZQNFZcjs.FARM_VIDEO_PLAYER_HTML);
3180
3216
  return;
3181
3217
  }
3182
3218
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3231,7 +3267,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3231
3267
  openapi: options.openapi
3232
3268
  },
3233
3269
  workflows: discoveredWorkflows,
3234
- plugins: _optionalChain([pm, 'optionalAccess', _216 => _216.getSortedPlugins, 'call', _217 => _217()])
3270
+ plugins: _optionalChain([pm, 'optionalAccess', _218 => _218.getSortedPlugins, 'call', _219 => _219()])
3235
3271
  });
3236
3272
  res.statusCode = 200;
3237
3273
  res.setHeader(
@@ -3266,10 +3302,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3266
3302
  render: {
3267
3303
  pathname: pathname2,
3268
3304
  method: requestMethod,
3269
- routePattern: _optionalChain([match, 'optionalAccess', _218 => _218.route, 'optionalAccess', _219 => _219.pattern]) || null,
3270
- params: _optionalChain([match, 'optionalAccess', _220 => _220.params]) || {}
3305
+ routePattern: _optionalChain([match, 'optionalAccess', _220 => _220.route, 'optionalAccess', _221 => _221.pattern]) || null,
3306
+ params: _optionalChain([match, 'optionalAccess', _222 => _222.params]) || {}
3271
3307
  },
3272
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _221 => _221.layouts]) || []).map((layout) => layout.pattern)
3308
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _223 => _223.layouts]) || []).map((layout) => layout.pattern)
3273
3309
  };
3274
3310
  return pageHookRouteMatch;
3275
3311
  };
@@ -3357,7 +3393,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3357
3393
  }
3358
3394
  }
3359
3395
  const runAppMiddlewareForContentRoute = async () => {
3360
- if (!_optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()])) return false;
3396
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _224 => _224.hasMiddleware, 'call', _225 => _225()])) return false;
3361
3397
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3362
3398
  return runFarmMiddlewareWithNavigation(
3363
3399
  farmApp.getServerRenderer(),
@@ -3395,7 +3431,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3395
3431
  return response.status;
3396
3432
  };
3397
3433
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3398
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _224 => _224.hasRuntimeHook, 'call', _225 => _225("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _226 => _226.hasMiddleware, 'call', _227 => _227()]) ? interceptFarmDevPageResponse({
3434
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeHook, 'call', _227 => _227("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _228 => _228.hasMiddleware, 'call', _229 => _229()]) ? interceptFarmDevPageResponse({
3399
3435
  req,
3400
3436
  res,
3401
3437
  pm,
@@ -3408,7 +3444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3408
3444
  urlPath: requestUrl,
3409
3445
  pathname: requestPathname,
3410
3446
  startTime: Date.now(),
3411
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _228 => _228(status)]),
3447
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _230 => _230(status)]),
3412
3448
  // The runtime reports a runtime.after failure itself.
3413
3449
  emitError: async () => {
3414
3450
  },
@@ -3419,7 +3455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3419
3455
  handled = await runAppMiddlewareForContentRoute();
3420
3456
  } catch (error) {
3421
3457
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3422
- _optionalChain([interceptor, 'optionalAccess', _229 => _229.release, 'call', _230 => _230()]);
3458
+ _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3423
3459
  throw error;
3424
3460
  }
3425
3461
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3427,10 +3463,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3427
3463
  return true;
3428
3464
  }
3429
3465
  if (!handled) {
3430
- _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3466
+ _optionalChain([interceptor, 'optionalAccess', _233 => _233.release, 'call', _234 => _234()]);
3431
3467
  return false;
3432
3468
  }
3433
- if (!_optionalChain([interceptor, 'optionalAccess', _233 => _233.isEnded, 'call', _234 => _234()])) _optionalChain([logResponse2, 'optionalCall', _235 => _235(res.statusCode || 200)]);
3469
+ if (!_optionalChain([interceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) _optionalChain([logResponse2, 'optionalCall', _237 => _237(res.statusCode || 200)]);
3434
3470
  return true;
3435
3471
  };
3436
3472
  const serveBuiltInRoute = async (respond, {
@@ -3439,7 +3475,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3439
3475
  label
3440
3476
  } = {}) => {
3441
3477
  const discard = async () => {
3442
- await _optionalChain([computed, 'optionalAccess', _236 => _236.body, 'optionalAccess', _237 => _237.cancel, 'call', _238 => _238(), 'access', _239 => _239.catch, 'call', _240 => _240(() => {
3478
+ await _optionalChain([computed, 'optionalAccess', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240(), 'access', _241 => _241.catch, 'call', _242 => _242(() => {
3443
3479
  })]);
3444
3480
  };
3445
3481
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3456,9 +3492,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3456
3492
  if (pm && opensFarmDevRuntimeSession(pm)) {
3457
3493
  try {
3458
3494
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3459
- const route = _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
3495
+ const route = _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
3460
3496
  { pathname: requestPathname },
3461
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkMZG5M4JScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3497
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkSO4USIKLcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3462
3498
  );
3463
3499
  runtimeSession2 = await pm.beginRuntimeRequest(
3464
3500
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3496,7 +3532,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3496
3532
  }
3497
3533
  responding = true;
3498
3534
  response = await respond(
3499
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _241 => _241.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3535
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _243 => _243.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3500
3536
  );
3501
3537
  } catch (error) {
3502
3538
  if (!responding && !res.headersSent) {
@@ -3516,7 +3552,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3516
3552
  else await _chunk6VC7NUY3cjs.sendWebResponse.call(void 0, res, response);
3517
3553
  };
3518
3554
  const openAPIRequestPathname = openAPIManager ? _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3519
- if (openAPIManager && _optionalChain([options, 'access', _242 => _242.openapi, 'optionalAccess', _243 => _243.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3555
+ if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3520
3556
  const specManager = openAPIManager;
3521
3557
  await serveBuiltInRoute(async () => {
3522
3558
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3536,7 +3572,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3536
3572
  });
3537
3573
  return;
3538
3574
  }
3539
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.route])) {
3575
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _246 => _246.openapi, 'optionalAccess', _247 => _247.route])) {
3540
3576
  const docsManager = openAPIManager;
3541
3577
  await serveBuiltInRoute(
3542
3578
  async () => {
@@ -3547,7 +3583,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3547
3583
  );
3548
3584
  return;
3549
3585
  }
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))) {
3586
+ if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkSO4USIKLcjs.isFarmAppManifestPath.call(void 0, _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3551
3587
  const manifestGuardCoversPath = (path7) => _chunkIGBQSUT5cjs.farmPathGuardCoversEndpoint.call(void 0,
3552
3588
  {
3553
3589
  config: farmConfig,
@@ -3557,18 +3593,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3557
3593
  apiServerBasePath
3558
3594
  );
3559
3595
  await serveBuiltInRoute(async () => {
3560
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkVWPGK6UVcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3561
- const manifest = await _chunkMZG5M4JScjs.createFarmAppManifestResponse.call(void 0,
3596
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTAXZQNFZcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3597
+ const manifest = await _chunkSO4USIKLcjs.createFarmAppManifestResponse.call(void 0,
3562
3598
  new Request(parsedRequestUrl, {
3563
3599
  method: requestMethod,
3564
3600
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3565
3601
  }),
3566
3602
  {
3567
- ..._chunkMZG5M4JScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3603
+ ..._chunkSO4USIKLcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3568
3604
  build: "development",
3569
3605
  packages: farmAppPackages,
3570
3606
  // Read again on each request; unchanged files come from a cache.
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) : []
3607
+ webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkTAXZQNFZcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3572
3608
  }),
3573
3609
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3574
3610
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3586,11 +3622,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3586
3622
  });
3587
3623
  return;
3588
3624
  }
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) {
3625
+ if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkSO4USIKLcjs.FARM_API_CATALOG_PATH) {
3590
3626
  await serveBuiltInRoute(
3591
- () => _chunkMZG5M4JScjs.createFarmApiCatalogResponse.call(void 0,
3627
+ () => _chunkSO4USIKLcjs.createFarmApiCatalogResponse.call(void 0,
3592
3628
  requestMethod,
3593
- _chunkMZG5M4JScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3629
+ _chunkSO4USIKLcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3594
3630
  new Request(parsedRequestUrl, {
3595
3631
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3596
3632
  })
@@ -3598,8 +3634,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3598
3634
  );
3599
3635
  return;
3600
3636
  }
3601
- if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.aiCatalog]) !== false) {
3602
- const aiCatalog = _chunkMZG5M4JScjs.createFarmAiCatalogResponse.call(void 0,
3637
+ if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
3638
+ const aiCatalog = _chunkSO4USIKLcjs.createFarmAiCatalogResponse.call(void 0,
3603
3639
  new Request(parsedRequestUrl, {
3604
3640
  method: requestMethod,
3605
3641
  headers: {
@@ -3647,7 +3683,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3647
3683
  );
3648
3684
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3649
3685
  if (docsResponse) {
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")]);
3686
+ 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")]);
3651
3687
  await serveBuiltInRoute(
3652
3688
  async (request) => {
3653
3689
  if (!docsPage) {
@@ -3665,7 +3701,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3665
3701
  farmConfig.deploymentId
3666
3702
  );
3667
3703
  if (deploymentMismatch) {
3668
- await _optionalChain([docsResponse, 'access', _262 => _262.body, 'optionalAccess', _263 => _263.cancel, 'call', _264 => _264()]);
3704
+ await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
3669
3705
  return _chunkVIDUNAQEcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3670
3706
  }
3671
3707
  const page = _chunkSWOJU7LIcjs._withFarmResponseHeaders.call(void 0,
@@ -3686,11 +3722,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3686
3722
  {
3687
3723
  kind: "docs",
3688
3724
  computed: docsResponse,
3689
- label: _chunkMZG5M4JScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3725
+ label: _chunkSO4USIKLcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3690
3726
  _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3691
3727
  {
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)]),
3728
+ path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
3729
+ roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
3694
3730
  pages: await getFarmDocsPagePaths()
3695
3731
  }
3696
3732
  )
@@ -3699,7 +3735,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3699
3735
  return;
3700
3736
  }
3701
3737
  }
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)])) {
3738
+ 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)])) {
3703
3739
  const { createFarmNativeTreeResponse } = await import("./native-tree-PHCV43W4.cjs");
3704
3740
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7GKZDRY2cjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3705
3741
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3717,15 +3753,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3717
3753
  });
3718
3754
  await serveBuiltInRoute(() => treeResponse, {
3719
3755
  computed: treeResponse,
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))
3756
+ 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))
3721
3757
  });
3722
3758
  return;
3723
3759
  }
3724
3760
  const markdownRouteLabel = () => (
3725
3761
  // On the route path, as production labels it: /fr/index.md is /index.md.
3726
- _chunkMZG5M4JScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3762
+ _chunkSO4USIKLcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3727
3763
  toRoutePathname(requestPathname),
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])
3764
+ (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])
3729
3765
  )
3730
3766
  );
3731
3767
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk27IPPPCVcjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3737,14 +3773,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3737
3773
  routePathname: toRoutePathname,
3738
3774
  resolveSource: async (pathname2) => {
3739
3775
  const match = farmApp.getRouteManager().matchRoute(pathname2);
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);
3776
+ 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);
3741
3777
  if (!sourcePath) {
3742
3778
  return null;
3743
3779
  }
3744
3780
  return {
3745
3781
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3746
3782
  // Project-relative, as production sends it: never the machine's path.
3747
- filePath: _chunkVWPGK6UVcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3783
+ filePath: _chunkTAXZQNFZcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3748
3784
  };
3749
3785
  },
3750
3786
  // The anonymous check goes through this server, so its guards and
@@ -3894,7 +3930,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3894
3930
  "beforeRequest",
3895
3931
  (plugin2) => {
3896
3932
  const owner = _chunkN4AM7Q34cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3897
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _289 => _289.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3933
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3898
3934
  },
3899
3935
  req,
3900
3936
  res
@@ -3931,7 +3967,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3931
3967
  isProd: false
3932
3968
  },
3933
3969
  request,
3934
- { clientAddress: _optionalChain([req, 'access', _290 => _290.socket, 'optionalAccess', _291 => _291.remoteAddress]) }
3970
+ { clientAddress: _optionalChain([req, 'access', _292 => _292.socket, 'optionalAccess', _293 => _293.remoteAddress]) }
3935
3971
  );
3936
3972
  if (!result) {
3937
3973
  throw new Error(`Matched integration route did not return a response`);
@@ -3939,7 +3975,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3939
3975
  return result;
3940
3976
  } catch (error) {
3941
3977
  _chunk7ZDLE77Pcjs.logger.error(`Integration route error: ${error}`);
3942
- await _optionalChain([runtime, 'optionalAccess', _292 => _292.reportError, 'call', _293 => _293(error)]);
3978
+ await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
3943
3979
  return _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
3944
3980
  }
3945
3981
  };
@@ -3993,7 +4029,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3993
4029
  _chunkN4AM7Q34cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3994
4030
  pathname: requestPathname,
3995
4031
  method: requestMethod
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)
4032
+ }) || 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)
3997
4033
  );
3998
4034
  };
3999
4035
  try {
@@ -4083,15 +4119,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4083
4119
  );
4084
4120
  };
4085
4121
  const isDocsAPIRequest = Boolean(
4086
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(pathname2)])
4122
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _298 => _298.isFarmDocsAPIRequest, 'call', _299 => _299(pathname2)])
4087
4123
  );
4088
4124
  const docsRuntimeOptions = () => ({
4089
4125
  kind: "docs",
4090
- route: _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
4126
+ route: _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
4091
4127
  { pathname: pathname2, pattern: urlPath2 },
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)])
4128
+ _chunkSO4USIKLcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4129
+ path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
4130
+ roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
4095
4131
  })
4096
4132
  )
4097
4133
  });
@@ -4173,7 +4209,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4173
4209
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4174
4210
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4175
4211
  if (apiHandler && hasExplicitAPIRoute) {
4176
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _304 => _304.route, 'access', _305 => _305.path]) || urlPath2;
4212
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
4177
4213
  _chunkRFKPIAOFcjs.emitFarmEvent.call(void 0, {
4178
4214
  type: "route.matched",
4179
4215
  pathname: pathname2,
@@ -4223,7 +4259,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4223
4259
  error
4224
4260
  });
4225
4261
  _chunk7ZDLE77Pcjs.logger.error(`API route error: ${error}`);
4226
- await _optionalChain([runtime, 'optionalAccess', _306 => _306.reportError, 'call', _307 => _307(error)]);
4262
+ await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
4227
4263
  response = _chunk5P3TZGS3cjs.createFarmInternalServerErrorResponse.call(void 0, );
4228
4264
  }
4229
4265
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4328,12 +4364,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4328
4364
  }
4329
4365
  return;
4330
4366
  }
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")])) {
4367
+ 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")])) {
4332
4368
  return next();
4333
4369
  }
4334
4370
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4335
4371
  requestPathname,
4336
- _optionalChain([farmApp, 'optionalAccess', _314 => _314.getRouteManager, 'call', _315 => _315()]),
4372
+ _optionalChain([farmApp, 'optionalAccess', _316 => _316.getRouteManager, 'call', _317 => _317()]),
4337
4373
  [server.config.publicDir, server.config.root],
4338
4374
  farmAgentGeneratedPaths(farmConfig),
4339
4375
  requestMethod
@@ -4341,7 +4377,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4341
4377
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4342
4378
  return next();
4343
4379
  }
4344
- if (_optionalChain([req, 'access', _316 => _316.url, 'optionalAccess', _317 => _317.startsWith, 'call', _318 => _318("/__farm/page-data")])) {
4380
+ if (_optionalChain([req, 'access', _318 => _318.url, 'optionalAccess', _319 => _319.startsWith, 'call', _320 => _320("/__farm/page-data")])) {
4345
4381
  const urlObj = parsedRequestUrl;
4346
4382
  const targetPath = urlObj.searchParams.get("path") || "/";
4347
4383
  let renderedRequest;
@@ -4371,7 +4407,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4371
4407
  renderedRequest = targetRequest;
4372
4408
  let middlewareMap = /* @__PURE__ */ new Map();
4373
4409
  let middlewareContext = /* @__PURE__ */ new Map();
4374
- if (_optionalChain([middlewareManager, 'optionalAccess', _319 => _319.hasMiddleware, 'call', _320 => _320()])) {
4410
+ if (_optionalChain([middlewareManager, 'optionalAccess', _321 => _321.hasMiddleware, 'call', _322 => _322()])) {
4375
4411
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4376
4412
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4377
4413
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4405,10 +4441,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4405
4441
  if (pm) {
4406
4442
  await pm.runHookParallel("afterRouteMatch", {
4407
4443
  pathname: targetPath,
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)
4444
+ matched: !!_optionalChain([match, 'optionalAccess', _323 => _323.route]),
4445
+ routePattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
4446
+ params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {},
4447
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _327 => _327.layouts]) || []).map((l) => l.pattern)
4412
4448
  });
4413
4449
  }
4414
4450
  if (!match) {
@@ -4443,7 +4479,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4443
4479
  );
4444
4480
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4445
4481
  const navigationManifest = routeManager3.generateClientManifest(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)));
4482
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4447
4483
  const isClientComponent = moduleMetadata.isClientComponent;
4448
4484
  const shouldHydrate = moduleMetadata.shouldHydrate;
4449
4485
  let mergedMetadata = {};
@@ -4454,7 +4490,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4454
4490
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4455
4491
  (entry) => entry.pattern === layout.pattern
4456
4492
  ), () => ( {
4457
- ..._chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4493
+ ..._chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4458
4494
  serverTree: false
4459
4495
  }))
4460
4496
  );
@@ -4468,17 +4504,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4468
4504
  )
4469
4505
  ];
4470
4506
  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,
4507
+ _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options)))
4508
+ ) === "islands" ? _chunkTAXZQNFZcjs.resolveFarmRouteRootStrategy.call(void 0,
4473
4509
  route,
4474
4510
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4475
4511
  layouts.map((layout, index) => ({
4476
4512
  pattern: layout.pattern,
4477
4513
  modulePath: layout.modulePath,
4478
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.shouldHydrate]) === true,
4514
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.shouldHydrate]) === true,
4479
4515
  // Manifest entries carry it; metadata read from source does not.
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))
4516
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.hasIsolatedClientBoundaries]) === true,
4517
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _334 => _334[index], 'optionalAccess', _335 => _335.islandStrategy]), () => ( null))
4482
4518
  })),
4483
4519
  server.config.root,
4484
4520
  true
@@ -4535,7 +4571,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4535
4571
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4536
4572
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4537
4573
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4538
- ), () => ( _chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4574
+ ), () => ( _chunkGWFNJLDNcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4539
4575
  const slotContext = await _chunkYZMSJRM5cjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4540
4576
  request: targetRequest,
4541
4577
  params: slot.params,
@@ -4585,7 +4621,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4585
4621
  pageShouldHydrate: shouldHydrate,
4586
4622
  layoutShouldHydrate: shouldHydrateLayout,
4587
4623
  islandStrategy: hydrationIslandStrategy,
4588
- rendering: _chunkT4VF6BYVcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4624
+ rendering: _chunkYPPAYYSXcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4589
4625
  });
4590
4626
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4591
4627
  const layoutStartIndex = _chunkIGBQSUT5cjs.getSharedLayoutPrefixLength.call(void 0,
@@ -4599,13 +4635,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4599
4635
  middlewareContext,
4600
4636
  () => renderer.renderNavigationFragment({
4601
4637
  PageComponent: routeModule.default,
4602
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _334 => _334.default]),
4638
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _336 => _336.default]),
4603
4639
  pageProps: routeProps,
4604
4640
  params,
4605
4641
  layouts: layouts.map((layout, index) => ({
4606
4642
  pattern: layout.pattern,
4607
4643
  module: layoutModules[index],
4608
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _335 => _335[index], 'optionalAccess', _336 => _336.serverTree])
4644
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _337 => _337[index], 'optionalAccess', _338 => _338.serverTree])
4609
4645
  })),
4610
4646
  layoutStartIndex,
4611
4647
  slots: routeSlots.map((slot) => ({
@@ -4713,14 +4749,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4713
4749
  trustProxy: currentServerConfig.trustProxy
4714
4750
  }).pathname;
4715
4751
  const routeManager2 = farmApp.getRouteManager();
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)));
4752
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("beforeRequest")]), () => ( false));
4753
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("afterResponse")]), () => ( false));
4754
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasHook, 'call', _346 => _346("afterRender")]), () => ( false)));
4719
4755
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4720
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasRuntimeHook, 'call', _346 => _346("after")]), () => ( false));
4756
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasRuntimeHook, 'call', _348 => _348("after")]), () => ( false));
4721
4757
  const pageBuiltInRouteLabel = (pathname2) => {
4722
4758
  const routePathname = _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4723
- const mcpLabel = _chunkMZG5M4JScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4759
+ const mcpLabel = _chunkSO4USIKLcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4724
4760
  if (mcpLabel) return mcpLabel;
4725
4761
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4726
4762
  return routePathname === _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4729,13 +4765,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4729
4765
  const match = routeManager2.matchRoute(pathname2);
4730
4766
  return {
4731
4767
  kind: "page",
4732
- route: _chunkMZG5M4JScjs.setFarmRouteLabel.call(void 0,
4768
+ route: _chunkSO4USIKLcjs.setFarmRouteLabel.call(void 0,
4733
4769
  {
4734
4770
  pathname: pathname2,
4735
- pattern: _optionalChain([match, 'optionalAccess', _347 => _347.route, 'optionalAccess', _348 => _348.pattern]) || null,
4736
- params: _optionalChain([match, 'optionalAccess', _349 => _349.params]) || {}
4771
+ pattern: _optionalChain([match, 'optionalAccess', _349 => _349.route, 'optionalAccess', _350 => _350.pattern]) || null,
4772
+ params: _optionalChain([match, 'optionalAccess', _351 => _351.params]) || {}
4737
4773
  },
4738
- _optionalChain([match, 'optionalAccess', _350 => _350.route]) ? null : pageBuiltInRouteLabel(pathname2)
4774
+ _optionalChain([match, 'optionalAccess', _352 => _352.route]) ? null : pageBuiltInRouteLabel(pathname2)
4739
4775
  )
4740
4776
  };
4741
4777
  };
@@ -4815,7 +4851,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4815
4851
  }) : void 0;
4816
4852
  let middlewareFailed = false;
4817
4853
  try {
4818
- if (_optionalChain([middlewareManager, 'optionalAccess', _351 => _351.hasMiddleware, 'call', _352 => _352()])) {
4854
+ if (_optionalChain([middlewareManager, 'optionalAccess', _353 => _353.hasMiddleware, 'call', _354 => _354()])) {
4819
4855
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4820
4856
  const handled = await runFarmMiddlewareWithNavigation(
4821
4857
  farmApp.getServerRenderer(),
@@ -4828,7 +4864,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4828
4864
  throw error;
4829
4865
  });
4830
4866
  if (handled) {
4831
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4867
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4832
4868
  const duration = Date.now() - startTime;
4833
4869
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4834
4870
  }
@@ -4843,8 +4879,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4843
4879
  res
4844
4880
  );
4845
4881
  }
4846
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4847
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4882
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4883
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4848
4884
  const duration = Date.now() - startTime;
4849
4885
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4850
4886
  }
@@ -4863,8 +4899,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4863
4899
  await pm.reportRuntimeRequestError(runtimeSession, error);
4864
4900
  } else {
4865
4901
  await pm.failRuntimeRequest(runtimeSession, error);
4866
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4867
- _optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.release, 'call', _362 => _362()]);
4902
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.isEnded, 'call', _362 => _362()])) {
4903
+ _optionalChain([responseInterceptor, 'optionalAccess', _363 => _363.release, 'call', _364 => _364()]);
4868
4904
  console.error("[FARM] Page error:", error);
4869
4905
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4870
4906
  return;
@@ -4881,7 +4917,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4881
4917
  }
4882
4918
  })
4883
4919
  );
4884
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _363 => _363.stack, 'access', _364 => _364.at, 'call', _365 => _365(-1), 'optionalAccess', _366 => _366.handle]);
4920
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _365 => _365.stack, 'access', _366 => _366.at, 'call', _367 => _367(-1), 'optionalAccess', _368 => _368.handle]);
4885
4921
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4886
4922
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4887
4923
  }
@@ -4910,7 +4946,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4910
4946
  });
4911
4947
  }
4912
4948
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
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;
4949
+ const root = _optionalChain([farmApp, 'optionalAccess', _369 => _369.getConfig, 'call', _370 => _370(), 'access', _371 => _371.root]) || _optionalChain([server, 'optionalAccess', _372 => _372.config, 'access', _373 => _373.root]) || options.root;
4914
4950
  return this.resolve(id, path6.join(root, "package.json"), {
4915
4951
  ...resolveOptions,
4916
4952
  skipSelf: true
@@ -4924,7 +4960,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4924
4960
  const imageId = await imageImports.resolveId.call(this, id, importer, resolveOptions);
4925
4961
  if (imageId) return imageId;
4926
4962
  }
4927
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4963
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4928
4964
  return id;
4929
4965
  }
4930
4966
  if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
@@ -4938,7 +4974,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4938
4974
  }
4939
4975
  },
4940
4976
  async load(id, loadOptions) {
4941
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _372 => _372.ssr]) && !farmSetupContext.getStore()) {
4977
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _374 => _374.ssr]) && !farmSetupContext.getStore()) {
4942
4978
  await pendingClientSetup;
4943
4979
  }
4944
4980
  if (_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4955,9 +4991,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4955
4991
  const imageModule = await imageImports.load.call(this, id);
4956
4992
  if (imageModule) return imageModule;
4957
4993
  }
4958
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
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;
4994
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4995
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _375 => _375.getConfig, 'call', _376 => _376(), 'access', _377 => _377.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
4996
+ const root = _optionalChain([server, 'optionalAccess', _378 => _378.config, 'access', _379 => _379.root]) || options.root;
4961
4997
  if (isClientEnvironment(this, loadOptions)) {
4962
4998
  return generateProgrammaticClientRouteModuleForId(
4963
4999
  id,
@@ -4973,19 +5009,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4973
5009
  return FARM_DEV_CLIENT_BOOT_MODULE;
4974
5010
  }
4975
5011
  if (isFarmClientVirtualId(id)) {
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]);
5012
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _380 => _380.getConfig, 'call', _381 => _381()]);
5013
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.renderer]) || _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, options.renderer);
5014
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.integrations]) || options.integrations;
5015
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.root]) || _optionalChain([server, 'optionalAccess', _385 => _385.config, 'access', _386 => _386.root]) || process.cwd();
5016
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.docs]);
4981
5017
  const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4982
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
5018
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.devtools]), () => ( _chunkRQSPBWXJcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4983
5019
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4984
- _optionalChain([docs, 'optionalAccess', _387 => _387.enabled]) ? loadFarmDocsDevRuntime() : null,
4985
- _optionalChain([docs, 'optionalAccess', _388 => _388.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
5020
+ _optionalChain([docs, 'optionalAccess', _389 => _389.enabled]) ? loadFarmDocsDevRuntime() : null,
5021
+ _optionalChain([docs, 'optionalAccess', _390 => _390.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4986
5022
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4987
5023
  ]);
4988
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _389 => _389.isFarmDocsSearchEnabled, 'call', _390 => _390(docs)]), () => ( false));
5024
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _391 => _391.isFarmDocsSearchEnabled, 'call', _392 => _392(docs)]), () => ( false));
4989
5025
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4990
5026
  docsSearchEnabled,
4991
5027
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -4993,8 +5029,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4993
5029
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4994
5030
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkVZ2P6GRCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4995
5031
  const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, integrations);
4996
- const isolatedHydrationMode = _chunkZCT6B5PQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4997
- _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.isolatedClientHydration]),
5032
+ const isolatedHydrationMode = _chunkGWFNJLDNcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
5033
+ _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.experimental, 'optionalAccess', _394 => _394.isolatedClientHydration]),
4998
5034
  {
4999
5035
  serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "rsc",
5000
5036
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider))
@@ -5004,22 +5040,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
5004
5040
  integrationProviders,
5005
5041
  [
5006
5042
  ..._chunkN4AM7Q34cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
5007
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
5043
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _395 => _395.getFarmDocsDocumentNavigationMatchers, 'call', _396 => _396(docs)]), () => ( []))
5008
5044
  ],
5009
5045
  generatedDocsSearchRuntime,
5010
5046
  `${generatedDevtoolsClientRuntime}
5011
5047
  ${generatedDevIndicatorsClientRuntime}`,
5012
- _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
5048
+ _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.plugins]) || [],
5013
5049
  root,
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,
5050
+ _optionalChain([resolvedConfig, 'optionalAccess', _398 => _398.srcDir]) || options.srcDir || "src",
5051
+ _optionalChain([resolvedConfig, 'optionalAccess', _399 => _399.publicRuntimeConfig]) || options.publicRuntimeConfig,
5052
+ adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _400 => _400.adapter])) : void 0,
5017
5053
  renderer,
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]))
5054
+ isolatedHydrationMode === "enabled" || _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _401 => _401.getRouteManager, 'call', _402 => _402(), 'access', _403 => _403.getIsolatedClientBoundaryModules, 'call', _404 => _404(root)])))), 'optionalAccess', _405 => _405.size]) > 0,
5055
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.trailingSlash]), () => ( false)),
5056
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.basePath]), () => ( "/")),
5057
+ _chunkTAXZQNFZcjs.generateClientCachePersistenceCode.call(void 0,
5058
+ _chunkTAXZQNFZcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _408 => _408.cache]))
5023
5059
  ),
5024
5060
  adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
5025
5061
  _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, resolvedConfig)) === "islands"
@@ -5029,7 +5065,7 @@ ${generatedDevIndicatorsClientRuntime}`,
5029
5065
  return generateServerCode();
5030
5066
  }
5031
5067
  if (id === "/@farm/manifest") {
5032
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
5068
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
5033
5069
  if (!routeManager) {
5034
5070
  return `
5035
5071
  export const getManifest = () => ({
@@ -5041,11 +5077,11 @@ export const getManifest = () => ({
5041
5077
  });
5042
5078
  `;
5043
5079
  }
5044
- const globalStylesheetHref = _chunkVWPGK6UVcjs.resolveDevGlobalStylesheetHref.call(void 0,
5080
+ const globalStylesheetHref = _chunkTAXZQNFZcjs.resolveDevGlobalStylesheetHref.call(void 0,
5045
5081
  server.config.root,
5046
- _optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'access', _411 => _411.srcDir])
5082
+ _optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
5047
5083
  );
5048
- const fullManifest = _chunkVWPGK6UVcjs.createFarmDevClientManifest.call(void 0,
5084
+ const fullManifest = _chunkTAXZQNFZcjs.createFarmDevClientManifest.call(void 0,
5049
5085
  routeManager.generateClientManifest(server.config.root),
5050
5086
  {
5051
5087
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -5061,51 +5097,51 @@ export { manifest };
5061
5097
  }
5062
5098
  },
5063
5099
  async transform(code, id, transformOptions) {
5064
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) && !farmSetupContext.getStore()) {
5100
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) && !farmSetupContext.getStore()) {
5065
5101
  await pendingClientSetup;
5066
5102
  }
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));
5103
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5104
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
5069
5105
  let rewrotePackageImports = false;
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)) {
5106
+ if (_chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, actionConfig)) === "islands" && (!id.includes("/node_modules/") && !isFarmCoreModule(id) || _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, code)) {
5071
5107
  const file = id.split("?", 1)[0];
5072
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
5108
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _419 => _419.config, 'access', _420 => _420.root]) || process.cwd();
5073
5109
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
5074
5110
  const rewrite = () => {
5075
- if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
5111
+ if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
5076
5112
  if (farmReactServerFiles.has(file)) {
5077
- for (const child of _chunkZCT6B5PQcjs.farmRelativeImportFiles.call(void 0, code, file))
5113
+ for (const child of _chunkGWFNJLDNcjs.farmRelativeImportFiles.call(void 0, code, file))
5078
5114
  farmReactServerFiles.add(child);
5079
5115
  }
5080
- const serverModule = farmReactServerFiles.has(file) || !_chunkZCT6B5PQcjs.getFarmClientReachableModules.call(void 0,
5116
+ const serverModule = farmReactServerFiles.has(file) || !_chunkGWFNJLDNcjs.getFarmClientReachableModules.call(void 0,
5081
5117
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
5082
5118
  projectRoot
5083
5119
  ).has(path6.resolve(file));
5084
- const reactServer = !serverModule ? null : _chunkZCT6B5PQcjs.rewriteFarmReactServerImports.call(void 0, {
5120
+ const reactServer = !serverModule ? null : _chunkGWFNJLDNcjs.rewriteFarmReactServerImports.call(void 0, {
5085
5121
  code,
5086
5122
  file,
5087
- reference: (specifier, exportName) => _chunkZCT6B5PQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5123
+ reference: (specifier, exportName) => _chunkGWFNJLDNcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5088
5124
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5089
5125
  });
5090
5126
  if (reactServer !== null) {
5091
5127
  code = reactServer;
5092
5128
  rewrotePackageImports = true;
5093
5129
  }
5094
- const internal = farmReactServerFiles.has(file) ? _chunkZCT6B5PQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5130
+ const internal = farmReactServerFiles.has(file) ? _chunkGWFNJLDNcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5095
5131
  code,
5096
5132
  file,
5097
- reference: (clientFile) => _chunkZCT6B5PQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5133
+ reference: (clientFile) => _chunkGWFNJLDNcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5098
5134
  }) : null;
5099
5135
  if (internal !== null) {
5100
5136
  code = internal;
5101
5137
  rewrotePackageImports = true;
5102
5138
  }
5103
5139
  }
5104
- const rewritePackageImports = (source2) => _chunkZCT6B5PQcjs.rewriteFarmPackageClientImports.call(void 0, {
5140
+ const rewritePackageImports = (source2) => _chunkGWFNJLDNcjs.rewriteFarmPackageClientImports.call(void 0, {
5105
5141
  code: source2,
5106
5142
  file,
5107
5143
  root: projectRoot,
5108
- isClientPackage: (specifier) => _chunkZCT6B5PQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5144
+ isClientPackage: (specifier) => _chunkGWFNJLDNcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5109
5145
  });
5110
5146
  const source = code;
5111
5147
  const referenced = inspectPackages(() => rewritePackageImports(source));
@@ -5113,11 +5149,11 @@ export { manifest };
5113
5149
  code = referenced;
5114
5150
  rewrotePackageImports = true;
5115
5151
  }
5116
- if (_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true) {
5152
+ if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
5117
5153
  const cached = rewriteFarmReactCacheImport(
5118
5154
  code,
5119
5155
  file,
5120
- _optionalChain([runtimeModule, 'optionalCall', _421 => _421(FARM_REACT_CACHE_MODULE)])
5156
+ _optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
5121
5157
  );
5122
5158
  if (cached !== null) {
5123
5159
  code = cached;
@@ -5125,12 +5161,12 @@ export { manifest };
5125
5161
  }
5126
5162
  }
5127
5163
  };
5128
- if (buildSnapshot) _chunkZCT6B5PQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5164
+ if (buildSnapshot) _chunkGWFNJLDNcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5129
5165
  else rewrite();
5130
5166
  }
5131
5167
  if (islandsServerFns() && !_chunk7O3YJ6NPcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5132
5168
  const serverFns = _chunk7O3YJ6NPcjs.transformFarmServerFns.call(void 0, code, id, {
5133
- environment: _optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true ? "rsc" : "client"
5169
+ environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
5134
5170
  });
5135
5171
  if (serverFns) {
5136
5172
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5143,8 +5179,8 @@ export { manifest };
5143
5179
  const actionModule = transformFarmFormActionModule({
5144
5180
  code,
5145
5181
  id,
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,
5182
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
5183
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
5148
5184
  // Parsed by file type: page components are TSX.
5149
5185
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5150
5186
  runtimeModule,
@@ -5152,21 +5188,21 @@ export { manifest };
5152
5188
  });
5153
5189
  if (actionModule) return { code: actionModule, map: null };
5154
5190
  }
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]);
5191
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5192
+ const docsConfigModule = _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5193
+ if (_chunkTAXZQNFZcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5194
+ const redacted = _chunkTAXZQNFZcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5159
5195
  if (redacted !== null) return { code: redacted, map: null };
5160
5196
  }
5161
5197
  }
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()) {
5198
+ if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5199
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
5200
+ if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5165
5201
  const violation = findClientServerFnViolation(code, id);
5166
5202
  if (violation) {
5167
- const locate = _chunkZCT6B5PQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5203
+ const locate = _chunkGWFNJLDNcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5168
5204
  this.error(
5169
- _chunkZCT6B5PQcjs.formatFarmDiagnostic.call(void 0,
5205
+ _chunkGWFNJLDNcjs.formatFarmDiagnostic.call(void 0,
5170
5206
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5171
5207
  currentConfig.root
5172
5208
  )
@@ -5174,8 +5210,8 @@ export { manifest };
5174
5210
  }
5175
5211
  }
5176
5212
  }
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)));
5213
+ if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
5214
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
5179
5215
  }
5180
5216
  if (typeof imageImports.transform === "function") {
5181
5217
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5190,13 +5226,13 @@ export { manifest };
5190
5226
  id,
5191
5227
  transformOptions
5192
5228
  );
5193
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _438 => _438.code, 'optionalAccess', _439 => _439.toString, 'call', _440 => _440()]);
5229
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
5194
5230
  if (fontCode) {
5195
5231
  transformedCode = fontCode;
5196
5232
  transformed = true;
5197
5233
  }
5198
5234
  }
5199
- if (_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && server) {
5235
+ if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
5200
5236
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5201
5237
  code: transformedCode,
5202
5238
  id,
@@ -5208,27 +5244,27 @@ export { manifest };
5208
5244
  transformed = true;
5209
5245
  }
5210
5246
  }
5211
- if (_chunkZCT6B5PQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5247
+ if (_chunkGWFNJLDNcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5212
5248
  const clientBoundarySource = transformedCode;
5213
5249
  const moduleInfo = this.getModuleInfo(id);
5214
5250
  if (moduleInfo) {
5215
5251
  moduleInfo.isClientComponent = true;
5216
5252
  }
5217
- transformedCode = _chunkZCT6B5PQcjs.stripUseClientDirective.call(void 0, transformedCode);
5253
+ transformedCode = _chunkGWFNJLDNcjs.stripUseClientDirective.call(void 0, transformedCode);
5218
5254
  transformed = true;
5219
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options));
5255
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5220
5256
  let isolatedModuleReference = null;
5221
5257
  let rendererIslandModule = false;
5222
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _444 => _444.config, 'access', _445 => _445.root]) || process.cwd();
5258
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5223
5259
  const cleanId = id.split("?", 1)[0];
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))) {
5260
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5261
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5262
+ if (_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkGWFNJLDNcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5263
+ cleanId.replace(/\\/g, "/").includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5228
5264
  isolatedModuleReference = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root);
5229
5265
  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;
5266
+ const explicitStrategy = _chunkGWFNJLDNcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5267
+ const inference = islandsMode && explicitStrategy === null ? _chunkTAXZQNFZcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5232
5268
  if (inference) {
5233
5269
  for (const file of inference.files) {
5234
5270
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5241,8 +5277,8 @@ export { manifest };
5241
5277
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5242
5278
  parse: (source) => this.parse(source),
5243
5279
  slots: islandsMode,
5244
- browser: _optionalChain([transformOptions, 'optionalAccess', _452 => _452.ssr]) !== true,
5245
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _453 => _453.strategy]) === "interaction",
5280
+ browser: _optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) !== true,
5281
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _455 => _455.strategy]) === "interaction",
5246
5282
  runtimeModule
5247
5283
  });
5248
5284
  if (!transformedBoundary) {
@@ -5251,14 +5287,14 @@ export { manifest };
5251
5287
  );
5252
5288
  }
5253
5289
  transformedCode = transformedBoundary;
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))) {
5290
+ } else if (selectedForIsolatedHydration && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkGWFNJLDNcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5255
5291
  rendererIslandModule = true;
5256
- if (_optionalChain([transformOptions, 'optionalAccess', _454 => _454.ssr]) === true) {
5292
+ if (_optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) === true) {
5257
5293
  const renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5258
5294
  const transformedBoundary = transformIsolatedClientBoundaryModule({
5259
5295
  code: transformedCode,
5260
5296
  moduleReference: _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, cleanId, root),
5261
- islandStrategy: _nullishCoalesce(_chunkZCT6B5PQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5297
+ islandStrategy: _nullishCoalesce(_chunkGWFNJLDNcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5262
5298
  parse: (source) => this.parse(source),
5263
5299
  withIsland: renderer.server
5264
5300
  });
@@ -5291,7 +5327,7 @@ export { manifest };
5291
5327
  );
5292
5328
  return;
5293
5329
  }` : "";
5294
- const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5330
+ const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _457 => _457.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5295
5331
  const hmrCode = rendererIslandHmr ? `
5296
5332
  if (import.meta.hot) {
5297
5333
  import.meta.hot.accept((newModule) => {
@@ -5301,7 +5337,7 @@ if (import.meta.hot) {
5301
5337
  }
5302
5338
  });
5303
5339
  }
5304
- ` : _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5340
+ ` : _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5305
5341
  if (import.meta.hot) {
5306
5342
  import.meta.hot.accept((newModule) => {
5307
5343
  ${isolatedHmrUpdate}
@@ -5357,14 +5393,14 @@ if (import.meta.hot) {
5357
5393
  }
5358
5394
  _chunk7ZDLE77Pcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5359
5395
  _chunk7ZDLE77Pcjs.logger.info("Pre-rendering SSG pages...");
5360
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _457 => _457.config, 'access', _458 => _458.root]) || process.cwd(), options.outDir || "dist");
5396
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _459 => _459.config, 'access', _460 => _460.root]) || process.cwd(), options.outDir || "dist");
5361
5397
  const clientDir = path6.join(outDir, "client");
5362
5398
  for (const page of ssgPages) {
5363
5399
  try {
5364
5400
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5365
5401
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5366
5402
  const mod = await routeManager.loadRouteModule(page.filePath);
5367
- if (!_optionalChain([mod, 'optionalAccess', _459 => _459.default])) return;
5403
+ if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
5368
5404
  const { layouts } = routeManager.matchRoute(page.urlPath);
5369
5405
  const layoutModules = await Promise.all(
5370
5406
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5396,7 +5432,7 @@ if (import.meta.hot) {
5396
5432
  const i18nSnapshot = _chunkYCIFGYBYcjs.getFarmI18nClientSnapshot.call(void 0, );
5397
5433
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5398
5434
  const fullHtml = `<!DOCTYPE html>
5399
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _460 => _460.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5435
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5400
5436
  <head>
5401
5437
  <meta charset="utf-8">
5402
5438
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5441,11 +5477,11 @@ if (import.meta.hot) {
5441
5477
  watchChange(id, change) {
5442
5478
  const watched = _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, id);
5443
5479
  const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
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, );
5480
+ if (appSource) _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
5481
+ _chunkGWFNJLDNcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5482
+ _chunkGWFNJLDNcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5483
+ _chunkTAXZQNFZcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5484
+ _chunkGWFNJLDNcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5449
5485
  },
5450
5486
  async handleHotUpdate(ctx) {
5451
5487
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5470,7 +5506,7 @@ if (import.meta.hot) {
5470
5506
  server2.moduleGraph.invalidateModule(mod);
5471
5507
  }
5472
5508
  }
5473
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _465 => _465.getConfig, 'call', _466 => _466()]);
5509
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
5474
5510
  const normalizedFile = file.replace(/\\/g, "/");
5475
5511
  const reloadAfterEdit = () => {
5476
5512
  for (const files of pendingRouteReloads) {
@@ -5478,31 +5514,31 @@ if (import.meta.hot) {
5478
5514
  }
5479
5515
  server2.ws.send({ type: "full-reload", path: "*" });
5480
5516
  };
5481
- if (normalizedFile.includes(_chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5517
+ if (normalizedFile.includes(_chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5482
5518
  path6.posix.join(
5483
- _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _467 => _467.root]) || options.root || server2.config.root),
5484
- _chunkZCT6B5PQcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5519
+ _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
5520
+ _chunkGWFNJLDNcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5485
5521
  )
5486
5522
  ))
5487
5523
  return modules;
5488
- if (currentFarmConfig && _chunkMNBFSAWFcjs.isFarmAPIRouteFileName.call(void 0,
5524
+ if (currentFarmConfig && _chunkYCGOQKVCcjs.isFarmAPIRouteFileName.call(void 0,
5489
5525
  path6.posix.basename(normalizedFile),
5490
- _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5526
+ _chunkYCGOQKVCcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5491
5527
  ) && _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5492
5528
  (appDir) => normalizedFile.startsWith(`${_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appDir)}/api/`)
5493
5529
  )) {
5494
5530
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5495
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _468 => _468(`updated ${file}`)]);
5531
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5496
5532
  reloadAfterEdit();
5497
5533
  return [];
5498
5534
  }
5499
5535
  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;
5500
- if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkPYPHM7AScjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5536
+ if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkLH7S7FI3cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5501
5537
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5502
5538
  for (const mod of modules) {
5503
5539
  server2.moduleGraph.invalidateModule(mod);
5504
5540
  }
5505
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5541
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5506
5542
  reloadAfterEdit();
5507
5543
  return [];
5508
5544
  }
@@ -5512,22 +5548,27 @@ if (import.meta.hot) {
5512
5548
  for (const mod of modules) {
5513
5549
  server2.moduleGraph.invalidateModule(mod);
5514
5550
  }
5515
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5551
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5516
5552
  reloadAfterEdit();
5517
5553
  return [];
5518
5554
  }
5519
5555
  if (apiRouteManager && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5520
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5556
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5521
5557
  }
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()]);
5558
+ if (_optionalChain([refreshFarmDocsConfig, 'optionalCall', _474 => _474(file)])) {
5559
+ logUpdate("PAGE", `updated ${path6.basename(file)}`);
5560
+ reloadAfterEdit();
5561
+ return [];
5562
+ }
5563
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5564
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5524
5565
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5525
- const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _476 => _476.renderer])) && planRouteManager !== void 0;
5566
+ const tracksAsyncOwnerIslands = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5526
5567
  let clientPlanCurrent = false;
5527
5568
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5528
5569
  const routeManager = planRouteManager;
5529
- await _optionalChain([ctx, 'access', _477 => _477.read, 'optionalCall', _478 => _478()]);
5530
- if (_optionalChain([routeManager, 'optionalAccess', _479 => _479.isEditPlanNeutral, 'call', _480 => _480(file)])) {
5570
+ await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5571
+ if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5531
5572
  clientPlanCurrent = true;
5532
5573
  } else if (routeManager) {
5533
5574
  routeManager.noteSourceChange(file, "update");
@@ -5571,7 +5612,7 @@ if (import.meta.hot) {
5571
5612
  }
5572
5613
  }
5573
5614
  }
5574
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _481 => _481.getRouteManager, 'call', _482 => _482(), 'access', _483 => _483.isRendererRouteModule, 'call', _484 => _484(normalizedFile)]) === true;
5615
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5575
5616
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5576
5617
  if (normalizedFile.includes("middleware.")) {
5577
5618
  if (middlewareManager) {
@@ -5589,7 +5630,7 @@ if (import.meta.hot) {
5589
5630
  }
5590
5631
  return [];
5591
5632
  }
5592
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _485 => _485.getRouteManager, 'call', _486 => _486(), 'access', _487 => _487.invalidateClientManifest, 'call', _488 => _488()]);
5633
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5593
5634
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5594
5635
  if (manifestModule) {
5595
5636
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5605,14 +5646,14 @@ if (import.meta.hot) {
5605
5646
  }
5606
5647
  }
5607
5648
  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]),
5649
+ _optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph]),
5609
5650
  normalizedFile,
5610
5651
  planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5611
5652
  )) {
5612
5653
  reloadAfterEdit();
5613
5654
  return [];
5614
5655
  }
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) {
5656
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _495 => _495.environments, 'access', _496 => _496.client, 'optionalAccess', _497 => _497.moduleGraph, 'access', _498 => _498.getModulesByFile, 'call', _499 => _499(normalizedFile), 'optionalAccess', _500 => _500.size]) && _chunkVB7P66Q4cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5616
5657
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5617
5658
  reloadAfterEdit();
5618
5659
  return [];
@@ -5620,10 +5661,11 @@ if (import.meta.hot) {
5620
5661
  return modules;
5621
5662
  }
5622
5663
  };
5623
- if (!deferredSetup) return plugin;
5624
5664
  const setUpDevServer = plugin.configureServer;
5665
+ plugin.configureServer = { order: "post", handler: setUpDevServer };
5666
+ if (!deferredSetup) return plugin;
5625
5667
  let deferred = false;
5626
- plugin.configureServer = function(viteServer) {
5668
+ const setUpDeferredDevServer = function(viteServer) {
5627
5669
  if (deferred) {
5628
5670
  deferredGates = void 0;
5629
5671
  return setUpDevServer.call(this, viteServer);
@@ -5653,6 +5695,7 @@ if (import.meta.hot) {
5653
5695
  viteServer.middlewares.use(post);
5654
5696
  };
5655
5697
  };
5698
+ plugin.configureServer = { order: "post", handler: setUpDeferredDevServer };
5656
5699
  return plugin;
5657
5700
  }
5658
5701
  function runFarmMiddlewareWithNavigation(renderer, middlewareRequest, req, res, execute) {
@@ -5710,7 +5753,7 @@ function createPageDataMiddlewareResponse(res) {
5710
5753
  return (...args) => {
5711
5754
  if (captures(target.statusCode, target.getHeader("location"))) {
5712
5755
  const callback = args.find((arg) => typeof arg === "function");
5713
- _optionalChain([callback, 'optionalCall', _498 => _498()]);
5756
+ _optionalChain([callback, 'optionalCall', _501 => _501()]);
5714
5757
  return property === "write" ? true : response;
5715
5758
  }
5716
5759
  return target[property](...args);
@@ -5774,27 +5817,27 @@ function isFarmClientVirtualId(id) {
5774
5817
  }
5775
5818
  function isClientEnvironment(context, loadOptions) {
5776
5819
  const environment = context.environment;
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;
5820
+ if (_optionalChain([environment, 'optionalAccess', _502 => _502.config, 'optionalAccess', _503 => _503.consumer])) return environment.config.consumer === "client";
5821
+ if (_optionalChain([environment, 'optionalAccess', _504 => _504.name])) return environment.name === "client";
5822
+ return _optionalChain([loadOptions, 'optionalAccess', _505 => _505.ssr]) !== true;
5780
5823
  }
5781
5824
  function invalidateProgrammaticClientRouteModules(server) {
5782
- const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5825
+ const graph = _optionalChain([server, 'access', _506 => _506.environments, 'optionalAccess', _507 => _507.client, 'optionalAccess', _508 => _508.moduleGraph]);
5783
5826
  if (!graph) return;
5784
5827
  for (const [id, module] of graph.idToModuleMap) {
5785
- if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
5828
+ if (_chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
5786
5829
  }
5787
5830
  }
5788
5831
  function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, clientRoutes, watchFile) {
5789
- const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5832
+ const parsed = _chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5790
5833
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5791
5834
  watchFile(routesFile);
5792
- return _chunkZCT6B5PQcjs.generateProgrammaticClientRouteModule.call(void 0, {
5835
+ return _chunkGWFNJLDNcjs.generateProgrammaticClientRouteModule.call(void 0, {
5793
5836
  kind: parsed.kind,
5794
5837
  routePath: parsed.routePath,
5795
5838
  routesFile,
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)
5839
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _509 => _509.routes, 'access', _510 => _510.get, 'call', _511 => _511(
5840
+ _chunkGWFNJLDNcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5798
5841
  )]),
5799
5842
  // React's client module exports no createElement; the main client entry imports React too.
5800
5843
  rendererClient: _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
@@ -5802,7 +5845,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5802
5845
  });
5803
5846
  }
5804
5847
  function resolveRealModuleFile(filePath, root) {
5805
- const resolved = _nullishCoalesce(_chunkZCT6B5PQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5848
+ const resolved = _nullishCoalesce(_chunkGWFNJLDNcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5806
5849
  try {
5807
5850
  return _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5808
5851
  } catch (e29) {
@@ -5810,7 +5853,7 @@ function resolveRealModuleFile(filePath, root) {
5810
5853
  }
5811
5854
  }
5812
5855
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER) {
5813
- const parsed = _chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5856
+ const parsed = _chunkLH7S7FI3cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5814
5857
  if (!parsed) {
5815
5858
  return "";
5816
5859
  }
@@ -6116,12 +6159,12 @@ async function parseRouteModuleProps(routeModule, input) {
6116
6159
  }
6117
6160
  const schemas = routeModule.__farmRouteSchemas;
6118
6161
  const params = parseRouteModuleSchema(
6119
- _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
6162
+ _optionalChain([schemas, 'optionalAccess', _512 => _512.params]),
6120
6163
  input.props.params,
6121
6164
  "params",
6122
6165
  input.routePath
6123
6166
  );
6124
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6167
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _513 => _513.search]), input.search, "search", input.routePath);
6125
6168
  return {
6126
6169
  ...input.props,
6127
6170
  params,
@@ -6141,12 +6184,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6141
6184
  }
6142
6185
  }
6143
6186
  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,
6187
+ const providerClientCode = _chunkTAXZQNFZcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6145
6188
  integrationProviders,
6146
6189
  root,
6147
6190
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
6148
6191
  );
6149
- const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
6192
+ const clientPluginEntry = _chunkWAQIO2VDcjs.generateFarmClientPluginEntryCode.call(void 0,
6150
6193
  plugins,
6151
6194
  root,
6152
6195
  srcDir,
@@ -6239,7 +6282,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6239
6282
  return null;
6240
6283
  }
6241
6284
  }
6242
- ${islandValues ? `${_chunkVWPGK6UVcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6285
+ ${islandValues ? `${_chunkTAXZQNFZcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6243
6286
  let farmLastRouteState = null;
6244
6287
 
6245
6288
  // A hot update to a layout tree's client module renders the route again.
@@ -7080,7 +7123,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
7080
7123
  return loadedLayouts;
7081
7124
  }
7082
7125
 
7083
- ${_chunkVWPGK6UVcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7126
+ ${_chunkTAXZQNFZcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7084
7127
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
7085
7128
  let wrapped = element;
7086
7129
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7380,7 +7423,7 @@ function readActiveLayoutPatterns() {
7380
7423
  );
7381
7424
  }
7382
7425
 
7383
- ${_chunkVWPGK6UVcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7426
+ ${_chunkTAXZQNFZcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7384
7427
 
7385
7428
  function activateFragmentScripts(root) {
7386
7429
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7439,7 +7482,7 @@ function getLayoutShell(root, patterns, index, find) {
7439
7482
  return shell.innerHTML;
7440
7483
  }
7441
7484
 
7442
- ${islandValues ? _chunkVWPGK6UVcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7485
+ ${islandValues ? _chunkTAXZQNFZcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7443
7486
  container,
7444
7487
  fragment,
7445
7488
  currentPatterns,
@@ -7514,9 +7557,9 @@ ${islandValues ? `
7514
7557
  return nextTarget;
7515
7558
  }
7516
7559
 
7517
- ${islandValues ? `${_chunkVWPGK6UVcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7560
+ ${islandValues ? `${_chunkTAXZQNFZcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7518
7561
 
7519
- ${_chunkVWPGK6UVcjs.FARM_EARLY_NAVIGATION_SOURCE}
7562
+ ${_chunkTAXZQNFZcjs.FARM_EARLY_NAVIGATION_SOURCE}
7520
7563
 
7521
7564
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7522
7565
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -8220,9 +8263,9 @@ function generateClientManifest(bundle) {
8220
8263
  return manifest;
8221
8264
  }
8222
8265
  async function defineConfig(config = {}) {
8223
- const tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, );
8266
+ const tailwindVitePlugin = await _chunkWAQIO2VDcjs.loadTailwindVitePlugin.call(void 0, );
8224
8267
  const appRoot = path6.resolve(config.root || process.cwd());
8225
- if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8268
+ if (_optionalChain([config, 'access', _514 => _514.extends, 'optionalAccess', _515 => _515.length])) {
8226
8269
  const { config: layeredConfig } = await import("./layers-6R55QDT5.cjs").then(
8227
8270
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8228
8271
  root: appRoot,
@@ -8232,11 +8275,11 @@ async function defineConfig(config = {}) {
8232
8275
  config = layeredConfig;
8233
8276
  }
8234
8277
  config.renderer = _chunkLEZJZX4Ccjs.resolveFarmRenderer.call(void 0, config.renderer);
8235
- config.images = _chunkVWPGK6UVcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8278
+ config.images = _chunkTAXZQNFZcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8236
8279
  const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8237
8280
  ssr: true
8238
8281
  });
8239
- const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkQCVP22KWcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8282
+ const reactRefreshPlugins = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk5RYBQKBYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8240
8283
  const nodeBuiltinStubs = {
8241
8284
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8242
8285
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8324,13 +8367,13 @@ async function defineConfig(config = {}) {
8324
8367
  if (!serverStarted) {
8325
8368
  serverStarted = true;
8326
8369
  const elapsed = Date.now() - startTime;
8327
- const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8370
+ const address = _optionalChain([server, 'access', _516 => _516.httpServer, 'optionalAccess', _517 => _517.address, 'call', _518 => _518()]);
8328
8371
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8329
8372
  const hostConfig = server.config.server.host;
8330
8373
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8331
8374
  console.log("");
8332
8375
  console.log(
8333
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkZ7YIQ7AJcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8376
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkC2J5LMH6cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8334
8377
  );
8335
8378
  console.log("");
8336
8379
  console.log(
@@ -8363,8 +8406,8 @@ async function defineConfig(config = {}) {
8363
8406
  return {
8364
8407
  plugins: [
8365
8408
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8366
- _chunkQCVP22KWcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8367
- _chunkVWPGK6UVcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8409
+ _chunk5RYBQKBYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8410
+ _chunkTAXZQNFZcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8368
8411
  tailwindVitePlugin,
8369
8412
  ...rendererVitePlugins,
8370
8413
  ...reactRefreshPlugins,
@@ -8374,14 +8417,14 @@ async function defineConfig(config = {}) {
8374
8417
  farmNavigationPlugin(config.renderer),
8375
8418
  farmIslandContainersPlugin(config),
8376
8419
  farmPlugin(config),
8377
- _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8420
+ _chunkGWFNJLDNcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8378
8421
  farmBrandingPlugin
8379
8422
  ],
8380
8423
  customLogger: farmLogger,
8381
8424
  clearScreen: false,
8382
8425
  optimizeDeps: {
8383
- ..._chunkVWPGK6UVcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8384
- _chunkVWPGK6UVcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8426
+ ..._chunkTAXZQNFZcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8427
+ _chunkTAXZQNFZcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8385
8428
  appRoot,
8386
8429
  _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8387
8430
  ),
@@ -8425,7 +8468,7 @@ async function defineConfig(config = {}) {
8425
8468
  // Stub out problematic server-only modules during dev mode
8426
8469
  alias: {
8427
8470
  ..._chunkPFVNPOKNcjs.getFarmLayerAliases.call(void 0, config.layers),
8428
- ..._chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8471
+ ..._chunkTAXZQNFZcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8429
8472
  // Nitro internals that should not be resolved in browser
8430
8473
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8431
8474
  "@poppinss/dumper": "data:text/javascript,export default {};",