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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (687) hide show
  1. package/README.md +1 -3
  2. package/dist/THIRD-PARTY-LICENSES.md +3220 -0
  3. package/dist/after.cjs +3 -3
  4. package/dist/after.mjs +1 -1
  5. package/dist/{agent-mcp-handler-VX4NDDHR.mjs → agent-mcp-handler-BY7VJQ4W.mjs} +1 -1
  6. package/dist/agent-mcp-handler-S4UTE7NO.cjs +21 -0
  7. package/dist/{agent-mcp.d-DhCEzIfu.d.mts → agent-mcp.d-DhZf5-v0.d.mts} +1 -1
  8. package/dist/{agent-mcp.d-DBaonhLg.d.ts → agent-mcp.d-xPua9Zdz.d.ts} +1 -1
  9. package/dist/agent-runtime.cjs +25 -22
  10. package/dist/agent-runtime.d.mts +1 -1
  11. package/dist/agent-runtime.d.ts +1 -1
  12. package/dist/agent-runtime.mjs +2 -2
  13. package/dist/{analyzer-T2U345WL.mjs → analyzer-LQ4LVDCW.mjs} +3 -3
  14. package/dist/analyzer-ZFC2L6NZ.cjs +17 -0
  15. package/dist/api/client.cjs +16 -16
  16. package/dist/api/client.mjs +1 -1
  17. package/dist/api/client.native.cjs +21 -18
  18. package/dist/api/client.native.mjs +1 -1
  19. package/dist/api/node.cjs +29 -26
  20. package/dist/api/node.d.mts +3 -3
  21. package/dist/api/node.d.ts +3 -3
  22. package/dist/api/node.mjs +1 -1
  23. package/dist/api/route-manager.cjs +45 -45
  24. package/dist/api/route-manager.d.mts +3 -3
  25. package/dist/api/route-manager.d.ts +3 -3
  26. package/dist/api/route-manager.mjs +5 -5
  27. package/dist/api/runtime.cjs +25 -25
  28. package/dist/api/runtime.d.mts +2 -2
  29. package/dist/api/runtime.d.ts +2 -2
  30. package/dist/api/runtime.mjs +1 -1
  31. package/dist/api.cjs +57 -57
  32. package/dist/api.d.mts +4 -4
  33. package/dist/api.d.ts +4 -4
  34. package/dist/api.mjs +6 -6
  35. package/dist/{app-manifest.d-uE0JGZKN.d.mts → app-manifest.d-Bq9VWtpk.d.mts} +1 -1
  36. package/dist/{app-manifest.d-nLVFFd7N.d.ts → app-manifest.d-D6l1Wkn6.d.ts} +1 -1
  37. package/dist/app-markdown-compiler-4RCCOTTF.cjs +33007 -0
  38. package/dist/app-markdown-compiler-OM2AMFRK.mjs +32402 -0
  39. package/dist/app-markdown.cjs +16 -16
  40. package/dist/app-markdown.d.mts +2 -2
  41. package/dist/app-markdown.d.ts +2 -2
  42. package/dist/app-markdown.mjs +3 -3
  43. package/dist/{app.d-DGGcNXV7.d.mts → app.d-Bn1bqBkf.d.mts} +17 -7
  44. package/dist/{app.d-CwVkAUEU.d.ts → app.d-gnTrW72o.d.ts} +17 -7
  45. package/dist/cache.cjs +8 -8
  46. package/dist/cache.mjs +1 -1
  47. package/dist/{chunk-DA432P2F.cjs → chunk-25CHWAZY.cjs} +14 -10
  48. package/dist/{chunk-JDT733EW.cjs → chunk-27IPPPCV.cjs} +16 -19
  49. package/dist/{chunk-X2SMVPLH.mjs → chunk-2FBFJO2Z.mjs} +8 -5
  50. package/dist/{chunk-PHCJJJZV.cjs → chunk-2HC46EGU.cjs} +6 -2
  51. package/dist/{chunk-MF3IA2AW.cjs → chunk-2L4M6YUG.cjs} +6 -1
  52. package/dist/{chunk-RBSGFS5X.cjs → chunk-2LHO4HTP.cjs} +62 -54
  53. package/dist/{chunk-CIY74JLV.cjs → chunk-2RA2VIKN.cjs} +9 -5
  54. package/dist/{chunk-A3LNXQJJ.cjs → chunk-2VLW3HWJ.cjs} +9 -2
  55. package/dist/{chunk-4EBC7EMW.cjs → chunk-323JTLXR.cjs} +6 -1
  56. package/dist/{chunk-7KJJ4SBS.cjs → chunk-32HGOX3M.cjs} +6 -1
  57. package/dist/{chunk-RKQOMG2X.cjs → chunk-3ACTVXZG.cjs} +9 -5
  58. package/dist/{chunk-N3H7UPBM.cjs → chunk-3EZHMZGD.cjs} +6 -1
  59. package/dist/{chunk-LQWIIBI2.cjs → chunk-3KLDTMIC.cjs} +6 -1
  60. package/dist/{chunk-OO7DYIJD.cjs → chunk-3YT7DIIS.cjs} +7 -1
  61. package/dist/{chunk-ILQSRLKK.cjs → chunk-4A6WSOZH.cjs} +55 -49
  62. package/dist/{chunk-CBB7I6HW.cjs → chunk-4ER5KYSC.cjs} +9 -5
  63. package/dist/{chunk-E5UN4OWX.cjs → chunk-4JARM2QQ.cjs} +6 -1
  64. package/dist/{chunk-VGVRGGP4.cjs → chunk-4JCX33RZ.cjs} +13 -8
  65. package/dist/chunk-4RLFAN7T.cjs +6 -0
  66. package/dist/{chunk-OZUINP2P.cjs → chunk-4USE4SEU.cjs} +19 -15
  67. package/dist/{chunk-LQ3FISSD.mjs → chunk-54INSSWI.mjs} +66 -53
  68. package/dist/{chunk-PENBZAHJ.cjs → chunk-57OAZCWQ.cjs} +6 -1
  69. package/dist/{chunk-JYQ6DGPW.cjs → chunk-5P3TZGS3.cjs} +52 -45
  70. package/dist/{chunk-Z3RM3VA2.mjs → chunk-5VXVRMXK.mjs} +11 -1
  71. package/dist/{chunk-OZC2JPW6.cjs → chunk-5XYJ5KRN.cjs} +6 -1
  72. package/dist/{chunk-QKW6DLDT.cjs → chunk-5YT2ZSWS.cjs} +17 -13
  73. package/dist/{chunk-QCKSYYXK.cjs → chunk-63S7DAEG.cjs} +21 -17
  74. package/dist/{chunk-FDGYDQGL.cjs → chunk-66WIOZXX.cjs} +7 -1
  75. package/dist/{chunk-MHKPXX3J.cjs → chunk-6AUPJYHF.cjs} +13 -9
  76. package/dist/{chunk-DVJM55D2.cjs → chunk-6FIY4KBC.cjs} +6 -1
  77. package/dist/{chunk-TIZJYHB7.mjs → chunk-6IUWKO2Q.mjs} +15 -0
  78. package/dist/{chunk-VWIW47FW.cjs → chunk-6K7LEL2T.cjs} +6 -1
  79. package/dist/{chunk-UZCMMJJT.cjs → chunk-6NQ63L6N.cjs} +6 -1
  80. package/dist/{chunk-BTVDYS4B.cjs → chunk-6QCZWAGO.cjs} +6 -1
  81. package/dist/{chunk-RDADQG5S.cjs → chunk-6QWCFVGL.cjs} +14 -7
  82. package/dist/{chunk-JRGR5Z4K.cjs → chunk-6VC7NUY3.cjs} +6 -1
  83. package/dist/{chunk-CKPTIEDX.cjs → chunk-7BFFBYLN.cjs} +6 -1
  84. package/dist/{chunk-7Q7UB4TL.cjs → chunk-7GKZDRY2.cjs} +9 -5
  85. package/dist/{chunk-UCJCU2IL.cjs → chunk-7JI7W2MD.cjs} +34 -30
  86. package/dist/{chunk-C7LCTVJ2.cjs → chunk-7JZVCHNF.cjs} +10 -6
  87. package/dist/{chunk-QZUCVJZJ.cjs → chunk-7M3X4CBY.cjs} +6 -1
  88. package/dist/{chunk-7JUIK547.cjs → chunk-7MQMWGTL.cjs} +6 -1
  89. package/dist/{chunk-PIUTGRDI.cjs → chunk-7O3YJ6NP.cjs} +6 -1
  90. package/dist/{chunk-SXCL2MIN.cjs → chunk-7V5MQSBL.cjs} +9 -1
  91. package/dist/{chunk-7U4XF76R.cjs → chunk-7ZDLE77P.cjs} +12 -8
  92. package/dist/{chunk-NU5XLYRN.cjs → chunk-A2ELHZBZ.cjs} +10 -1
  93. package/dist/{chunk-RZI6436F.cjs → chunk-ADCVSTFV.cjs} +18 -11
  94. package/dist/chunk-AZJEQ5CR.cjs +6 -0
  95. package/dist/{chunk-ZMSVKVI3.cjs → chunk-B2VSX33T.cjs} +6 -1
  96. package/dist/{chunk-AQIRXBBY.cjs → chunk-B6JPBPBQ.cjs} +6 -1
  97. package/dist/{chunk-W76C7TCW.cjs → chunk-BNVQSUZK.cjs} +6 -2
  98. package/dist/{chunk-MNUYXZV7.cjs → chunk-BNWADCG2.cjs} +6 -1
  99. package/dist/{chunk-CCAUIBIS.cjs → chunk-BRWSQDKO.cjs} +10 -1
  100. package/dist/{chunk-KQS27YN7.cjs → chunk-C6DR4JAR.cjs} +14 -10
  101. package/dist/{chunk-Y3WG64CP.cjs → chunk-CH2JX3CM.cjs} +6 -1
  102. package/dist/{chunk-KDQKTX3Q.cjs → chunk-COMBIEAP.cjs} +44 -36
  103. package/dist/{chunk-YUQUGVSV.cjs → chunk-CTTXHHZG.cjs} +50 -46
  104. package/dist/{chunk-FDZZ6K3N.cjs → chunk-CUW7K4AU.cjs} +14 -10
  105. package/dist/chunk-CWSUKW2H.cjs +6 -0
  106. package/dist/chunk-CYUTK4JP.cjs +52 -0
  107. package/dist/{chunk-COK4IXOO.mjs → chunk-D7KBMJ7L.mjs} +1 -1
  108. package/dist/{chunk-T3SMMLSB.cjs → chunk-DB4NOIQC.cjs} +12 -8
  109. package/dist/{chunk-N2ZMSSPP.cjs → chunk-DNERKYN4.cjs} +77 -70
  110. package/dist/{chunk-OWOUTKIJ.cjs → chunk-DQYMTSF3.cjs} +6 -1
  111. package/dist/{chunk-7V5M43ND.mjs → chunk-DVL3UVYT.mjs} +2 -2
  112. package/dist/{chunk-UNOXV37V.cjs → chunk-DYGHX2UR.cjs} +6 -1
  113. package/dist/{chunk-LSHX2H5G.cjs → chunk-EBE6BK54.cjs} +6 -1
  114. package/dist/{chunk-WT6RAN2I.cjs → chunk-EGMJ5KEU.cjs} +6 -1
  115. package/dist/{chunk-22KXTL3I.cjs → chunk-EJLMRNSV.cjs} +24 -19
  116. package/dist/{chunk-RDNKQ5MK.cjs → chunk-EMM3YXXI.cjs} +19 -15
  117. package/dist/{chunk-EZUTDTFM.cjs → chunk-ERSLQ4C7.cjs} +18 -11
  118. package/dist/{chunk-4WXNTAOM.mjs → chunk-EUVHELJL.mjs} +1 -1
  119. package/dist/{chunk-VGZIIOU6.cjs → chunk-EWPH5IOC.cjs} +26 -19
  120. package/dist/{chunk-J6TZRYCO.cjs → chunk-F5JTXLS7.cjs} +6 -1
  121. package/dist/{chunk-UWDFH3ZV.mjs → chunk-FFROR7QD.mjs} +1 -1
  122. package/dist/{chunk-HUGPJFOC.cjs → chunk-G22QP2MX.cjs} +9 -5
  123. package/dist/{chunk-PMJSG4JS.cjs → chunk-G5KGLMPN.cjs} +6 -1
  124. package/dist/{chunk-4Q263EQI.mjs → chunk-GAD63TH7.mjs} +9 -9
  125. package/dist/{chunk-R5U7OIPI.cjs → chunk-GAII22G2.cjs} +6 -1
  126. package/dist/{chunk-SSFAPTRD.mjs → chunk-GK2RCRT2.mjs} +1 -1
  127. package/dist/{chunk-6CTFVBAT.cjs → chunk-GKYOFMPQ.cjs} +6 -1
  128. package/dist/{chunk-JYT7AN37.cjs → chunk-GLP3ID53.cjs} +6 -1
  129. package/dist/{chunk-QBJ6N5MT.mjs → chunk-GN2RXH72.mjs} +1 -1
  130. package/dist/{chunk-RQRTH57V.cjs → chunk-GQONHUMI.cjs} +6 -1
  131. package/dist/{chunk-EOXPRC2C.cjs → chunk-GQQID5IB.cjs} +7 -1
  132. package/dist/{chunk-IUKBPBM7.cjs → chunk-GUDYDNKU.cjs} +6 -1
  133. package/dist/{chunk-6GJZJAED.mjs → chunk-GUNPDMSX.mjs} +1 -1
  134. package/dist/{chunk-Z43CIBUR.cjs → chunk-GUYGMTWA.cjs} +20 -13
  135. package/dist/{chunk-QO24II6C.mjs → chunk-GXWCR7PP.mjs} +7 -3
  136. package/dist/{chunk-VS7HLH4S.cjs → chunk-GYH2B4YQ.cjs} +12 -8
  137. package/dist/{chunk-RGMUS3HO.cjs → chunk-H3TYWCMG.cjs} +18 -14
  138. package/dist/{chunk-2OF5RPVU.cjs → chunk-H5AC3XSE.cjs} +18 -14
  139. package/dist/{chunk-ZIOFRBIU.cjs → chunk-H7INTSUK.cjs} +15 -9
  140. package/dist/{chunk-RFNQTQ44.cjs → chunk-HBRCMX24.cjs} +10 -5
  141. package/dist/{chunk-UA77C2ZA.cjs → chunk-HF3JJPH4.cjs} +58 -50
  142. package/dist/{chunk-HV6CYSMF.mjs → chunk-HHZURH4U.mjs} +1 -17
  143. package/dist/{chunk-JP5TWUK2.cjs → chunk-HSAHQBMG.cjs} +8 -4
  144. package/dist/{chunk-OQOII62L.mjs → chunk-HYYOVRED.mjs} +2 -2
  145. package/dist/{chunk-3BTN3NP7.cjs → chunk-I5PDHLKE.cjs} +6 -2
  146. package/dist/{chunk-2RSVYJT6.cjs → chunk-IBZW57NW.cjs} +9 -5
  147. package/dist/{chunk-KORZ6PRE.cjs → chunk-IDUGG7VR.cjs} +6 -1
  148. package/dist/{chunk-6JHZPB52.cjs → chunk-IEZFFXSC.cjs} +10 -6
  149. package/dist/{chunk-VACYUMXW.cjs → chunk-IGA3OTFY.cjs} +37 -29
  150. package/dist/{chunk-YSRZSKQB.cjs → chunk-IGBQSUT5.cjs} +55 -40
  151. package/dist/{chunk-JIBEFLQ7.cjs → chunk-IKYNDANT.cjs} +7 -1
  152. package/dist/{chunk-KBGZ5FD6.cjs → chunk-IVEV44O2.cjs} +6 -2
  153. package/dist/{chunk-MCSRMEQV.cjs → chunk-J2JMESBJ.cjs} +6 -1
  154. package/dist/{chunk-WMRGIQTA.cjs → chunk-J3RIMCBD.cjs} +6 -1
  155. package/dist/{chunk-MWAWMFG3.cjs → chunk-J6JAUJPC.cjs} +737 -709
  156. package/dist/{chunk-N4AQNEXR.cjs → chunk-JIBZ6SCC.cjs} +6 -1
  157. package/dist/{chunk-SWPLGPYF.cjs → chunk-JKNQMGZE.cjs} +28 -24
  158. package/dist/{chunk-IZYFP7IN.cjs → chunk-JOSR2E2C.cjs} +17 -13
  159. package/dist/{chunk-AOKXITZ6.cjs → chunk-JOZDAIKZ.cjs} +6 -1
  160. package/dist/{chunk-EODGIFI7.cjs → chunk-JYQMGMKT.cjs} +16 -4
  161. package/dist/{chunk-J6RFB324.cjs → chunk-JZCUDAH2.cjs} +6 -1
  162. package/dist/{chunk-N2BRIN7I.mjs → chunk-K44IR6WC.mjs} +1 -1
  163. package/dist/{chunk-SUCDVKUB.cjs → chunk-K6LZMZNB.cjs} +6 -1
  164. package/dist/{chunk-GYJT2U7J.cjs → chunk-KAD5WBY4.cjs} +9 -5
  165. package/dist/{chunk-O4JYMU5N.cjs → chunk-KDUVIJSZ.cjs} +22 -18
  166. package/dist/{chunk-2LHZD3OP.cjs → chunk-KEBD377T.cjs} +6 -2
  167. package/dist/{chunk-3DE6RK7K.cjs → chunk-KHTJVI6B.cjs} +6 -1
  168. package/dist/{chunk-OY5XDG24.cjs → chunk-KI3B3H5K.cjs} +9 -5
  169. package/dist/{chunk-ANKMAGFJ.mjs → chunk-KJW6KEOZ.mjs} +1 -1
  170. package/dist/{chunk-4A6A6P4T.mjs → chunk-KKXGBQ2K.mjs} +3 -3
  171. package/dist/{chunk-4IE3YK7U.mjs → chunk-KQXYBJES.mjs} +14 -11
  172. package/dist/{chunk-P2355C6E.cjs → chunk-KSRWTQ6J.cjs} +6 -1
  173. package/dist/{chunk-SHIWRBFI.cjs → chunk-KUG3P3GY.cjs} +6 -1
  174. package/dist/{chunk-T7HGXF7D.cjs → chunk-KXCPX3HE.cjs} +11 -7
  175. package/dist/{chunk-C5QHZ626.cjs → chunk-KXXZDS7C.cjs} +6 -1
  176. package/dist/{chunk-DUIP64BF.cjs → chunk-KYFTDHNN.cjs} +6 -1
  177. package/dist/{chunk-VXCFJWK5.cjs → chunk-L6CW5AWM.cjs} +6 -1
  178. package/dist/{chunk-XGPRM7OK.cjs → chunk-LEK3P2ZD.cjs} +16 -7
  179. package/dist/{chunk-T7UC2ORA.cjs → chunk-LEZJZX4C.cjs} +7 -18
  180. package/dist/{chunk-HA7YRO53.cjs → chunk-LF7HAALM.cjs} +6 -1
  181. package/dist/{chunk-2KMIJDY6.cjs → chunk-LG62AYPQ.cjs} +6 -1
  182. package/dist/{chunk-OLIWLN4I.cjs → chunk-LGL5QKUJ.cjs} +24 -20
  183. package/dist/{chunk-SMUW7UST.mjs → chunk-LO5BNR6Y.mjs} +7 -2
  184. package/dist/{chunk-PWDBWXQI.cjs → chunk-LVYUTMW4.cjs} +6 -1
  185. package/dist/{chunk-XRRHPBG2.cjs → chunk-M6W3AN57.cjs} +6 -1
  186. package/dist/{chunk-PZXYAWYG.cjs → chunk-M7RS7HSB.cjs} +13 -8
  187. package/dist/{chunk-I5KPOXUE.mjs → chunk-MEIZIRMK.mjs} +1 -1
  188. package/dist/{chunk-HNB5JHBO.mjs → chunk-MLMDOIBY.mjs} +5 -5
  189. package/dist/{chunk-CEVXKJKF.cjs → chunk-MMSCWTJT.cjs} +6 -1
  190. package/dist/{chunk-SIECKBNK.cjs → chunk-MNBFSAWF.cjs} +7 -2
  191. package/dist/{chunk-EA5HVG45.cjs → chunk-MUQP2APN.cjs} +9 -2
  192. package/dist/{chunk-XOLYZZDX.mjs → chunk-MX4G24YS.mjs} +110 -56
  193. package/dist/{chunk-SCE7VWPN.cjs → chunk-MZG5M4JS.cjs} +48 -41
  194. package/dist/{chunk-DVAZ53X6.cjs → chunk-N4AM7Q34.cjs} +77 -73
  195. package/dist/{chunk-DXUXQP2T.cjs → chunk-N4C72FCD.cjs} +6 -1
  196. package/dist/{chunk-H7REG7OX.cjs → chunk-NKW4JEOH.cjs} +13 -9
  197. package/dist/{chunk-XRFGOYXG.cjs → chunk-NMMCBJZM.cjs} +17 -12
  198. package/dist/{chunk-SHDCKRP4.cjs → chunk-NQUZDXKJ.cjs} +7 -3
  199. package/dist/{chunk-UGWKNZ4U.cjs → chunk-O47IT4CS.cjs} +25 -21
  200. package/dist/{chunk-EUZFBHPP.cjs → chunk-O7B6LJWE.cjs} +7 -3
  201. package/dist/{chunk-UOMSGJHK.cjs → chunk-OAAVIFOJ.cjs} +116 -103
  202. package/dist/{chunk-SAUGKNCF.cjs → chunk-OBERQH7M.cjs} +42 -37
  203. package/dist/{chunk-NW3DL2PM.cjs → chunk-OCQSYDMG.cjs} +11 -4
  204. package/dist/{chunk-ZNXU4E6A.cjs → chunk-OSLI2SCA.cjs} +83 -72
  205. package/dist/{chunk-HLYRXN2I.cjs → chunk-OUOUPA37.cjs} +6 -1
  206. package/dist/{chunk-YIGUFJMR.cjs → chunk-OVSK47CZ.cjs} +6 -1
  207. package/dist/{chunk-ATYTLVSI.cjs → chunk-OX63SW6N.cjs} +7 -1
  208. package/dist/{chunk-GTHBWZUK.mjs → chunk-OZAVCLXY.mjs} +1 -1
  209. package/dist/{chunk-YKHRCY4T.cjs → chunk-P2LSRUQB.cjs} +6 -1
  210. package/dist/{chunk-XJDB564A.cjs → chunk-P4ZLFUNB.cjs} +7 -2
  211. package/dist/{chunk-2OFP3IVA.cjs → chunk-P5RNGH52.cjs} +32 -18
  212. package/dist/{chunk-NZRAUCUL.cjs → chunk-PATIHHC7.cjs} +26 -20
  213. package/dist/{chunk-6FXBJPF5.cjs → chunk-PCF54MSR.cjs} +6 -1
  214. package/dist/{chunk-52Q4OB4A.cjs → chunk-PFVNPOKN.cjs} +21 -7
  215. package/dist/{chunk-GVYZCJZH.cjs → chunk-PHYSFHJK.cjs} +6 -1
  216. package/dist/{chunk-4DCWVSL2.cjs → chunk-PHZ7MLRQ.cjs} +6 -1
  217. package/dist/{chunk-PCAEJNQF.cjs → chunk-PNMRXZS5.cjs} +13 -9
  218. package/dist/{chunk-HS4JPIGR.cjs → chunk-PRKFECGT.cjs} +7 -3
  219. package/dist/chunk-PTG5BEMG.mjs +47 -0
  220. package/dist/{chunk-YUCU6XB4.cjs → chunk-PYPHM7AS.cjs} +9 -4
  221. package/dist/{chunk-YNPVG2GG.mjs → chunk-PZ5ZJAAO.mjs} +2 -2
  222. package/dist/{chunk-H7OFZJCV.cjs → chunk-QBMMQS25.cjs} +14 -8
  223. package/dist/{chunk-Y2FEFQAY.cjs → chunk-QCVP22KW.cjs} +8 -5
  224. package/dist/{chunk-J3GFOQOL.cjs → chunk-QGJL7EPX.cjs} +13 -9
  225. package/dist/{chunk-2PE5STAR.cjs → chunk-QHHEL4ZO.cjs} +6 -2
  226. package/dist/{chunk-LTOT5KVJ.mjs → chunk-QKXQFBNL.mjs} +1 -1
  227. package/dist/{chunk-L6E5BSNU.cjs → chunk-QT7MJL5E.cjs} +7 -3
  228. package/dist/{chunk-ERMUL73L.cjs → chunk-QTGYT2DF.cjs} +6 -1
  229. package/dist/{chunk-WBTHHTBO.cjs → chunk-QW5I5D5T.cjs} +6 -1
  230. package/dist/{chunk-IIHZ2BEE.cjs → chunk-QZRFEHMS.cjs} +15 -11
  231. package/dist/{chunk-HXNLKCWH.cjs → chunk-QZVPBDF7.cjs} +6 -1
  232. package/dist/{chunk-JH4CDG4G.cjs → chunk-R6GOH5CH.cjs} +18 -14
  233. package/dist/{chunk-2BEGVSDF.cjs → chunk-RBDAW6IZ.cjs} +7 -3
  234. package/dist/{chunk-HVGINJTO.mjs → chunk-RDT2LJES.mjs} +77 -40
  235. package/dist/{chunk-PLJMEUAN.cjs → chunk-RFKPIAOF.cjs} +9 -1
  236. package/dist/{chunk-WPURVYXT.cjs → chunk-RGIHE6YL.cjs} +6 -2
  237. package/dist/{chunk-6B44ZU5P.cjs → chunk-RHORD2K2.cjs} +19 -15
  238. package/dist/{chunk-7MMDEIVC.mjs → chunk-RKWZ6F5D.mjs} +2 -2
  239. package/dist/{chunk-OCS3PSYR.cjs → chunk-RLC7NNTA.cjs} +6 -1
  240. package/dist/{chunk-WEZTGM7N.cjs → chunk-RMLXUVR5.cjs} +11 -9
  241. package/dist/{chunk-Q637AXGZ.mjs → chunk-RP55BUJM.mjs} +103 -20
  242. package/dist/{chunk-STF6VDYQ.cjs → chunk-RQSPBWXJ.cjs} +6 -1
  243. package/dist/{chunk-RWR7SMD7.cjs → chunk-S2QSTMBE.cjs} +7 -3
  244. package/dist/{chunk-GCJ4GNMC.cjs → chunk-SGBEJBBB.cjs} +8 -4
  245. package/dist/chunk-SGRWZEQC.cjs +44 -0
  246. package/dist/{chunk-BW563VZZ.mjs → chunk-SIHHYNX4.mjs} +1 -1
  247. package/dist/{chunk-NDMPGFKL.cjs → chunk-SIQPXYBB.cjs} +6 -1
  248. package/dist/{chunk-2HTNASSB.cjs → chunk-SM4Y7CL4.cjs} +10 -6
  249. package/dist/{chunk-UNJZGVPU.cjs → chunk-SQ5O5EDN.cjs} +6 -1
  250. package/dist/{chunk-A25FXJ7D.cjs → chunk-SWOJU7LI.cjs} +6 -1
  251. package/dist/{chunk-BNH53KOT.cjs → chunk-SZBBBLLS.cjs} +6 -1
  252. package/dist/{chunk-EXPVSFAG.cjs → chunk-T4VF6BYV.cjs} +50 -41
  253. package/dist/{chunk-ML4TOUZP.cjs → chunk-T4YCWRCJ.cjs} +6 -1
  254. package/dist/{chunk-NDOE76QC.cjs → chunk-TDAH76RR.cjs} +8 -4
  255. package/dist/{chunk-D22BUQKW.cjs → chunk-TFCBJFP7.cjs} +6 -1
  256. package/dist/{chunk-NWF2FTFV.mjs → chunk-TP3ISVRU.mjs} +2 -9
  257. package/dist/{chunk-3EIPOTZV.cjs → chunk-TP7JAC3T.cjs} +6 -2
  258. package/dist/{chunk-FB4CWSC2.cjs → chunk-TSLXAEGM.cjs} +16 -12
  259. package/dist/{chunk-5LJF4KUZ.cjs → chunk-U2HFXURZ.cjs} +19 -9
  260. package/dist/{chunk-SHD265HW.cjs → chunk-U3NUGF2E.cjs} +7 -1
  261. package/dist/{chunk-SVXOCTQ2.cjs → chunk-UARKTC55.cjs} +6 -1
  262. package/dist/{chunk-UZM3PDKK.cjs → chunk-UGL4BDNB.cjs} +27 -3
  263. package/dist/{chunk-GBMWLDCC.cjs → chunk-UHTXBC4Q.cjs} +7 -1
  264. package/dist/{chunk-47JV57DA.cjs → chunk-UOFTT6S4.cjs} +6 -1
  265. package/dist/{chunk-NNNMFSXG.mjs → chunk-V36K4TSU.mjs} +2 -2
  266. package/dist/{chunk-I2RBHZF7.cjs → chunk-VB7P66Q4.cjs} +6 -1
  267. package/dist/{chunk-BIAGSYIZ.cjs → chunk-VD7ENQP2.cjs} +54 -47
  268. package/dist/{chunk-J2EKGR6E.cjs → chunk-VFZQXADS.cjs} +719 -634
  269. package/dist/{chunk-NLBHLPEO.cjs → chunk-VIDUNAQE.cjs} +6 -1
  270. package/dist/{chunk-VM57CK74.cjs → chunk-VNWKJOJF.cjs} +6 -1
  271. package/dist/{chunk-MPU5DOXX.cjs → chunk-VUCDMV3Q.cjs} +6 -1
  272. package/dist/{chunk-M4YXD6MD.cjs → chunk-VWPGK6UV.cjs} +837 -769
  273. package/dist/{chunk-L2GUEYHR.cjs → chunk-VZ2P6GRC.cjs} +8 -1
  274. package/dist/{chunk-3SPECQXI.cjs → chunk-W4KSV6GX.cjs} +13 -9
  275. package/dist/{chunk-CHOOBTDD.cjs → chunk-W4WFKRLR.cjs} +17 -13
  276. package/dist/chunk-W7BMZI3I.cjs +6 -0
  277. package/dist/{chunk-SNP33A33.cjs → chunk-WCPGU6J6.cjs} +6 -1
  278. package/dist/{chunk-2OR5WAD5.cjs → chunk-WFNL24R6.cjs} +58 -43
  279. package/dist/{chunk-XOFJUSWC.cjs → chunk-WJ5ADUI2.cjs} +18 -14
  280. package/dist/{chunk-SPKZCFPH.mjs → chunk-WOPQQCP3.mjs} +5 -5
  281. package/dist/{chunk-ZSVFI7JM.cjs → chunk-WXPY5FRF.cjs} +23 -18
  282. package/dist/{chunk-JCYDWJVO.cjs → chunk-WZSLDPVZ.cjs} +13 -9
  283. package/dist/{chunk-O5YM6GU3.mjs → chunk-X2TC6PBK.mjs} +1 -1
  284. package/dist/{chunk-BSX5OGSD.cjs → chunk-XE3E4MER.cjs} +24 -20
  285. package/dist/{chunk-3BIASUGR.cjs → chunk-XEPUUTGC.cjs} +6 -1
  286. package/dist/{chunk-HQKCSJEH.cjs → chunk-XH4GQ7MT.cjs} +17 -10
  287. package/dist/{chunk-5AMH6AFA.cjs → chunk-XK7SRVHC.cjs} +15 -11
  288. package/dist/{chunk-WKVYF2B5.cjs → chunk-XSJYXUY6.cjs} +6 -1
  289. package/dist/{chunk-5DX3O6TT.cjs → chunk-XSLYRNNA.cjs} +8 -4
  290. package/dist/{chunk-UUQNJDGH.cjs → chunk-XTQPYWQW.cjs} +6 -1
  291. package/dist/{chunk-3HLQTOVU.cjs → chunk-XVD5Y6S4.cjs} +6 -1
  292. package/dist/{chunk-7Q2YWZF7.cjs → chunk-XXBWKAJF.cjs} +14 -10
  293. package/dist/{chunk-YDXLC4DW.cjs → chunk-XZ6L3FUU.cjs} +6 -1
  294. package/dist/{chunk-FZ7OUN5M.cjs → chunk-Y3HLU2XL.cjs} +6 -2
  295. package/dist/{chunk-I2BYNELA.cjs → chunk-Y6WRVFD6.cjs} +9 -5
  296. package/dist/{chunk-OOZEU5KK.cjs → chunk-YC3LKWJO.cjs} +6 -1
  297. package/dist/{chunk-SXXSQVKK.cjs → chunk-YCIFGYBY.cjs} +13 -8
  298. package/dist/{chunk-CYOTNHDF.cjs → chunk-YHALJBYT.cjs} +6 -2
  299. package/dist/{chunk-WOAXQ5MZ.cjs → chunk-YLEL4ZRQ.cjs} +18 -14
  300. package/dist/{chunk-WEGAVN37.cjs → chunk-YMJK6VWQ.cjs} +6 -1
  301. package/dist/{chunk-2HW5LWAH.cjs → chunk-YQ5NVEFS.cjs} +6 -1
  302. package/dist/{chunk-AQLHD6HZ.cjs → chunk-YQXLBYY2.cjs} +20 -11
  303. package/dist/{chunk-IBEHVSU4.cjs → chunk-YUV5XXDC.cjs} +6 -1
  304. package/dist/{chunk-PWMJBCAN.cjs → chunk-YV47TSSB.cjs} +7 -3
  305. package/dist/{chunk-X333W5KV.cjs → chunk-YZMSJRM5.cjs} +6 -1
  306. package/dist/{chunk-VFMHE5D3.cjs → chunk-Z23OCU33.cjs} +29 -25
  307. package/dist/{chunk-DBYNZIIQ.cjs → chunk-Z2JQR56W.cjs} +6 -1
  308. package/dist/chunk-Z7YIQ7AJ.cjs +16 -0
  309. package/dist/{chunk-RTAWQXME.cjs → chunk-ZCT6B5PQ.cjs} +242 -145
  310. package/dist/{chunk-P2TGLGRR.mjs → chunk-ZF7N222A.mjs} +2 -2
  311. package/dist/{chunk-RK3YYUX6.cjs → chunk-ZKVA2TV6.cjs} +6 -1
  312. package/dist/{chunk-SAPG45RA.cjs → chunk-ZPZGC6OD.cjs} +31 -27
  313. package/dist/{chunk-DV52ZS53.cjs → chunk-ZRRNF26T.cjs} +6 -2
  314. package/dist/{chunk-26ZTI2ZO.mjs → chunk-ZRTBDHO2.mjs} +19 -14
  315. package/dist/{chunk-PO5MXV5X.cjs → chunk-ZSSBEPN4.cjs} +6 -1
  316. package/dist/{chunk-TWFJJPE7.cjs → chunk-ZTNU4XCC.cjs} +42 -38
  317. package/dist/{chunk-V5FEFFHV.mjs → chunk-ZVEKOMZS.mjs} +1 -1
  318. package/dist/{cli-runtime.d-oUiNuspW.d.mts → cli-runtime.d-LwIb0swO.d.mts} +5 -5
  319. package/dist/{cli-runtime.d-Dbl-gIoz.d.ts → cli-runtime.d-Vvxf-Z8a.d.ts} +5 -5
  320. package/dist/client/lifecycle.cjs +8 -3
  321. package/dist/client/lifecycle.mjs +1 -1
  322. package/dist/{client-component.d-DaUqOhZT.d.mts → client-component.d-34DDMZcl.d.mts} +1 -1
  323. package/dist/{client-component.d-CT4q7tmy.d.ts → client-component.d-DT5OKBZu.d.ts} +1 -1
  324. package/dist/client-plugins.cjs +8 -3
  325. package/dist/{client-plugins.d-BfGTqbAH.d.mts → client-plugins.d-D7k9t9Ge.d.mts} +31 -12
  326. package/dist/{client-plugins.d-24qhjX8c.d.ts → client-plugins.d-D9CnUvZ5.d.ts} +31 -12
  327. package/dist/client-plugins.d.mts +1 -1
  328. package/dist/client-plugins.d.ts +1 -1
  329. package/dist/client-plugins.mjs +1 -1
  330. package/dist/client.cjs +51 -51
  331. package/dist/client.d.mts +7 -7
  332. package/dist/client.d.ts +7 -7
  333. package/dist/client.mjs +1 -1
  334. package/dist/config.cjs +3 -3
  335. package/dist/config.d.mts +1 -1
  336. package/dist/config.d.ts +1 -1
  337. package/dist/config.mjs +1 -1
  338. package/dist/cron.cjs +9 -9
  339. package/dist/cron.mjs +1 -1
  340. package/dist/deferred.cjs +3 -3
  341. package/dist/deferred.mjs +1 -1
  342. package/dist/deployment.cjs +3 -3
  343. package/dist/deployment.mjs +1 -1
  344. package/dist/desktop.cjs +4 -1
  345. package/dist/desktop.d.mts +2 -2
  346. package/dist/desktop.d.ts +2 -2
  347. package/dist/desktop.mjs +1 -1
  348. package/dist/{dev-guard-VIEEA4LS.cjs → dev-guard-M3ZCDWCK.cjs} +14 -11
  349. package/dist/{dev-guard-K3GJDPEQ.mjs → dev-guard-TFVWJNIB.mjs} +2 -2
  350. package/dist/{devtools-5WDQQDTA.cjs → devtools-IUU4SWQL.cjs} +78 -72
  351. package/dist/{devtools-DPYIYHTI.mjs → devtools-R77KAJA4.mjs} +11 -8
  352. package/dist/{devtools-client-BKBCCORT.cjs → devtools-client-3K67NMWA.cjs} +7 -4
  353. package/dist/{devtools-client-L4MUWD6K.mjs → devtools-client-WAMA6Q77.mjs} +1 -1
  354. package/dist/{devtools-ui-C2EMF2SO.cjs → devtools-ui-TPBPQEEB.cjs} +4 -1
  355. package/dist/{devtools-ui-BOG33MT5.mjs → devtools-ui-UYEVDADD.mjs} +1 -1
  356. package/dist/docs.cjs +73 -72
  357. package/dist/docs.d.mts +3 -3
  358. package/dist/docs.d.ts +3 -3
  359. package/dist/docs.mjs +9 -8
  360. package/dist/env-types.cjs +4 -4
  361. package/dist/env-types.mjs +1 -1
  362. package/dist/env.cjs +4 -4
  363. package/dist/env.mjs +1 -1
  364. package/dist/environment/vite.cjs +17 -16
  365. package/dist/environment/vite.d.mts +1 -0
  366. package/dist/environment/vite.d.ts +1 -0
  367. package/dist/environment/vite.mjs +6 -5
  368. package/dist/environment.cjs +3 -3
  369. package/dist/environment.mjs +1 -1
  370. package/dist/font.cjs +3 -3
  371. package/dist/font.mjs +1 -1
  372. package/dist/{handler.d-Oca5kNSz.d.ts → handler.d-DbZvbwNi.d.ts} +1 -1
  373. package/dist/{handler.d-GfNuz57p.d.mts → handler.d-fxTjv3Nn.d.mts} +1 -1
  374. package/dist/headers.cjs +6 -6
  375. package/dist/{headers.d-C_lsQIWA.d.mts → headers.d-OBHpGTF_.d.mts} +1 -1
  376. package/dist/{headers.d-b8gHJDvu.d.ts → headers.d-oeWybIk8.d.ts} +1 -1
  377. package/dist/headers.mjs +1 -1
  378. package/dist/i18n/client.cjs +23 -20
  379. package/dist/i18n/client.mjs +1 -1
  380. package/dist/i18n/index.cjs +12 -7
  381. package/dist/i18n/index.mjs +1 -1
  382. package/dist/i18n/server.cjs +11 -11
  383. package/dist/i18n/server.mjs +1 -1
  384. package/dist/image/server.cjs +8 -8
  385. package/dist/image/server.mjs +1 -1
  386. package/dist/image/sharp.cjs +21 -18
  387. package/dist/image/sharp.mjs +1 -1
  388. package/dist/image.cjs +7 -4
  389. package/dist/image.mjs +1 -1
  390. package/dist/index.cjs +229 -216
  391. package/dist/{index.d-Ckv6kHFm.d.ts → index.d-BM-dKdzH.d.ts} +1 -1
  392. package/dist/{index.d-BLtjh1aS.d.mts → index.d-CRrPQwlO.d.mts} +1 -1
  393. package/dist/index.d.mts +22 -22
  394. package/dist/index.d.ts +22 -22
  395. package/dist/index.mjs +42 -41
  396. package/dist/instrumentation.cjs +5 -5
  397. package/dist/instrumentation.mjs +1 -1
  398. package/dist/integrations/orm.cjs +7 -7
  399. package/dist/integrations/orm.d.mts +1 -1
  400. package/dist/integrations/orm.d.ts +1 -1
  401. package/dist/integrations/orm.mjs +3 -3
  402. package/dist/integrations.cjs +22 -22
  403. package/dist/integrations.d.mts +1 -1
  404. package/dist/integrations.d.ts +1 -1
  405. package/dist/integrations.mjs +2 -2
  406. package/dist/internal/app-markdown-runtime.cjs +14 -14
  407. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  408. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  409. package/dist/internal/app-markdown-runtime.mjs +2 -2
  410. package/dist/internal/build-runtime.cjs +187 -181
  411. package/dist/internal/build-runtime.d.mts +5 -5
  412. package/dist/internal/build-runtime.d.ts +5 -5
  413. package/dist/internal/build-runtime.mjs +36 -35
  414. package/dist/internal/cli-runtime.cjs +106 -100
  415. package/dist/internal/cli-runtime.d.mts +7 -7
  416. package/dist/internal/cli-runtime.d.ts +7 -7
  417. package/dist/internal/cli-runtime.mjs +18 -17
  418. package/dist/internal/client-error-overlay.cjs +12 -9
  419. package/dist/internal/client-error-overlay.mjs +2 -2
  420. package/dist/internal/client-runtime.cjs +37 -26
  421. package/dist/internal/client-runtime.d.mts +5 -5
  422. package/dist/internal/client-runtime.d.ts +5 -5
  423. package/dist/internal/client-runtime.mjs +1 -1
  424. package/dist/internal/compression-runtime.cjs +4 -4
  425. package/dist/internal/compression-runtime.d.mts +1 -1
  426. package/dist/internal/compression-runtime.d.ts +1 -1
  427. package/dist/internal/compression-runtime.mjs +1 -1
  428. package/dist/internal/config-runtime.cjs +86 -82
  429. package/dist/internal/config-runtime.d.mts +3 -3
  430. package/dist/internal/config-runtime.d.ts +3 -3
  431. package/dist/internal/config-runtime.mjs +10 -9
  432. package/dist/internal/desktop-guard.cjs +5 -5
  433. package/dist/internal/desktop-guard.mjs +1 -1
  434. package/dist/internal/docs-precompiled-runtime.cjs +10 -7
  435. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  436. package/dist/internal/form-actions-client.cjs +4 -1
  437. package/dist/internal/form-actions-client.mjs +1 -1
  438. package/dist/internal/form-actions.cjs +13 -13
  439. package/dist/internal/form-actions.mjs +1 -1
  440. package/dist/internal/infra-analytics-runtime.cjs +32 -29
  441. package/dist/internal/infra-analytics-runtime.mjs +5 -5
  442. package/dist/internal/island-codec.cjs +4 -4
  443. package/dist/internal/island-codec.mjs +1 -1
  444. package/dist/internal/island-value-store.cjs +4 -1
  445. package/dist/internal/island-value-store.mjs +1 -1
  446. package/dist/internal/islands-action-client.cjs +10 -10
  447. package/dist/internal/islands-action-client.mjs +1 -1
  448. package/dist/internal/islands-boot.cjs +6 -3
  449. package/dist/internal/islands-boot.mjs +1 -1
  450. package/dist/internal/islands-runtime.cjs +12 -9
  451. package/dist/internal/islands-runtime.mjs +2 -2
  452. package/dist/internal/islands-server-tree.cjs +4 -1
  453. package/dist/internal/islands-server-tree.mjs +1 -1
  454. package/dist/internal/islands-server.cjs +9 -6
  455. package/dist/internal/islands-server.mjs +1 -1
  456. package/dist/internal/islx-actions-client.cjs +13 -10
  457. package/dist/internal/islx-actions-client.mjs +1 -1
  458. package/dist/internal/islx-actions-server.cjs +4 -1
  459. package/dist/internal/islx-actions-server.mjs +1 -1
  460. package/dist/internal/islx-client.cjs +7 -4
  461. package/dist/internal/islx-client.mjs +2 -2
  462. package/dist/internal/islx-react.cjs +4 -1
  463. package/dist/internal/islx-server.cjs +4 -1
  464. package/dist/internal/isolated-boundary.cjs +5 -5
  465. package/dist/internal/isolated-boundary.mjs +1 -1
  466. package/dist/internal/metadata-image-runtime.cjs +8 -8
  467. package/dist/internal/metadata-image-runtime.mjs +1 -1
  468. package/dist/internal/native-server-fns.cjs +10 -10
  469. package/dist/internal/native-server-fns.mjs +4 -4
  470. package/dist/internal/navigation-neutral.cjs +6 -3
  471. package/dist/internal/navigation-neutral.mjs +1 -1
  472. package/dist/internal/product-telemetry-runtime.cjs +4 -4
  473. package/dist/internal/product-telemetry-runtime.mjs +3 -3
  474. package/dist/internal/production-node-env.cjs +3 -3
  475. package/dist/internal/production-node-env.mjs +2 -2
  476. package/dist/internal/production-runtime.cjs +97 -89
  477. package/dist/internal/production-runtime.d.mts +10 -10
  478. package/dist/internal/production-runtime.d.ts +10 -10
  479. package/dist/internal/production-runtime.mjs +6 -6
  480. package/dist/internal/react-cache.cjs +10 -7
  481. package/dist/internal/react-cache.mjs +1 -1
  482. package/dist/internal/renderer-islands.cjs +4 -1
  483. package/dist/internal/renderer-islands.mjs +1 -1
  484. package/dist/internal/request-cookies.cjs +3 -3
  485. package/dist/internal/request-cookies.mjs +1 -1
  486. package/dist/internal/server-fn-transform.cjs +3 -3
  487. package/dist/internal/server-fn-transform.mjs +1 -1
  488. package/dist/internal/server-tree.cjs +5 -5
  489. package/dist/internal/server-tree.mjs +1 -1
  490. package/dist/internal/spa-router.cjs +20 -20
  491. package/dist/internal/spa-router.d.mts +3 -3
  492. package/dist/internal/spa-router.d.ts +3 -3
  493. package/dist/internal/spa-router.mjs +1 -1
  494. package/dist/internal/start-manifest.cjs +4 -1
  495. package/dist/internal/start-manifest.d.mts +1 -1
  496. package/dist/internal/start-manifest.d.ts +1 -1
  497. package/dist/internal/start-manifest.mjs +1 -1
  498. package/dist/internal/vercel-edge-middleware.cjs +23 -20
  499. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  500. package/dist/json-ld.cjs +4 -1
  501. package/dist/json-ld.mjs +1 -1
  502. package/dist/layers-6R55QDT5.cjs +26 -0
  503. package/dist/{layers-744BBUY5.mjs → layers-O6GUR6LT.mjs} +7 -2
  504. package/dist/{libsql-http-M6LMNXCN.cjs → libsql-http-5GYGFVGC.cjs} +94 -87
  505. package/dist/{libsql-http-2QD224YS.mjs → libsql-http-PBJXNEOX.mjs} +1 -1
  506. package/dist/{manager-7BNSJKME.mjs → manager-EFPBRS3U.mjs} +4 -4
  507. package/dist/manager-STAB5TVZ.cjs +18 -0
  508. package/dist/markdown.cjs +12 -12
  509. package/dist/markdown.d.mts +1 -1
  510. package/dist/markdown.d.ts +1 -1
  511. package/dist/markdown.mjs +1 -1
  512. package/dist/middleware.cjs +32 -32
  513. package/dist/middleware.d.mts +1 -1
  514. package/dist/middleware.d.ts +1 -1
  515. package/dist/middleware.mjs +4 -4
  516. package/dist/mobile.cjs +4 -1
  517. package/dist/mobile.mjs +1 -1
  518. package/dist/{modules-3Q2ZCY4Q.mjs → modules-IVJXVV4W.mjs} +1 -1
  519. package/dist/modules-JDPCBWND.cjs +13 -0
  520. package/dist/{mount.d-BCS8mD4E.d.mts → mount.d-B7RiwjiO.d.mts} +1 -1
  521. package/dist/{mount.d-DEX8eref.d.ts → mount.d-TnD-Mebk.d.ts} +1 -1
  522. package/dist/{native-server-fn-handler-PYK65A46.mjs → native-server-fn-handler-IMLQMSIR.mjs} +1 -1
  523. package/dist/native-server-fn-handler-U7I6H6MM.cjs +30 -0
  524. package/dist/{native-specs-A7YOL463.mjs → native-specs-4DOPYSOJ.mjs} +1 -1
  525. package/dist/native-specs-IXHEIZCD.cjs +15 -0
  526. package/dist/{native-tree-AO7PQ7FR.mjs → native-tree-2GQMSOLV.mjs} +1 -1
  527. package/dist/native-tree-PHCV43W4.cjs +28 -0
  528. package/dist/native.cjs +4 -1
  529. package/dist/native.mjs +1 -1
  530. package/dist/{navigation-delegate.d-F83ugsZW.d.mts → navigation-delegate.d-Boz2511c.d.mts} +1 -1
  531. package/dist/{navigation-delegate.d-Cgi28e5Q.d.ts → navigation-delegate.d-VBCF0EeN.d.ts} +1 -1
  532. package/dist/navigation.cjs +26 -26
  533. package/dist/navigation.d.mts +4 -4
  534. package/dist/navigation.d.ts +4 -4
  535. package/dist/navigation.mjs +1 -1
  536. package/dist/{nitro-FK3SZM4H.mjs → nitro-6HSEGMWJ.mjs} +2 -2
  537. package/dist/{nitro-YDFMH5PY.cjs → nitro-K4MCBBB6.cjs} +31 -28
  538. package/dist/{node-module-bundle-ZWCQJCKA.mjs → node-module-bundle-4IN4YCDV.mjs} +1 -1
  539. package/dist/node-module-bundle-PHKRIHI6.cjs +15 -0
  540. package/dist/observability.cjs +3 -3
  541. package/dist/observability.mjs +1 -1
  542. package/dist/og.cjs +4 -1
  543. package/dist/og.mjs +1 -1
  544. package/dist/platform.cjs +4 -1
  545. package/dist/platform.mjs +1 -1
  546. package/dist/{plugin-EVKQZBNW.mjs → plugin-B7I5QVBE.mjs} +2 -2
  547. package/dist/plugin-QYBJSGHG.cjs +33 -0
  548. package/dist/plugin.cjs +176 -170
  549. package/dist/plugin.d.mts +5 -5
  550. package/dist/plugin.d.ts +5 -5
  551. package/dist/plugin.mjs +30 -29
  552. package/dist/{port-STMSGUVU.cjs → port-2YV5GBDN.cjs} +13 -10
  553. package/dist/{port-CEZTV776.mjs → port-4ZIDLV4Z.mjs} +1 -1
  554. package/dist/query/client.cjs +38 -34
  555. package/dist/query/client.mjs +1 -1
  556. package/dist/query/index.cjs +5 -5
  557. package/dist/query/index.mjs +1 -1
  558. package/dist/query/parsers.cjs +3 -3
  559. package/dist/query/parsers.mjs +1 -1
  560. package/dist/query/server.cjs +8 -5
  561. package/dist/query/server.mjs +1 -1
  562. package/dist/{render-plan.d-DCF2GZdD.d.ts → render-plan.d-BrumV_ZE.d.ts} +1 -1
  563. package/dist/{render-plan.d-BkVY4aFb.d.mts → render-plan.d-BwnmyfNk.d.mts} +1 -1
  564. package/dist/renderer/none/server.cjs +4 -1
  565. package/dist/renderer/none/server.mjs +1 -1
  566. package/dist/renderer/react/client.cjs +4 -1
  567. package/dist/renderer/react/client.mjs +1 -1
  568. package/dist/renderer/react/server.cjs +14 -11
  569. package/dist/renderer/react/server.mjs +1 -1
  570. package/dist/renderer/react/vite.cjs +4 -1
  571. package/dist/renderer/react/vite.mjs +1 -1
  572. package/dist/renderer-client.cjs +67 -64
  573. package/dist/renderer-client.d.mts +5 -5
  574. package/dist/renderer-client.d.ts +5 -5
  575. package/dist/renderer-client.mjs +1 -1
  576. package/dist/renderer.cjs +12 -6
  577. package/dist/renderer.d.mts +1 -1
  578. package/dist/renderer.d.ts +1 -1
  579. package/dist/renderer.mjs +4 -3
  580. package/dist/request.cjs +9 -4
  581. package/dist/{request.d-DMPB53-i.d.mts → request.d-Dd5nRTO5.d.mts} +1 -1
  582. package/dist/{request.d-C5o-4dU2.d.ts → request.d-NUi01-5e.d.ts} +1 -1
  583. package/dist/request.d.mts +2 -2
  584. package/dist/request.d.ts +2 -2
  585. package/dist/request.mjs +1 -1
  586. package/dist/{route-rendering.d-DDvArvik.d.mts → route-rendering.d-BK0Pf7_k.d.mts} +1 -1
  587. package/dist/{route-rendering.d-DfP6zRP7.d.ts → route-rendering.d-CJR5BPXV.d.ts} +1 -1
  588. package/dist/router.cjs +5 -5
  589. package/dist/{router.d-s40h7aoS.d.ts → router.d-C-JSFCPU.d.ts} +1 -1
  590. package/dist/{router.d-1Skf2XCO.d.mts → router.d-CNUS3x1j.d.mts} +1 -1
  591. package/dist/router.mjs +1 -1
  592. package/dist/routes.cjs +16 -16
  593. package/dist/routes.d.mts +1 -1
  594. package/dist/routes.d.ts +1 -1
  595. package/dist/routes.mjs +1 -1
  596. package/dist/{rsc-pipeline-O2YMVHUF.mjs → rsc-pipeline-DHISDFT7.mjs} +13 -12
  597. package/dist/rsc-pipeline-UBWVU3NF.cjs +92 -0
  598. package/dist/{runtime-K2X3IZAF.mjs → runtime-VUKMY44G.mjs} +16 -13
  599. package/dist/{runtime-WOTVFYQY.cjs → runtime-XKRQW3YT.cjs} +132 -119
  600. package/dist/{runtime.d-k-9kFUsM.d.ts → runtime.d-B2T4bM5_.d.ts} +1 -1
  601. package/dist/{runtime.d-Bykc5Qfg.d.mts → runtime.d-CsOpO6yQ.d.mts} +1 -1
  602. package/dist/safe-fetch.cjs +4 -4
  603. package/dist/safe-fetch.mjs +1 -1
  604. package/dist/{schema-dev-notice-EUPAUJVN.mjs → schema-dev-notice-EZAOFO7A.mjs} +1 -1
  605. package/dist/{schema-dev-notice-ZSCL47CT.cjs → schema-dev-notice-Y4J5KPEY.cjs} +16 -13
  606. package/dist/schema.cjs +4 -4
  607. package/dist/schema.mjs +1 -1
  608. package/dist/{search-client-GIXIEU75.mjs → search-client-HN3ZY6AK.mjs} +1 -1
  609. package/dist/search-client-Z7KDVD4C.cjs +15 -0
  610. package/dist/server-action-security.cjs +10 -10
  611. package/dist/server-action-security.mjs +1 -1
  612. package/dist/{server-components-status.d-DLNd1C5j.d.ts → server-components-status.d-Cc5rir0l.d.mts} +2 -2
  613. package/dist/{server-components-status.d-D-HixBe0.d.mts → server-components-status.d-DOYt4E_Q.d.ts} +2 -2
  614. package/dist/server-fn-client.cjs +4 -4
  615. package/dist/server-fn-client.mjs +1 -1
  616. package/dist/server-fn.cjs +17 -17
  617. package/dist/server-fn.mjs +1 -1
  618. package/dist/server-plugins.cjs +21 -16
  619. package/dist/server-plugins.d.mts +3 -3
  620. package/dist/server-plugins.d.ts +3 -3
  621. package/dist/server-plugins.mjs +1 -1
  622. package/dist/server-query-client.cjs +10 -10
  623. package/dist/server-query-client.mjs +1 -1
  624. package/dist/server-query.cjs +19 -19
  625. package/dist/server-query.mjs +1 -1
  626. package/dist/server.cjs +236 -224
  627. package/dist/server.d.mts +12 -12
  628. package/dist/server.d.ts +12 -12
  629. package/dist/server.mjs +37 -34
  630. package/dist/session-J7NTZI56.cjs +24 -0
  631. package/dist/{session-4IB34X35.mjs → session-ZFM3RDG2.mjs} +3 -3
  632. package/dist/{spa-router.d-Dl-EJeJT.d.ts → spa-router.d-C7FcpLxU.d.ts} +2 -2
  633. package/dist/{spa-router.d-DIlXwm00.d.mts → spa-router.d-Cq5UFJvq.d.mts} +2 -2
  634. package/dist/{ssg.d-D2ZV0bhs.d.mts → ssg.d-BzNZemk7.d.mts} +2 -2
  635. package/dist/{ssg.d-bE-ylg0e.d.ts → ssg.d-DUhacIxj.d.ts} +2 -2
  636. package/dist/storage.cjs +4 -4
  637. package/dist/storage.mjs +2 -2
  638. package/dist/{store-core.d-BmdnMopD.d.ts → store-core.d-BX3yXrxA.d.ts} +2 -2
  639. package/dist/{store-core.d-DPsCYzV7.d.mts → store-core.d-DbUAtSBK.d.mts} +2 -2
  640. package/dist/testing.cjs +65 -62
  641. package/dist/testing.d.mts +1 -1
  642. package/dist/testing.d.ts +1 -1
  643. package/dist/testing.mjs +5 -5
  644. package/dist/theme/client.cjs +5 -5
  645. package/dist/theme/client.mjs +1 -1
  646. package/dist/theme/index.cjs +4 -4
  647. package/dist/theme/index.mjs +1 -1
  648. package/dist/theme/runtime.cjs +3 -3
  649. package/dist/theme/runtime.mjs +1 -1
  650. package/dist/theme/server.cjs +8 -8
  651. package/dist/theme/server.mjs +1 -1
  652. package/dist/{utils.d-BFZQcBZV.d.ts → utils.d-BhJJEXzo.d.ts} +1 -1
  653. package/dist/{utils.d-nM3OHKq5.d.mts → utils.d-NOMkLFpC.d.mts} +1 -1
  654. package/dist/version.cjs +3 -3
  655. package/dist/version.mjs +2 -2
  656. package/dist/vite.cjs +169 -168
  657. package/dist/vite.d.mts +6 -6
  658. package/dist/vite.d.ts +6 -6
  659. package/dist/vite.mjs +30 -29
  660. package/dist/workflows.cjs +14 -14
  661. package/dist/workflows.mjs +2 -2
  662. package/package.json +5 -5
  663. package/LICENSE +0 -22
  664. package/dist/agent-mcp-handler-EXOG55M4.cjs +0 -21
  665. package/dist/analyzer-OWIHFO5M.cjs +0 -17
  666. package/dist/chunk-3376ZTRC.cjs +0 -1
  667. package/dist/chunk-K5NI5YQR.cjs +0 -1
  668. package/dist/chunk-MCJLA63J.cjs +0 -1
  669. package/dist/chunk-NOSLIDSG.cjs +0 -9
  670. package/dist/chunk-PAKB6JHX.cjs +0 -40
  671. package/dist/chunk-YTAABQEV.cjs +0 -1
  672. package/dist/layers-XLOMMQP7.cjs +0 -21
  673. package/dist/manager-37UJPUN4.cjs +0 -18
  674. package/dist/modules-KDHFBQ6L.cjs +0 -13
  675. package/dist/native-server-fn-handler-57TCQPSM.cjs +0 -30
  676. package/dist/native-specs-JDPH26AO.cjs +0 -15
  677. package/dist/native-tree-52CUAP3N.cjs +0 -28
  678. package/dist/node-module-bundle-TNSY5PAC.cjs +0 -15
  679. package/dist/plugin-MWO3G2XM.cjs +0 -33
  680. package/dist/rsc-pipeline-SFQSMVI7.cjs +0 -91
  681. package/dist/search-client-A7YJT7JZ.cjs +0 -15
  682. package/dist/session-MOYQJ7E6.cjs +0 -24
  683. package/dist/{chunk-IVP5Q4BX.mjs → chunk-6IKUYFNQ.mjs} +0 -0
  684. package/dist/{chunk-D7LXBLUW.mjs → chunk-FYTZZM5U.mjs} +3 -3
  685. /package/dist/{chunk-E72GG355.mjs → chunk-HDZ2AMDD.mjs} +0 -0
  686. /package/dist/{chunk-URBP6DLH.mjs → chunk-LQZXCSYG.mjs} +0 -0
  687. /package/dist/{chunk-M6AJZ4XR.mjs → chunk-QNJUQIUZ.mjs} +0 -0
@@ -6,10 +6,10 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkE5UN4OWXcjs = require('./chunk-E5UN4OWX.cjs');
9
+ var _chunk4JARM2QQcjs = require('./chunk-4JARM2QQ.cjs');
10
10
 
11
11
 
12
- var _chunkMF3IA2AWcjs = require('./chunk-MF3IA2AW.cjs');
12
+ var _chunk2L4M6YUGcjs = require('./chunk-2L4M6YUG.cjs');
13
13
 
14
14
 
15
15
 
@@ -22,17 +22,17 @@ var _chunkMF3IA2AWcjs = require('./chunk-MF3IA2AW.cjs');
22
22
 
23
23
 
24
24
 
25
- var _chunkEODGIFI7cjs = require('./chunk-EODGIFI7.cjs');
25
+ var _chunkJYQMGMKTcjs = require('./chunk-JYQMGMKT.cjs');
26
26
 
27
27
 
28
- var _chunkVM57CK74cjs = require('./chunk-VM57CK74.cjs');
28
+ var _chunkVNWKJOJFcjs = require('./chunk-VNWKJOJF.cjs');
29
29
 
30
30
 
31
- var _chunkMHKPXX3Jcjs = require('./chunk-MHKPXX3J.cjs');
31
+ var _chunk6AUPJYHFcjs = require('./chunk-6AUPJYHF.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkCBB7I6HWcjs = require('./chunk-CBB7I6HW.cjs');
35
+ var _chunk4ER5KYSCcjs = require('./chunk-4ER5KYSC.cjs');
36
36
 
37
37
 
38
38
 
@@ -41,7 +41,7 @@ var _chunkCBB7I6HWcjs = require('./chunk-CBB7I6HW.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkRBSGFS5Xcjs = require('./chunk-RBSGFS5X.cjs');
44
+ var _chunk2LHO4HTPcjs = require('./chunk-2LHO4HTP.cjs');
45
45
 
46
46
 
47
47
 
@@ -54,33 +54,33 @@ var _chunkRBSGFS5Xcjs = require('./chunk-RBSGFS5X.cjs');
54
54
 
55
55
 
56
56
 
57
- var _chunkILQSRLKKcjs = require('./chunk-ILQSRLKK.cjs');
57
+ var _chunk4A6WSOZHcjs = require('./chunk-4A6WSOZH.cjs');
58
58
 
59
59
 
60
60
 
61
61
 
62
- var _chunkN3H7UPBMcjs = require('./chunk-N3H7UPBM.cjs');
62
+ var _chunk3EZHMZGDcjs = require('./chunk-3EZHMZGD.cjs');
63
63
 
64
64
 
65
- var _chunkYUQUGVSVcjs = require('./chunk-YUQUGVSV.cjs');
65
+ var _chunkCTTXHHZGcjs = require('./chunk-CTTXHHZG.cjs');
66
66
 
67
67
 
68
- var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
68
+ var _chunkTDAH76RRcjs = require('./chunk-TDAH76RR.cjs');
69
69
 
70
70
 
71
71
 
72
72
 
73
73
 
74
- var _chunkUOMSGJHKcjs = require('./chunk-UOMSGJHK.cjs');
74
+ var _chunkOAAVIFOJcjs = require('./chunk-OAAVIFOJ.cjs');
75
75
 
76
76
 
77
- var _chunk3BTN3NP7cjs = require('./chunk-3BTN3NP7.cjs');
77
+ var _chunkI5PDHLKEcjs = require('./chunk-I5PDHLKE.cjs');
78
78
 
79
79
 
80
- var _chunkOCS3PSYRcjs = require('./chunk-OCS3PSYR.cjs');
80
+ var _chunkRLC7NNTAcjs = require('./chunk-RLC7NNTA.cjs');
81
81
 
82
82
 
83
- var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
83
+ var _chunkKDUVIJSZcjs = require('./chunk-KDUVIJSZ.cjs');
84
84
 
85
85
 
86
86
 
@@ -117,27 +117,27 @@ var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
117
117
 
118
118
 
119
119
 
120
- var _chunkM4YXD6MDcjs = require('./chunk-M4YXD6MD.cjs');
120
+ var _chunkVWPGK6UVcjs = require('./chunk-VWPGK6UV.cjs');
121
121
 
122
122
 
123
123
 
124
124
 
125
125
 
126
126
 
127
- var _chunkRZI6436Fcjs = require('./chunk-RZI6436F.cjs');
127
+ var _chunkADCVSTFVcjs = require('./chunk-ADCVSTFV.cjs');
128
128
 
129
129
 
130
- var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
130
+ var _chunkIGA3OTFYcjs = require('./chunk-IGA3OTFY.cjs');
131
131
 
132
132
 
133
133
 
134
134
 
135
135
 
136
- var _chunkEXPVSFAGcjs = require('./chunk-EXPVSFAG.cjs');
136
+ var _chunkT4VF6BYVcjs = require('./chunk-T4VF6BYV.cjs');
137
137
 
138
138
 
139
139
 
140
- var _chunkUGWKNZ4Ucjs = require('./chunk-UGWKNZ4U.cjs');
140
+ var _chunkO47IT4CScjs = require('./chunk-O47IT4CS.cjs');
141
141
 
142
142
 
143
143
 
@@ -150,14 +150,14 @@ var _chunkUGWKNZ4Ucjs = require('./chunk-UGWKNZ4U.cjs');
150
150
 
151
151
 
152
152
 
153
- var _chunkYSRZSKQBcjs = require('./chunk-YSRZSKQB.cjs');
153
+ var _chunkIGBQSUT5cjs = require('./chunk-IGBQSUT5.cjs');
154
154
 
155
155
 
156
- var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
156
+ var _chunkXVD5Y6S4cjs = require('./chunk-XVD5Y6S4.cjs');
157
157
 
158
158
 
159
159
 
160
- var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
160
+ var _chunkUOFTT6S4cjs = require('./chunk-UOFTT6S4.cjs');
161
161
 
162
162
 
163
163
 
@@ -165,18 +165,18 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
165
165
 
166
166
 
167
167
 
168
- var _chunkSCE7VWPNcjs = require('./chunk-SCE7VWPN.cjs');
168
+ var _chunkMZG5M4JScjs = require('./chunk-MZG5M4JS.cjs');
169
169
 
170
170
 
171
171
 
172
172
 
173
- var _chunkJH4CDG4Gcjs = require('./chunk-JH4CDG4G.cjs');
173
+ var _chunkR6GOH5CHcjs = require('./chunk-R6GOH5CH.cjs');
174
174
 
175
175
 
176
- var _chunkEA5HVG45cjs = require('./chunk-EA5HVG45.cjs');
176
+ var _chunkMUQP2APNcjs = require('./chunk-MUQP2APN.cjs');
177
177
 
178
178
 
179
- var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
179
+ var _chunk323JTLXRcjs = require('./chunk-323JTLXR.cjs');
180
180
 
181
181
 
182
182
 
@@ -194,34 +194,34 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
194
194
 
195
195
 
196
196
 
197
- var _chunkRTAWQXMEcjs = require('./chunk-RTAWQXME.cjs');
197
+ var _chunkZCT6B5PQcjs = require('./chunk-ZCT6B5PQ.cjs');
198
198
 
199
199
 
200
200
 
201
- var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
201
+ var _chunkP4ZLFUNBcjs = require('./chunk-P4ZLFUNB.cjs');
202
202
 
203
203
 
204
204
 
205
- var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
205
+ var _chunkQTGYT2DFcjs = require('./chunk-QTGYT2DF.cjs');
206
206
 
207
207
 
208
208
 
209
209
 
210
- var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
210
+ var _chunkVZ2P6GRCcjs = require('./chunk-VZ2P6GRC.cjs');
211
211
 
212
212
 
213
213
 
214
- var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
214
+ var _chunkQZRFEHMScjs = require('./chunk-QZRFEHMS.cjs');
215
215
 
216
216
 
217
- var _chunkZ43CIBURcjs = require('./chunk-Z43CIBUR.cjs');
217
+ var _chunkGUYGMTWAcjs = require('./chunk-GUYGMTWA.cjs');
218
218
 
219
219
 
220
220
 
221
- var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
221
+ var _chunkIEZFFXSCcjs = require('./chunk-IEZFFXSC.cjs');
222
222
 
223
223
 
224
- var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
224
+ var _chunkPFVNPOKNcjs = require('./chunk-PFVNPOKN.cjs');
225
225
 
226
226
 
227
227
 
@@ -231,73 +231,74 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
231
231
 
232
232
 
233
233
 
234
+ var _chunkLEZJZX4Ccjs = require('./chunk-LEZJZX4C.cjs');
234
235
 
235
- var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
236
236
 
237
237
 
238
+ var _chunkCYUTK4JPcjs = require('./chunk-CYUTK4JP.cjs');
238
239
 
239
240
 
240
241
 
241
242
 
242
- var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
243
243
 
244
244
 
245
- var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
245
+ var _chunkXH4GQ7MTcjs = require('./chunk-XH4GQ7MT.cjs');
246
246
 
247
247
 
248
- var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
248
+ var _chunkNMMCBJZMcjs = require('./chunk-NMMCBJZM.cjs');
249
249
 
250
250
 
251
+ var _chunkTP7JAC3Tcjs = require('./chunk-TP7JAC3T.cjs');
251
252
 
252
253
 
253
254
 
254
- var _chunkJDT733EWcjs = require('./chunk-JDT733EW.cjs');
255
255
 
256
256
 
257
+ var _chunk27IPPPCVcjs = require('./chunk-27IPPPCV.cjs');
257
258
 
258
- var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
259
259
 
260
260
 
261
- var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
261
+ var _chunkYQ5NVEFScjs = require('./chunk-YQ5NVEFS.cjs');
262
262
 
263
263
 
264
- var _chunkPWDBWXQIcjs = require('./chunk-PWDBWXQI.cjs');
264
+ var _chunkU2HFXURZcjs = require('./chunk-U2HFXURZ.cjs');
265
265
 
266
266
 
267
+ var _chunkLVYUTMW4cjs = require('./chunk-LVYUTMW4.cjs');
267
268
 
268
- var _chunkBSX5OGSDcjs = require('./chunk-BSX5OGSD.cjs');
269
269
 
270
270
 
271
+ var _chunkXE3E4MERcjs = require('./chunk-XE3E4MER.cjs');
271
272
 
272
273
 
273
- var _chunkDVAZ53X6cjs = require('./chunk-DVAZ53X6.cjs');
274
274
 
275
275
 
276
+ var _chunkN4AM7Q34cjs = require('./chunk-N4AM7Q34.cjs');
276
277
 
277
- var _chunkQKW6DLDTcjs = require('./chunk-QKW6DLDT.cjs');
278
278
 
279
279
 
280
- var _chunkNW3DL2PMcjs = require('./chunk-NW3DL2PM.cjs');
280
+ var _chunk5YT2ZSWScjs = require('./chunk-5YT2ZSWS.cjs');
281
281
 
282
282
 
283
+ var _chunkOCQSYDMGcjs = require('./chunk-OCQSYDMG.cjs');
283
284
 
284
285
 
285
- var _chunkSHDCKRP4cjs = require('./chunk-SHDCKRP4.cjs');
286
286
 
287
287
 
288
- var _chunkTWFJJPE7cjs = require('./chunk-TWFJJPE7.cjs');
288
+ var _chunkNQUZDXKJcjs = require('./chunk-NQUZDXKJ.cjs');
289
289
 
290
290
 
291
+ var _chunkZTNU4XCCcjs = require('./chunk-ZTNU4XCC.cjs');
291
292
 
292
- var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
293
293
 
294
294
 
295
- var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
295
+ var _chunkMNBFSAWFcjs = require('./chunk-MNBFSAWF.cjs');
296
296
 
297
297
 
298
- var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
298
+ var _chunkYHALJBYTcjs = require('./chunk-YHALJBYT.cjs');
299
299
 
300
300
 
301
+ var _chunkIDUGG7VRcjs = require('./chunk-IDUGG7VR.cjs');
301
302
 
302
303
 
303
304
 
@@ -305,55 +306,61 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
305
306
 
306
307
 
307
308
 
308
- var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
309
309
 
310
310
 
311
+ var _chunkGUDYDNKUcjs = require('./chunk-GUDYDNKU.cjs');
311
312
 
312
313
 
313
- var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
314
314
 
315
315
 
316
+ var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
316
317
 
317
- var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
318
318
 
319
319
 
320
- var _chunkNOSLIDSGcjs = require('./chunk-NOSLIDSG.cjs');
320
+ var _chunkH5AC3XSEcjs = require('./chunk-H5AC3XSE.cjs');
321
321
 
322
322
 
323
- var _chunkEUZFBHPPcjs = require('./chunk-EUZFBHPP.cjs');
323
+ var _chunkZ7YIQ7AJcjs = require('./chunk-Z7YIQ7AJ.cjs');
324
324
 
325
325
 
326
+ var _chunkO7B6LJWEcjs = require('./chunk-O7B6LJWE.cjs');
326
327
 
327
- var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
328
328
 
329
329
 
330
- var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
330
+ var _chunkVIDUNAQEcjs = require('./chunk-VIDUNAQE.cjs');
331
331
 
332
332
 
333
- var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
333
+ var _chunk6FIY4KBCcjs = require('./chunk-6FIY4KBC.cjs');
334
334
 
335
335
 
336
+ var _chunkIBZW57NWcjs = require('./chunk-IBZW57NW.cjs');
336
337
 
337
338
 
338
- var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
339
339
 
340
340
 
341
+ var _chunkTFCBJFP7cjs = require('./chunk-TFCBJFP7.cjs');
341
342
 
342
343
 
343
344
 
344
- var _chunkML4TOUZPcjs = require('./chunk-ML4TOUZP.cjs');
345
345
 
346
346
 
347
- var _chunkUZM3PDKKcjs = require('./chunk-UZM3PDKK.cjs');
347
+ var _chunkT4YCWRCJcjs = require('./chunk-T4YCWRCJ.cjs');
348
+
349
+
350
+
351
+ var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
348
352
 
349
353
  // src/build/index.ts
354
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
350
355
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
351
356
  var _fs = require('fs');
352
357
 
353
358
  // src/nitro/universal-build.ts
359
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
354
360
  var _crypto = require('crypto');
355
361
 
356
362
  // src/nitro/static-range.ts
363
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
357
364
 
358
365
 
359
366
  var FARM_NITRO_STATIC_HANDLER_SOURCE = `import { HTTPError, defineHandler } from "h3";
@@ -524,6 +531,7 @@ function toPosix(file) {
524
531
  }
525
532
 
526
533
  // src/nitro/client-css-href.ts
534
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
527
535
 
528
536
  var FARM_CLIENT_CSS_HREF_PLACEHOLDER = "/__farm_client_css_href__";
529
537
  var FARM_CLIENT_JS_SRC_PLACEHOLDER = "/__farm_client_js_src__";
@@ -600,6 +608,7 @@ var _module = require('module');
600
608
  var _util = require('util');
601
609
 
602
610
  // src/docs/compiler.ts
611
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
603
612
 
604
613
  var FARM_DOCS_COMPILED_ORIGIN = "https://farm-docs-build.invalid";
605
614
  function normalizePathname(pathname) {
@@ -641,13 +650,13 @@ function getDocsTitle(docs) {
641
650
  return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
642
651
  }
643
652
  function loadPages(contentDir, docs) {
644
- return _chunkILQSRLKKcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkILQSRLKKcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
653
+ return _chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunk4A6WSOZHcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
645
654
  }
646
655
  function findSocialImagePath(html, basePath) {
647
656
  const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
648
657
  if (!_optionalChain([match, 'optionalAccess', _2 => _2[1]])) return null;
649
658
  try {
650
- return _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, new URL(match[1], FARM_DOCS_COMPILED_ORIGIN).pathname, basePath);
659
+ return _chunkTFCBJFP7cjs.stripFarmBasePath.call(void 0, new URL(match[1], FARM_DOCS_COMPILED_ORIGIN).pathname, basePath);
651
660
  } catch (e7) {
652
661
  return null;
653
662
  }
@@ -659,15 +668,15 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
659
668
  return response;
660
669
  }
661
670
  async function compileFarmDocsManifest(docs, options) {
662
- const contentDir = _chunkILQSRLKKcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
671
+ const contentDir = _chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
663
672
  const pages = loadPages(contentDir, docs);
664
- const basePath = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
673
+ const basePath = _chunkTFCBJFP7cjs.normalizeFarmBasePath.call(void 0, options.basePath);
665
674
  const absolutePaths = [
666
675
  _path2.default.resolve(options.root),
667
676
  _path2.default.resolve(contentDir),
668
677
  docs.configPath || ""
669
678
  ];
670
- const handler = _chunkILQSRLKKcjs.createFarmDocsHandler.call(void 0, docs, {
679
+ const handler = _chunk4A6WSOZHcjs.createFarmDocsHandler.call(void 0, docs, {
671
680
  root: options.root,
672
681
  srcDir: options.srcDir,
673
682
  clientEntry: options.clientEntry,
@@ -677,7 +686,7 @@ async function compileFarmDocsManifest(docs, options) {
677
686
  isPathGuarded: options.isPathGuarded,
678
687
  basePath
679
688
  });
680
- const apiHandler = _chunkRBSGFS5Xcjs.createFarmDocsAPIHandler.call(void 0, {
689
+ const apiHandler = _chunk2LHO4HTPcjs.createFarmDocsAPIHandler.call(void 0, {
681
690
  rootDir: options.root,
682
691
  srcDir: options.srcDir,
683
692
  docs,
@@ -689,7 +698,7 @@ async function compileFarmDocsManifest(docs, options) {
689
698
  const apiMarkdown = {};
690
699
  for (const page of pages) {
691
700
  const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
692
- const markdownPath = _chunkILQSRLKKcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
701
+ const markdownPath = _chunk4A6WSOZHcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
693
702
  await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
694
703
  if (htmlResponse) {
695
704
  const socialImagePath = findSocialImagePath(await htmlResponse.text(), basePath);
@@ -774,7 +783,7 @@ async function compileFarmDocsManifest(docs, options) {
774
783
  post: await compileResponse(postResponse, absolutePaths),
775
784
  search: {
776
785
  pages: publicPages.map((page) => ({
777
- ..._chunkILQSRLKKcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
786
+ ..._chunk4A6WSOZHcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
778
787
  sourcePath: `farm-docs:${page.slug || "index"}`
779
788
  })),
780
789
  search: _nullishCoalesce(searchConfig, () => ( true)),
@@ -786,6 +795,7 @@ async function compileFarmDocsManifest(docs, options) {
786
795
  }
787
796
 
788
797
  // src/nitro/client-module-preloads.ts
798
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
789
799
  var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
790
800
 
791
801
  var FARM_CLIENT_MODULE_PRELOADS_PLACEHOLDER = "__farm_client_module_preloads__";
@@ -832,7 +842,7 @@ function collectFarmClientModulePreloads(bundle, options) {
832
842
  const addModule = (id, chunk) => {
833
843
  const moduleId = id.split("?")[0];
834
844
  if (!_path2.default.isAbsolute(moduleId)) return;
835
- const key = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, moduleId, options.root);
845
+ const key = _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, moduleId, options.root);
836
846
  if (modules[key]) return;
837
847
  const loaded = /* @__PURE__ */ new Set([...entryLoaded, chunk.fileName]);
838
848
  modules[key] = [chunk.fileName, ...staticImports(chunk, loaded, [])].map(index);
@@ -934,6 +944,7 @@ function encodeFarmBuildJSONPlaceholder(value) {
934
944
  }
935
945
 
936
946
  // src/nitro/client-route-table.ts
947
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
937
948
 
938
949
 
939
950
  var FARM_CLIENT_ROUTE_TABLE_MODULE = "farm-client-routes";
@@ -954,7 +965,7 @@ function createFarmClientRouteTable(clientPages) {
954
965
  function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
955
966
  const docsRoutes = /* @__PURE__ */ new Map();
956
967
  for (const page of pages) {
957
- if (page.docs) docsRoutes.set(_chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, page.pattern, "router"), page);
968
+ if (page.docs) docsRoutes.set(_chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, page.pattern, "router"), page);
958
969
  }
959
970
  const docsTemplate = docsRoutes.values().next().value;
960
971
  const groupedDocsPages = [];
@@ -962,7 +973,7 @@ function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
962
973
  const shadowed = [];
963
974
  for (const page of pages) {
964
975
  if (page.docs) continue;
965
- const shape = _chunkML4TOUZPcjs.getRoutePatternShape.call(void 0, page.pattern, "router");
976
+ const shape = _chunkT4YCWRCJcjs.getRoutePatternShape.call(void 0, page.pattern, "router");
966
977
  const docsRoute = docsRoutes.get(shape);
967
978
  const directory = page.directory ? { directory: page.directory } : {};
968
979
  if (docsPagePaths.has(page.pattern)) {
@@ -972,7 +983,7 @@ function resolveFarmDocsClientRoutes(pages, docsPagePaths) {
972
983
  }
973
984
  } else if (!docsRoute) {
974
985
  appPages.push(page);
975
- } else if (_chunkML4TOUZPcjs.getRoutePatternSpecificity.call(void 0, docsRoute.pattern, "router").every(isStatic)) {
986
+ } else if (_chunkT4YCWRCJcjs.getRoutePatternSpecificity.call(void 0, docsRoute.pattern, "router").every(isStatic)) {
976
987
  docsRoutes.delete(shape);
977
988
  appPages.push(page);
978
989
  } else {
@@ -1006,6 +1017,7 @@ async function readFarmClientRouteTable(buildDir) {
1006
1017
  }
1007
1018
 
1008
1019
  // src/docs/module-preloads.ts
1020
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1009
1021
 
1010
1022
 
1011
1023
  var FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER = "__farm_docs_module_preloads__";
@@ -1093,6 +1105,7 @@ function encodeFarmDocsModulePreloads(manifest) {
1093
1105
  }
1094
1106
 
1095
1107
  // src/route-runtime-manifest.ts
1108
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1096
1109
 
1097
1110
  var FARM_ROUTE_RUNTIME_MANIFEST = "route-runtime-manifest.json";
1098
1111
  async function createFarmRouteRuntimeManifest(options) {
@@ -1100,7 +1113,7 @@ async function createFarmRouteRuntimeManifest(options) {
1100
1113
  const routes = [];
1101
1114
  for (const [pattern, entry] of options.routeManager.getRoutes()) {
1102
1115
  const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
1103
- const rendering = await _chunkEXPVSFAGcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1116
+ const rendering = await _chunkT4VF6BYVcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1104
1117
  const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
1105
1118
  routes.push({
1106
1119
  kind: "page",
@@ -1111,13 +1124,13 @@ async function createFarmRouteRuntimeManifest(options) {
1111
1124
  });
1112
1125
  }
1113
1126
  for (const [pattern, route] of options.apiRouteManager.getRoutes()) {
1114
- const publicPattern = _chunk2OF5RPVUcjs.resolveFarmAPIServerRoutePath.call(void 0,
1127
+ const publicPattern = _chunkH5AC3XSEcjs.resolveFarmAPIServerRoutePath.call(void 0,
1115
1128
  pattern,
1116
- _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, options.config.api)
1129
+ _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, options.config.api)
1117
1130
  );
1118
- const inherited = _chunkIUKBPBM7cjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, publicPattern, options.config.routeRules);
1119
- const own = _chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0,
1120
- _chunkIUKBPBM7cjs.getFarmRouteRuntimeConfig.call(void 0, route),
1131
+ const inherited = _chunkGUDYDNKUcjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, publicPattern, options.config.routeRules);
1132
+ const own = _chunkGUDYDNKUcjs.normalizeFarmRouteRuntimeConfig.call(void 0,
1133
+ _chunkGUDYDNKUcjs.getFarmRouteRuntimeConfig.call(void 0, route),
1121
1134
  `API route "${pattern}"`
1122
1135
  );
1123
1136
  routes.push({
@@ -1125,8 +1138,8 @@ async function createFarmRouteRuntimeManifest(options) {
1125
1138
  pattern: publicPattern,
1126
1139
  rendering: "dynamic",
1127
1140
  source: normalizeManifestSource(root, route.filePath),
1128
- ..._chunkIUKBPBM7cjs.resolveFarmRouteRuntimeConfig.call(void 0,
1129
- _chunkIUKBPBM7cjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
1141
+ ..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0,
1142
+ _chunkGUDYDNKUcjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
1130
1143
  `API route "${pattern}"`
1131
1144
  )
1132
1145
  });
@@ -1134,9 +1147,9 @@ async function createFarmRouteRuntimeManifest(options) {
1134
1147
  for (const entry of options.routeManager.getMetadataRoutes().values()) {
1135
1148
  const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
1136
1149
  const pattern = entry.pattern === "/" ? `/${entry.outputName}` : `${entry.pattern}/${entry.outputName}`;
1137
- const inherited = _chunkIUKBPBM7cjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, pattern, options.config.routeRules);
1138
- const own = _chunkIUKBPBM7cjs.normalizeFarmRouteRuntimeConfig.call(void 0,
1139
- _chunkIUKBPBM7cjs.getFarmRouteRuntimeConfig.call(void 0, routeModule),
1150
+ const inherited = _chunkGUDYDNKUcjs.resolveFarmRouteRuleRuntimeConfig.call(void 0, pattern, options.config.routeRules);
1151
+ const own = _chunkGUDYDNKUcjs.normalizeFarmRouteRuntimeConfig.call(void 0,
1152
+ _chunkGUDYDNKUcjs.getFarmRouteRuntimeConfig.call(void 0, routeModule),
1140
1153
  `Metadata route "${pattern}"`
1141
1154
  );
1142
1155
  routes.push({
@@ -1144,19 +1157,19 @@ async function createFarmRouteRuntimeManifest(options) {
1144
1157
  pattern,
1145
1158
  rendering: "dynamic",
1146
1159
  source: normalizeManifestSource(root, entry.modulePath),
1147
- ..._chunkIUKBPBM7cjs.resolveFarmRouteRuntimeConfig.call(void 0,
1148
- _chunkIUKBPBM7cjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
1160
+ ..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0,
1161
+ _chunkGUDYDNKUcjs.mergeFarmRouteRuntimeConfigs.call(void 0, inherited, own),
1149
1162
  `Metadata route "${pattern}"`
1150
1163
  )
1151
1164
  });
1152
1165
  }
1153
1166
  for (const [pattern, rule] of Object.entries(options.config.routeRules)) {
1154
- if (!_chunkIUKBPBM7cjs.hasFarmRouteRuntimeControls.call(void 0, rule)) continue;
1167
+ if (!_chunkGUDYDNKUcjs.hasFarmRouteRuntimeControls.call(void 0, rule)) continue;
1155
1168
  routes.push({
1156
1169
  kind: "rule",
1157
1170
  pattern,
1158
1171
  rendering: rule.prerender || rule.render === "static" ? "static" : "dynamic",
1159
- ..._chunkIUKBPBM7cjs.resolveFarmRouteRuntimeConfig.call(void 0, rule, `Route rule "${pattern}"`)
1172
+ ..._chunkGUDYDNKUcjs.resolveFarmRouteRuntimeConfig.call(void 0, rule, `Route rule "${pattern}"`)
1160
1173
  });
1161
1174
  }
1162
1175
  return {
@@ -1173,7 +1186,7 @@ async function writeFarmRouteRuntimeManifest(directory, manifest) {
1173
1186
  return manifestPath;
1174
1187
  }
1175
1188
  function validateFarmRouteRuntimeDeployment(manifest, preset) {
1176
- const runtime = _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset);
1189
+ const runtime = _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset);
1177
1190
  const warnings = /* @__PURE__ */ new Set();
1178
1191
  for (const route of manifest.routes) {
1179
1192
  if (route.rendering === "static") continue;
@@ -1209,6 +1222,8 @@ function normalizeManifestSource(root, modulePath) {
1209
1222
  }
1210
1223
 
1211
1224
  // src/nitro/vercel-route-runtime.ts
1225
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1226
+
1212
1227
 
1213
1228
  async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, basePath = "/") {
1214
1229
  const dynamicRoutes = manifest.routes.filter(
@@ -1224,7 +1239,7 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
1224
1239
  regions: route.regions,
1225
1240
  maxDuration: route.maxDuration
1226
1241
  };
1227
- const key = _chunkIUKBPBM7cjs.createFarmRouteRuntimeKey.call(void 0, config);
1242
+ const key = _chunkGUDYDNKUcjs.createFarmRouteRuntimeKey.call(void 0, config);
1228
1243
  const group = groups.get(key) || { config, routes: [] };
1229
1244
  group.routes.push(route);
1230
1245
  groups.set(key, group);
@@ -1241,7 +1256,8 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
1241
1256
  groupIndex += 1;
1242
1257
  const functionName = `__farm_runtime_${groupIndex}`;
1243
1258
  const functionDir = _path2.default.join(functionsDir, `${functionName}.func`);
1244
- await fs5.cp(baseFunctionDir, functionDir, { recursive: true, force: true });
1259
+ await fs5.rm(functionDir, { recursive: true, force: true });
1260
+ await linkVercelFunctionFiles(baseFunctionDir, functionDir, fs5);
1245
1261
  await configureVercelFunction(functionDir, group.config, fs5);
1246
1262
  destinations.set(key, `/${functionName}`);
1247
1263
  }
@@ -1251,7 +1267,7 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
1251
1267
  const src = farmRoutePatternToVercelSource(route.pattern, basePath);
1252
1268
  if (seenSources.has(src)) continue;
1253
1269
  seenSources.add(src);
1254
- const key = _chunkIUKBPBM7cjs.createFarmRouteRuntimeKey.call(void 0, {
1270
+ const key = _chunkGUDYDNKUcjs.createFarmRouteRuntimeKey.call(void 0, {
1255
1271
  runtime: route.runtime === "auto" ? "node" : route.runtime,
1256
1272
  regions: route.regions,
1257
1273
  maxDuration: route.maxDuration
@@ -1260,6 +1276,26 @@ async function createFarmVercelRouteRuntimeFunctions(outputDir, manifest, fs5, b
1260
1276
  }
1261
1277
  return routes;
1262
1278
  }
1279
+ var LINK_FALLBACK_CODES = /* @__PURE__ */ new Set(["EXDEV", "EPERM", "ENOTSUP", "EMLINK"]);
1280
+ async function linkVercelFunctionFiles(source, target, fs5, root = true) {
1281
+ await fs5.mkdir(target, { recursive: true });
1282
+ const entries = await fs5.readdir(source, { withFileTypes: true });
1283
+ await Promise.all(
1284
+ entries.map(async (entry) => {
1285
+ const from = _path2.default.join(source, entry.name);
1286
+ const to = _path2.default.join(target, entry.name);
1287
+ if (entry.isDirectory()) return linkVercelFunctionFiles(from, to, fs5, false);
1288
+ if (entry.isSymbolicLink()) return fs5.cp(from, to, { verbatimSymlinks: true });
1289
+ if (root && entry.name === ".vc-config.json") return fs5.copyFile(from, to);
1290
+ try {
1291
+ await fs5.link(from, to);
1292
+ } catch (error) {
1293
+ if (!LINK_FALLBACK_CODES.has(_nullishCoalesce(error.code, () => ( "")))) throw error;
1294
+ await fs5.copyFile(from, to, _fs.constants.COPYFILE_FICLONE);
1295
+ }
1296
+ })
1297
+ );
1298
+ }
1263
1299
  function farmRoutePatternToVercelSource(pattern, basePath = "/") {
1264
1300
  const normalized = normalizePattern(pattern);
1265
1301
  const normalizedBasePath = normalizeBasePath(basePath);
@@ -1323,7 +1359,14 @@ function escapeRegExp(value) {
1323
1359
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1324
1360
  }
1325
1361
 
1362
+ // src/nitro/vercel-not-found.ts
1363
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1364
+
1365
+ // src/nitro/vercel-assets.ts
1366
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1367
+
1326
1368
  // src/nitro/immutable-assets.ts
1369
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1327
1370
 
1328
1371
  var FARM_IMMUTABLE_ASSET_CACHE_CONTROL = "public, max-age=31536000, immutable";
1329
1372
  var FARM_IMMUTABLE_ASSET_MAX_AGE = 31536e3;
@@ -1338,7 +1381,7 @@ function planFarmImmutableAssets(options) {
1338
1381
  const cacheRulePatterns = Object.entries(_nullishCoalesce(options.routeRules, () => ( {}))).filter(
1339
1382
  ([, rule]) => Object.keys(_nullishCoalesce(_optionalChain([rule, 'optionalAccess', _28 => _28.headers]), () => ( {}))).some((name) => name.toLowerCase() === "cache-control")
1340
1383
  ).map(([pattern]) => pattern);
1341
- const isImmutable = (file) => isFarmImmutableAssetPath(file) && !cacheRulePatterns.some((pattern) => _chunkIUKBPBM7cjs.farmRouteRuleMatches.call(void 0, pattern, file));
1384
+ const isImmutable = (file) => isFarmImmutableAssetPath(file) && !cacheRulePatterns.some((pattern) => _chunkGUDYDNKUcjs.farmRouteRuleMatches.call(void 0, pattern, file));
1342
1385
  const routeDirs = new Set(
1343
1386
  (_nullishCoalesce(options.routePaths, () => ( []))).map((routePath) => routePath.split("/").filter(Boolean)[0])
1344
1387
  );
@@ -1542,6 +1585,7 @@ function escapeRegExp3(value) {
1542
1585
  }
1543
1586
 
1544
1587
  // src/nitro/ssr-public-assets.ts
1588
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1545
1589
 
1546
1590
  var SERVER_FILE_URL_RE = /new\s+URL\(\s*(["'`])([^"'`\\]+)\1\s*,\s*import\.meta\.url\s*\)/g;
1547
1591
  function resolveBundleFileName(chunkFileName, relativeUrl) {
@@ -1605,7 +1649,7 @@ function collectServerOnlySSRAssets(bundle, polyroute = false) {
1605
1649
  return serverOnly;
1606
1650
  }
1607
1651
  function canReadServerFiles(preset) {
1608
- return _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" && !preset.startsWith("cloudflare");
1652
+ return _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" && !preset.startsWith("cloudflare");
1609
1653
  }
1610
1654
  function assertServerReadSSRAssetsSupported(bundle, preset, root) {
1611
1655
  if (canReadServerFiles(preset)) return;
@@ -1658,6 +1702,7 @@ function createServerReadSSRAssetsPlugin(bundle, ssrOutputDir) {
1658
1702
  }
1659
1703
 
1660
1704
  // src/nitro/netlify-entry.ts
1705
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1661
1706
 
1662
1707
 
1663
1708
  function resolveNitroNetlifyEntry(nitroRuntimeEntry) {
@@ -1723,6 +1768,7 @@ export default async function farmNetlifyHandler(request, context) {
1723
1768
  }
1724
1769
 
1725
1770
  // src/build/strip-platform-config.ts
1771
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1726
1772
 
1727
1773
 
1728
1774
  var PLATFORM_CONFIG_KEYS = /* @__PURE__ */ new Set(["desktop", "mobile"]);
@@ -1809,7 +1855,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
1809
1855
  // removed block used (`readFileSync` for a version, say).
1810
1856
  enforce: "pre",
1811
1857
  transform: {
1812
- filter: { id: _chunkM4YXD6MDcjs.fileNamePattern.call(void 0, configFiles) },
1858
+ filter: { id: _chunkVWPGK6UVcjs.fileNamePattern.call(void 0, configFiles) },
1813
1859
  async handler(code, id) {
1814
1860
  const file = id.split("?", 1)[0];
1815
1861
  if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
@@ -1824,6 +1870,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
1824
1870
  }
1825
1871
 
1826
1872
  // src/build/markdown-precompile.ts
1873
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1827
1874
 
1828
1875
 
1829
1876
 
@@ -1877,6 +1924,7 @@ function precompileFarmMarkdownPages(bodies, coreRoot) {
1877
1924
  }
1878
1925
 
1879
1926
  // src/nitro/client-sourcemaps.ts
1927
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1880
1928
 
1881
1929
 
1882
1930
  var FARM_CLIENT_SOURCEMAPS_DIR = "client-sourcemaps";
@@ -1911,6 +1959,7 @@ function createFarmPrivateClientSourcemapsPlugin(options) {
1911
1959
  }
1912
1960
 
1913
1961
  // src/nitro/client-brotli-assets.ts
1962
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1914
1963
 
1915
1964
 
1916
1965
 
@@ -1946,7 +1995,11 @@ async function writeFarmClientBrotliAssets(clientOutputDir) {
1946
1995
  await Promise.all(Array.from({ length: _os.availableParallelism.call(void 0, ) }, next));
1947
1996
  }
1948
1997
 
1998
+ // src/nitro/client-chunks.ts
1999
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
2000
+
1949
2001
  // src/nitro/islands-react-chunk.ts
2002
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1950
2003
  var REACT_MODULE = /[\\/]node_modules[\\/](?:react|react-dom|scheduler)[\\/]/;
1951
2004
  var REACT_DOM_MODULE = /[\\/]node_modules[\\/]react-dom[\\/]/;
1952
2005
  var FARM_EAGER_COMPILE_HINT = "//# allFunctionsCalledOnLoad";
@@ -2036,6 +2089,7 @@ function createFarmClientChunksPlugin(options) {
2036
2089
  }
2037
2090
 
2038
2091
  // src/middleware/static-config.ts
2092
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
2039
2093
  function literalMatcher(node) {
2040
2094
  if (!node) return void 0;
2041
2095
  if (node.type === "Literal" && typeof node.value === "string") return node.value;
@@ -2110,6 +2164,7 @@ async function readMiddlewareFileConfig(filePath) {
2110
2164
  }
2111
2165
 
2112
2166
  // src/nitro/vercel-edge-middleware.ts
2167
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
2113
2168
 
2114
2169
 
2115
2170
 
@@ -2128,7 +2183,7 @@ function escapeRegExp4(value) {
2128
2183
  }
2129
2184
  function toFarmVercelEdgeGuardedUrls(pathnames, basePath) {
2130
2185
  return [
2131
- ...new Set(pathnames.flatMap((pathname) => [pathname, _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pathname, basePath)]))
2186
+ ...new Set(pathnames.flatMap((pathname) => [pathname, _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, pathname, basePath)]))
2132
2187
  ];
2133
2188
  }
2134
2189
  function createFarmVercelEdgeMiddlewareRoutes(pathnames, basePath = "/") {
@@ -2159,8 +2214,8 @@ ${modules.join("\n")}
2159
2214
  ],
2160
2215
  i18n: ${JSON.stringify(config.i18n)},
2161
2216
  server: ${JSON.stringify({ trustProxy: _optionalChain([config, 'access', _64 => _64.server, 'optionalAccess', _65 => _65.trustProxy]) === true })},
2162
- apiBasePath: ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
2163
- notFoundPath: ${JSON.stringify(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, FARM_VERCEL_EDGE_NOT_FOUND_PATH, config.basePath))},
2217
+ apiBasePath: ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
2218
+ notFoundPath: ${JSON.stringify(_chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_VERCEL_EDGE_NOT_FOUND_PATH, config.basePath))},
2164
2219
  pages: ${JSON.stringify(toFarmVercelEdgeGuardedUrls(guardedPages, config.basePath))},
2165
2220
  });
2166
2221
  `;
@@ -2217,7 +2272,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
2217
2272
  logLevel: "silent",
2218
2273
  plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
2219
2274
  resolve: {
2220
- alias: _chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2275
+ alias: _chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
2221
2276
  conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
2222
2277
  },
2223
2278
  transform: {
@@ -2236,7 +2291,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
2236
2291
  await bundle.close();
2237
2292
  }
2238
2293
  } catch (error) {
2239
- throw _chunkPWDBWXQIcjs.withPlainDiagnostics.call(void 0, error);
2294
+ throw _chunkLVYUTMW4cjs.withPlainDiagnostics.call(void 0, error);
2240
2295
  } finally {
2241
2296
  await fs5.rm(entryPath, { force: true });
2242
2297
  }
@@ -2257,11 +2312,11 @@ Remove them from the middleware (Edge provides ${[...EDGE_NODE_MODULES].join(",
2257
2312
  );
2258
2313
  const gzippedBytes = _zlib.gzipSync.call(void 0, code).length;
2259
2314
  if (gzippedBytes > EDGE_FUNCTION_SIZE_WARNING_BYTES) {
2260
- _chunk7U4XF76Rcjs.logger.warn(
2315
+ _chunk7ZDLE77Pcjs.logger.warn(
2261
2316
  `Vercel edge middleware is ${(gzippedBytes / 1024 / 1024).toFixed(2)} MB gzipped, over the Hobby plan's 1 MB Edge function limit (Pro allows 2 MB, Enterprise 4 MB).`
2262
2317
  );
2263
2318
  }
2264
- _chunk7U4XF76Rcjs.logger.info(
2319
+ _chunk7ZDLE77Pcjs.logger.info(
2265
2320
  `\u{1F6E1}\uFE0F Vercel edge middleware: ${routes.length} middleware file(s) guard their prerendered pages before the CDN serves them`
2266
2321
  );
2267
2322
  }
@@ -2287,7 +2342,7 @@ function preloadFarmNitroBuilder() {
2287
2342
  (reason) => ({ status: "rejected", reason })
2288
2343
  );
2289
2344
  }
2290
- var _filename = typeof _chunkUZM3PDKKcjs.define_import_meta_default.url !== "undefined" ? _url.fileURLToPath.call(void 0, _chunkUZM3PDKKcjs.define_import_meta_default.url) : "";
2345
+ var _filename = typeof _chunkUGL4BDNBcjs.define_import_meta_default.url !== "undefined" ? _url.fileURLToPath.call(void 0, _chunkUGL4BDNBcjs.define_import_meta_default.url) : "";
2291
2346
  var _dirname = _path2.default.dirname(_filename);
2292
2347
  function findFarmCoreRoot(from) {
2293
2348
  let dir = _path2.default.dirname(from);
@@ -2405,6 +2460,7 @@ var NITRO_EXTERNAL_MODULES = /* @__PURE__ */ new Set([
2405
2460
  var NITRO_REACT_RUNTIME_MODULES = /* @__PURE__ */ new Set(["react", "react-dom", "react-dom/server"]);
2406
2461
  var FARM_SSR_PACKAGE_IMPORT = "#farm-ssr-entry";
2407
2462
  var FARM_SSR_OUTPUT_DIR = "farm-ssr";
2463
+ var PREBUILT_SSR_PRESETS = /* @__PURE__ */ new Set(["node-server", "vercel"]);
2408
2464
  var FARM_CLIENT_BUILD_TARGET = ["es2020", "edge88", "firefox78", "chrome87", "safari14"];
2409
2465
  function resolveNitroRuntimeDependency(root, specifier) {
2410
2466
  return _module.createRequire.call(void 0, resolveNitroPackageEntry(root)).resolve(specifier).split(_path2.default.sep).join("/");
@@ -2439,7 +2495,7 @@ function createPrerenderMarkdownPagesPlugin(pages) {
2439
2495
  const compiled = await pages;
2440
2496
  if (compiled.size === 0) return "";
2441
2497
  return `globalThis[Symbol.for(${JSON.stringify(
2442
- _chunkJDT733EWcjs.FARM_MARKDOWN_PRECOMPILED_PAGES.description
2498
+ _chunk27IPPPCVcjs.FARM_MARKDOWN_PRECOMPILED_PAGES.description
2443
2499
  )})] = new Map(${JSON.stringify([...compiled])});`;
2444
2500
  }
2445
2501
  };
@@ -2470,7 +2526,7 @@ function createPrerenderRuntimeResolverPlugin(root, resolveNitroEntry = resolveN
2470
2526
  };
2471
2527
  }
2472
2528
  function createFarmStorageModuleRegistration(config) {
2473
- const modules = _chunkNW3DL2PMcjs._collectFarmStorageModules.call(void 0, config.storage);
2529
+ const modules = _chunkOCQSYDMGcjs._collectFarmStorageModules.call(void 0, config.storage);
2474
2530
  if (modules.length === 0) return "";
2475
2531
  const root = config.root || process.cwd();
2476
2532
  const projectRequire = _module.createRequire.call(void 0, _path2.default.join(root, "package.json"));
@@ -2577,7 +2633,7 @@ function hasReactDomEdgeServerBuild(root) {
2577
2633
  }
2578
2634
  }
2579
2635
  function shouldAliasReactServerToWebBuild(renderer, preset) {
2580
- return _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge";
2636
+ return _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge";
2581
2637
  }
2582
2638
  function isCloudflareImagePreset(preset) {
2583
2639
  return preset === "cloudflare" || preset === "cloudflare-pages" || preset === "cloudflare-module";
@@ -2619,7 +2675,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2619
2675
  return {
2620
2676
  name: "farm-omitted-metadata-image-runtime",
2621
2677
  resolveId: {
2622
- filter: { id: _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2678
+ filter: { id: _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2623
2679
  handler(source, importer) {
2624
2680
  if (source !== "@vercel/og") return null;
2625
2681
  const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
@@ -2628,7 +2684,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2628
2684
  }
2629
2685
  },
2630
2686
  load: {
2631
- filter: { id: _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2687
+ filter: { id: _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2632
2688
  handler(id) {
2633
2689
  if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
2634
2690
  return `
@@ -2677,7 +2733,7 @@ function createEdgeMetadataImageRuntimePlugin({
2677
2733
  return null;
2678
2734
  }
2679
2735
  const resolvedPath = _path2.default.resolve(_path2.default.dirname(importer.split("?", 1)[0]), source);
2680
- return { id: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolvedPath), external: "absolute" };
2736
+ return { id: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, resolvedPath), external: "absolute" };
2681
2737
  }
2682
2738
  };
2683
2739
  }
@@ -2907,7 +2963,7 @@ function resolveBuildDocsContentDir(docs, root, srcDir) {
2907
2963
  return _fs.existsSync.call(void 0, rootDocsDir) ? rootDocsDir : null;
2908
2964
  }
2909
2965
  function getFarmDocsBundledRootPaths(docs, root, srcDir) {
2910
- return _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, docs).slice(1).map((docsRoot) => {
2966
+ return _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, docs).slice(1).map((docsRoot) => {
2911
2967
  const contentDir = resolveBuildDocsContentDir(docsRoot, root, srcDir);
2912
2968
  const relativePath = contentDir ? _path2.default.relative(root, contentDir) : "";
2913
2969
  return relativePath === ".." || relativePath.startsWith(`..${_path2.default.sep}`) || _path2.default.isAbsolute(relativePath) ? "" : relativePath.split(_path2.default.sep).join("/");
@@ -2964,9 +3020,9 @@ function hasFarmPluginRoutes(config) {
2964
3020
  }
2965
3021
  function farmServerRuntimePluginsMayHandlePath(config, pathname) {
2966
3022
  return (config.plugins || []).some(
2967
- (plugin) => _chunkDVAZ53X6cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
3023
+ (plugin) => _chunkN4AM7Q34cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
2968
3024
  // prerendered file never answers or sends; its endpoints live under /__farm/.
2969
- plugin.name !== _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
3025
+ plugin.name !== _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN && _chunkUOFTT6S4cjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
2970
3026
  );
2971
3027
  }
2972
3028
  async function discoverMiddlewareRoutes(appDir) {
@@ -2996,8 +3052,8 @@ async function discoverMiddlewareRoutes(appDir) {
2996
3052
  }
2997
3053
  await walk(
2998
3054
  _path2.default.join(dir, entry.name),
2999
- _chunkSHDCKRP4cjs.appendMiddlewareRoutePath.call(void 0, routePath, entry.name),
3000
- _chunkSHDCKRP4cjs.appendMiddlewareDirectory.call(void 0, directory, entry.name),
3055
+ _chunkNQUZDXKJcjs.appendMiddlewareRoutePath.call(void 0, routePath, entry.name),
3056
+ _chunkNQUZDXKJcjs.appendMiddlewareDirectory.call(void 0, directory, entry.name),
3001
3057
  discovered
3002
3058
  );
3003
3059
  }
@@ -3009,10 +3065,10 @@ async function discoverMiddlewareRoutes(appDir) {
3009
3065
  routes.set(route.directory, route);
3010
3066
  }
3011
3067
  }
3012
- return Array.from(routes.values()).sort(_chunkSHDCKRP4cjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
3068
+ return Array.from(routes.values()).sort(_chunkNQUZDXKJcjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
3013
3069
  }
3014
3070
  function assertFarmDocsRuntimeSupported(config, preset) {
3015
- if (!_optionalChain([config, 'access', _92 => _92.docs, 'optionalAccess', _93 => _93.enabled]) || !_optionalChain([config, 'access', _94 => _94.docs, 'access', _95 => _95.adapter, 'optionalAccess', _96 => _96.server]) || _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
3071
+ if (!_optionalChain([config, 'access', _92 => _92.docs, 'optionalAccess', _93 => _93.enabled]) || !_optionalChain([config, 'access', _94 => _94.docs, 'access', _95 => _95.adapter, 'optionalAccess', _96 => _96.server]) || _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
3016
3072
  return;
3017
3073
  }
3018
3074
  throw new Error(
@@ -3027,10 +3083,10 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
3027
3083
  const distDir = config.distDir || ".farm";
3028
3084
  const lifecyclePluginManager = options.pluginManager;
3029
3085
  const productionViteResultPromise = Promise.allSettled([
3030
- Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))
3086
+ Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunk2L4M6YUGcjs.loadFarmProductionVite.call(void 0, ))))
3031
3087
  ]);
3032
3088
  const nitroBuilderResultPromise = preloadFarmNitroBuilder();
3033
- _chunk7U4XF76Rcjs.logger.info(`\u{1F69C} Building Farm.js application (universal) with preset: ${preset}...`);
3089
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F69C} Building Farm.js application (universal) with preset: ${preset}...`);
3034
3090
  const rendererBuild = options.rendererBuildLifetime ? void 0 : new AbortController();
3035
3091
  const rendererBuildLifetime = _nullishCoalesce(options.rendererBuildLifetime, () => ( rendererBuild.signal));
3036
3092
  let markdownPrecompile;
@@ -3047,7 +3103,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
3047
3103
  routeManager.getSearchPreserveRoutes().map((route) => [route.pattern, route])
3048
3104
  );
3049
3105
  for (const [pattern, entry] of routeManager.getRoutes()) {
3050
- const markdownSourcePath = entry.markdownSourcePath || (_chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
3106
+ const markdownSourcePath = entry.markdownSourcePath || (_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
3051
3107
  const searchPreserve = searchPreserveRoutes.get(entry.pattern);
3052
3108
  pageRoutes.push({
3053
3109
  pattern,
@@ -3077,13 +3133,13 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
3077
3133
  fallback: entry.fallback
3078
3134
  })
3079
3135
  );
3080
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes`);
3136
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes`);
3081
3137
  const fs5 = await import("fs/promises");
3082
3138
  const layoutRoutes = Array.from(routeManager.getLayouts(), ([pattern, { modulePath }]) => ({
3083
3139
  pattern,
3084
3140
  modulePath
3085
3141
  }));
3086
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes and ${layoutRoutes.length} layouts`);
3142
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes and ${layoutRoutes.length} layouts`);
3087
3143
  const isolatedClientBoundaryModules = routeManager.getIsolatedClientBoundaryModules(root);
3088
3144
  const islandsErrors = routeManager.getIslandsErrors(root);
3089
3145
  if (islandsErrors.length > 0) {
@@ -3102,9 +3158,9 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3102
3158
  throw productionViteResult.reason;
3103
3159
  }
3104
3160
  const productionVite = productionViteResult.value;
3105
- _chunk7U4XF76Rcjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
3161
+ _chunk7ZDLE77Pcjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
3106
3162
  const mobileClient = shouldBuildFarmMobileClient(config);
3107
- const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer);
3163
+ const rendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer);
3108
3164
  const buildClientBundle = async () => {
3109
3165
  if (rendererDisabled) {
3110
3166
  await fs5.rm(clientOutputDir, { recursive: true, force: true });
@@ -3147,11 +3203,11 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3147
3203
  let clientBuildResult;
3148
3204
  let ssrBuildResult;
3149
3205
  if (!rendererDisabled && config.renderer.buildConcurrency === "serial") {
3150
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Building client and SSR bundles serially for ${config.renderer.name}...`);
3206
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Building client and SSR bundles serially for ${config.renderer.name}...`);
3151
3207
  [clientBuildResult] = await Promise.allSettled([buildClientBundle()]);
3152
3208
  [ssrBuildResult] = await Promise.allSettled([buildSSRBundle()]);
3153
3209
  } else {
3154
- _chunk7U4XF76Rcjs.logger.info(
3210
+ _chunk7ZDLE77Pcjs.logger.info(
3155
3211
  rendererDisabled ? "\u{1F4E6} Building the server bundle (renderer: false, no client bundle)..." : "\u{1F4E6} Building client and SSR bundles in parallel..."
3156
3212
  );
3157
3213
  [clientBuildResult, ssrBuildResult] = await Promise.allSettled([
@@ -3168,7 +3224,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3168
3224
  if (productionVite.builder !== "rolldown" || !(clientBuildResult.reason instanceof IncompleteClientBuildOutputError)) {
3169
3225
  throw clientBuildResult.reason;
3170
3226
  }
3171
- _chunk7U4XF76Rcjs.logger.warn("Client bundle was incomplete; retrying after the SSR build...");
3227
+ _chunk7ZDLE77Pcjs.logger.warn("Client bundle was incomplete; retrying after the SSR build...");
3172
3228
  try {
3173
3229
  await buildClient(
3174
3230
  productionVite,
@@ -3198,7 +3254,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3198
3254
  const routeRuntimeManifest = routeRuntimeManifestResult.value;
3199
3255
  const runtimeValidation = validateFarmRouteRuntimeDeployment(routeRuntimeManifest, preset);
3200
3256
  for (const warning of runtimeValidation.warnings) {
3201
- _chunk7U4XF76Rcjs.logger.warn(warning);
3257
+ _chunk7ZDLE77Pcjs.logger.warn(warning);
3202
3258
  }
3203
3259
  const { bundle: ssrBundle, entryFile: ssrEntryFile, configuredHeaderRoutes } = ssrResult;
3204
3260
  assertServerReadSSRAssetsSupported(ssrBundle, preset, root);
@@ -3209,7 +3265,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3209
3265
  if (config.docs.enabled) {
3210
3266
  await copyFarmDocsFontAssetsToClient(root, clientOutputDir);
3211
3267
  }
3212
- _chunk7U4XF76Rcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
3268
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
3213
3269
  await buildNitroUniversal(
3214
3270
  config,
3215
3271
  routeManager,
@@ -3231,7 +3287,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3231
3287
  _path2.default.join(root, distDir),
3232
3288
  routeRuntimeManifest
3233
3289
  );
3234
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Route runtime manifest: ${_path2.default.relative(root, runtimeManifestPath)}`);
3290
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Route runtime manifest: ${_path2.default.relative(root, runtimeManifestPath)}`);
3235
3291
  } catch (error) {
3236
3292
  if (lifecyclePluginManager) {
3237
3293
  await lifecyclePluginManager.runHookParallel("onError", {
@@ -3243,7 +3299,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3243
3299
  }
3244
3300
  });
3245
3301
  }
3246
- _chunk7U4XF76Rcjs.logger.error(`\u274C Build failed: ${error}`);
3302
+ _chunk7ZDLE77Pcjs.logger.error(`\u274C Build failed: ${error}`);
3247
3303
  throw error;
3248
3304
  } finally {
3249
3305
  _optionalChain([rendererBuild, 'optionalAccess', _100 => _100.abort, 'call', _101 => _101()]);
@@ -3253,10 +3309,10 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
3253
3309
  function collectFarmPrerenderedMarkdownBodies(pageRoutes) {
3254
3310
  const bodies = [];
3255
3311
  for (const route of pageRoutes) {
3256
- if (route.source === void 0 || !_chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
3257
- const { body } = _chunkJDT733EWcjs.parseMarkdownFrontmatter.call(void 0, route.source);
3258
- const rendering = _chunkEXPVSFAGcjs.resolveRouteRenderingConfig.call(void 0,
3259
- _chunkJDT733EWcjs.readFarmMarkdownRouteConfig.call(void 0, body),
3312
+ if (route.source === void 0 || !_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
3313
+ const { body } = _chunk27IPPPCVcjs.parseMarkdownFrontmatter.call(void 0, route.source);
3314
+ const rendering = _chunkT4VF6BYVcjs.resolveRouteRenderingConfig.call(void 0,
3315
+ _chunk27IPPPCVcjs.readFarmMarkdownRouteConfig.call(void 0, body),
3260
3316
  route.source
3261
3317
  );
3262
3318
  if (rendering.ssg && rendering.revalidate === void 0) bodies.push(body);
@@ -3291,15 +3347,19 @@ async function writeSSRAssetsToClient(bundle, outputDir, polyroute) {
3291
3347
  }
3292
3348
  const filePath = _path2.default.join(outputDir, fileName);
3293
3349
  await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
3294
- await fs5.writeFile(filePath, output.source);
3350
+ try {
3351
+ await fs5.writeFile(filePath, output.source, { flag: "wx" });
3352
+ } catch (error) {
3353
+ if (error.code !== "EEXIST") throw error;
3354
+ }
3295
3355
  }
3296
3356
  }
3297
3357
  async function writeFarmVideoPlayerToClient(outputDir) {
3298
3358
  const fs5 = await import("fs/promises");
3299
- const filePath = _path2.default.join(outputDir, _chunkEUZFBHPPcjs.FARM_VIDEO_PLAYER_PATH.slice(1));
3359
+ const filePath = _path2.default.join(outputDir, _chunkO7B6LJWEcjs.FARM_VIDEO_PLAYER_PATH.slice(1));
3300
3360
  await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
3301
3361
  try {
3302
- await fs5.writeFile(filePath, _chunkM4YXD6MDcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
3362
+ await fs5.writeFile(filePath, _chunkVWPGK6UVcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
3303
3363
  } catch (error) {
3304
3364
  if (error.code !== "EEXIST") throw error;
3305
3365
  }
@@ -3307,7 +3367,7 @@ async function writeFarmVideoPlayerToClient(outputDir) {
3307
3367
  async function copyFarmDocsFontAssetsToClient(root, outputDir) {
3308
3368
  const fs5 = await import("fs/promises");
3309
3369
  await Promise.all(
3310
- _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, root).map(async ({ sourcePath, url }) => {
3370
+ _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, root).map(async ({ sourcePath, url }) => {
3311
3371
  const targetPath = _path2.default.join(outputDir, url.replace(/^\/+/, ""));
3312
3372
  await fs5.mkdir(_path2.default.dirname(targetPath), { recursive: true });
3313
3373
  await fs5.copyFile(sourcePath, targetPath);
@@ -3333,7 +3393,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
3333
3393
  }
3334
3394
  const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
3335
3395
  await fs5.writeFile(fontCssPath, normalizedFontCss);
3336
- await fs5.writeFile(clientCssPath, _chunkM4YXD6MDcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3396
+ await fs5.writeFile(clientCssPath, _chunkVWPGK6UVcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3337
3397
  }
3338
3398
  function importsFarmClientBlockedPackage(id, packageName) {
3339
3399
  return id === packageName || id.startsWith(`${packageName}/`);
@@ -3383,16 +3443,16 @@ async function validateClientBuildOutput(root, srcDir, outputDir) {
3383
3443
  }
3384
3444
  }
3385
3445
  function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, options = {}) {
3386
- const key = _chunkRTAWQXMEcjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3446
+ const key = _chunkZCT6B5PQcjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3387
3447
  let plan = cache.get(key);
3388
3448
  if (!plan) {
3389
- plan = _chunkRTAWQXMEcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3449
+ plan = _chunkZCT6B5PQcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3390
3450
  cache.set(key, plan);
3391
3451
  }
3392
3452
  return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
3393
3453
  }
3394
3454
  async function buildClient(productionVite, config, root, srcDir, outputDir, pageRoutes, layoutRoutes = [], routeSlots = [], isolatedClientBoundaryModules = /* @__PURE__ */ new Set(), hydrationPlanCache = /* @__PURE__ */ new Map(), rendererBuildLifetime, programmaticClientRoutes, mobile = false, sourceSnapshot) {
3395
- if (!mobile) await _chunkE5UN4OWXcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
3455
+ if (!mobile) await _chunk4JARM2QQcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
3396
3456
  const viteBuild = productionVite.build;
3397
3457
  const {
3398
3458
  farmIslandContainersPlugin,
@@ -3400,7 +3460,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3400
3460
  farmPlugin,
3401
3461
  farmServerOnlyEntriesPlugin
3402
3462
  } = await import("./vite.cjs");
3403
- const { PluginManager: PluginManager2 } = await import("./plugin-MWO3G2XM.cjs");
3463
+ const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
3404
3464
  const fs5 = await import("fs/promises");
3405
3465
  const pluginManager = new PluginManager2({
3406
3466
  config,
@@ -3409,50 +3469,50 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3409
3469
  });
3410
3470
  pluginManager.addPlugins(config.plugins || []);
3411
3471
  const clientPages = [];
3412
- const integrationProviders = _chunkDVAZ53X6cjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3472
+ const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3413
3473
  (provider) => provider.component || provider.type === "clerk"
3414
3474
  );
3415
3475
  const unsupportedIntegrationProvider = integrationProviders.find(
3416
- (provider) => !_chunkDVAZ53X6cjs.providerSupportsIslands.call(void 0, provider)
3476
+ (provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider)
3417
3477
  );
3418
- if (_optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.isolatedClientHydration]) === "enabled" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _108 => _108.experimental, 'optionalAccess', _109 => _109.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
3419
- _chunk7U4XF76Rcjs.logger.warn(
3478
+ if (_optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.isolatedClientHydration]) === "enabled" && _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) !== "rsc" && unsupportedIntegrationProvider) {
3479
+ _chunk7ZDLE77Pcjs.logger.warn(
3420
3480
  `[Farm.js] Client components hydrate with their route, not as islands, because integration provider "${unsupportedIntegrationProvider.name}" doesn't declare \`islands: true\`.`
3421
3481
  );
3422
3482
  }
3423
- const isolatedMode = _chunkRTAWQXMEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3424
- _optionalChain([config, 'access', _110 => _110.experimental, 'optionalAccess', _111 => _111.isolatedClientHydration]),
3483
+ const isolatedMode = _chunkZCT6B5PQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3484
+ _optionalChain([config, 'access', _108 => _108.experimental, 'optionalAccess', _109 => _109.isolatedClientHydration]),
3425
3485
  {
3426
- serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverComponents])) === "rsc",
3486
+ serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "rsc",
3427
3487
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
3428
3488
  }
3429
3489
  );
3430
- const planOptions = _chunkRTAWQXMEcjs.getFarmClientHydrationPlanOptions.call(void 0,
3490
+ const planOptions = _chunkZCT6B5PQcjs.getFarmClientHydrationPlanOptions.call(void 0,
3431
3491
  config.renderer,
3432
3492
  Boolean(unsupportedIntegrationProvider)
3433
3493
  );
3434
3494
  const pagePlanOptions = {
3435
3495
  ...planOptions,
3436
- serverOwners: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands"
3496
+ serverOwners: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands"
3437
3497
  };
3438
3498
  const layoutPlanOptions = {
3439
3499
  ...planOptions,
3440
3500
  serverTreeLayouts: pagePlanOptions.serverOwners
3441
3501
  };
3442
- const layoutAppliesToRoute = _chunkYSRZSKQBcjs.routeBoundaryCoversDirectory;
3502
+ const layoutAppliesToRoute = _chunkIGBQSUT5cjs.routeBoundaryCoversDirectory;
3443
3503
  const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
3444
- const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _116 => _116.experimental, 'optionalAccess', _117 => _117.serverComponents])) === "islands";
3445
- const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
3446
- const docsEntries = _optionalChain([config, 'access', _118 => _118.docs, 'optionalAccess', _119 => _119.enabled]) ? _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, config.docs).map(
3504
+ const islandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands";
3505
+ const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
3506
+ const docsEntries = _optionalChain([config, 'access', _110 => _110.docs, 'optionalAccess', _111 => _111.enabled]) ? _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).map(
3447
3507
  (docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
3448
3508
  ) : [];
3449
3509
  const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
3450
3510
  const isAdapterDocsRoute = (routePattern) => adapterOwnsDocsRuntime && docsEntries.some(
3451
3511
  (docsEntry) => docsEntry === "/" || routePattern === docsEntry || routePattern.startsWith(`${docsEntry}/`)
3452
3512
  );
3453
- const syntheticDocsEntry = _optionalChain([config, 'access', _120 => _120.docs, 'optionalAccess', _121 => _121.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
3513
+ const syntheticDocsEntry = _optionalChain([config, 'access', _112 => _112.docs, 'optionalAccess', _113 => _113.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
3454
3514
  const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
3455
- const plan = (operation) => sourceSnapshot ? _chunkRTAWQXMEcjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkRTAWQXMEcjs.withFarmSourceSnapshot.call(void 0, operation);
3515
+ const plan = (operation) => sourceSnapshot ? _chunkZCT6B5PQcjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkZCT6B5PQcjs.withFarmSourceSnapshot.call(void 0, operation);
3456
3516
  const { clientLayouts, clientRouteSlots } = plan(() => {
3457
3517
  const clientLayouts2 = layoutRoutes.map((layout) => {
3458
3518
  try {
@@ -3480,7 +3540,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3480
3540
  serverTreeLayout: metadata.serverTreeLayout
3481
3541
  };
3482
3542
  } catch (error) {
3483
- _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
3543
+ _chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
3484
3544
  return {
3485
3545
  ...layout,
3486
3546
  shouldHydrate: false,
@@ -3499,15 +3559,15 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3499
3559
  };
3500
3560
  }
3501
3561
  });
3502
- const markdownPagePlan = _chunkRTAWQXMEcjs.createMarkdownPageHydrationPlanner.call(void 0,
3503
- _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
3562
+ const markdownPagePlan = _chunkZCT6B5PQcjs.createMarkdownPageHydrationPlanner.call(void 0,
3563
+ _chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx), root),
3504
3564
  root,
3505
3565
  isolatedMode,
3506
3566
  { ...planOptions, packageReferences: pagePlanOptions.serverOwners }
3507
3567
  );
3508
3568
  const routePlans = pageRoutes.map((route) => ({
3509
3569
  route,
3510
- metadata: _chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
3570
+ metadata: _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
3511
3571
  route.modulePath,
3512
3572
  root,
3513
3573
  isolatedMode,
@@ -3515,7 +3575,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3515
3575
  pagePlanOptions
3516
3576
  )
3517
3577
  }));
3518
- _chunkRTAWQXMEcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3578
+ _chunkZCT6B5PQcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3519
3579
  clientLayouts2.map((layout) => ({
3520
3580
  pattern: layout.pattern,
3521
3581
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -3524,7 +3584,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3524
3584
  [
3525
3585
  ...routePlans.map(({ route, metadata }) => ({
3526
3586
  pattern: routeDirectory(route),
3527
- depth: _chunkYSRZSKQBcjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3587
+ depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3528
3588
  metadata
3529
3589
  })),
3530
3590
  ...syntheticDocsPatterns.map((pattern) => ({
@@ -3548,8 +3608,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3548
3608
  for (const layout of clientLayouts2) {
3549
3609
  const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
3550
3610
  if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
3551
- _chunk7U4XF76Rcjs.logger.warn(
3552
- `\u26A0\uFE0F ${_chunkRTAWQXMEcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3611
+ _chunk7ZDLE77Pcjs.logger.warn(
3612
+ `\u26A0\uFE0F ${_chunkZCT6B5PQcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3553
3613
  );
3554
3614
  }
3555
3615
  }
@@ -3561,7 +3621,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3561
3621
  if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
3562
3622
  continue;
3563
3623
  }
3564
- _chunk7U4XF76Rcjs.logger.info(
3624
+ _chunk7ZDLE77Pcjs.logger.info(
3565
3625
  `\u{1F4CA} Isolated hydration analysis: ${entry.modulePath} can exclude its server owner and hydrate ${metadata.isolatedBoundaries.length} client ${metadata.isolatedBoundaries.length === 1 ? "boundary" : "boundaries"}.`
3566
3626
  );
3567
3627
  }
@@ -3583,8 +3643,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3583
3643
  (layout) => (layout.shouldHydrate || layout.hasIsolatedClientBoundaries) && layoutAppliesToRoute(layout.pattern, routeDirectory(route))
3584
3644
  );
3585
3645
  if (metadata.suppressedAsyncHydration) {
3586
- _chunk7U4XF76Rcjs.logger.warn(
3587
- `\u26A0\uFE0F ${_chunkRTAWQXMEcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3646
+ _chunk7ZDLE77Pcjs.logger.warn(
3647
+ `\u26A0\uFE0F ${_chunkZCT6B5PQcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3588
3648
  );
3589
3649
  }
3590
3650
  const slotBoundaries = serverSlotPlans.filter(
@@ -3592,7 +3652,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3592
3652
  ).flatMap(({ plan: plan2 }) => plan2.isolatedBoundaries);
3593
3653
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0 || slotBoundaries.length > 0) {
3594
3654
  const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
3595
- const islandStrategy = _chunkM4YXD6MDcjs.resolveFarmRouteRootStrategy.call(void 0,
3655
+ const islandStrategy = _chunkVWPGK6UVcjs.resolveFarmRouteRootStrategy.call(void 0,
3596
3656
  route,
3597
3657
  metadata,
3598
3658
  clientLayouts2,
@@ -3611,12 +3671,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3611
3671
  ...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
3612
3672
  ],
3613
3673
  // The server renders a server tree only below a hydrating layout.
3614
- ..._chunkRTAWQXMEcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3674
+ ..._chunkZCT6B5PQcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3615
3675
  });
3616
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
3676
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
3617
3677
  }
3618
3678
  } catch (error) {
3619
- _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
3679
+ _chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
3620
3680
  }
3621
3681
  }
3622
3682
  if (syntheticDocsEntry) {
@@ -3648,10 +3708,10 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3648
3708
  }
3649
3709
  const clientRouteSlots2 = routeSlots.filter((slot) => {
3650
3710
  try {
3651
- const metadata = _chunkRTAWQXMEcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3711
+ const metadata = _chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3652
3712
  return metadata.shouldHydrate && (!islandsMode || metadata.isClientComponent);
3653
3713
  } catch (error) {
3654
- _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
3714
+ _chunk7ZDLE77Pcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
3655
3715
  return false;
3656
3716
  }
3657
3717
  });
@@ -3660,24 +3720,24 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3660
3720
  const docsEntryOwns = (pattern) => syntheticDocsEntry === "/" || pattern === syntheticDocsEntry || pattern.startsWith(`${syntheticDocsEntry}/`);
3661
3721
  if (syntheticDocsEntry && clientPages.some((page) => !page.docs && docsEntryOwns(page.pattern))) {
3662
3722
  const docsPagePaths = new Set(
3663
- _chunkILQSRLKKcjs.discoverFarmDocsPages.call(void 0,
3664
- _chunkILQSRLKKcjs.resolveFarmDocsContentDir.call(void 0, config.docs, { root: config.root, srcDir: config.srcDir }),
3723
+ _chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0,
3724
+ _chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, config.docs, { root: config.root, srcDir: config.srcDir }),
3665
3725
  config.docs
3666
3726
  ).map((page) => page.href)
3667
3727
  );
3668
3728
  const resolved = resolveFarmDocsClientRoutes(clientPages, docsPagePaths);
3669
3729
  for (const page of resolved.shadowed) {
3670
- _chunk7U4XF76Rcjs.logger.warn(
3730
+ _chunk7ZDLE77Pcjs.logger.warn(
3671
3731
  `\u26A0\uFE0F ${page.pattern} has the URL shape of the docs route ${syntheticDocsPatterns[1]}, whose pages answer first: the page renders only at paths without a docs page, and does not hydrate as a page there.`
3672
3732
  );
3673
3733
  }
3674
3734
  clientPages.splice(0, clientPages.length, ...resolved.pages);
3675
3735
  }
3676
- _chunk7U4XF76Rcjs.logger.info(
3736
+ _chunk7ZDLE77Pcjs.logger.info(
3677
3737
  `\u{1F4F1} Total hydratable routes detected: ${clientPages.length} pages, ${clientLayouts.filter((layout) => layout.shouldHydrate || layout.hasIsolatedClientBoundaries).length} layouts, and ${clientRouteSlots.length} slots`
3678
3738
  );
3679
3739
  const clientRouteTable = createFarmClientRouteTable(clientPages);
3680
- _chunkO4JYMU5Ncjs.createFarmRouter.call(void 0, clientRouteTable.map((route) => ({ path: route.pattern, meta: route })));
3740
+ _chunkKDUVIJSZcjs.createFarmRouter.call(void 0, clientRouteTable.map((route) => ({ path: route.pattern, meta: route })));
3681
3741
  await writeFarmClientRouteTable(_path2.default.dirname(outputDir), clientRouteTable);
3682
3742
  const buildTarget = async (platform) => {
3683
3743
  const clientEntryRoot = _path2.default.join(root, ".farm", "tmp");
@@ -3690,22 +3750,22 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3690
3750
  clientRouteSlots,
3691
3751
  root,
3692
3752
  srcDir,
3693
- adapterOwnsDocsRuntime ? false : _chunkN3H7UPBMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
3694
- adapterOwnsDocsRuntime ? void 0 : _chunkN3H7UPBMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
3695
- _optionalChain([config, 'access', _122 => _122.docs, 'optionalAccess', _123 => _123.enabled]) ? _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
3696
- adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter) : void 0,
3753
+ adapterOwnsDocsRuntime ? false : _chunk3EZHMZGDcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
3754
+ adapterOwnsDocsRuntime ? void 0 : _chunk3EZHMZGDcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
3755
+ _optionalChain([config, 'access', _114 => _114.docs, 'optionalAccess', _115 => _115.enabled]) ? _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
3756
+ adapterOwnsDocsRuntime ? _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter) : void 0,
3697
3757
  config.i18n,
3698
3758
  config.plugins,
3699
3759
  config.renderer,
3700
3760
  config.publicRuntimeConfig,
3701
3761
  config.trailingSlash,
3702
- _chunkDVAZ53X6cjs.getIntegrationProviders.call(void 0, config.integrations),
3762
+ _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations),
3703
3763
  config.basePath,
3704
- _chunkM4YXD6MDcjs.generateClientCachePersistenceCode.call(void 0, _chunkM4YXD6MDcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3705
- adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
3706
- _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _124 => _124.experimental, 'optionalAccess', _125 => _125.serverComponents])) === "islands",
3764
+ _chunkVWPGK6UVcjs.generateClientCachePersistenceCode.call(void 0, _chunkVWPGK6UVcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3765
+ adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
3766
+ _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands",
3707
3767
  platform,
3708
- islandsMode ? _chunkRTAWQXMEcjs.collectFarmServerStylesheets.call(void 0,
3768
+ islandsMode ? _chunkZCT6B5PQcjs.collectFarmServerStylesheets.call(void 0,
3709
3769
  [
3710
3770
  ...layoutRoutes.map((layout) => layout.modulePath),
3711
3771
  ...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
@@ -3713,7 +3773,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3713
3773
  root
3714
3774
  ) : []
3715
3775
  );
3716
- const entryName = platform === "mobile" ? _chunkE5UN4OWXcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
3776
+ const entryName = platform === "mobile" ? _chunk4JARM2QQcjs.FARM_MOBILE_CLIENT_ENTRY_NAME : "farm-client";
3717
3777
  const clientEntry = islandsMode && platform === "web" && clientHydrationCode.includes("/*farm-router-stub*/") ? splitFarmClientEntry(clientHydrationCode) : { entry: clientHydrationCode, router: void 0, root: void 0 };
3718
3778
  await fs5.writeFile(clientEntryPath, clientEntry.entry);
3719
3779
  await fs5.writeFile(
@@ -3729,7 +3789,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3729
3789
  await fs5.writeFile(_path2.default.join(clientEntryDir, "farm-client-root.tsx"), clientEntry.root);
3730
3790
  }
3731
3791
  const clientInput = { [entryName]: clientEntryPath };
3732
- if (platform === "web" && _chunkM4YXD6MDcjs.canBootFarmIslandsClient.call(void 0, config)) {
3792
+ if (platform === "web" && _chunkVWPGK6UVcjs.canBootFarmIslandsClient.call(void 0, config)) {
3733
3793
  const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
3734
3794
  await fs5.writeFile(
3735
3795
  clientBootPath,
@@ -3740,17 +3800,17 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3740
3800
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
3741
3801
  let postcssSearchPath;
3742
3802
  let tailwindVitePlugin = void 0;
3743
- const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
3803
+ const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
3744
3804
  ssr: false,
3745
3805
  buildLifetime: rendererBuildLifetime
3746
3806
  });
3747
3807
  if (hasScopedPostcssConfig) {
3748
- _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
3808
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
3749
3809
  } else {
3750
3810
  const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
3751
3811
  await fs5.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
3752
3812
  postcssSearchPath = clientEntryDir;
3753
- tailwindVitePlugin = await _chunkRZI6436Fcjs.loadTailwindVitePlugin.call(void 0, {
3813
+ tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, {
3754
3814
  builder: productionVite.builder,
3755
3815
  announce: true
3756
3816
  });
@@ -3771,11 +3831,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3771
3831
  target: FARM_CLIENT_BUILD_TARGET,
3772
3832
  // Tailwind CSS 4 already requires newer browsers than that baseline. An app's own
3773
3833
  // `build.target` or `build.cssTarget` still decides, as Vite derives one from the other.
3774
- ..._optionalChain([config, 'access', _126 => _126.vite, 'optionalAccess', _127 => _127.build, 'optionalAccess', _128 => _128.target]) === void 0 && _optionalChain([config, 'access', _129 => _129.vite, 'optionalAccess', _130 => _130.build, 'optionalAccess', _131 => _131.cssTarget]) === void 0 && (_chunkRZI6436Fcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkRZI6436Fcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _132 => _132.vite, 'optionalAccess', _133 => _133.plugins]))) ? { cssTarget: _chunkRZI6436Fcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3834
+ ..._optionalChain([config, 'access', _116 => _116.vite, 'optionalAccess', _117 => _117.build, 'optionalAccess', _118 => _118.target]) === void 0 && _optionalChain([config, 'access', _119 => _119.vite, 'optionalAccess', _120 => _120.build, 'optionalAccess', _121 => _121.cssTarget]) === void 0 && (_chunkADCVSTFVcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkADCVSTFVcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _122 => _122.vite, 'optionalAccess', _123 => _123.plugins]))) ? { cssTarget: _chunkADCVSTFVcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3775
3835
  outDir: outputDir,
3776
3836
  emptyOutDir: platform === "web",
3777
3837
  // Never public: see resolveFarmClientSourcemap.
3778
- sourcemap: resolveFarmClientSourcemap(_optionalChain([config, 'access', _134 => _134.vite, 'optionalAccess', _135 => _135.build, 'optionalAccess', _136 => _136.sourcemap])),
3838
+ sourcemap: resolveFarmClientSourcemap(_optionalChain([config, 'access', _124 => _124.vite, 'optionalAccess', _125 => _125.build, 'optionalAccess', _126 => _126.sourcemap])),
3779
3839
  assetsInlineLimit: 0,
3780
3840
  cssCodeSplit: false,
3781
3841
  // Bundle all CSS into one file
@@ -3787,7 +3847,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3787
3847
  hashCharacters: "hex",
3788
3848
  // Use predictable name for CSS so we can reference it in SSR HTML
3789
3849
  assetFileNames: (assetInfo) => {
3790
- if (_optionalChain([assetInfo, 'access', _137 => _137.name, 'optionalAccess', _138 => _138.endsWith, 'call', _139 => _139(".css")])) {
3850
+ if (_optionalChain([assetInfo, 'access', _127 => _127.name, 'optionalAccess', _128 => _128.endsWith, 'call', _129 => _129(".css")])) {
3791
3851
  return `${entryName}.css`;
3792
3852
  }
3793
3853
  return "assets/[name]-h[hash][extname]";
@@ -3804,7 +3864,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3804
3864
  }
3805
3865
  },
3806
3866
  plugins: [
3807
- _chunkM4YXD6MDcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3867
+ _chunkVWPGK6UVcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3808
3868
  createFarmPrivateClientSourcemapsPlugin({
3809
3869
  outDir: _path2.default.join(
3810
3870
  _path2.default.dirname(outputDir),
@@ -3812,7 +3872,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3812
3872
  )
3813
3873
  }),
3814
3874
  // The web client's preload manifests; the mobile client records its files instead.
3815
- platform === "mobile" ? _chunkE5UN4OWXcjs.createFarmMobileClientManifestPlugin.call(void 0, {
3875
+ platform === "mobile" ? _chunk4JARM2QQcjs.createFarmMobileClientManifestPlugin.call(void 0, {
3816
3876
  buildDir: _path2.default.dirname(outputDir),
3817
3877
  entryName
3818
3878
  }) : createFarmClientModulePreloadPlugin({
@@ -3825,7 +3885,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3825
3885
  ],
3826
3886
  rootModules: [_path2.default.join(clientEntryDir, "farm-client-root.tsx")],
3827
3887
  // What the islands entry loads with its first render or hydration (RFC 0010).
3828
- ...islandsMode && _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? {
3888
+ ...islandsMode && _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? {
3829
3889
  rendererImports: [
3830
3890
  "react",
3831
3891
  "react-dom/client",
@@ -3846,8 +3906,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3846
3906
  importer: clientEntryPath,
3847
3907
  entryName: "farm-client",
3848
3908
  modules: [
3849
- _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter),
3850
- _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs)
3909
+ _chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter),
3910
+ _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs)
3851
3911
  ].filter((specifier) => Boolean(specifier))
3852
3912
  })
3853
3913
  ] : [],
@@ -3858,12 +3918,16 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3858
3918
  // unless the app's config or one of its plugins splits chunks.
3859
3919
  createFarmClientChunksPlugin({
3860
3920
  inlineCommonChunks: platform === "web",
3861
- islandsReact: islandsMode && _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer)
3921
+ islandsReact: islandsMode && _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer)
3922
+ }),
3923
+ farmServerOnlyEntriesPlugin({
3924
+ // A desktop app's client is the web target, and its `platform()` says "desktop".
3925
+ platform: platform === "web" && config.desktop ? "desktop" : platform,
3926
+ distDir: config.distDir || ".farm"
3862
3927
  }),
3863
- farmServerOnlyEntriesPlugin({ platform, distDir: config.distDir || ".farm" }),
3864
3928
  farmNavigationPlugin(config.renderer),
3865
- _chunkM4YXD6MDcjs.farmDocsClientConfigPlugin.call(void 0,
3866
- adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
3929
+ _chunkVWPGK6UVcjs.farmDocsClientConfigPlugin.call(void 0,
3930
+ adapterOwnsDocsRuntime ? _chunkP4ZLFUNBcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
3867
3931
  ),
3868
3932
  // Plugin to redirect @farm.js/core imports to client-only exports
3869
3933
  {
@@ -3895,7 +3959,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3895
3959
  },
3896
3960
  load: {
3897
3961
  filter: {
3898
- id: _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [
3962
+ id: _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [
3899
3963
  "\0empty-module",
3900
3964
  "\0empty-api-route",
3901
3965
  "\0farm-i18n-client-bridge",
@@ -3933,7 +3997,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3933
3997
  { ...config, isolatedClientBoundaryModules, programmaticClientRoutes, sourceSnapshot },
3934
3998
  pluginManager
3935
3999
  ),
3936
- _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
4000
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
3937
4001
  ],
3938
4002
  mode: "production",
3939
4003
  css: postcssSearchPath ? {
@@ -3941,7 +4005,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3941
4005
  } : void 0,
3942
4006
  // Ensure React is bundled for client
3943
4007
  resolve: {
3944
- alias: _chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
4008
+ alias: _chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
3945
4009
  dedupe: [...config.renderer.dedupe || []]
3946
4010
  },
3947
4011
  // Optimize dependencies - exclude server-side code from client bundle
@@ -3955,13 +4019,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3955
4019
  }
3956
4020
  };
3957
4021
  await viteBuild(
3958
- _chunkM4YXD6MDcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
4022
+ _chunkVWPGK6UVcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
3959
4023
  );
3960
4024
  if (platform === "mobile") {
3961
4025
  await fs5.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
3962
- if (!await _chunkE5UN4OWXcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
4026
+ if (!await _chunk4JARM2QQcjs.hasFarmMobileClientEntry.call(void 0, _path2.default.dirname(outputDir), outputDir)) {
3963
4027
  throw new IncompleteClientBuildOutputError(
3964
- `${_chunkE5UN4OWXcjs.FARM_MOBILE_CLIENT_ENTRY_NAME}.js is missing or empty`
4028
+ `${_chunk4JARM2QQcjs.FARM_MOBILE_CLIENT_ENTRY_NAME}.js is missing or empty`
3965
4029
  );
3966
4030
  }
3967
4031
  } else {
@@ -4049,9 +4113,9 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
4049
4113
  return response;
4050
4114
  }
4051
4115
 
4052
- ${streamNavigations ? `${_chunkM4YXD6MDcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
4116
+ ${streamNavigations ? `${_chunkVWPGK6UVcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
4053
4117
 
4054
- ${_chunkM4YXD6MDcjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
4118
+ ${_chunkVWPGK6UVcjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
4055
4119
 
4056
4120
  function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
4057
4121
  if (error?.name === "FarmDeploymentMismatchError") {
@@ -4220,8 +4284,8 @@ for (const type of FARM_ROUTE_TABLE_INTENT_EVENTS) {
4220
4284
  }`;
4221
4285
  }
4222
4286
  function getFarmClientLayoutMatch(pattern) {
4223
- const groupScope = _chunkYSRZSKQBcjs.getRouteGroupScope.call(void 0, pattern);
4224
- return groupScope ? { pattern, urlPattern: _chunkYSRZSKQBcjs.stripRouteGroups.call(void 0, pattern), groupScope } : { pattern };
4287
+ const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, pattern);
4288
+ return groupScope ? { pattern, urlPattern: _chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, pattern), groupScope } : { pattern };
4225
4289
  }
4226
4290
  function generateFarmClientLayoutSelectionSource() {
4227
4291
  return `function selectFarmClientLayouts(layouts, routePathname, readDirectory) {
@@ -5224,7 +5288,7 @@ function readFarmEntryImports(source) {
5224
5288
  for (const match of source.matchAll(/^import\s+([^"';]+?)\s+from\s+(["'][^"']+["'])/gm)) {
5225
5289
  const from = match[2];
5226
5290
  const named = /\{([^}]*)\}/.exec(match[1]);
5227
- for (const specifier of _nullishCoalesce(_optionalChain([named, 'optionalAccess', _140 => _140[1], 'optionalAccess', _141 => _141.split, 'call', _142 => _142(",")]), () => ( []))) {
5291
+ for (const specifier of _nullishCoalesce(_optionalChain([named, 'optionalAccess', _130 => _130[1], 'optionalAccess', _131 => _131.split, 'call', _132 => _132(",")]), () => ( []))) {
5228
5292
  const [imported, local] = specifier.trim().split(/\s+as\s+/);
5229
5293
  if (imported)
5230
5294
  bindings.push({ local: _nullishCoalesce(local, () => ( imported)), clause: `{ ${specifier.trim()} }`, from });
@@ -5359,34 +5423,34 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
5359
5423
  secure: false
5360
5424
  },
5361
5425
  direction: {}
5362
- }, plugins = [], renderer = _chunkT7UC2ORAcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
5426
+ }, plugins = [], renderer = _chunkLEZJZX4Ccjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
5363
5427
  const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
5364
- const clientPluginEntry = _chunkRZI6436Fcjs.generateFarmClientPluginEntryCode.call(void 0,
5428
+ const clientPluginEntry = _chunkADCVSTFVcjs.generateFarmClientPluginEntryCode.call(void 0,
5365
5429
  plugins,
5366
5430
  root,
5367
5431
  srcDir,
5368
5432
  publicRuntimeConfig,
5369
5433
  platform
5370
5434
  );
5371
- const appSetupPath = _chunkT7UC2ORAcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5372
- const lazyRenderer = islandValues && platform !== "mobile" && _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
5435
+ const appSetupPath = _chunkLEZJZX4Ccjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5436
+ const lazyRenderer = islandValues && platform !== "mobile" && _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
5373
5437
  const lazyRoot = islandValues && platform !== "mobile";
5374
5438
  const lazyMatcher = lazyRoot && clientPages.length > 0;
5375
- const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` : _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
5439
+ const rendererClientImports = lazyRenderer ? `import { holdFarmIslandInteractions, restorePagePosition, watchFarmIslandTriggers } from "@farm.js/core/internal/client-runtime";` : _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
5376
5440
  import { createRoot, hydrateRoot } from "react-dom/client";
5377
5441
  import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : (
5378
5442
  // Named exports only, as the server entry and the development client read them. A copy
5379
5443
  // of the namespace, so feature checks of optional exports don't make Rolldown warn.
5380
5444
  appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
5381
5445
  import { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
5382
- import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appSetupPath))};
5446
+ import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appSetupPath))};
5383
5447
  const React = { ...__farmRendererClient };
5384
5448
  __farmConfigureApp(__farmAppSetup);` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
5385
5449
  import { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};
5386
5450
  const React = { ...__farmRendererClient };`
5387
5451
  );
5388
- const hydrateFarmRouteCall = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);";
5389
- const providerClientCode = _chunkM4YXD6MDcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5452
+ const hydrateFarmRouteCall = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);";
5453
+ const providerClientCode = _chunkVWPGK6UVcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5390
5454
  integrationProviders,
5391
5455
  root,
5392
5456
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -5410,12 +5474,12 @@ const React = { ...__farmRendererClient };`
5410
5474
  const layoutRegistrations = [];
5411
5475
  const layoutComponents = [];
5412
5476
  const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
5413
- const treeLayoutPatterns = islandValues ? _chunkYSRZSKQBcjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
5477
+ const treeLayoutPatterns = islandValues ? _chunkIGBQSUT5cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
5414
5478
  layoutRoutes.forEach((layout, index) => {
5415
5479
  const relativePath = toImportPath(layout.modulePath);
5416
5480
  const treeLayout = treeLayoutPatterns.has(layout.pattern);
5417
5481
  const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
5418
- (pattern) => _chunkYSRZSKQBcjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
5482
+ (pattern) => _chunkIGBQSUT5cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
5419
5483
  );
5420
5484
  if (rendersOnClient && !treeLayout) {
5421
5485
  layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
@@ -5492,11 +5556,11 @@ function isFarmDocsPath() {
5492
5556
  return false;
5493
5557
  }
5494
5558
  `;
5495
- const docsAdapterRuntime = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
5559
+ const docsAdapterRuntime = _chunkP4ZLFUNBcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
5496
5560
  docsAdapterUI,
5497
5561
  docsConfigModule,
5498
5562
  // Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
5499
- _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
5563
+ _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
5500
5564
  );
5501
5565
  if (clientPages.length === 0 && clientRouteSlots.length === 0 && !providerClientCode.hasProviders) {
5502
5566
  return `
@@ -5510,7 +5574,7 @@ ${clientCachePersistence.imports}
5510
5574
  ${i18nClientRuntime}
5511
5575
  ${docsNavigationRuntime}
5512
5576
  ${docsAdapterRuntime}
5513
- ${_chunkN3H7UPBMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
5577
+ ${_chunk3EZHMZGDcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
5514
5578
 
5515
5579
  setFarmBasePath(${JSON.stringify(basePath)});
5516
5580
  setFarmTrailingSlashPreference(${JSON.stringify(trailingSlash)});
@@ -5520,7 +5584,7 @@ mountFarmDocsSearch();
5520
5584
 
5521
5585
  ${generateUniversalRouterStateRuntime()}
5522
5586
 
5523
- ${_chunkM4YXD6MDcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
5587
+ ${_chunkVWPGK6UVcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
5524
5588
 
5525
5589
  // SPA Router for server-rendered pages (HTML swap)
5526
5590
  const spaRouter = {
@@ -5813,7 +5877,7 @@ installFarmLinkPrefetch();
5813
5877
  clientPages.forEach((page) => {
5814
5878
  for (const boundary of page.isolatedBoundaries) {
5815
5879
  isolatedBoundaryModules.set(
5816
- _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, boundary.modulePath, root),
5880
+ _chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, boundary.modulePath, root),
5817
5881
  toImportPath(boundary.modulePath)
5818
5882
  );
5819
5883
  }
@@ -5824,7 +5888,7 @@ installFarmLinkPrefetch();
5824
5888
  }
5825
5889
  });
5826
5890
  const isolatedHydrationEnabled = isolatedBoundaryModules.size > 0;
5827
- const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
5891
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) && _chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
5828
5892
  const serverTreeEnabled = isolatedHydrationEnabled && clientPages.some((page) => page.serverTree);
5829
5893
  const islandsRuntimeExports = [
5830
5894
  "createFarmIsolatedHydrationRuntime",
@@ -6026,7 +6090,7 @@ ${docsNavigationRuntime}
6026
6090
  ${docsAdapterRuntime}
6027
6091
 
6028
6092
  ${imports.join("\n")}
6029
- ${_chunkN3H7UPBMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId, void 0, lazyRenderer ? "loadFarmRenderer" : void 0)}
6093
+ ${_chunk3EZHMZGDcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId, void 0, lazyRenderer ? "loadFarmRenderer" : void 0)}
6030
6094
 
6031
6095
  ${providerClientCode.runtime}
6032
6096
 
@@ -6062,7 +6126,7 @@ ${layoutRegistrations.join(",\n")}
6062
6126
  ${generateFarmClientRouteMatchSource({ lazyMatcher })}
6063
6127
 
6064
6128
  ${layoutComponentsRuntime}/*farm-root-start*/
6065
- ${_chunkM4YXD6MDcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6129
+ ${_chunkVWPGK6UVcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6066
6130
  // Wrap a page element with applicable layouts
6067
6131
  function wrapWithLayouts(pageElement, pathname, params) {
6068
6132
  const layouts = getApplicableLayouts(pathname);
@@ -6097,7 +6161,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
6097
6161
  return React.createElement("div", props, pageElement);
6098
6162
  }
6099
6163
  let farmLastRouteState = null;
6100
- ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkM4YXD6MDcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6164
+ ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkVWPGK6UVcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6101
6165
  function farmTreeLayoutsOf(pathname) {
6102
6166
  return getApplicableLayouts(pathname).filter(function(layout) {
6103
6167
  return layout.serverTree === true;
@@ -6212,7 +6276,7 @@ async function createMatchedHydrationRoute(matched, pathname, searchParams, navi
6212
6276
 
6213
6277
  if (!pageElement) return null;
6214
6278
  if (!hydrateLayouts) {
6215
- ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "if (hydrationContainer) pageElement = restorePagePosition(React, hydrationContainer, pageElement);" : ""}
6279
+ ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, renderer) ? "if (hydrationContainer) pageElement = restorePagePosition(React, hydrationContainer, pageElement);" : ""}
6216
6280
  return createFarmRouteState(pageElement, pathname, params, false);
6217
6281
  }
6218
6282
  if (matched.route.pageShouldHydrate) {
@@ -6241,7 +6305,7 @@ function createFarmRouteState(page, pathname, params, includeLayouts) {
6241
6305
 
6242
6306
  function hydrateFarmRoute(container, route) {
6243
6307
  farmLastRouteState = route;
6244
- ${_chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, renderer).hydrationFallback ? `try {
6308
+ ${_chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, renderer).hydrationFallback ? `try {
6245
6309
  ${hydrateFarmRouteCall}
6246
6310
  } catch (error) {
6247
6311
  // The renderer opted in with capabilities.hydrationFallback, as development always does. The
@@ -6731,7 +6795,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
6731
6795
  return true;
6732
6796
  }` : ""}
6733
6797
 
6734
- ${_chunkM4YXD6MDcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6798
+ ${_chunkVWPGK6UVcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6735
6799
 
6736
6800
  function activateNavigationScripts(root) {
6737
6801
  for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
@@ -6837,7 +6901,7 @@ function getLayoutShell(root, patterns, index) {
6837
6901
  return shell.innerHTML;
6838
6902
  }
6839
6903
 
6840
- ${islandValues ? _chunkM4YXD6MDcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6904
+ ${islandValues ? _chunkVWPGK6UVcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6841
6905
  // A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
6842
6906
  if (refresh) revealFarmStreamedContent(nextRoot);
6843
6907
  const currentPatterns = getLayoutPatterns(currentRoot);
@@ -7517,7 +7581,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7517
7581
  farmPlugin,
7518
7582
  farmServerOnlyEntriesPlugin
7519
7583
  } = await import("./vite.cjs");
7520
- const { PluginManager: PluginManager2 } = await import("./plugin-MWO3G2XM.cjs");
7584
+ const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
7521
7585
  const fs5 = await import("fs/promises");
7522
7586
  const pluginManager = new PluginManager2({
7523
7587
  config,
@@ -7528,7 +7592,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7528
7592
  const hasScopedPostcssConfig = hasProjectPostcssConfig(root);
7529
7593
  let postcssConfigDir;
7530
7594
  let tailwindVitePlugin = void 0;
7531
- const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
7595
+ const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
7532
7596
  ssr: true,
7533
7597
  buildLifetime: rendererBuildLifetime
7534
7598
  });
@@ -7538,7 +7602,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7538
7602
  _path2.default.join(postcssConfigDir, "postcss.config.cjs"),
7539
7603
  "module.exports = { plugins: [] };\n"
7540
7604
  );
7541
- tailwindVitePlugin = await _chunkRZI6436Fcjs.loadTailwindVitePlugin.call(void 0, {
7605
+ tailwindVitePlugin = await _chunkADCVSTFVcjs.loadTailwindVitePlugin.call(void 0, {
7542
7606
  builder: productionVite.builder,
7543
7607
  label: "for SSR"
7544
7608
  });
@@ -7617,11 +7681,11 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7617
7681
  pattern: entry.pattern,
7618
7682
  modulePath: entry.modulePath
7619
7683
  })) : [];
7620
- const i18nCatalogs = config.i18n.enabled ? (await _chunkCYOTNHDFcjs.readFarmI18nCatalogs.call(void 0, config.i18n)).catalogs : {};
7621
- const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config);
7684
+ const i18nCatalogs = config.i18n.enabled ? (await _chunkYHALJBYTcjs.readFarmI18nCatalogs.call(void 0, config.i18n)).catalogs : {};
7685
+ const appDirs = _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config);
7622
7686
  let openAPIReference = null;
7623
7687
  if (config.openapi.enabled && config.openapi.route) {
7624
- const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-37UJPUN4.cjs");
7688
+ const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-STAB5TVZ.cjs");
7625
7689
  const openAPIManager = new OpenAPIManager(appDirs, config.openapi, {
7626
7690
  mode: "production",
7627
7691
  apiBaseURL: config.api.baseURL,
@@ -7645,19 +7709,19 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7645
7709
  config: await readMiddlewareFileConfig(route.filePath)
7646
7710
  }))
7647
7711
  );
7648
- const instrumentationPath = _chunk3BTN3NP7cjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
7649
- const notFoundPath = _chunkM4YXD6MDcjs.resolveFarmNotFoundComponentPath.call(void 0,
7712
+ const instrumentationPath = _chunkI5PDHLKEcjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
7713
+ const notFoundPath = _chunkVWPGK6UVcjs.resolveFarmNotFoundComponentPath.call(void 0,
7650
7714
  config,
7651
7715
  appDirs,
7652
7716
  routeManager.getRendererNotFoundPath()
7653
7717
  );
7654
- if (notFoundPath) _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
7718
+ if (notFoundPath) _chunk7ZDLE77Pcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
7655
7719
  layoutRoutes.sort((a, b) => {
7656
7720
  const depthA = a.pattern.split("/").filter(Boolean).length;
7657
7721
  const depthB = b.pattern.split("/").filter(Boolean).length;
7658
7722
  return depthA - depthB;
7659
7723
  });
7660
- _chunk7U4XF76Rcjs.logger.info(
7724
+ _chunk7ZDLE77Pcjs.logger.info(
7661
7725
  `\u{1F4CB} Found ${pageRoutes.length} page routes, ${layoutRoutes.length} layouts, ${apiRoutes.length} API routes, ${applicationMetadataRoutes.length} metadata routes, and ${middlewareRoutes.length} middleware files`
7662
7726
  );
7663
7727
  const configuredIntegrationValues = Object.values(config.integrations || {});
@@ -7667,14 +7731,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7667
7731
  const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
7668
7732
  (integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
7669
7733
  );
7670
- const hasIntegrationProviders = _chunkDVAZ53X6cjs.getIntegrationProviders.call(void 0, config.integrations).some(
7734
+ const hasIntegrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations).some(
7671
7735
  (provider) => provider.component || provider.type === "clerk"
7672
7736
  );
7673
7737
  const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
7674
- const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _143 => _143.mdx, 'optionalAccess', _144 => _144.components]));
7675
- const hasMiddlewareConfig = _chunkYSRZSKQBcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7676
- const hasRouteContextConfig = _chunkUOMSGJHKcjs.hasCustomFarmRouteContext.call(void 0, config);
7677
- const hasServerRuntimePlugins = _chunkRZI6436Fcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
7738
+ const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _133 => _133.mdx, 'optionalAccess', _134 => _134.components]));
7739
+ const hasMiddlewareConfig = _chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7740
+ const hasRouteContextConfig = _chunkOAAVIFOJcjs.hasCustomFarmRouteContext.call(void 0, config);
7741
+ const hasServerRuntimePlugins = _chunkADCVSTFVcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
7678
7742
  const hasPluginRoutes = hasFarmPluginRoutes(config);
7679
7743
  const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
7680
7744
  const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasServerCacheConfig || hasFarmServerStorageConfig(config.storage) || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
@@ -7683,19 +7747,19 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7683
7747
  const hasConfiguredRuntimePlugins = Boolean(
7684
7748
  hasRuntimeConfigModule && (config.plugins || []).length > 0
7685
7749
  );
7686
- if (_chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
7750
+ if (_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
7687
7751
  const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
7688
- _chunkRBSGFS5Xcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
7752
+ _chunk2LHO4HTPcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
7689
7753
  config.docs,
7690
7754
  { root, srcDir: config.srcDir },
7691
7755
  (pathname) => adapterGuardedPaths.has(pathname),
7692
- _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? "edge" : "node"
7756
+ _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? "edge" : "node"
7693
7757
  );
7694
7758
  }
7695
- const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
7696
- const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _145 => _145.docs, 'optionalAccess', _146 => _146.enabled]) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunk2RSVYJT6cjs._runWithFarmCspNonce.call(void 0,
7759
+ const farmDocsCspNonceMarker = _chunkIEZFFXSCcjs.createFarmCspNonce.call(void 0, config.security);
7760
+ const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _135 => _135.docs, 'optionalAccess', _136 => _136.enabled]) && _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunkIBZW57NWcjs._runWithFarmCspNonce.call(void 0,
7697
7761
  farmDocsCspNonceMarker,
7698
- async () => _optionalChain([config, 'access', _147 => _147.docs, 'access', _148 => _148.adapter, 'optionalAccess', _149 => _149.server]) ? await _chunkRBSGFS5Xcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
7762
+ async () => _optionalChain([config, 'access', _137 => _137.docs, 'access', _138 => _138.adapter, 'optionalAccess', _139 => _139.server]) ? await _chunk2LHO4HTPcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
7699
7763
  root,
7700
7764
  srcDir: config.srcDir,
7701
7765
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
@@ -7707,7 +7771,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7707
7771
  root,
7708
7772
  srcDir: config.srcDir,
7709
7773
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
7710
- fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, root)),
7774
+ fontAssets: _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, root)),
7711
7775
  fontStylesheetHref: "/farm-fonts.css",
7712
7776
  globalStylesheetHref: FARM_CLIENT_CSS_HREF_PLACEHOLDER,
7713
7777
  isPathGuarded: (pathname) => guardedPaths.has(pathname),
@@ -7755,7 +7819,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7755
7819
  (image) => image.sourceType === "module"
7756
7820
  );
7757
7821
  const externalMetadataImageRuntime = useExternalMetadataImageRuntime && !omitCoreMetadataImageRuntime ? ["@vercel/og"] : [];
7758
- const rendererOptionalExternals = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? [] : [
7822
+ const rendererOptionalExternals = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? [] : [
7759
7823
  "react",
7760
7824
  "react/jsx-runtime",
7761
7825
  "react/jsx-dev-runtime",
@@ -7809,7 +7873,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7809
7873
  // Adapters can render provider scripts by serializing function source.
7810
7874
  // keepNames injects helper calls into those functions; after Nitro
7811
7875
  // minifies the server chunk the helper is no longer in script scope.
7812
- keepNames: !(_optionalChain([config, 'access', _150 => _150.docs, 'optionalAccess', _151 => _151.enabled]) && _optionalChain([config, 'access', _152 => _152.docs, 'access', _153 => _153.adapter, 'optionalAccess', _154 => _154.server])),
7876
+ keepNames: !(_optionalChain([config, 'access', _140 => _140.docs, 'optionalAccess', _141 => _141.enabled]) && _optionalChain([config, 'access', _142 => _142.docs, 'access', _143 => _143.adapter, 'optionalAccess', _144 => _144.server])),
7813
7877
  jsxDev: false
7814
7878
  },
7815
7879
  // SSR configuration to externalize problematic modules
@@ -7858,11 +7922,11 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7858
7922
  },
7859
7923
  define: {
7860
7924
  __FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
7861
- __FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
7862
- __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _155 => _155.env, 'optionalAccess', _156 => _156.public]) || {})
7925
+ __FARM_ENV__: JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env)),
7926
+ __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _145 => _145.env, 'optionalAccess', _146 => _146.public]) || {})
7863
7927
  },
7864
7928
  plugins: [
7865
- _chunkM4YXD6MDcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7929
+ _chunkVWPGK6UVcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7866
7930
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
7867
7931
  ...rendererVitePlugins,
7868
7932
  ...config.vite.plugins || [],
@@ -7882,7 +7946,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7882
7946
  },
7883
7947
  createVercelOgFontInlinePlugin(edgeMetadataImageRuntime.runtime)
7884
7948
  ] : [],
7885
- { ..._chunkEODGIFI7cjs.createReactProductionModePlugin.call(void 0, ), enforce: "pre" },
7949
+ { ..._chunkJYQMGMKTcjs.createReactProductionModePlugin.call(void 0, ), enforce: "pre" },
7886
7950
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
7887
7951
  farmNavigationPlugin(config.renderer),
7888
7952
  farmIslandContainersPlugin(config),
@@ -7894,7 +7958,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7894
7958
  },
7895
7959
  pluginManager
7896
7960
  ),
7897
- _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7961
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7898
7962
  ...hasRuntimeConfigModule ? [
7899
7963
  farmStripPlatformConfigPlugin(
7900
7964
  [
@@ -7906,7 +7970,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7906
7970
  {
7907
7971
  name: "farm-virtual-ssr-entry",
7908
7972
  resolveId: {
7909
- filter: { id: _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7973
+ filter: { id: _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7910
7974
  handler(id) {
7911
7975
  if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
7912
7976
  return virtualEntryId;
@@ -7915,7 +7979,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7915
7979
  }
7916
7980
  },
7917
7981
  load: {
7918
- filter: { id: _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7982
+ filter: { id: _chunkVWPGK6UVcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7919
7983
  handler(id) {
7920
7984
  if (id === virtualEntryId) {
7921
7985
  return virtualEntryCode;
@@ -7927,7 +7991,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7927
7991
  {
7928
7992
  name: "capture-ssr-bundle",
7929
7993
  configResolved(config2) {
7930
- polyroute = _chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, config2.plugins);
7994
+ polyroute = _chunkMNBFSAWFcjs.hasPolyroutePlugin.call(void 0, config2.plugins);
7931
7995
  },
7932
7996
  enforce: "post",
7933
7997
  generateBundle: {
@@ -7955,7 +8019,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7955
8019
  resolve: {
7956
8020
  alias: [
7957
8021
  ...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
7958
- ...Object.entries(_chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
8022
+ ...Object.entries(_chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
7959
8023
  ([find, replacement]) => ({ find, replacement })
7960
8024
  )
7961
8025
  ],
@@ -7963,7 +8027,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7963
8027
  dedupe: [...config.renderer.dedupe || []]
7964
8028
  }
7965
8029
  };
7966
- await viteBuild(_chunkM4YXD6MDcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
8030
+ await viteBuild(_chunkVWPGK6UVcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
7967
8031
  } finally {
7968
8032
  if (postcssConfigDir) {
7969
8033
  try {
@@ -8000,26 +8064,26 @@ function readFarmPageLastModified(pageRoutes) {
8000
8064
  return lastModified;
8001
8065
  }
8002
8066
  function getFarmDocsGuardedPaths(config, middlewareRoutes) {
8003
- if (!_optionalChain([config, 'access', _157 => _157.docs, 'optionalAccess', _158 => _158.enabled])) return [];
8067
+ if (!_optionalChain([config, 'access', _147 => _147.docs, 'optionalAccess', _148 => _148.enabled])) return [];
8004
8068
  const options = { root: config.root, srcDir: config.srcDir };
8005
8069
  const guards = {
8006
8070
  config: { middleware: config.middleware, integrations: config.integrations },
8007
8071
  middlewareRoutes
8008
8072
  };
8009
- return _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
8010
- (docsRoot) => _chunkILQSRLKKcjs.discoverFarmDocsPages.call(void 0, _chunkILQSRLKKcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
8011
- ).flatMap((page) => [page.href, _chunkILQSRLKKcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkYSRZSKQBcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
8073
+ return _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
8074
+ (docsRoot) => _chunk4A6WSOZHcjs.discoverFarmDocsPages.call(void 0, _chunk4A6WSOZHcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
8075
+ ).flatMap((page) => [page.href, _chunk4A6WSOZHcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
8012
8076
  }
8013
8077
  function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
8014
- const llmsTxt = _optionalChain([agent, 'optionalAccess', _159 => _159.llmsTxt]);
8078
+ const llmsTxt = _optionalChain([agent, 'optionalAccess', _149 => _149.llmsTxt]);
8015
8079
  const ownedByFile = (kind) => applicationMetadataRoutes.some(
8016
8080
  (metadata) => metadata.kind === kind && metadata.pattern === "/"
8017
8081
  );
8018
8082
  return [
8019
- ..._optionalChain([llmsTxt, 'optionalAccess', _160 => _160.enabled]) || ownedByFile("llms") ? ["/llms.txt"] : [],
8020
- ..._optionalChain([llmsTxt, 'optionalAccess', _161 => _161.enabled]) && llmsTxt.full || ownedByFile("llms-full") ? ["/llms-full.txt"] : [],
8021
- ..._optionalChain([agent, 'optionalAccess', _162 => _162.sitemap, 'optionalAccess', _163 => _163.enabled]) || ownedByFile("sitemap") ? ["/sitemap.xml"] : [],
8022
- ..._optionalChain([agent, 'optionalAccess', _164 => _164.crawlers, 'optionalAccess', _165 => _165.enabled]) || ownedByFile("robots") ? ["/robots.txt"] : []
8083
+ ..._optionalChain([llmsTxt, 'optionalAccess', _150 => _150.enabled]) || ownedByFile("llms") ? ["/llms.txt"] : [],
8084
+ ..._optionalChain([llmsTxt, 'optionalAccess', _151 => _151.enabled]) && llmsTxt.full || ownedByFile("llms-full") ? ["/llms-full.txt"] : [],
8085
+ ..._optionalChain([agent, 'optionalAccess', _152 => _152.sitemap, 'optionalAccess', _153 => _153.enabled]) || ownedByFile("sitemap") ? ["/sitemap.xml"] : [],
8086
+ ..._optionalChain([agent, 'optionalAccess', _154 => _154.crawlers, 'optionalAccess', _155 => _155.enabled]) || ownedByFile("robots") ? ["/robots.txt"] : []
8023
8087
  ];
8024
8088
  }
8025
8089
  function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
@@ -8030,7 +8094,7 @@ function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
8030
8094
  docsPath: ${root}.entry,
8031
8095
  contentDir: ${root}.contentDir || ${root}.config?.contentDir,
8032
8096
  }`;
8033
- if (_optionalChain([docs, 'optionalAccess', _166 => _166.roots, 'optionalAccess', _167 => _167.length])) {
8097
+ if (_optionalChain([docs, 'optionalAccess', _156 => _156.roots, 'optionalAccess', _157 => _157.length])) {
8034
8098
  return {
8035
8099
  factory: "createFarmDocsAdapterMultiRuntimeHandler",
8036
8100
  config: `[farmDocsResolvedConfig, ...farmDocsResolvedConfig.roots].map((farmDocsRoot) => ({
@@ -8046,7 +8110,7 @@ function generateFarmDocsAdapterHandlerArguments(docs, docsConfigModulePath) {
8046
8110
  }
8047
8111
  function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false, bundledRootPaths = []) {
8048
8112
  if (!docs.enabled) return "null";
8049
- const serializableDocs = _optionalChain([docs, 'access', _168 => _168.roots, 'optionalAccess', _169 => _169.length]) ? {
8113
+ const serializableDocs = _optionalChain([docs, 'access', _158 => _158.roots, 'optionalAccess', _159 => _159.length]) ? {
8050
8114
  ...docs,
8051
8115
  // React elements and functions do not survive JSON; see runtimeConfig below.
8052
8116
  roots: docs.roots.map((docsRoot) => ({ ...docsRoot, runtimeConfig: void 0 }))
@@ -8080,7 +8144,7 @@ function generateFarmDocsRuntimeConfigExpression(docs, precompiled = false, bund
8080
8144
  },
8081
8145
  }
8082
8146
  : ${JSON.stringify({ ...serializableDocs, runtimeConfig: void 0 })}`;
8083
- if (!_optionalChain([docs, 'access', _170 => _170.roots, 'optionalAccess', _171 => _171.length])) return expression;
8147
+ if (!_optionalChain([docs, 'access', _160 => _160.roots, 'optionalAccess', _161 => _161.length])) return expression;
8084
8148
  return `((farmDocs, farmDocsBundledRootPaths) => ({
8085
8149
  ...farmDocs,
8086
8150
  roots: farmDocs.roots.map((farmDocsRoot, index) => {
@@ -8098,7 +8162,7 @@ function toVirtualEntryImportSpecifier(modulePath) {
8098
8162
  return JSON.stringify(modulePath.replace(/\\/g, "/"));
8099
8163
  }
8100
8164
  function generateNativeAuthIntegrationSource(auth) {
8101
- if (_optionalChain([auth, 'optionalAccess', _172 => _172.enabled]) !== true) {
8165
+ if (_optionalChain([auth, 'optionalAccess', _162 => _162.enabled]) !== true) {
8102
8166
  return { importSource: "", registerSource: "" };
8103
8167
  }
8104
8168
  return {
@@ -8402,56 +8466,56 @@ async function applyFarmPreloadBudget(response, pathname, request) {
8402
8466
  `.trim();
8403
8467
  }
8404
8468
  function generateFarmRendererAppSetupServerCode(config) {
8405
- const appSetupPath = _chunkT7UC2ORAcjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
8469
+ const appSetupPath = _chunkLEZJZX4Ccjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
8406
8470
  if (!appSetupPath) return "";
8407
8471
  return `
8408
- import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appSetupPath))};
8472
+ import __farmAppSetup from ${JSON.stringify(_chunk7ZDLE77Pcjs.toPosixPath.call(void 0, appSetupPath))};
8409
8473
  if (typeof ReactDOMServer.configureApp !== "function") {
8410
8474
  throw new Error(${JSON.stringify(`Renderer \`${config.renderer.name}\` does not support \`appSetup\`: its server module must export configureApp().`)});
8411
8475
  }
8412
8476
  ReactDOMServer.configureApp(__farmAppSetup);`;
8413
8477
  }
8414
8478
  function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlots, errorRoutes, metadataImageRoutes, applicationMetadataRoutes, middlewareRoutes, redirectRoutes, configuredRewriteRoutes, configuredHeaderRoutes, openAPIReference, notFoundPath, instrumentationPath, config, farmDocsPrecompiledManifest, configModulePath, hasServerRuntimeIntegrations, hasRuntimeIntegrationConfig, hasConfiguredRuntimePlugins, hasServerRuntimePlugins, preset, i18nCatalogs, isolatedClientBoundaryModules, hydrationPlanCache, mobileShellLoadingRoutes = [], farmDocsAnalyticsPages = []) {
8415
- const farmRendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer);
8416
- const farmStaticNotFoundBuild = preset === "vercel" && _optionalChain([config, 'access', _173 => _173.experimental, 'optionalAccess', _174 => _174.staticNotFound]) === true && !farmRendererDisabled;
8479
+ const farmRendererDisabled = _chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer);
8480
+ const farmStaticNotFoundBuild = preset === "vercel" && _optionalChain([config, 'access', _163 => _163.experimental, 'optionalAccess', _164 => _164.staticNotFound]) === true && !farmRendererDisabled;
8417
8481
  const searchPreserveRoutes = pageRoutes.flatMap(
8418
8482
  (route) => route.searchPreserve ? [route.searchPreserve] : []
8419
8483
  );
8420
8484
  const searchPreserveRoutesSource = searchPreserveRoutes.length > 0 ? JSON.stringify(searchPreserveRoutes) : "";
8421
- const farmIslandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _175 => _175.experimental, 'optionalAccess', _176 => _176.serverComponents])) === "islands";
8422
- const farmRendererActions = _chunkM4YXD6MDcjs.resolveFarmIslxActionsMode.call(void 0, config) === "renderer";
8423
- const farmClientBoot = _chunkM4YXD6MDcjs.canBootFarmIslandsClient.call(void 0, config);
8485
+ const farmIslandsMode = _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands";
8486
+ const farmRendererActions = _chunkVWPGK6UVcjs.resolveFarmIslxActionsMode.call(void 0, config) === "renderer";
8487
+ const farmClientBoot = _chunkVWPGK6UVcjs.canBootFarmIslandsClient.call(void 0, config);
8424
8488
  const farmMobileClient = shouldBuildFarmMobileClient(config);
8425
8489
  const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
8426
- const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "edge";
8427
- const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _177 => _177.agent, 'optionalAccess', _178 => _178.crawlers, 'optionalAccess', _179 => _179.enabled])) && !applicationMetadataRoutes.some(
8490
+ const hasCompressionRuntime = config.compress && _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "edge";
8491
+ const servesAgentRobotsTxt = Boolean(_optionalChain([config, 'access', _165 => _165.agent, 'optionalAccess', _166 => _166.crawlers, 'optionalAccess', _167 => _167.enabled])) && !applicationMetadataRoutes.some(
8428
8492
  (metadata) => metadata.kind === "robots" && metadata.pattern === "/"
8429
8493
  );
8430
- const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _180 => _180.agent, 'optionalAccess', _181 => _181.sitemap, 'optionalAccess', _182 => _182.enabled])) && !applicationMetadataRoutes.some(
8494
+ const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _168 => _168.agent, 'optionalAccess', _169 => _169.sitemap, 'optionalAccess', _170 => _170.enabled])) && !applicationMetadataRoutes.some(
8431
8495
  (metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
8432
8496
  );
8433
- const servesDefaultMCP = _optionalChain([config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.mcp]) === true && !_chunkJH4CDG4Gcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
8434
- const servesAiCatalog = _optionalChain([config, 'access', _185 => _185.agent, 'optionalAccess', _186 => _186.aiCatalog]) !== false;
8497
+ const servesDefaultMCP = _optionalChain([config, 'access', _171 => _171.agent, 'optionalAccess', _172 => _172.mcp]) === true && !_chunkR6GOH5CHcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
8498
+ const servesAiCatalog = _optionalChain([config, 'access', _173 => _173.agent, 'optionalAccess', _174 => _174.aiCatalog]) !== false;
8435
8499
  const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
8436
- const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
8437
- const reportsWebMCPCalls = hasInfraAnalyticsRuntime && _chunkUGWKNZ4Ucjs._farmWebMCPReportsEnabled.call(void 0, config.plugins);
8500
+ const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
8501
+ const reportsWebMCPCalls = hasInfraAnalyticsRuntime && _chunkO47IT4CScjs._farmWebMCPReportsEnabled.call(void 0, config.plugins);
8438
8502
  const hasPrecompiledDocs = Boolean(farmDocsPrecompiledManifest);
8439
- const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
8440
- if (_optionalChain([config, 'access', _187 => _187.docs, 'optionalAccess', _188 => _188.enabled]) && _optionalChain([config, 'access', _189 => _189.docs, 'access', _190 => _190.roots, 'optionalAccess', _191 => _191.length]) && !adapterOwnsDocsRuntime) {
8503
+ const adapterOwnsDocsRuntime = _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs);
8504
+ if (_optionalChain([config, 'access', _175 => _175.docs, 'optionalAccess', _176 => _176.enabled]) && _optionalChain([config, 'access', _177 => _177.docs, 'access', _178 => _178.roots, 'optionalAccess', _179 => _179.length]) && !adapterOwnsDocsRuntime) {
8441
8505
  throw new Error(
8442
8506
  "Several docs roots need a docs adapter; Farm's built-in docs renderer serves a single docs root."
8443
8507
  );
8444
8508
  }
8445
8509
  const docsConfigModulePath = adapterOwnsDocsRuntime && !hasPrecompiledDocs && config.docs.configPath && !config.docs.configPath.endsWith(".json") ? config.docs.configPath : void 0;
8446
8510
  const adapterHandler = generateFarmDocsAdapterHandlerArguments(config.docs, docsConfigModulePath);
8447
- const hasIsolatedClientGraphRuntime = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
8448
- const hasRendererIslandsGraph = isolatedClientBoundaryModules.size > 0 && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, config);
8449
- const rendererStreamingCapabilities = _chunkT7UC2ORAcjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
8511
+ const hasIsolatedClientGraphRuntime = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) && isolatedClientBoundaryModules.size > 0;
8512
+ const hasRendererIslandsGraph = isolatedClientBoundaryModules.size > 0 && _chunkGUYGMTWAcjs.usesFarmRendererIslands.call(void 0, config);
8513
+ const rendererStreamingCapabilities = _chunkLEZJZX4Ccjs.getFarmRendererStreamingCapabilitiesForRuntime.call(void 0,
8450
8514
  config.renderer,
8451
- _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset)
8515
+ _chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset)
8452
8516
  );
8453
- const hasReactSyncRender = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer);
8454
- const rendererServerImports = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
8517
+ const hasReactSyncRender = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer);
8518
+ const rendererServerImports = _chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
8455
8519
  import * as ReactDOMServer from "react-dom/server";
8456
8520
  import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : (
8457
8521
  // The renderer contract is the server module's named exports, which the development
@@ -8509,27 +8573,27 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8509
8573
  (image) => image.sourceType === "module"
8510
8574
  );
8511
8575
  const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
8512
- const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkYSRZSKQBcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
8513
- const farmDocsFontAssets = _optionalChain([config, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
8514
- const integrationProviders = _chunkDVAZ53X6cjs.getIntegrationProviders.call(void 0, config.integrations);
8576
+ const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
8577
+ const farmDocsFontAssets = _optionalChain([config, 'access', _180 => _180.docs, 'optionalAccess', _181 => _181.enabled]) ? _chunkQTGYT2DFcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkQTGYT2DFcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
8578
+ const integrationProviders = _chunkN4AM7Q34cjs.getIntegrationProviders.call(void 0, config.integrations);
8515
8579
  const renderedIntegrationProviders = integrationProviders.filter(
8516
8580
  (provider) => provider.component || provider.type === "clerk"
8517
8581
  );
8518
- if (renderedIntegrationProviders.length > 0 && !_chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, config.renderer).functionComponents) {
8582
+ if (renderedIntegrationProviders.length > 0 && !_chunkLEZJZX4Ccjs.getFarmRendererCapabilities.call(void 0, config.renderer).functionComponents) {
8519
8583
  throw new Error(
8520
8584
  `Integration provider components are not supported by the "${config.renderer.name}" renderer.`
8521
8585
  );
8522
8586
  }
8523
- const providerServerModules = _chunkM4YXD6MDcjs.generateFarmIntegrationProviderServerModules.call(void 0,
8587
+ const providerServerModules = _chunkVWPGK6UVcjs.generateFarmIntegrationProviderServerModules.call(void 0,
8524
8588
  renderedIntegrationProviders,
8525
8589
  config.root,
8526
8590
  _nullishCoalesce(config.renderer.componentExtensions, () => ( []))
8527
8591
  );
8528
8592
  const resolvedIntegrationProviderFallback = Object.fromEntries(
8529
8593
  Object.entries(config.integrations).flatMap(([name, integration]) => {
8530
- const configuredProviders = _optionalChain([integration, 'optionalAccess', _194 => _194.providers]);
8594
+ const configuredProviders = _optionalChain([integration, 'optionalAccess', _182 => _182.providers]);
8531
8595
  const providers = Array.isArray(configuredProviders) ? configuredProviders : [];
8532
- if (providers.some((provider) => typeof _optionalChain([provider, 'optionalAccess', _195 => _195.component]) === "function")) {
8596
+ if (providers.some((provider) => typeof _optionalChain([provider, 'optionalAccess', _183 => _183.component]) === "function")) {
8533
8597
  throw new Error(
8534
8598
  `Integration provider components in production must use an importable component reference, for example component: { module: "@/components/provider" }.`
8535
8599
  );
@@ -8538,24 +8602,24 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8538
8602
  })
8539
8603
  );
8540
8604
  const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
8541
- (provider) => !_chunkDVAZ53X6cjs.providerSupportsIslands.call(void 0, provider)
8605
+ (provider) => !_chunkN4AM7Q34cjs.providerSupportsIslands.call(void 0, provider)
8542
8606
  );
8543
- const isolatedHydrationMode = _chunkRTAWQXMEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
8544
- _optionalChain([config, 'access', _196 => _196.experimental, 'optionalAccess', _197 => _197.isolatedClientHydration]),
8607
+ const isolatedHydrationMode = _chunkZCT6B5PQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
8608
+ _optionalChain([config, 'access', _184 => _184.experimental, 'optionalAccess', _185 => _185.isolatedClientHydration]),
8545
8609
  {
8546
- serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _198 => _198.experimental, 'optionalAccess', _199 => _199.serverComponents])) === "rsc",
8610
+ serverComponents: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "rsc",
8547
8611
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
8548
8612
  }
8549
8613
  );
8550
- const hydrationPlanOptions = _chunkRTAWQXMEcjs.getFarmClientHydrationPlanOptions.call(void 0,
8614
+ const hydrationPlanOptions = _chunkZCT6B5PQcjs.getFarmClientHydrationPlanOptions.call(void 0,
8551
8615
  config.renderer,
8552
8616
  Boolean(unsupportedIntegrationProvider)
8553
8617
  );
8554
8618
  const pageHydrationPlanOptions = {
8555
8619
  ...hydrationPlanOptions,
8556
- serverOwners: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _200 => _200.experimental, 'optionalAccess', _201 => _201.serverComponents])) === "islands"
8620
+ serverOwners: _chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands"
8557
8621
  };
8558
- const { layoutHydrationPlans, pageHydrationPlans } = _chunkRTAWQXMEcjs.withFarmSourceSnapshot.call(void 0, () => {
8622
+ const { layoutHydrationPlans, pageHydrationPlans } = _chunkZCT6B5PQcjs.withFarmSourceSnapshot.call(void 0, () => {
8559
8623
  const layoutHydrationPlans2 = layoutRoutes.map((layout) => ({
8560
8624
  ...layout,
8561
8625
  hydration: getCachedClientModuleHydrationPlan(
@@ -8566,8 +8630,8 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8566
8630
  { ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
8567
8631
  )
8568
8632
  }));
8569
- const markdownPagePlan = _chunkRTAWQXMEcjs.createMarkdownPageHydrationPlanner.call(void 0,
8570
- _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
8633
+ const markdownPagePlan = _chunkZCT6B5PQcjs.createMarkdownPageHydrationPlanner.call(void 0,
8634
+ _chunkYQ5NVEFScjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunkYQ5NVEFScjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
8571
8635
  config.root,
8572
8636
  isolatedHydrationMode,
8573
8637
  { ...hydrationPlanOptions, packageReferences: pageHydrationPlanOptions.serverOwners }
@@ -8575,7 +8639,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8575
8639
  const pageHydrationPlans2 = new Map(
8576
8640
  pageRoutes.map((route) => [
8577
8641
  route.modulePath,
8578
- _chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
8642
+ _chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
8579
8643
  route.modulePath,
8580
8644
  config.root,
8581
8645
  isolatedHydrationMode,
@@ -8586,7 +8650,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8586
8650
  );
8587
8651
  return { layoutHydrationPlans: layoutHydrationPlans2, pageHydrationPlans: pageHydrationPlans2 };
8588
8652
  });
8589
- _chunkRTAWQXMEcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
8653
+ _chunkZCT6B5PQcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
8590
8654
  layoutHydrationPlans.map((layout) => ({
8591
8655
  pattern: layout.pattern,
8592
8656
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -8595,10 +8659,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8595
8659
  pageRoutes.map((route) => ({
8596
8660
  // Compared by directory so a grouped layout applies only inside its group.
8597
8661
  pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
8598
- depth: _chunkYSRZSKQBcjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
8662
+ depth: _chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
8599
8663
  metadata: pageHydrationPlans.get(route.modulePath)
8600
8664
  })),
8601
- _chunkYSRZSKQBcjs.routeBoundaryCoversDirectory,
8665
+ _chunkIGBQSUT5cjs.routeBoundaryCoversDirectory,
8602
8666
  { serverOwners: pageHydrationPlanOptions.serverOwners }
8603
8667
  );
8604
8668
  const providerServerImports = [
@@ -8614,13 +8678,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8614
8678
  apiImports.push(
8615
8679
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(route.filePath)};`
8616
8680
  );
8617
- if (_chunkSIECKBNKcjs.isPolyrouteRouteFileName.call(void 0, _path2.default.basename(route.filePath))) {
8681
+ if (_chunkMNBFSAWFcjs.isPolyrouteRouteFileName.call(void 0, _path2.default.basename(route.filePath))) {
8618
8682
  nativeAPIRoutes.push(`[${JSON.stringify(route.path)}, ${varName}]`);
8619
8683
  }
8620
8684
  apiRegistrations.push(`
8621
8685
  {
8622
8686
  path: ${JSON.stringify(route.path)},
8623
- methods: ${JSON.stringify(route.methods.filter((method) => !_optionalChain([route, 'access', _202 => _202.pluginMethods, 'optionalAccess', _203 => _203.includes, 'call', _204 => _204(method)])))},
8687
+ methods: ${JSON.stringify(route.methods.filter((method) => !_optionalChain([route, 'access', _186 => _186.pluginMethods, 'optionalAccess', _187 => _187.includes, 'call', _188 => _188(method)])))},
8624
8688
  endpoints: ${varName},
8625
8689
  }`);
8626
8690
  });
@@ -8628,14 +8692,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8628
8692
  const pageRegistrations = [];
8629
8693
  const hasMarkdownPages = pageRoutes.some((route) => route.source !== void 0);
8630
8694
  const orderedPageRoutes = pageRoutes.map((route, index) => ({ route, index })).sort((left, right) => {
8631
- const order = _chunkML4TOUZPcjs.compareRoutePatternSpecificity.call(void 0, left.route.pattern, right.route.pattern);
8695
+ const order = _chunkT4YCWRCJcjs.compareRoutePatternSpecificity.call(void 0, left.route.pattern, right.route.pattern);
8632
8696
  return order || left.index - right.index;
8633
8697
  }).map(({ route }) => route);
8634
8698
  orderedPageRoutes.forEach((route, index) => {
8635
8699
  const varName = `pageRoute${index}`;
8636
- if (_chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
8637
- const renderingDirective2 = _chunkEXPVSFAGcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8638
- const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkRTAWQXMEcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
8700
+ if (_chunk27IPPPCVcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
8701
+ const renderingDirective2 = _chunkT4VF6BYVcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8702
+ const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkZCT6B5PQcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
8639
8703
  pageRegistrations.push(`
8640
8704
  {
8641
8705
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
@@ -8643,14 +8707,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8643
8707
  rendering: ${JSON.stringify(renderingDirective2)},` : ""}${markdownServerTree ? "\n serverTree: true," : ""}
8644
8708
  module: createFarmMarkdownRouteModule({
8645
8709
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
8646
- filePath: ${JSON.stringify(_chunkM4YXD6MDcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
8710
+ filePath: ${JSON.stringify(_chunkVWPGK6UVcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
8647
8711
  components: farmMdxComponents,
8648
- config: farmMdxConfig,${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: React,"}
8712
+ config: farmMdxConfig,${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: React,"}
8649
8713
  }),
8650
8714
  markdownSource: {
8651
8715
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
8652
8716
  filePath: ${JSON.stringify(
8653
- _chunkM4YXD6MDcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
8717
+ _chunkVWPGK6UVcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
8654
8718
  )},
8655
8719
  },
8656
8720
  }`);
@@ -8660,16 +8724,16 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8660
8724
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
8661
8725
  );
8662
8726
  const clientMetadata = pageHydrationPlans.get(route.modulePath);
8663
- const renderingDirective = _chunkEXPVSFAGcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8727
+ const renderingDirective = _chunkT4VF6BYVcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8664
8728
  pageRegistrations.push(`
8665
8729
  {
8666
8730
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
8667
8731
  directory: ${JSON.stringify(route.directory)},` : ""}
8668
8732
  module: ${varName},
8669
8733
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
8670
- clientModule: ${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
8671
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkRTAWQXMEcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
8672
- const rootStrategy = _chunkM4YXD6MDcjs.resolveFarmRouteRootStrategy.call(void 0,
8734
+ clientModule: ${JSON.stringify(_chunk7ZDLE77Pcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
8735
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkZCT6B5PQcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
8736
+ const rootStrategy = _chunkVWPGK6UVcjs.resolveFarmRouteRootStrategy.call(void 0,
8673
8737
  route,
8674
8738
  clientMetadata,
8675
8739
  layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
@@ -8682,13 +8746,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8682
8746
  rendering: ${JSON.stringify(renderingDirective)},` : ""}
8683
8747
  ${route.source !== void 0 ? `markdownSource: {
8684
8748
  source: ${JSON.stringify(route.source)},
8685
- filePath: ${JSON.stringify(_chunkM4YXD6MDcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
8749
+ filePath: ${JSON.stringify(_chunkVWPGK6UVcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
8686
8750
  },` : ""}
8687
8751
  }`);
8688
8752
  });
8689
8753
  const layoutImports = [];
8690
8754
  const layoutRegistrations = [];
8691
- const treeLayoutPatterns = farmIslandsMode ? _chunkYSRZSKQBcjs.getFarmServerTreeLayoutPatterns.call(void 0,
8755
+ const treeLayoutPatterns = farmIslandsMode ? _chunkIGBQSUT5cjs.getFarmServerTreeLayoutPatterns.call(void 0,
8692
8756
  layoutHydrationPlans.map((layout) => ({
8693
8757
  pattern: layout.pattern,
8694
8758
  shouldHydrate: layout.hydration.shouldHydrate,
@@ -8706,7 +8770,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8706
8770
  pattern: ${JSON.stringify(layout.pattern)},
8707
8771
  module: ${varName},
8708
8772
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},
8709
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkM4YXD6MDcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
8773
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkVWPGK6UVcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
8710
8774
  // isolatedClientHydration, or an async layout): it wraps a docs page as an app page.
8711
8775
  clientMetadata.hasIsolatedClientBoundaries ? "\n islands: true," : ""}
8712
8776
  }`);
@@ -8734,7 +8798,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8734
8798
  containerId: ${JSON.stringify(slot.containerId)},
8735
8799
  interception: ${JSON.stringify(slot.interception)},
8736
8800
  fallback: ${JSON.stringify(slot.fallback)},
8737
- hydrates: ${!farmIslandsMode || _chunkRTAWQXMEcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
8801
+ hydrates: ${!farmIslandsMode || _chunkZCT6B5PQcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
8738
8802
  module: ${varName},
8739
8803
  }`);
8740
8804
  });
@@ -8745,12 +8809,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8745
8809
  errorImports.push(
8746
8810
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
8747
8811
  );
8748
- const groupScope = _chunkYSRZSKQBcjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8812
+ const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8749
8813
  errorRegistrations.push(`
8750
8814
  {
8751
- pattern: ${JSON.stringify(_chunkYSRZSKQBcjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8815
+ pattern: ${JSON.stringify(_chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8752
8816
  groupScope: ${JSON.stringify(groupScope)},
8753
- directoryDepth: ${_chunkYSRZSKQBcjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8817
+ directoryDepth: ${_chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8754
8818
  module: ${varName},
8755
8819
  }`);
8756
8820
  });
@@ -8762,12 +8826,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8762
8826
  loadingImports.push(
8763
8827
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
8764
8828
  );
8765
- const groupScope = _chunkYSRZSKQBcjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8829
+ const groupScope = _chunkIGBQSUT5cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8766
8830
  loadingRegistrations.push(`
8767
8831
  {
8768
- pattern: ${JSON.stringify(_chunkYSRZSKQBcjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8832
+ pattern: ${JSON.stringify(_chunkIGBQSUT5cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8769
8833
  groupScope: ${JSON.stringify(groupScope)},
8770
- directoryDepth: ${_chunkYSRZSKQBcjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8834
+ directoryDepth: ${_chunkIGBQSUT5cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8771
8835
  module: ${varName},
8772
8836
  }`);
8773
8837
  });
@@ -8780,7 +8844,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8780
8844
  metadataImageImports.push(
8781
8845
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(image.modulePath)};`
8782
8846
  );
8783
- const component = !_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) && _chunkM4YXD6MDcjs.isRendererCompiledComponent.call(void 0, image.modulePath, _nullishCoalesce(_optionalChain([config, 'access', _205 => _205.renderer, 'optionalAccess', _206 => _206.componentExtensions]), () => ( [])));
8847
+ const component = !_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) && _chunkVWPGK6UVcjs.isRendererCompiledComponent.call(void 0, image.modulePath, _nullishCoalesce(_optionalChain([config, 'access', _189 => _189.renderer, 'optionalAccess', _190 => _190.componentExtensions]), () => ( [])));
8784
8848
  metadataImageRegistrations.push(`
8785
8849
  {
8786
8850
  pattern: ${JSON.stringify(image.pattern)},
@@ -8856,7 +8920,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8856
8920
  createDefaultErrorMarkup,
8857
8921
  createFarmInstrumentationLifecycle,
8858
8922
  createFarmLayoutSelector,
8859
- createFarmLayoutBoundary,${_optionalChain([config, 'access', _207 => _207.docs, 'optionalAccess', _208 => _208.enabled]) ? "\n createFarmDocsLayoutTree,\n farmDocsLayoutsWrapPage,\n placeFarmDocsLayoutRoot," : ""}
8923
+ createFarmLayoutBoundary,${_optionalChain([config, 'access', _191 => _191.docs, 'optionalAccess', _192 => _192.enabled]) ? "\n createFarmDocsLayoutTree,\n farmDocsLayoutsWrapPage,\n placeFarmDocsLayoutRoot," : ""}
8860
8924
  isInFarmRouteGroupScope,
8861
8925
  routeBoundaryCoversDirectory,
8862
8926
  createFarmCacheKey,
@@ -8940,13 +9004,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8940
9004
  createFarmDeploymentMismatchResponse,
8941
9005
  FARM_DEPLOYMENT_ID_HEADER,
8942
9006
  getFarmDeploymentMismatch,
8943
- withoutFarmDeploymentCookie,${config.mobileClient ? "\n createFarmNativeTreeResponse," : ""}${config.trailingSlash && (_optionalChain([config, 'access', _209 => _209.md, 'optionalAccess', _210 => _210.enabled]) || hasMarkdownPages) ? "\n toFarmTrailingSlashPageRequest," : ""}${hasInfraAnalyticsRuntime ? "\n resolveFarmDocsEngineRouteLabel,\n resolveFarmDocsRouteLabel,\n resolveFarmMarkdownRouteLabel,\n resolveFarmMCPRouteLabel,\n setFarmRouteLabel," : ""}${hasFarmServerStorageConfig(config.storage) ? "\n _registerFarmStorageModules,\n disposeFarmStorage,\n initFarmStorage," : ""}${searchPreserveRoutesSource ? "\n _setFarmSearchPreserveRoutes," : ""}
9007
+ withoutFarmDeploymentCookie,${config.mobileClient ? "\n createFarmNativeTreeResponse," : ""}${config.trailingSlash && (_optionalChain([config, 'access', _193 => _193.md, 'optionalAccess', _194 => _194.enabled]) || hasMarkdownPages) ? "\n toFarmTrailingSlashPageRequest," : ""}${hasInfraAnalyticsRuntime ? "\n resolveFarmDocsEngineRouteLabel,\n resolveFarmDocsRouteLabel,\n resolveFarmMarkdownRouteLabel,\n resolveFarmMCPRouteLabel,\n setFarmRouteLabel," : ""}${hasFarmServerStorageConfig(config.storage) ? "\n _registerFarmStorageModules,\n disposeFarmStorage,\n initFarmStorage," : ""}${searchPreserveRoutesSource ? "\n _setFarmSearchPreserveRoutes," : ""}
8944
9008
  } from "@farm.js/core/internal/production-runtime";${farmMobileClient ? `
8945
9009
  import { _applyFarmMobileShellClient } from "@farm.js/core/internal/production-runtime";
8946
9010
  // The mobile client documents load when a mobile shell asks for them (RFC 0004, 7.2), filled in
8947
9011
  // once the client build has finished (see buildNitroUniversal). A shell's document stays out of
8948
9012
  // shared caches, which the adapter learns as it does for a guarded response.
8949
- const farmMobileShellClient = JSON.parse("${_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER}");
9013
+ const farmMobileShellClient = JSON.parse("${_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER}");
8950
9014
  function applyFarmMobileShellResponse(request, response, context) {
8951
9015
  return _applyFarmMobileShellClient(request, response, farmMobileShellClient, () =>
8952
9016
  context?.onGuardedResponse?.()
@@ -8997,12 +9061,12 @@ function resolveFarmMobileShellRender(request, route, routePathname) {
8997
9061
  import { getFarmFormState as farmFormState, getSharedLayoutPrefixLength, handleFarmFormActionRequest, ignoreFarmHeldValues, installFarmIslandValues, parseFarmLayoutChainHeader, renderFarmFormStateScript as farmFormStateScript } from "@farm.js/core/internal/production-runtime";
8998
9062
  import { installFarmIslandsServer } from "@farm.js/core/internal/islands-server";
8999
9063
  installFarmIslandsServer();
9000
- const farmFormActionsConfig = ${JSON.stringify(_chunkXRFGOYXGcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
9064
+ const farmFormActionsConfig = ${JSON.stringify(_chunkNMMCBJZMcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
9001
9065
  installFarmIslandValues();
9002
9066
  ${islandsActionKeyCode("@farm.js/core/internal/islx-server")}
9003
9067
  ${FARM_SEGMENT_NAVIGATION_SERVER_RUNTIME}` : `${farmRendererActions ? `
9004
9068
  import { handleFarmFormActionRequest } from "@farm.js/core/internal/production-runtime";
9005
- const farmFormActionsConfig = ${JSON.stringify(_chunkXRFGOYXGcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
9069
+ const farmFormActionsConfig = ${JSON.stringify(_chunkNMMCBJZMcjs.resolveServerActionsConfig.call(void 0, config.serverActions))};
9006
9070
  ${islandsActionKeyCode("@farm.js/core/internal/islx-actions-server")}` : ""}
9007
9071
  function farmFormState() { return undefined; }
9008
9072
  function farmFormStateScript() { return ""; }`}`;
@@ -9012,25 +9076,25 @@ function farmFormStateScript() { return ""; }`}`;
9012
9076
  const infraAnalyticsImport = hasInfraAnalyticsRuntime ? `import { ${hasPluginRuntime ? "createFarmInfraAnalyticsPlugin" : "createFarmInfraAnalyticsRecorder"} } from "@farm.js/core/internal/infra-analytics-runtime";` : "";
9013
9077
  const compressionRuntimeImport = hasCompressionRuntime ? `import { compressFarmResponse${hasPluginRuntime ? ", createCompressionPlugin" : ""} } from "@farm.js/core/internal/compression-runtime";` : "";
9014
9078
  const i18nServerImport = config.i18n.enabled ? `import { _runWithFarmI18nRequest, _setDefaultFarmI18nRuntime, createFarmI18nRuntime, getFarmI18nClientSnapshot } from "@farm.js/core/i18n/server";` : "";
9015
- const docsHandlerImport = _optionalChain([config, 'access', _211 => _211.docs, 'optionalAccess', _212 => _212.enabled]) ? hasPrecompiledDocs ? `import { createFarmDocsPrecompiledRuntime } from "@farm.js/core/internal/docs-precompiled-runtime";
9079
+ const docsHandlerImport = _optionalChain([config, 'access', _195 => _195.docs, 'optionalAccess', _196 => _196.enabled]) ? hasPrecompiledDocs ? `import { createFarmDocsPrecompiledRuntime } from "@farm.js/core/internal/docs-precompiled-runtime";
9016
9080
  const isFarmDocsAPIRequest = (requestOrPathname) => {
9017
9081
  const pathname = typeof requestOrPathname === "string"
9018
9082
  ? requestOrPathname
9019
9083
  : new URL(requestOrPathname.url).pathname;
9020
- const apiPath = ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _213 => _213.apiPath]) || "/api/docs")};
9084
+ const apiPath = ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _197 => _197.apiPath]) || "/api/docs")};
9021
9085
  return pathname === apiPath || pathname.startsWith(apiPath + "/");
9022
9086
  };` : adapterOwnsDocsRuntime ? `import { ${docsConfigModulePath ? "getFarmDocsConfigModuleRoot, " : ""}isFarmDocsAPIRequest } from "@farm.js/core/docs";
9023
- import { ${_optionalChain([config, 'access', _214 => _214.docs, 'access', _215 => _215.roots, 'optionalAccess', _216 => _216.length]) ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
9024
- import * as FarmDocsAdapterUI from ${JSON.stringify(_chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter))};${docsConfigModulePath ? `
9087
+ import { ${_optionalChain([config, 'access', _198 => _198.docs, 'access', _199 => _199.roots, 'optionalAccess', _200 => _200.length]) ? "createFarmDocsMultiRuntimeHandler as createFarmDocsAdapterMultiRuntimeHandler" : "createFarmDocsRuntimeHandler as createFarmDocsAdapterRuntimeHandler"} } from ${JSON.stringify(config.docs.adapter.server)};
9088
+ import * as FarmDocsAdapterUI from ${JSON.stringify(_chunkVZ2P6GRCcjs.getFarmDocsAdapterUIModule.call(void 0, config.docs.adapter))};${docsConfigModulePath ? `
9025
9089
  import * as farmDocsConfigModule from ${toVirtualEntryImportSpecifier(docsConfigModulePath)};` : ""}` : `import { createFarmDocsAPIHandler, createFarmDocsHandler, isFarmDocsAPIRequest } from "@farm.js/core/docs";` : "";
9026
- const docsFontImport = _optionalChain([config, 'access', _217 => _217.docs, 'optionalAccess', _218 => _218.enabled]) && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
9027
- const docsRuntimeImport = _optionalChain([config, 'access', _219 => _219.docs, 'optionalAccess', _220 => _220.enabled]) && !hasPrecompiledDocs ? `import { existsSync as farmDocsExistsSync } from "node:fs";
9090
+ const docsFontImport = _optionalChain([config, 'access', _201 => _201.docs, 'optionalAccess', _202 => _202.enabled]) && !hasPrecompiledDocs ? `import { resolveFarmLayoutFonts } from "@farm.js/core/font";` : "";
9091
+ const docsRuntimeImport = _optionalChain([config, 'access', _203 => _203.docs, 'optionalAccess', _204 => _204.enabled]) && !hasPrecompiledDocs ? `import { existsSync as farmDocsExistsSync } from "node:fs";
9028
9092
  import { dirname as farmDocsDirname, join as farmDocsJoin } from "node:path";
9029
9093
  import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
9030
- const markdownHandlerImport = _optionalChain([config, 'access', _221 => _221.md, 'optionalAccess', _222 => _222.enabled]) ? `import { applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, getFarmMarkdownAlternatePath } from "@farm.js/core/markdown";` : "";
9094
+ const markdownHandlerImport = _optionalChain([config, 'access', _205 => _205.md, 'optionalAccess', _206 => _206.enabled]) ? `import { applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, getFarmMarkdownAlternatePath } from "@farm.js/core/markdown";` : "";
9031
9095
  const appMarkdownImport = hasMarkdownPages ? `import { FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, isFarmMarkdownPublicSourceResponse } from "@farm.js/core/internal/app-markdown-runtime";` : "const createFarmMarkdownSourceResponse = null;\nconst isFarmMarkdownPublicSourceResponse = null;";
9032
9096
  const markdownErrorImport = `import { FARM_MARKDOWN_CONTENT_TYPE, FARM_MARKDOWN_PAGE_CHECK_HEADER, _isFarmMarkdownPageCheck, createFarmMarkdownErrorBody, farmRequestWantsMarkdown } from "@farm.js/core/markdown";`;
9033
- const mdxComponentsPath = typeof _optionalChain([config, 'access', _223 => _223.mdx, 'optionalAccess', _224 => _224.components]) === "string" ? _path2.default.isAbsolute(config.mdx.components) ? config.mdx.components : _path2.default.join(config.root, config.mdx.components) : null;
9097
+ const mdxComponentsPath = typeof _optionalChain([config, 'access', _207 => _207.mdx, 'optionalAccess', _208 => _208.components]) === "string" ? _path2.default.isAbsolute(config.mdx.components) ? config.mdx.components : _path2.default.join(config.root, config.mdx.components) : null;
9034
9098
  const mdxComponentsImport = mdxComponentsPath ? `import * as FarmMdxComponentsModule from ${toVirtualEntryImportSpecifier(mdxComponentsPath)};` : "";
9035
9099
  const layerConfigPaths = (config.layers || []).map((layer) => layer.configFile).filter((configFile) => Boolean(configFile)).filter((configFile) => configFile !== configModulePath);
9036
9100
  const layerConfigImports = layerConfigPaths.map(
@@ -9048,16 +9112,16 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
9048
9112
  const integrationRuntimeImport = integrationRuntimeExports.length ? `import { ${integrationRuntimeExports.join(", ")} } from "@farm.js/core/integrations";` : "";
9049
9113
  const instrumentationImport = instrumentationPath ? `import * as FarmInstrumentationModule from ${toVirtualEntryImportSpecifier(instrumentationPath)};` : "";
9050
9114
  const nativeAuth = generateNativeAuthIntegrationSource(config.auth);
9051
- const nativeMCP = _chunkVM57CK74cjs.generateNativeMCPPluginSource.call(void 0, config.mcp);
9115
+ const nativeMCP = _chunkVNWKJOJFcjs.generateNativeMCPPluginSource.call(void 0, config.mcp);
9052
9116
  const mobileSession = (config.plugins || []).some(
9053
- (plugin) => _optionalChain([plugin, 'optionalAccess', _225 => _225.name]) === _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN
9117
+ (plugin) => _optionalChain([plugin, 'optionalAccess', _209 => _209.name]) === _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN
9054
9118
  );
9055
9119
  const nativeServerFns = (config.plugins || []).some(
9056
- (plugin) => _optionalChain([plugin, 'optionalAccess', _226 => _226.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
9057
- ) ? _chunkCBB7I6HWcjs.collectFarmNativeServerFns.call(void 0, {
9120
+ (plugin) => _optionalChain([plugin, 'optionalAccess', _210 => _210.name]) === _chunk323JTLXRcjs.FARM_NATIVE_SERVER_FN_PLUGIN
9121
+ ) ? _chunk4ER5KYSCcjs.collectFarmNativeServerFns.call(void 0, {
9058
9122
  root: config.root,
9059
9123
  srcDir: config.srcDir,
9060
- entries: _chunkCBB7I6HWcjs.findFarmNativeScreenFiles.call(void 0, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config))
9124
+ entries: _chunk4ER5KYSCcjs.findFarmNativeScreenFiles.call(void 0, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config))
9061
9125
  }) : void 0;
9062
9126
  const integrationImports = `
9063
9127
  ${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
@@ -9072,7 +9136,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
9072
9136
  ${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
9073
9137
  });` : ""}
9074
9138
  `;
9075
- const imageRuntime = _chunkM4YXD6MDcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
9139
+ const imageRuntime = _chunkVWPGK6UVcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
9076
9140
  const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
9077
9141
  const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
9078
9142
  const apiHandlerCode = apiRoutes.length > 0 ? `
@@ -9209,7 +9273,7 @@ ${routeClientGraphServerRuntime}
9209
9273
  const farmRendererStreamingCapabilities = ${JSON.stringify(rendererStreamingCapabilities)};
9210
9274
  const farmRendererName = ${JSON.stringify(config.renderer.name)};
9211
9275
  const farmReactSyncRender = ${JSON.stringify(hasReactSyncRender)};
9212
- const farmRendererRuntime = ${JSON.stringify(_chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset))};
9276
+ const farmRendererRuntime = ${JSON.stringify(_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset))};
9213
9277
  const farmRendererRuntimeStreamingCapabilities = ReactDOMServer.capabilities &&
9214
9278
  ReactDOMServer.capabilities.streaming;
9215
9279
  if (farmRendererRuntimeStreamingCapabilities &&
@@ -9254,7 +9318,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
9254
9318
 
9255
9319
  function renderFarmDefault404Page() {
9256
9320
  return React.createElement(React.Fragment, null,
9257
- React.createElement("style", null, ${JSON.stringify(_chunkM4YXD6MDcjs.DEFAULT_NOT_FOUND_STYLES)}),
9321
+ React.createElement("style", null, ${JSON.stringify(_chunkVWPGK6UVcjs.DEFAULT_NOT_FOUND_STYLES)}),
9258
9322
  React.createElement("main", {
9259
9323
  className: "farm-default-not-found",
9260
9324
  "aria-labelledby": "farm-default-not-found-title",
@@ -9295,8 +9359,8 @@ function createFarmNotFoundElement(pathname) {
9295
9359
  function isFarmStaticNotFoundPrerender(pathname) {
9296
9360
  return (
9297
9361
  typeof process !== "undefined" &&
9298
- process.env?.${_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV} === "1" &&
9299
- pathname === ${JSON.stringify(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath))}
9362
+ process.env?.${_chunkO47IT4CScjs.FARM_PRERENDER_ENV} === "1" &&
9363
+ pathname === ${JSON.stringify(_chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath))}
9300
9364
  );
9301
9365
  }
9302
9366
 
@@ -9367,7 +9431,7 @@ function wrapWithFarmIntegrationProviders(element) {
9367
9431
  // providers, so the server renders them inside it too. React lines an island up with its tree
9368
9432
  // position instead, and its providers render no markup.
9369
9433
  function wrapFarmIslandIntegrationProviders(element) {
9370
- return ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "element" : "wrapWithFarmIntegrationProviders(element)"};
9434
+ return ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "element" : "wrapWithFarmIntegrationProviders(element)"};
9371
9435
  }
9372
9436
  const serverRuntimeIntegrations = Object.fromEntries(
9373
9437
  Object.entries(configuredIntegrations).filter(([, integration]) =>
@@ -9376,7 +9440,7 @@ const serverRuntimeIntegrations = Object.fromEntries(
9376
9440
  );
9377
9441
  const integrationRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs, {
9378
9442
  integrations: configuredIntegrations,
9379
- ${JSON.stringify(_chunkQKW6DLDTcjs.FARM_INTEGRATION_API_BASE_PATH_KEY)}: ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
9443
+ ${JSON.stringify(_chunk5YT2ZSWScjs.FARM_INTEGRATION_API_BASE_PATH_KEY)}: ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))},
9380
9444
  });
9381
9445
  const farmInfraAnalytics = ${hasInfraAnalyticsRuntime ? `${hasPluginRuntime ? "createFarmInfraAnalyticsPlugin" : "createFarmInfraAnalyticsRecorder"}(${reportsWebMCPCalls ? "{ webmcp: { route: farmWebMCPCallRoute } }" : ""})` : "null"};${reportsWebMCPCalls ? `
9382
9446
  // A WebMCP tool call a page reports goes under that page's route, matched and labeled as a
@@ -9427,24 +9491,24 @@ const farmImageHandler = ${imageRuntime === "none" ? "null" : imageRuntime === "
9427
9491
  validateRemoteUrl: createNodeImageUrlValidator(${JSON.stringify(config.images)}),
9428
9492
  onError(error) { console.error("[Farm Image]", error); },
9429
9493
  })`};
9430
- const farmMarkdownConfig = ${JSON.stringify(config.md)};${_optionalChain([config, 'access', _227 => _227.md, 'optionalAccess', _228 => _228.enabled]) || hasMarkdownPages ? config.trailingSlash ? `
9494
+ const farmMarkdownConfig = ${JSON.stringify(config.md)};${_optionalChain([config, 'access', _211 => _211.md, 'optionalAccess', _212 => _212.enabled]) || hasMarkdownPages ? config.trailingSlash ? `
9431
9495
  // A Markdown mirror, and a page.md source's page check, read the page at the URL it answers at
9432
9496
  // ('/about/'), so the trailing-slash 308 never answers in its place.
9433
9497
  const toFarmMarkdownPageRequest = (request) => toFarmTrailingSlashPageRequest(request, true);` : `
9434
9498
  const toFarmMarkdownPageRequest = (request) => request;` : ""}
9435
- const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.llmsTxt]), () => ( { enabled: false, include: [], exclude: [] })))};
9436
- ${_optionalChain([config, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.llmsTxt, 'optionalAccess', _233 => _233.enabled]) ? "const farmLlmsFullRenderer = createFarmLlmsFullRenderer({ revalidate: farmLlmsTxtConfig.revalidate });\n" : ""}${servesAgentRobotsTxt ? `const farmAgentCrawlers = ${JSON.stringify(config.agent.crawlers)};` : ""}
9499
+ const farmLlmsTxtConfig = ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _213 => _213.agent, 'optionalAccess', _214 => _214.llmsTxt]), () => ( { enabled: false, include: [], exclude: [] })))};
9500
+ ${_optionalChain([config, 'access', _215 => _215.agent, 'optionalAccess', _216 => _216.llmsTxt, 'optionalAccess', _217 => _217.enabled]) ? "const farmLlmsFullRenderer = createFarmLlmsFullRenderer({ revalidate: farmLlmsTxtConfig.revalidate });\n" : ""}${servesAgentRobotsTxt ? `const farmAgentCrawlers = ${JSON.stringify(config.agent.crawlers)};` : ""}
9437
9501
  const farmMdxConfig = ${JSON.stringify({
9438
9502
  ...config.mdx,
9439
- components: typeof _optionalChain([config, 'access', _234 => _234.mdx, 'optionalAccess', _235 => _235.components]) === "string" ? config.mdx.components : void 0
9503
+ components: typeof _optionalChain([config, 'access', _218 => _218.mdx, 'optionalAccess', _219 => _219.components]) === "string" ? config.mdx.components : void 0
9440
9504
  })};
9441
9505
  const configuredFarmMdxComponents = farmUserConfig?.mdx?.components;
9442
- ${_optionalChain([config, 'access', _236 => _236.agent, 'optionalAccess', _237 => _237.noindexPreviews]) ? `// agent.noindexPreviews: the runtime environment decides, falling back to the
9506
+ ${_optionalChain([config, 'access', _220 => _220.agent, 'optionalAccess', _221 => _221.noindexPreviews]) ? `// agent.noindexPreviews: the runtime environment decides, falling back to the
9443
9507
  // environment this was built in, since Netlify exposes its deploy context only
9444
9508
  // to the build.
9445
9509
  const farmNoindexPreview = resolveFarmPreviewDeployment(
9446
9510
  globalThis.process?.env,
9447
- ${JSON.stringify(_chunkEA5HVG45cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
9511
+ ${JSON.stringify(_chunkMUQP2APNcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
9448
9512
  );` : ""}
9449
9513
  const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
9450
9514
  const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
@@ -9490,7 +9554,7 @@ export const farmProductionLifecycle = createFarmProductionLifecycle({
9490
9554
  });
9491
9555
  const farmI18nRuntime = ${config.i18n.enabled ? `createFarmI18nRuntime(farmI18nConfig, ${JSON.stringify(i18nCatalogs)})` : "null"};
9492
9556
  ${config.i18n.enabled ? "_setDefaultFarmI18nRuntime(farmI18nRuntime);" : ""}
9493
- const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _238 => _238.docs, 'optionalAccess', _239 => _239.enabled]) && !hasPrecompiledDocs ? `(() => {
9557
+ const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _222 => _222.docs, 'optionalAccess', _223 => _223.enabled]) && !hasPrecompiledDocs ? `(() => {
9494
9558
  try {
9495
9559
  const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
9496
9560
  const candidates = [
@@ -9502,7 +9566,7 @@ const farmDocsBundledContentDir = ${_optionalChain([config, 'access', _238 => _2
9502
9566
  } catch {
9503
9567
  return null;
9504
9568
  }
9505
- })()` : "null"};${_optionalChain([config, 'access', _240 => _240.docs, 'optionalAccess', _241 => _241.enabled]) && !hasPrecompiledDocs && _optionalChain([config, 'access', _242 => _242.docs, 'access', _243 => _243.roots, 'optionalAccess', _244 => _244.length]) ? `
9569
+ })()` : "null"};${_optionalChain([config, 'access', _224 => _224.docs, 'optionalAccess', _225 => _225.enabled]) && !hasPrecompiledDocs && _optionalChain([config, 'access', _226 => _226.docs, 'access', _227 => _227.roots, 'optionalAccess', _228 => _228.length]) ? `
9506
9570
  const farmDocsBundledRootsDir = (() => {
9507
9571
  try {
9508
9572
  const currentDir = farmDocsDirname(farmDocsFileURLToPath(import.meta.url));
@@ -9519,7 +9583,7 @@ const farmDocsBundledRootsDir = (() => {
9519
9583
  const farmDocsResolvedConfig = ${generateFarmDocsRuntimeConfigExpression(
9520
9584
  config.docs,
9521
9585
  hasPrecompiledDocs,
9522
- _optionalChain([config, 'access', _245 => _245.docs, 'optionalAccess', _246 => _246.enabled]) && _optionalChain([config, 'access', _247 => _247.docs, 'access', _248 => _248.roots, 'optionalAccess', _249 => _249.length]) ? getFarmDocsBundledRootPaths(config.docs, config.root, config.srcDir) : []
9586
+ _optionalChain([config, 'access', _229 => _229.docs, 'optionalAccess', _230 => _230.enabled]) && _optionalChain([config, 'access', _231 => _231.docs, 'access', _232 => _232.roots, 'optionalAccess', _233 => _233.length]) ? getFarmDocsBundledRootPaths(config.docs, config.root, config.srcDir) : []
9523
9587
  )};
9524
9588
  const farmDocsRuntimeRoot = ${hasPrecompiledDocs ? '"."' : `farmDocsBundledContentDir || ${JSON.stringify(config.root)}`};
9525
9589
  // Docs pages a path-specific guard covers, decided at build time. The docs API and the
@@ -9559,8 +9623,8 @@ const farmDocsModulePreloadPaths = farmDocsModulePreloads
9559
9623
  }
9560
9624
  : undefined;
9561
9625
  ${adapterOwnsDocsRuntime && !hasPrecompiledDocs ? `// The renderer contract's server exports, for a docs UI that builds its pages with them.
9562
- const farmDocsAppRenderer = ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? '{ name: "react", createElement: React.createElement, Fragment: React.Fragment, renderToString: ReactDOMServer.renderToString }' : "__farmRendererServer"};
9563
- ` : ""}const farmDocsHandler = ${_optionalChain([config, 'access', _250 => _250.docs, 'optionalAccess', _251 => _251.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {${_optionalChain([config, 'access', _252 => _252.docs, 'access', _253 => _253.roots, 'optionalAccess', _254 => _254.length]) ? "" : `
9626
+ const farmDocsAppRenderer = ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? '{ name: "react", createElement: React.createElement, Fragment: React.Fragment, renderToString: ReactDOMServer.renderToString }' : "__farmRendererServer"};
9627
+ ` : ""}const farmDocsHandler = ${_optionalChain([config, 'access', _234 => _234.docs, 'optionalAccess', _235 => _235.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleDocsRequest" : adapterOwnsDocsRuntime ? `${adapterHandler.factory}(${adapterHandler.config}, {${_optionalChain([config, 'access', _236 => _236.docs, 'access', _237 => _237.roots, 'optionalAccess', _238 => _238.length]) ? "" : `
9564
9628
  rootDir: farmDocsRuntimeRoot,`}
9565
9629
  // A production build's content cannot change, so the adapter reads its
9566
9630
  // navigation once instead of scanning the content directory per request.
@@ -9578,13 +9642,13 @@ const farmDocsAppRenderer = ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, con
9578
9642
  ),
9579
9643
  loadUIModule: async () => FarmDocsAdapterUI,
9580
9644
  // The app's renderer, for a UI that builds its pages with it.
9581
- loadRenderer: async () => farmDocsAppRenderer,${_chunkL2GUEYHRcjs.getFarmDocsAdapterRenderer.call(void 0, config.docs.adapter) === "react" ? `
9645
+ loadRenderer: async () => farmDocsAppRenderer,${_chunkVZ2P6GRCcjs.getFarmDocsAdapterRenderer.call(void 0, config.docs.adapter) === "react" ? `
9582
9646
  loadReactModule: async () => FarmDocsAdapterUI,` : ""}
9583
9647
  // Lists the docs MCP endpoint in /.well-known/ai-catalog.json for the server's lifetime.
9584
9648
  registerMCPServer: registerFarmMCPServer,
9585
9649
  // A page built with this keeps its HTML string, so the preload budget and the response
9586
9650
  // writer use it instead of reading and re-encoding the body. Older adapters ignore it.
9587
- createHtmlResponse: farmOwnedHtmlResponse,${_chunkRBSGFS5Xcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
9651
+ createHtmlResponse: farmOwnedHtmlResponse,${_chunk2LHO4HTPcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
9588
9652
  // The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
9589
9653
  // asks about any path its own content lists, so the guards decide here, not a page list.
9590
9654
  isPathGuarded: (pathname) =>
@@ -9610,7 +9674,7 @@ const farmDocsAppRenderer = ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, con
9610
9674
  isPathGuarded: isFarmDocsPathGuarded,
9611
9675
  basePath: ${JSON.stringify(config.basePath)},
9612
9676
  })` : "null"};
9613
- const farmDocsAPIHandler = ${_optionalChain([config, 'access', _255 => _255.docs, 'optionalAccess', _256 => _256.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleAPIRequest" : adapterOwnsDocsRuntime ? "null" : `createFarmDocsAPIHandler({ rootDir: farmDocsRuntimeRoot, srcDir: ${JSON.stringify(config.srcDir)}, docs: farmDocsResolvedConfig, isPathGuarded: isFarmDocsPathGuarded, basePath: ${JSON.stringify(config.basePath)} })` : "null"};
9677
+ const farmDocsAPIHandler = ${_optionalChain([config, 'access', _239 => _239.docs, 'optionalAccess', _240 => _240.enabled]) ? hasPrecompiledDocs ? "farmDocsPrecompiledRuntime.handleAPIRequest" : adapterOwnsDocsRuntime ? "null" : `createFarmDocsAPIHandler({ rootDir: farmDocsRuntimeRoot, srcDir: ${JSON.stringify(config.srcDir)}, docs: farmDocsResolvedConfig, isPathGuarded: isFarmDocsPathGuarded, basePath: ${JSON.stringify(config.basePath)} })` : "null"};
9614
9678
 
9615
9679
  // A long-running server calls this before it listens, so a Polyroute route's first request
9616
9680
  // doesn't wait for its WebAssembly to compile and its instance to start. Polyroute releases
@@ -9649,7 +9713,7 @@ function fetchFarmInnerRequest(request, context) {
9649
9713
  headers.delete("accept-encoding");
9650
9714
  return fetch(new Request(request, { headers }), context);
9651
9715
  }
9652
- const farmLocalAPIBasePath = ${JSON.stringify(_chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
9716
+ const farmLocalAPIBasePath = ${JSON.stringify(_chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api))};
9653
9717
  // Deployment skew protection (see the deployment docs): documents embed this ID, page responses
9654
9718
  // name it, and a page request from a browser holding another deployment's page is refused.
9655
9719
  const farmDeploymentId = ${JSON.stringify(config.deploymentId)};${searchPreserveRoutesSource ? `
@@ -9661,12 +9725,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
9661
9725
  // runtime request.
9662
9726
  const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
9663
9727
  const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
9664
- ${_optionalChain([config, 'access', _257 => _257.agent, 'optionalAccess', _258 => _258.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkSCE7VWPNcjs.resolveFarmApiCatalogInput.call(void 0, config))};
9665
- ` : ""}${_optionalChain([config, 'access', _259 => _259.agent, 'optionalAccess', _260 => _260.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
9666
- _chunkSCE7VWPNcjs.resolveFarmAppManifestInput.call(void 0, config, {
9728
+ ${_optionalChain([config, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunkMZG5M4JScjs.resolveFarmApiCatalogInput.call(void 0, config))};
9729
+ ` : ""}${_optionalChain([config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
9730
+ _chunkMZG5M4JScjs.resolveFarmAppManifestInput.call(void 0, config, {
9667
9731
  build: config.deploymentId,
9668
- packages: _chunkM4YXD6MDcjs.resolveFarmAppPackages.call(void 0, config.root),
9669
- webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkM4YXD6MDcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
9732
+ packages: _chunkVWPGK6UVcjs.resolveFarmAppPackages.call(void 0, config.root),
9733
+ webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkVWPGK6UVcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
9670
9734
  })
9671
9735
  )};
9672
9736
  ${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
@@ -9679,7 +9743,7 @@ farmAppManifestInput.guardCoversPath = (path) =>
9679
9743
  path,
9680
9744
  farmLocalAPIBasePath,
9681
9745
  );
9682
- ${_optionalChain([config, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.enabled]) ? `// A docs runtime's MCP server lists its tools when asked over MCP, in process. A build
9746
+ ${_optionalChain([config, 'access', _245 => _245.docs, 'optionalAccess', _246 => _246.enabled]) ? `// A docs runtime's MCP server lists its tools when asked over MCP, in process. A build
9683
9747
  // can't change them, so they are read once.
9684
9748
  if (farmDocsHandler) {
9685
9749
  farmAppManifestInput.registeredMCP = (request) =>
@@ -10454,7 +10518,7 @@ function peelFarmDocumentPrefix(markup) {
10454
10518
  let inner = markup.replace(/^\\s+/, "");
10455
10519
  let hoisted = "";
10456
10520
  const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
10457
- const hoistable = /${_chunkYSRZSKQBcjs.HOISTED_HEAD_ELEMENT.source}/i;
10521
+ const hoistable = /${_chunkIGBQSUT5cjs.HOISTED_HEAD_ELEMENT.source}/i;
10458
10522
  let match;
10459
10523
  while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
10460
10524
  if (!/^<div/i.test(match[0])) hoisted += match[0];
@@ -10483,7 +10547,7 @@ function opensFarmFullDocument(markup) {
10483
10547
  // them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
10484
10548
  function takeFarmHoistedHead(markup) {
10485
10549
  if (opensFarmFullDocument(markup)) return { head: "", body: markup };
10486
- const hoistable = /${_chunkYSRZSKQBcjs.HOISTED_HEAD_ELEMENT.source}/i;
10550
+ const hoistable = /${_chunkIGBQSUT5cjs.HOISTED_HEAD_ELEMENT.source}/i;
10487
10551
  let head = "";
10488
10552
  let body = markup;
10489
10553
  let match;
@@ -11041,10 +11105,10 @@ async function handleMetadataImageRequest(request, routePathname) {
11041
11105
  path: match.pagePath,
11042
11106
  };
11043
11107
 
11044
- ${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "" : ", {\n renderer: ReactDOMServer,\n component: image.component === true,\n }"});
11108
+ ${hasGeneratedMetadataImages ? `const value = await resolveFarmMetadataImageValue(imageModule, props${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "" : ", {\n renderer: ReactDOMServer,\n component: image.component === true,\n }"});
11045
11109
  return createFarmMetadataImageResponse(value, imageModule, {
11046
11110
  method,
11047
- ifNoneMatch: request.headers.get("if-none-match"),${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: ReactDOMServer,"}
11111
+ ifNoneMatch: request.headers.get("if-none-match"),${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "" : "\n renderer: ReactDOMServer,"}
11048
11112
  });` : 'throw new Error("Generated metadata image runtime is unavailable");'}
11049
11113
  } catch (error) {
11050
11114
  console.error("Metadata image render failed:", error);
@@ -11123,7 +11187,7 @@ function createFarmAgentRobotsResponse(request) {
11123
11187
  // its nearest layout's.
11124
11188
  const farmAgentGuardedPages = new Set(${JSON.stringify(
11125
11189
  pageRoutes.map((route) => route.pattern).filter(
11126
- (pattern) => !pattern.includes("[") && _chunkYSRZSKQBcjs.farmPathGuardCoversPage.call(void 0,
11190
+ (pattern) => !pattern.includes("[") && _chunkIGBQSUT5cjs.farmPathGuardCoversPage.call(void 0,
11127
11191
  {
11128
11192
  config: { middleware: config.middleware, integrations: config.integrations },
11129
11193
  middlewareRoutes
@@ -11178,12 +11242,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
11178
11242
  // aside for a page route that answers /mcp and for any MCP server published or
11179
11243
  // registered at runtime, such as the docs engine's.
11180
11244
  const farmDefaultMCPServer = ${JSON.stringify(
11181
- _chunkJH4CDG4Gcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkNOSLIDSGcjs.FARM_VERSION)
11245
+ _chunkR6GOH5CHcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkZ7YIQ7AJcjs.FARM_VERSION)
11182
11246
  )};
11183
11247
  let farmDefaultMCPRouteFree;
11184
11248
  function getFarmDefaultMCPServer() {
11185
11249
  if (farmDefaultMCPRouteFree === undefined) {
11186
- farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkJH4CDG4Gcjs.FARM_DEFAULT_MCP_PATH)});
11250
+ farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH)});
11187
11251
  }
11188
11252
  return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
11189
11253
  }
@@ -11372,7 +11436,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
11372
11436
  // middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
11373
11437
  const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
11374
11438
  const farmPrerendering =
11375
- typeof process !== "undefined" && process.env?.${_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV} === "1";
11439
+ typeof process !== "undefined" && process.env?.${_chunkO47IT4CScjs.FARM_PRERENDER_ENV} === "1";
11376
11440
  ` : ""}
11377
11441
  const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
11378
11442
  config: farmMiddlewareConfig,
@@ -11516,7 +11580,7 @@ function hasLocalRequestRoute(request, routePathname) {
11516
11580
  if (${imageRuntime === "none" ? "false" : `pathname === ${JSON.stringify(config.images.path)}`}) {
11517
11581
  return true;
11518
11582
  }
11519
- ${_optionalChain([config, 'access', _263 => _263.docs, 'optionalAccess', _264 => _264.enabled]) ? `const docsPath = normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs");
11583
+ ${_optionalChain([config, 'access', _247 => _247.docs, 'optionalAccess', _248 => _248.enabled]) ? `const docsPath = normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs");
11520
11584
  // The docs answer below the basePath; their API stays at /api/docs, as API routes do.
11521
11585
  const docsRoutePathname = stripFarmBasePath(pathname);
11522
11586
  if (
@@ -11544,7 +11608,7 @@ function getFarmPluginRequestOptions(request) {
11544
11608
  route: { ...route, pattern: normalizeRuntimePath(farmOpenAPIReference.route) },
11545
11609
  };
11546
11610
  }
11547
- const isDocsAPIRequest = ${_optionalChain([config, 'access', _265 => _265.docs, 'optionalAccess', _266 => _266.enabled]) ? "isFarmDocsAPIRequest(pathname)" : "false"};
11611
+ const isDocsAPIRequest = ${_optionalChain([config, 'access', _249 => _249.docs, 'optionalAccess', _250 => _250.enabled]) ? "isFarmDocsAPIRequest(pathname)" : "false"};
11548
11612
  const integrationMatch = ${hasServerRuntimeIntegrations ? `matchIntegrationRoute(serverRuntimeIntegrations, {
11549
11613
  pathname,
11550
11614
  method: request.method,
@@ -11628,7 +11692,7 @@ ${hasInfraAnalyticsRuntime ? `
11628
11692
  // endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
11629
11693
  // labeled here; route.pattern keeps meaning the matched app route for plugins.
11630
11694
  const farmBuiltInRoutePaths = new Set(${JSON.stringify(
11631
- _chunkSCE7VWPNcjs.listFarmBuiltInRoutePaths.call(void 0, {
11695
+ _chunkMZG5M4JScjs.listFarmBuiltInRoutePaths.call(void 0, {
11632
11696
  agent: {
11633
11697
  ...config.agent,
11634
11698
  aiCatalog: servesAiCatalog,
@@ -11639,9 +11703,9 @@ const farmBuiltInRoutePaths = new Set(${JSON.stringify(
11639
11703
  openapi: openAPIReference
11640
11704
  })
11641
11705
  )});
11642
- ${_optionalChain([config, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.enabled]) ? `const farmDocsRouteLabelInput = {
11706
+ ${_optionalChain([config, 'access', _251 => _251.docs, 'optionalAccess', _252 => _252.enabled]) ? `const farmDocsRouteLabelInput = {
11643
11707
  path: normalizeRuntimePath(farmDocsResolvedConfig?.entry || "/docs"),
11644
- apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _269 => _269.apiPath]) || "/api/docs")},${_optionalChain([config, 'access', _270 => _270.docs, 'access', _271 => _271.roots, 'optionalAccess', _272 => _272.length]) ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}${farmDocsAnalyticsPages.length ? `
11708
+ apiPath: ${JSON.stringify(_optionalChain([farmDocsPrecompiledManifest, 'optionalAccess', _253 => _253.apiPath]) || "/api/docs")},${_optionalChain([config, 'access', _254 => _254.docs, 'access', _255 => _255.roots, 'optionalAccess', _256 => _256.length]) ? "\n roots: farmDocsResolvedConfig.roots.map((farmDocsRoot) => farmDocsRoot.entry)," : ""}${farmDocsAnalyticsPages.length ? `
11645
11709
  pages: new Set(${JSON.stringify(farmDocsAnalyticsPages)}),` : ""}
11646
11710
  };
11647
11711
  ` : ""}// The request's route payload, for a handler that learns what answered while it handles.
@@ -11657,11 +11721,11 @@ function labelFarmRequestOptions(options) {
11657
11721
  setFarmRouteLabel(options.route, mcpLabel);
11658
11722
  return options;
11659
11723
  }
11660
- ${_optionalChain([config, 'access', _273 => _273.docs, 'optionalAccess', _274 => _274.enabled]) ? `if (options.kind === "docs") {
11724
+ ${_optionalChain([config, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.enabled]) ? `if (options.kind === "docs") {
11661
11725
  setFarmRouteLabel(options.route, resolveFarmDocsRouteLabel(routePathname, farmDocsRouteLabelInput));
11662
11726
  return options;
11663
11727
  }` : ""}
11664
- ${_optionalChain([config, 'access', _275 => _275.md, 'optionalAccess', _276 => _276.enabled]) || hasMarkdownPages ? `const markdownLabel = resolveFarmMarkdownRouteLabel(
11728
+ ${_optionalChain([config, 'access', _259 => _259.md, 'optionalAccess', _260 => _260.enabled]) || hasMarkdownPages ? `const markdownLabel = resolveFarmMarkdownRouteLabel(
11665
11729
  routePathname,
11666
11730
  (page) => matchPageRoute(page)?.route.pattern,
11667
11731
  );
@@ -11696,7 +11760,7 @@ function getApplicableLayouts(pathname, directory) {
11696
11760
  return applicable;
11697
11761
  }
11698
11762
 
11699
- ${_optionalChain([config, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.enabled]) ? `async function wrapFarmDocsResponseWithLayouts(request, response) {
11763
+ ${_optionalChain([config, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.enabled]) ? `async function wrapFarmDocsResponseWithLayouts(request, response) {
11700
11764
  if (request.method === "HEAD") return response;
11701
11765
  if (response.headers.get("x-farm-docs-adapter")) return response;
11702
11766
 
@@ -11802,7 +11866,7 @@ ${_optionalChain([config, 'access', _277 => _277.docs, 'optionalAccess', _278 =>
11802
11866
 
11803
11867
  // Shells keep their own LRU so query-string variants never evict app cache entries.
11804
11868
  const pprShellCache = getFarmDataCache().pprShellCache;
11805
- const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access', _279 => _279.experimental, 'optionalAccess', _280 => _280.ppr]) === true)};
11869
+ const experimentalPPREnabled = ${JSON.stringify(_optionalChain([config, 'access', _263 => _263.experimental, 'optionalAccess', _264 => _264.ppr]) === true)};
11806
11870
 
11807
11871
  function resolveRouteRenderingView(route) {
11808
11872
  // The same merge development uses: baked directive config under the
@@ -11922,7 +11986,7 @@ async function handleFarmRequest(request, adapterContext) {
11922
11986
  },
11923
11987
  { redirect: !isFarmLocalAPIPathname(requestUrl.pathname) }
11924
11988
  )` : "handleFarmRequestInContext(request, null, false, Date.now(), adapterContext, requestUrl)"};
11925
- ${_optionalChain([config, 'access', _281 => _281.md, 'optionalAccess', _282 => _282.enabled]) ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
11989
+ ${_optionalChain([config, 'access', _265 => _265.md, 'optionalAccess', _266 => _266.enabled]) ? `const pathname = getFarmRoutePathname(requestUrl.pathname);
11926
11990
  if (matchPageRoute(pathname)) {
11927
11991
  // The Link header advertises the public .md URL, like the head alternate.
11928
11992
  return applyMarkdownNegotiationHeaders(response, {
@@ -12139,7 +12203,7 @@ ${hasServerRuntimeIntegrations ? `
12139
12203
  return renderFarmErrorJSONResponse();` : `
12140
12204
  if (isFarmLocalAPIPathname(pathname)) return renderFarmErrorJSONResponse();
12141
12205
  // No page was selected, so only the root error boundary and layouts apply.
12142
- const errorResponse = await renderFarmErrorResponse(middlewareResult.error, "/", {}, null);${_optionalChain([config, 'access', _283 => _283.md, 'optionalAccess', _284 => _284.enabled]) ? `
12206
+ const errorResponse = await renderFarmErrorResponse(middlewareResult.error, "/", {}, null);${_optionalChain([config, 'access', _267 => _267.md, 'optionalAccess', _268 => _268.enabled]) ? `
12143
12207
  // An agent asking for Markdown reads the error document as Markdown, as it
12144
12208
  // does when a page throws. The helper answers null when Markdown is off.
12145
12209
  const markdownErrorResponse = await createMarkdownMirrorResponse({
@@ -12181,7 +12245,7 @@ ${hasServerRuntimeIntegrations ? `
12181
12245
  }
12182
12246
  ` : ""}
12183
12247
 
12184
- ${_optionalChain([config, 'access', _285 => _285.docs, 'optionalAccess', _286 => _286.enabled]) ? `
12248
+ ${_optionalChain([config, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.enabled]) ? `
12185
12249
  // Docs responses are served after app middleware so route guards and
12186
12250
  // middleware headers apply to the docs engine like any other page content.
12187
12251
  // An app's own llms.txt, llms-full.txt, sitemap.xml, and robots.txt take
@@ -12285,7 +12349,7 @@ ${hasServerRuntimeIntegrations ? `
12285
12349
  // A POST is a form a native-tier screen submitted (native-tree.ts).
12286
12350
  if (
12287
12351
  (request.method === "GET" || request.method === "HEAD" || request.method === "POST") &&
12288
- request.headers.get("accept")?.includes(${JSON.stringify(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)})
12352
+ request.headers.get("accept")?.includes(${JSON.stringify(_chunkXVD5Y6S4cjs.FARM_NATIVE_TREE_CONTENT_TYPE)})
12289
12353
  ) {
12290
12354
  const treeResponse = await createFarmNativeTreeResponse({
12291
12355
  request,
@@ -12301,7 +12365,7 @@ ${hasServerRuntimeIntegrations ? `
12301
12365
  }
12302
12366
  ` : ""}
12303
12367
 
12304
- ${_optionalChain([config, 'access', _287 => _287.md, 'optionalAccess', _288 => _288.enabled]) ? `
12368
+ ${_optionalChain([config, 'access', _271 => _271.md, 'optionalAccess', _272 => _272.enabled]) ? `
12305
12369
  if (farmMarkdownConfig?.enabled) {
12306
12370
  const markdownResponse = await createMarkdownMirrorResponse({
12307
12371
  // The mirror helper only reads metadata and creates its own GET request.
@@ -12405,11 +12469,11 @@ ${hasServerRuntimeIntegrations ? `
12405
12469
  return applyProductionMiddlewareHeaders(applicationMetadataResponse, middlewareHeaders);
12406
12470
  }
12407
12471
  ` : ""}
12408
- ${_optionalChain([config, 'access', _289 => _289.agent, 'optionalAccess', _290 => _290.manifest]) !== false ? `
12472
+ ${_optionalChain([config, 'access', _273 => _273.agent, 'optionalAccess', _274 => _274.manifest]) !== false ? `
12409
12473
  // agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
12410
12474
  // public manifest, the same document for every request.
12411
12475
  if (
12412
- [${JSON.stringify(_chunkSCE7VWPNcjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkSCE7VWPNcjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
12476
+ [${JSON.stringify(_chunkMZG5M4JScjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunkMZG5M4JScjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
12413
12477
  normalizeRuntimePath(routePathname),
12414
12478
  )
12415
12479
  ) {
@@ -12419,9 +12483,9 @@ ${hasServerRuntimeIntegrations ? `
12419
12483
  );
12420
12484
  }
12421
12485
  ` : ""}
12422
- ${_optionalChain([config, 'access', _291 => _291.agent, 'optionalAccess', _292 => _292.apiCatalog]) ? `
12486
+ ${_optionalChain([config, 'access', _275 => _275.agent, 'optionalAccess', _276 => _276.apiCatalog]) ? `
12423
12487
  // agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
12424
- if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkSCE7VWPNcjs.FARM_API_CATALOG_PATH)}) {
12488
+ if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkMZG5M4JScjs.FARM_API_CATALOG_PATH)}) {
12425
12489
  return applyProductionMiddlewareHeaders(
12426
12490
  createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
12427
12491
  middlewareHeaders,
@@ -12446,11 +12510,11 @@ ${hasServerRuntimeIntegrations ? `
12446
12510
  );
12447
12511
  }
12448
12512
  ` : ""}
12449
- ${_optionalChain([config, 'access', _293 => _293.agent, 'optionalAccess', _294 => _294.llmsTxt, 'optionalAccess', _295 => _295.enabled]) ? `
12513
+ ${_optionalChain([config, 'access', _277 => _277.agent, 'optionalAccess', _278 => _278.llmsTxt, 'optionalAccess', _279 => _279.enabled]) ? `
12450
12514
  // agent.llmsTxt with no llms.ts or llms-full.ts: serve the generated files.
12451
12515
  const farmGeneratedLlmsKind = normalizeRuntimePath(routePathname) === "/llms.txt"
12452
12516
  ? "llms"
12453
- : ${_optionalChain([config, 'access', _296 => _296.agent, 'optionalAccess', _297 => _297.llmsTxt, 'optionalAccess', _298 => _298.full]) ? `normalizeRuntimePath(routePathname) === "/llms-full.txt" ? "llms-full" : ` : ""}null;
12517
+ : ${_optionalChain([config, 'access', _280 => _280.agent, 'optionalAccess', _281 => _281.llmsTxt, 'optionalAccess', _282 => _282.full]) ? `normalizeRuntimePath(routePathname) === "/llms-full.txt" ? "llms-full" : ` : ""}null;
12454
12518
  if (farmGeneratedLlmsKind) {
12455
12519
  const llmsContext = createFarmLlmsTxtContext(request, farmGeneratedLlmsKind === "llms-full");
12456
12520
  // Renders are shared per origin the request reached, which is where pages are read.
@@ -12486,7 +12550,7 @@ ${hasServerRuntimeIntegrations ? `
12486
12550
  }
12487
12551
  ` : ""}
12488
12552
 
12489
- ${_optionalChain([config, 'access', _299 => _299.docs, 'optionalAccess', _300 => _300.enabled]) ? `if (farmDocsAPIHandler && isFarmDocsAPIRequest(pathname)) {
12553
+ ${_optionalChain([config, 'access', _283 => _283.docs, 'optionalAccess', _284 => _284.enabled]) ? `if (farmDocsAPIHandler && isFarmDocsAPIRequest(pathname)) {
12490
12554
  const docsAPIResponse = await farmDocsAPIHandler(cloneFarmRequestWithContext(request));
12491
12555
  if (docsAPIResponse) {
12492
12556
  return applyProductionMiddlewareHeaders(
@@ -12981,7 +13045,7 @@ ${hasServerRuntimeIntegrations ? `
12981
13045
  pageElement,
12982
13046
  );
12983
13047
 
12984
- ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) pageElement = markPagePosition(React, pageElement);" : ""}
13048
+ ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) pageElement = markPagePosition(React, pageElement);" : ""}
12985
13049
  // Wrap with layouts (from innermost to outermost)
12986
13050
  // Layouts are sorted by depth (root first), so we process in reverse
12987
13051
  let wrappedElement = pageElement;
@@ -13055,7 +13119,7 @@ ${hasServerRuntimeIntegrations ? `
13055
13119
  wrappedElement = wrapFarmRouteClientGraph(wrappedElement);
13056
13120
  }
13057
13121
 
13058
- ${_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) wrappedElement = markLayoutPosition(React, wrappedElement);" : ""}
13122
+ ${_chunkLEZJZX4Ccjs.isReactRenderer.call(void 0, config.renderer) ? "if (route.shouldHydrate && !shouldHydrateLayout) wrappedElement = markLayoutPosition(React, wrappedElement);" : ""}
13059
13123
  wrappedElement = wrapWithFarmIntegrationProviders(wrappedElement);
13060
13124
  return renderFarmElement(ReactDOMServer, wrappedElement, route.pattern, farmFlushToken);
13061
13125
  };
@@ -13126,7 +13190,7 @@ ${hasServerRuntimeIntegrations ? `
13126
13190
  );
13127
13191
  }
13128
13192
  }
13129
- ${_optionalChain([config, 'access', _301 => _301.md, 'optionalAccess', _302 => _302.enabled]) ? `
13193
+ ${_optionalChain([config, 'access', _285 => _285.md, 'optionalAccess', _286 => _286.enabled]) ? `
13130
13194
  // Advertise the Markdown mirror in the head as well as the Link header,
13131
13195
  // using the public path the .md request will be resolved against.
13132
13196
  mergedMetadata = addMetadataMarkdownAlternate(
@@ -13155,7 +13219,7 @@ ${hasServerRuntimeIntegrations ? `
13155
13219
  emitFarmEvent({ type: "cache.bypass", route: pathname, reason: "cookie" });
13156
13220
  }
13157
13221
 
13158
- const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _303 => _303.agent, 'optionalAccess', _304 => _304.jsonLd]), () => ( false)))} });
13222
+ const renderedMetadata = renderMetadataHead(mergedMetadata, { pathname, jsonLd: ${JSON.stringify(_nullishCoalesce(_optionalChain([config, 'access', _287 => _287.agent, 'optionalAccess', _288 => _288.jsonLd]), () => ( false)))} });
13159
13223
  const title = renderedMetadata.title;
13160
13224
  const metaTags = renderedMetadata.tags;
13161
13225
  const hasFavicon = renderedMetadata.hasFavicon;
@@ -13623,7 +13687,7 @@ ${hasServerRuntimeIntegrations ? `
13623
13687
  ${servesDefaultMCP ? `
13624
13688
  // agent.mcp: no app route answered /mcp, so the default read-only server may.
13625
13689
  if (
13626
- normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkJH4CDG4Gcjs.FARM_DEFAULT_MCP_PATH)} &&
13690
+ normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkR6GOH5CHcjs.FARM_DEFAULT_MCP_PATH)} &&
13627
13691
  getFarmDefaultMCPServer()
13628
13692
  ) {
13629
13693
  return applyProductionMiddlewareHeaders(
@@ -14013,11 +14077,11 @@ function createFarmRuntimeHookErrorResponse(request, error) {
14013
14077
  export async function fetch(request, context) {${imageRuntime === "none" ? "" : `
14014
14078
  // The image optimizer's fetch of a local source is not a loopback visitor.
14015
14079
  context = _withFarmImageSourceClientAddress(request, context);`}
14016
- ${_optionalChain([config, 'access', _305 => _305.agent, 'optionalAccess', _306 => _306.noindexPreviews]) ? "const response = await" : "return"} _runWithAPIRequestRuntime({
14080
+ ${_optionalChain([config, 'access', _289 => _289.agent, 'optionalAccess', _290 => _290.noindexPreviews]) ? "const response = await" : "return"} _runWithAPIRequestRuntime({
14017
14081
  basePath: farmLocalAPIBasePath,
14018
14082
  dispatch: async (localRequest) =>
14019
14083
  (await handleAPIRequest(localRequest)) ?? Response.json({ error: "Not Found" }, { status: 404 }),
14020
- }, () => handleFarmFetch(request, context));${_optionalChain([config, 'access', _307 => _307.agent, 'optionalAccess', _308 => _308.noindexPreviews]) ? `
14084
+ }, () => handleFarmFetch(request, context));${_optionalChain([config, 'access', _291 => _291.agent, 'optionalAccess', _292 => _292.noindexPreviews]) ? `
14021
14085
  // Keep every response of a preview deployment out of search indexes.
14022
14086
  return farmNoindexPreview ? applyFarmPreviewRobotsTag(response) : response;` : ""}
14023
14087
  }
@@ -14223,15 +14287,15 @@ function getManifestPageEntry(manifest, pathname) {
14223
14287
  pages = manifest.routes.filter((entry) => entry.kind === "page").map((entry) => ({
14224
14288
  entry,
14225
14289
  matches: createMiddlewarePatternMatcher(entry.pattern),
14226
- specificity: _chunkML4TOUZPcjs.getRoutePatternSpecificity.call(void 0, entry.pattern)
14227
- })).sort((left, right) => _chunkML4TOUZPcjs.compareRouteSpecificity.call(void 0, left.specificity, right.specificity)).map(({ entry, matches }) => ({ entry, matches }));
14290
+ specificity: _chunkT4YCWRCJcjs.getRoutePatternSpecificity.call(void 0, entry.pattern)
14291
+ })).sort((left, right) => _chunkT4YCWRCJcjs.compareRouteSpecificity.call(void 0, left.specificity, right.specificity)).map(({ entry, matches }) => ({ entry, matches }));
14228
14292
  manifestPageMatchers.set(manifest.routes, pages);
14229
14293
  }
14230
- return _optionalChain([pages, 'access', _309 => _309.find, 'call', _310 => _310((page) => page.matches(pathname)), 'optionalAccess', _311 => _311.entry]);
14294
+ return _optionalChain([pages, 'access', _293 => _293.find, 'call', _294 => _294((page) => page.matches(pathname)), 'optionalAccess', _295 => _295.entry]);
14231
14295
  }
14232
14296
  function withFarmEdgeGuardedPrerenderHeaders(headers, edgeGuarded) {
14233
14297
  if (!edgeGuarded) return headers;
14234
- const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ..._chunkYUQUGVSVcjs.CDN_CACHE_CONTROL_HEADERS]);
14298
+ const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ..._chunkCTTXHHZGcjs.CDN_CACHE_CONTROL_HEADERS]);
14235
14299
  return {
14236
14300
  ...Object.fromEntries(
14237
14301
  Object.entries(headers).filter(([name]) => !cacheHeaders.has(name.toLowerCase()))
@@ -14264,13 +14328,13 @@ function getPhysicalPrerenderBypassReason(options) {
14264
14328
  if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
14265
14329
  return "rewrite";
14266
14330
  }
14267
- if (_chunkYSRZSKQBcjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
14268
- if (_chunkYSRZSKQBcjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
14269
- if (_chunkUOMSGJHKcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
14331
+ if (_chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
14332
+ if (_chunkIGBQSUT5cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
14333
+ if (_chunkOAAVIFOJcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
14270
14334
  if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
14271
14335
  const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
14272
- if (_optionalChain([manifestEntry, 'optionalAccess', _312 => _312.rendering]) === "dynamic") return "dynamic runtime manifest";
14273
- if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _313 => _313.regions, 'optionalAccess', _314 => _314.length])) || manifestEntry.maxDuration !== void 0)) {
14336
+ if (_optionalChain([manifestEntry, 'optionalAccess', _296 => _296.rendering]) === "dynamic") return "dynamic runtime manifest";
14337
+ if (manifestEntry && (manifestEntry.runtime !== "auto" || Boolean(_optionalChain([manifestEntry, 'access', _297 => _297.regions, 'optionalAccess', _298 => _298.length])) || manifestEntry.maxDuration !== void 0)) {
14274
14338
  return "route runtime controls";
14275
14339
  }
14276
14340
  const routeRule = getEffectiveRouteRule(config, pathname);
@@ -14289,18 +14353,18 @@ function normalizeStaticNotFoundPath(pathname) {
14289
14353
  var FARM_STATIC_NOT_FOUND_PROBE = "/__farm-static-not-found-probe__/0";
14290
14354
  async function resolveFarmStaticNotFoundPlan(options) {
14291
14355
  const { config, routeManager } = options;
14292
- if (_optionalChain([config, 'access', _315 => _315.experimental, 'optionalAccess', _316 => _316.staticNotFound]) !== true) return null;
14356
+ if (_optionalChain([config, 'access', _299 => _299.experimental, 'optionalAccess', _300 => _300.staticNotFound]) !== true) return null;
14293
14357
  if (options.preset !== "vercel") {
14294
14358
  return { reason: `it applies to the vercel target, not "${options.preset}"` };
14295
14359
  }
14296
- if (_chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, config.renderer)) {
14360
+ if (_chunkLEZJZX4Ccjs.isFarmRendererDisabled.call(void 0, config.renderer)) {
14297
14361
  return { reason: "the app sets `renderer: false`, so a missing URL gets a JSON 404" };
14298
14362
  }
14299
14363
  if (config.i18n.enabled) return { reason: "i18n may redirect any path to a locale" };
14300
14364
  const routePatterns = /* @__PURE__ */ new Set();
14301
14365
  const prefixPatterns = /* @__PURE__ */ new Set([
14302
14366
  "/api",
14303
- _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api),
14367
+ _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api),
14304
14368
  "/_farm",
14305
14369
  "/__farm",
14306
14370
  "/.well-known",
@@ -14343,22 +14407,33 @@ async function resolveFarmStaticNotFoundPlan(options) {
14343
14407
  for (const image of routeManager.getMetadataImages().values()) {
14344
14408
  routePatterns.add(`${image.pattern === "/" ? "" : image.pattern}/${image.fileName}`);
14345
14409
  }
14410
+ const apiPrefixes = [...prefixPatterns].map(normalizeStaticNotFoundPath);
14411
+ for (const routePath of options.apiRoutePaths) {
14412
+ const pathname = normalizeStaticNotFoundPath(routePath);
14413
+ if (apiPrefixes.some((prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`))) {
14414
+ continue;
14415
+ }
14416
+ if (/^\/\[\[?\.\.\./.test(pathname)) {
14417
+ return { reason: `the API route \`${routePath}\` answers every path` };
14418
+ }
14419
+ routePatterns.add(pathname);
14420
+ }
14346
14421
  for (const plugin of config.plugins || []) {
14347
- if (_chunkDVAZ53X6cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) continue;
14348
- if (plugin.name === _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN) continue;
14349
- if (_chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, FARM_STATIC_NOT_FOUND_PROBE)) {
14422
+ if (_chunkN4AM7Q34cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) continue;
14423
+ if (plugin.name === _chunk6AUPJYHFcjs.FARM_MOBILE_SESSION_PLUGIN) continue;
14424
+ if (_chunkUOFTT6S4cjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, FARM_STATIC_NOT_FOUND_PROBE)) {
14350
14425
  return { reason: `the server plugin "${plugin.name}" may answer any path` };
14351
14426
  }
14352
- for (const endpoint of _nullishCoalesce(_optionalChain([plugin, 'access', _317 => _317.runtime, 'optionalAccess', _318 => _318.endpoints]), () => ( []))) {
14427
+ for (const endpoint of _nullishCoalesce(_optionalChain([plugin, 'access', _301 => _301.runtime, 'optionalAccess', _302 => _302.endpoints]), () => ( []))) {
14353
14428
  paths.add(
14354
- _chunk47JV57DAcjs.normalizeFarmPluginRuntimeEndpointPath.call(void 0,
14429
+ _chunkUOFTT6S4cjs.normalizeFarmPluginRuntimeEndpointPath.call(void 0,
14355
14430
  endpoint.path,
14356
14431
  `Farm plugin "${plugin.name}" runtime endpoint`
14357
14432
  )
14358
14433
  );
14359
14434
  }
14360
14435
  }
14361
- if (_chunkYSRZSKQBcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware)) {
14436
+ if (_chunkIGBQSUT5cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware)) {
14362
14437
  const entries = Array.isArray(config.middleware) ? config.middleware : [config.middleware];
14363
14438
  for (const entry of entries) {
14364
14439
  const refusal = addMatchers(entry.matcher, "middleware in the config");
@@ -14380,7 +14455,7 @@ async function resolveFarmStaticNotFoundPlan(options) {
14380
14455
  if (refusal) return { reason: refusal };
14381
14456
  }
14382
14457
  for (const [key, integration] of Object.entries(config.integrations || {})) {
14383
- if (!_chunkQKW6DLDTcjs.isFarmIntegration.call(void 0, integration)) continue;
14458
+ if (!_chunk5YT2ZSWScjs.isFarmIntegration.call(void 0, integration)) continue;
14384
14459
  for (const entry of _nullishCoalesce(integration.middleware, () => ( []))) {
14385
14460
  const refusal = addMatchers(entry.matcher, `the "${key}" integration's middleware`);
14386
14461
  if (refusal) return { reason: refusal };
@@ -14398,14 +14473,14 @@ async function resolveFarmStaticNotFoundPlan(options) {
14398
14473
  const refusal = addMatcherSource(source, "the rewrite source");
14399
14474
  if (refusal) return { reason: refusal };
14400
14475
  }
14401
- if (_optionalChain([config, 'access', _319 => _319.docs, 'optionalAccess', _320 => _320.enabled])) {
14402
- for (const docsRoot of _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, config.docs)) {
14476
+ if (_optionalChain([config, 'access', _303 => _303.docs, 'optionalAccess', _304 => _304.enabled])) {
14477
+ for (const docsRoot of _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs)) {
14403
14478
  const entry = normalizeStaticNotFoundPath(docsRoot.entry);
14404
14479
  if (entry === "/") return { reason: "the docs entry is `/`, so docs answer every path" };
14405
14480
  prefixPatterns.add(entry);
14406
14481
  }
14407
- if (_chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
14408
- const adapterRoutes = await _chunkRBSGFS5Xcjs.listFarmDocsAdapterRoutes.call(void 0, config.docs, {
14482
+ if (_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
14483
+ const adapterRoutes = await _chunk2LHO4HTPcjs.listFarmDocsAdapterRoutes.call(void 0, config.docs, {
14409
14484
  root: options.root,
14410
14485
  srcDir: config.srcDir
14411
14486
  });
@@ -14434,9 +14509,9 @@ async function resolveFarmStaticNotFoundPlan(options) {
14434
14509
  if (config.openapi.specRoute) paths.add(config.openapi.specRoute);
14435
14510
  }
14436
14511
  if (config.workflows.route) prefixPatterns.add(config.workflows.route);
14437
- const notFoundPath = _chunkM4YXD6MDcjs.resolveFarmNotFoundComponentPath.call(void 0,
14512
+ const notFoundPath = _chunkVWPGK6UVcjs.resolveFarmNotFoundComponentPath.call(void 0,
14438
14513
  config,
14439
- _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config),
14514
+ _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config),
14440
14515
  routeManager.getRendererNotFoundPath()
14441
14516
  );
14442
14517
  if (notFoundPath && /\bpathname\b/.test(_fs.readFileSync.call(void 0, notFoundPath, "utf8"))) {
@@ -14455,28 +14530,28 @@ async function resolveFarmStaticNotFoundPlan(options) {
14455
14530
  };
14456
14531
  }
14457
14532
  async function getFarmDocsPrerenderPages(config, root, preset) {
14458
- if (!_optionalChain([config, 'access', _321 => _321.docs, 'optionalAccess', _322 => _322.enabled]) || !config.docs.prerender) return [];
14459
- if (_chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
14460
- _chunk7U4XF76Rcjs.logger.info(
14533
+ if (!_optionalChain([config, 'access', _305 => _305.docs, 'optionalAccess', _306 => _306.enabled]) || !config.docs.prerender) return [];
14534
+ if (_chunkVIDUNAQEcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
14535
+ _chunk7ZDLE77Pcjs.logger.info(
14461
14536
  `\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
14462
14537
  );
14463
14538
  return [];
14464
14539
  }
14465
- if (!_chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
14466
- const { pages: pages2, originDependent } = _chunkILQSRLKKcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
14540
+ if (!_chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
14541
+ const { pages: pages2, originDependent } = _chunk4A6WSOZHcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
14467
14542
  root,
14468
14543
  srcDir: config.srcDir
14469
14544
  });
14470
14545
  if (originDependent.length > 0) {
14471
- _chunk7U4XF76Rcjs.logger.info(
14546
+ _chunk7ZDLE77Pcjs.logger.info(
14472
14547
  `\u21AA Keeping ${originDependent.length} docs page(s) rendering on request: their social image metadata is an absolute URL built from the request's origin. Set docs.socialImage.baseUrl to prerender them.`
14473
14548
  );
14474
14549
  }
14475
14550
  return pages2;
14476
14551
  }
14477
- const pages = await _chunkRBSGFS5Xcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
14552
+ const pages = await _chunk2LHO4HTPcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
14478
14553
  if (!pages) {
14479
- _chunk7U4XF76Rcjs.logger.warn(
14554
+ _chunk7ZDLE77Pcjs.logger.warn(
14480
14555
  `The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
14481
14556
  );
14482
14557
  return [];
@@ -14484,17 +14559,17 @@ async function getFarmDocsPrerenderPages(config, root, preset) {
14484
14559
  return pages;
14485
14560
  }
14486
14561
  async function listFarmDocsAnalyticsPages(config, root, preset) {
14487
- if (!_optionalChain([config, 'access', _323 => _323.docs, 'optionalAccess', _324 => _324.enabled]) || config.analytics === false || _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "nodejs") {
14562
+ if (!_optionalChain([config, 'access', _307 => _307.docs, 'optionalAccess', _308 => _308.enabled]) || config.analytics === false || _chunkRLC7NNTAcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) !== "nodejs") {
14488
14563
  return [];
14489
14564
  }
14490
14565
  try {
14491
- return await _chunkRBSGFS5Xcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
14566
+ return await _chunk2LHO4HTPcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
14492
14567
  root,
14493
14568
  srcDir: config.srcDir,
14494
- adapter: _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
14569
+ adapter: _chunkVZ2P6GRCcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
14495
14570
  });
14496
14571
  } catch (error) {
14497
- _chunk7U4XF76Rcjs.logger.warn(
14572
+ _chunk7ZDLE77Pcjs.logger.warn(
14498
14573
  `Farm Infra analytics reports docs pages by the docs route, not each page's path: listing them failed (${error instanceof Error ? error.message : String(error)}).`
14499
14574
  );
14500
14575
  return [];
@@ -14502,16 +14577,16 @@ async function listFarmDocsAnalyticsPages(config, root, preset) {
14502
14577
  }
14503
14578
  function hasFarmNitroCacheRouteRule(routeRules) {
14504
14579
  return Object.values(routeRules || {}).some((rule) => {
14505
- const swr = _optionalChain([rule, 'optionalAccess', _325 => _325.swr]);
14506
- const cache = _optionalChain([rule, 'optionalAccess', _326 => _326.cache]);
14507
- const headers = _optionalChain([rule, 'optionalAccess', _327 => _327.headers]);
14580
+ const swr = _optionalChain([rule, 'optionalAccess', _309 => _309.swr]);
14581
+ const cache = _optionalChain([rule, 'optionalAccess', _310 => _310.cache]);
14582
+ const headers = _optionalChain([rule, 'optionalAccess', _311 => _311.headers]);
14508
14583
  return swr !== void 0 && swr !== false || cache !== void 0 && cache !== false || !!headers && typeof headers === "object" && Object.keys(headers).length > 0;
14509
14584
  });
14510
14585
  }
14511
14586
  function getFarmRouteRuleHeaderNames(routeRules) {
14512
14587
  const names = /* @__PURE__ */ new Set();
14513
14588
  for (const rule of Object.values(routeRules || {})) {
14514
- const headers = _optionalChain([rule, 'optionalAccess', _328 => _328.headers]);
14589
+ const headers = _optionalChain([rule, 'optionalAccess', _312 => _312.headers]);
14515
14590
  if (!headers || typeof headers !== "object") continue;
14516
14591
  for (const name of Object.keys(headers)) names.add(name.toLowerCase());
14517
14592
  }
@@ -14526,10 +14601,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
14526
14601
  const nitroBuilder = nitroBuilderResult.value;
14527
14602
  const isVercel = preset === "vercel";
14528
14603
  const isCloudflareWorker = preset === "cloudflare-module";
14529
- const outputDir = _chunkUOMSGJHKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
14604
+ const outputDir = _chunkOAAVIFOJcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
14530
14605
  const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
14531
14606
  const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
14532
- const imageRuntime = _chunkM4YXD6MDcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
14607
+ const imageRuntime = _chunkVWPGK6UVcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
14533
14608
  const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
14534
14609
  (image) => image.sourceType === "module"
14535
14610
  );
@@ -14546,16 +14621,16 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
14546
14621
  const ssrExternalsArePackaged = [...ssrExternalPackages].every(
14547
14622
  (packageName) => copiedRuntimePackages.has(packageName)
14548
14623
  );
14549
- const isPrebuiltSSRCandidate = preset === "node-server" && ssrExternalsArePackaged;
14550
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Nitro output directory: ${outputDir}`);
14551
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} SSR entry file: ${ssrEntryFile}`);
14552
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Preset: ${preset}`);
14624
+ const isPrebuiltSSRCandidate = PREBUILT_SSR_PRESETS.has(preset) && ssrExternalsArePackaged;
14625
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Nitro output directory: ${outputDir}`);
14626
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} SSR entry file: ${ssrEntryFile}`);
14627
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4E6} Preset: ${preset}`);
14553
14628
  const ssgCollectionPromise = routeManager.collectSSGPages();
14554
- const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config));
14629
+ const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config));
14555
14630
  const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
14556
14631
  const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
14557
- const farmWorkflows = await _chunkBSX5OGSDcjs.prepareFarmWorkflowsForNitro.call(void 0, config);
14558
- const farmCron = await _chunkHQKCSJEHcjs.prepareFarmCronForNitro.call(void 0, config);
14632
+ const farmWorkflows = await _chunkXE3E4MERcjs.prepareFarmWorkflowsForNitro.call(void 0, config);
14633
+ const farmCron = await _chunkXH4GQ7MTcjs.prepareFarmCronForNitro.call(void 0, config);
14559
14634
  const [
14560
14635
  { ssg: ssgPages },
14561
14636
  middlewareRoutes,
@@ -14585,7 +14660,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
14585
14660
  const edgeGuardedPrerenderRoutes = [];
14586
14661
  const addPrerenderRoute = (pathname) => {
14587
14662
  prerenderRoutes.push(pathname);
14588
- if (_chunkYSRZSKQBcjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
14663
+ if (_chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
14589
14664
  edgeGuardedPrerenderRoutes.push(pathname);
14590
14665
  }
14591
14666
  };
@@ -14627,45 +14702,46 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
14627
14702
  addPrerenderRoute(pathname);
14628
14703
  }
14629
14704
  for (const skipped of skippedPrerenderRoutes) {
14630
- _chunk7U4XF76Rcjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
14705
+ _chunk7ZDLE77Pcjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
14631
14706
  }
14632
14707
  const staticNotFoundPlan = await resolveFarmStaticNotFoundPlan({
14633
14708
  config,
14634
14709
  root,
14635
14710
  preset,
14636
14711
  routeManager,
14712
+ apiRoutePaths: apiRouteManager.getRoutes().keys(),
14637
14713
  routeRuntimeManifest,
14638
14714
  middlewareRoutes,
14639
14715
  redirectSources,
14640
14716
  rewriteSources
14641
14717
  });
14642
14718
  if (staticNotFoundPlan && "reason" in staticNotFoundPlan) {
14643
- _chunk7U4XF76Rcjs.logger.info(
14719
+ _chunk7ZDLE77Pcjs.logger.info(
14644
14720
  `\u21AA Keeping missing URLs server-handled: experimental.staticNotFound is off because ${staticNotFoundPlan.reason}`
14645
14721
  );
14646
14722
  }
14647
- const staticNotFoundPrerenderPath = staticNotFoundPlan && "input" in staticNotFoundPlan ? _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath) : null;
14723
+ const staticNotFoundPrerenderPath = staticNotFoundPlan && "input" in staticNotFoundPlan ? _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, FARM_STATIC_NOT_FOUND_PATH, config.basePath) : null;
14648
14724
  if (farmWorkflows.workflows.length > 0) {
14649
- _chunk7U4XF76Rcjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
14725
+ _chunk7ZDLE77Pcjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
14650
14726
  }
14651
14727
  if (farmCron.jobs.length > 0 && farmCron.provider === "farmjs") {
14652
- _chunk7U4XF76Rcjs.logger.info(
14728
+ _chunk7ZDLE77Pcjs.logger.info(
14653
14729
  `\u23F1\uFE0F ${farmCron.jobs.length} Farm cron job(s) for Infra; run farm cron sync after deployment`
14654
14730
  );
14655
14731
  } else if (farmCron.jobs.length > 0) {
14656
- _chunk7U4XF76Rcjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
14732
+ _chunk7ZDLE77Pcjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
14657
14733
  }
14658
14734
  if (preset === "cloudflare-pages" && farmCron.jobs.length > 0 && farmCron.provider === "host") {
14659
- _chunk7U4XF76Rcjs.logger.warn(
14735
+ _chunk7ZDLE77Pcjs.logger.warn(
14660
14736
  "Cloudflare Pages does not install Cron Triggers. Use the cloudflare-module preset or an external scheduler with .farm/cron-manifest.json."
14661
14737
  );
14662
14738
  }
14663
- const portableScheduledTasks = _chunkHQKCSJEHcjs.mergeScheduledTasks.call(void 0,
14739
+ const portableScheduledTasks = _chunkXH4GQ7MTcjs.mergeScheduledTasks.call(void 0,
14664
14740
  farmWorkflows.scheduledTasks,
14665
14741
  farmCron.scheduledTasks
14666
14742
  );
14667
- const scheduledTasks = preset.startsWith("cloudflare") ? _chunkHQKCSJEHcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
14668
- const cloudflareCronConfig = farmCron.provider === "host" ? _chunkHQKCSJEHcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
14743
+ const scheduledTasks = preset.startsWith("cloudflare") ? _chunkXH4GQ7MTcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
14744
+ const cloudflareCronConfig = farmCron.provider === "host" ? _chunkXH4GQ7MTcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
14669
14745
  const [
14670
14746
  clientCssHref,
14671
14747
  clientJsSrc,
@@ -14688,20 +14764,20 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
14688
14764
  const encodedClientStylesheet = encodeFarmBuildJSONPlaceholder(
14689
14765
  await resolveClientStylesheetLinkHref(clientOutputDir, clientCssHref)
14690
14766
  );
14691
- const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ? _chunkE5UN4OWXcjs.encodeFarmMobileShellClient.call(void 0,
14692
- await _chunkE5UN4OWXcjs.finalizeFarmMobileClient.call(void 0, {
14767
+ const encodedMobileShellClient = shouldBuildFarmMobileClient(config) ? _chunk4JARM2QQcjs.encodeFarmMobileShellClient.call(void 0,
14768
+ await _chunk4JARM2QQcjs.finalizeFarmMobileClient.call(void 0, {
14693
14769
  buildDir: _path2.default.join(root, distDir),
14694
14770
  clientOutputDir,
14695
14771
  webEntry: clientJsSrc,
14696
14772
  webBoot: clientBootSrc,
14697
14773
  stylesheet: clientCssHref,
14698
- webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _329 => _329.files]), () => ( []))
14774
+ webFiles: _nullishCoalesce(_optionalChain([clientModulePreloads, 'optionalAccess', _313 => _313.files]), () => ( []))
14699
14775
  })
14700
14776
  ) : null;
14701
14777
  for (const output of Object.values(ssrBundle)) {
14702
14778
  if (output.type !== "chunk") continue;
14703
- if (encodedMobileShellClient && output.code.includes(_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER)) {
14704
- output.code = output.code.split(_chunkE5UN4OWXcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER).join(encodedMobileShellClient);
14779
+ if (encodedMobileShellClient && output.code.includes(_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER)) {
14780
+ output.code = output.code.split(_chunk4JARM2QQcjs.FARM_MOBILE_SHELL_CLIENT_PLACEHOLDER).join(encodedMobileShellClient);
14705
14781
  }
14706
14782
  if (output.code.includes(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER)) {
14707
14783
  output.code = output.code.split(FARM_DOCS_MODULE_PRELOADS_PLACEHOLDER).join(encodedDocsModulePreloads);
@@ -14999,19 +15075,19 @@ function toFarmNodeResponse(request, response) {
14999
15075
  );
15000
15076
  }
15001
15077
  await fs5.writeFile(
15002
- _path2.default.join(ssrOutputDir, _chunkEODGIFI7cjs.FARM_DESKTOP_ENV_MODULE_FILE),
15003
- _chunkEODGIFI7cjs.FARM_DESKTOP_ENV_MODULE_SOURCE
15078
+ _path2.default.join(ssrOutputDir, _chunkJYQMGMKTcjs.FARM_DESKTOP_ENV_MODULE_FILE),
15079
+ _chunkJYQMGMKTcjs.FARM_DESKTOP_ENV_MODULE_SOURCE
15004
15080
  );
15005
15081
  }
15006
15082
  const farmNodeServerEntryPath = preset === "node-server" ? _path2.default.join(ssrOutputDir, "farm-node-server-entry.mjs") : null;
15007
15083
  if (farmNodeServerEntryPath && nodeAdapterModule) {
15008
15084
  await fs5.writeFile(
15009
- _path2.default.join(ssrOutputDir, _chunkEODGIFI7cjs.FARM_NODE_ENV_MODULE_FILE),
15010
- _chunkEODGIFI7cjs.FARM_NODE_ENV_MODULE_SOURCE
15085
+ _path2.default.join(ssrOutputDir, _chunkJYQMGMKTcjs.FARM_NODE_ENV_MODULE_FILE),
15086
+ _chunkJYQMGMKTcjs.FARM_NODE_ENV_MODULE_SOURCE
15011
15087
  );
15012
15088
  await fs5.writeFile(
15013
15089
  farmNodeServerEntryPath,
15014
- _chunkEODGIFI7cjs.createFarmNodeServerEntry.call(void 0, {
15090
+ _chunkJYQMGMKTcjs.createFarmNodeServerEntry.call(void 0, {
15015
15091
  nitroEntryFile: _path2.default.basename(nitroEntryPath),
15016
15092
  nodeAdapterModule,
15017
15093
  server: config.server,
@@ -15024,7 +15100,7 @@ function toFarmNodeResponse(request, response) {
15024
15100
  if (farmBunServerEntryPath) {
15025
15101
  await fs5.writeFile(
15026
15102
  farmBunServerEntryPath,
15027
- _chunkEODGIFI7cjs.createFarmBunServerEntry.call(void 0, {
15103
+ _chunkJYQMGMKTcjs.createFarmBunServerEntry.call(void 0, {
15028
15104
  nitroEntryFile: _path2.default.basename(nitroEntryPath),
15029
15105
  bunAdapterModule: resolveNitroRuntimeDependency(root, "srvx/bun"),
15030
15106
  server: config.server,
@@ -15058,17 +15134,17 @@ function toFarmNodeResponse(request, response) {
15058
15134
  ssrOutputDir,
15059
15135
  ssrEntryFile
15060
15136
  );
15061
- const configuredNitroRouteRules = _chunkIIHZ2BEEcjs.nitroRouteRulesBelowBasePath.call(void 0,
15062
- varyFarmNitroCacheRules(_chunkIIHZ2BEEcjs.routeRulesToNitroRouteRules.call(void 0, config.routeRules), [
15137
+ const configuredNitroRouteRules = _chunkQZRFEHMScjs.nitroRouteRulesBelowBasePath.call(void 0,
15138
+ varyFarmNitroCacheRules(_chunkQZRFEHMScjs.routeRulesToNitroRouteRules.call(void 0, config.routeRules), [
15063
15139
  ...config.md.enabled ? ["accept"] : [],
15064
15140
  ...shouldBuildFarmMobileClient(config) ? ["x-farm-shell"] : [],
15065
- ..._chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])) === "islands" ? ["f-layouts"] : []
15141
+ ..._chunkCYUTK4JPcjs.resolveFarmServerComponentsMode.call(void 0, _chunkCYUTK4JPcjs.readFarmServerComponentsConfig.call(void 0, config)) === "islands" ? ["f-layouts"] : []
15066
15142
  ]),
15067
15143
  config.basePath,
15068
- _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
15144
+ _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
15069
15145
  );
15070
- const toPrerenderPublicPath = (route) => _chunkDVJM55D2cjs.normalizeFarmTrailingSlashPathname.call(void 0,
15071
- _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, route, config.basePath),
15146
+ const toPrerenderPublicPath = (route) => _chunk6FIY4KBCcjs.normalizeFarmTrailingSlashPathname.call(void 0,
15147
+ _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, route, config.basePath),
15072
15148
  config.trailingSlash === true
15073
15149
  );
15074
15150
  const prerenderNitroRouteRules = Object.fromEntries(
@@ -15099,10 +15175,10 @@ function toFarmNodeResponse(request, response) {
15099
15175
  routeRules: configuredNitroRouteRules,
15100
15176
  routePaths: [
15101
15177
  ...[...routeManager.getRoutes().keys()].map(
15102
- (pattern) => _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, pattern, config.basePath)
15178
+ (pattern) => _chunkTFCBJFP7cjs.applyFarmBasePath.call(void 0, pattern, config.basePath)
15103
15179
  ),
15104
15180
  ...apiRouteManager.getRoutes().keys(),
15105
- _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
15181
+ _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
15106
15182
  ]
15107
15183
  });
15108
15184
  let nitroConfig = {
@@ -15144,6 +15220,9 @@ function toFarmNodeResponse(request, response) {
15144
15220
  // answered independently, as by the production server, so keeping several
15145
15221
  // in flight overlaps the worker's rendering with this thread's per-route work.
15146
15222
  concurrency: Math.min(_os2.default.availableParallelism(), 8),
15223
+ workers: resolveFarmPrerenderWorkers(
15224
+ prerenderRoutes.length + (staticNotFoundPrerenderPath ? 1 : 0)
15225
+ ),
15147
15226
  routes: [
15148
15227
  ...prerenderRoutes.map(toPrerenderPublicPath),
15149
15228
  ...staticNotFoundPrerenderPath ? [staticNotFoundPrerenderPath] : []
@@ -15172,7 +15251,7 @@ function toFarmNodeResponse(request, response) {
15172
15251
  } : {},
15173
15252
  // Use serverHandlers to define our workflow handler first, then the catch-all handler.
15174
15253
  handlers: [
15175
- ...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, farmCloudflareEnvPath) }] : [],
15254
+ ...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, farmCloudflareEnvPath) }] : [],
15176
15255
  ...farmWorkflows.handlerPath ? [
15177
15256
  {
15178
15257
  route: `${config.workflows.route}/**`,
@@ -15181,7 +15260,7 @@ function toFarmNodeResponse(request, response) {
15181
15260
  ] : [],
15182
15261
  {
15183
15262
  route: "/**",
15184
- handler: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, nitroEntryPath)
15263
+ handler: _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, nitroEntryPath)
15185
15264
  }
15186
15265
  ],
15187
15266
  routeRules: {
@@ -15205,7 +15284,7 @@ function toFarmNodeResponse(request, response) {
15205
15284
  // Workers bundle React here rather than loading it from node_modules.
15206
15285
  // Unenv rewrites `process` before Nitro's own replacements run, so
15207
15286
  // React's development builds would otherwise ship next to production.
15208
- ...isCloudflareWorker ? [_chunkEODGIFI7cjs.createReactProductionModePlugin.call(void 0, )] : []
15287
+ ...isCloudflareWorker ? [_chunkJYQMGMKTcjs.createReactProductionModePlugin.call(void 0, )] : []
15209
15288
  ]
15210
15289
  },
15211
15290
  // Keep the public Nitro boolean intact for build hooks. Farm replaces
@@ -15218,7 +15297,7 @@ function toFarmNodeResponse(request, response) {
15218
15297
  if (pluginManager) {
15219
15298
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
15220
15299
  }
15221
- const expectedServerDir = _path2.default.join(outputDir, "server");
15300
+ const expectedServerDir = runtimeServerOutputDir;
15222
15301
  const customRollupKeys = Object.keys(nitroConfig.rollupConfig || {}).filter(
15223
15302
  (key) => key !== "external" && key !== "plugins"
15224
15303
  );
@@ -15231,22 +15310,22 @@ function toFarmNodeResponse(request, response) {
15231
15310
  snapshotSSRRebundleOptions(nitroConfig)
15232
15311
  );
15233
15312
  const requestedBuilder = _nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER));
15234
- const nitroBuildIsFarms = (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _332 => _332.rollupConfig, 'optionalAccess', _333 => _333.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _334 => _334.rollupConfig, 'optionalAccess', _335 => _335.plugins])) && customRollupKeys.length === 0 && Boolean(
15235
- _optionalChain([nitroConfig, 'access', _336 => _336.handlers, 'optionalAccess', _337 => _337.some, 'call', _338 => _338(
15236
- (handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _339 => _339.handler]) || "") === nitroEntryPath
15313
+ const nitroBuildIsFarms = (requestedBuilder === void 0 || requestedBuilder === "rollup" || requestedBuilder === "rolldown") && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig && !hasUnsupportedSSRRebundleOverrides && _optionalChain([nitroConfig, 'access', _314 => _314.rollupConfig, 'optionalAccess', _315 => _315.external]) === nitroRollupExternal && !hasRollupPlugins(_optionalChain([nitroConfig, 'access', _316 => _316.rollupConfig, 'optionalAccess', _317 => _317.plugins])) && customRollupKeys.length === 0 && Boolean(
15314
+ _optionalChain([nitroConfig, 'access', _318 => _318.handlers, 'optionalAccess', _319 => _319.some, 'call', _320 => _320(
15315
+ (handler) => _path2.default.resolve(_optionalChain([handler, 'optionalAccess', _321 => _321.handler]) || "") === nitroEntryPath
15237
15316
  )])
15238
15317
  );
15239
- const canReusePrebuiltSSR = isPrebuiltSSRCandidate && nitroConfig.preset === "node-server" && nitroBuildIsFarms && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _340 => _340.output, 'optionalAccess', _341 => _341.serverDir]) || "") === _path2.default.resolve(expectedServerDir);
15318
+ const canReusePrebuiltSSR = isPrebuiltSSRCandidate && PREBUILT_SSR_PRESETS.has(_nullishCoalesce(nitroConfig.preset, () => ( ""))) && nitroBuildIsFarms && _path2.default.resolve(_optionalChain([nitroConfig, 'access', _322 => _322.output, 'optionalAccess', _323 => _323.serverDir]) || "") === _path2.default.resolve(expectedServerDir);
15240
15319
  const prerenderReusesPrebuiltSSR = (prerenderRoutes.length > 0 || staticNotFoundPrerenderPath !== null) && ssrExternalsArePackaged && nitroBuildIsFarms;
15241
15320
  const selectRolldownBuilder = canReusePrebuiltSSR && requestedBuilder === void 0 && await canUseRolldownBuilder();
15242
15321
  if (selectRolldownBuilder) nitroConfig.builder = "rolldown";
15243
15322
  const useRolldownBuilder = canReusePrebuiltSSR && (_nullishCoalesce(nitroConfig.builder, () => ( process.env.NITRO_BUILDER))) === "rolldown";
15244
15323
  const shouldMinify = nitroConfig.minify !== false;
15245
- const keepServerNames = !(_optionalChain([config, 'access', _342 => _342.docs, 'optionalAccess', _343 => _343.enabled]) && _optionalChain([config, 'access', _344 => _344.docs, 'access', _345 => _345.adapter, 'optionalAccess', _346 => _346.server]));
15324
+ const keepServerNames = !(_optionalChain([config, 'access', _324 => _324.docs, 'optionalAccess', _325 => _325.enabled]) && _optionalChain([config, 'access', _326 => _326.docs, 'access', _327 => _327.adapter, 'optionalAccess', _328 => _328.server]));
15246
15325
  const useFarmServerMinifier = shouldMinify && nitroConfig.sourcemap === false && !hasCustomOxcOptions && !hasLateBuildMutationConfig;
15247
15326
  const serverChunkMinifier = useFarmServerMinifier ? createServerChunkMinifyPlugin({ keepNames: keepServerNames, target: "esnext" }) : null;
15248
15327
  const ssrRollupPlugin = canReusePrebuiltSSR ? prebuiltSSRPlugin : createServerReadSSRAssetsPlugin(ssrBundle, ssrOutputDir);
15249
- const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _347 => _347.rollupConfig, 'optionalAccess', _348 => _348.plugins]);
15328
+ const configuredRollupPlugins = _optionalChain([nitroConfig, 'access', _329 => _329.rollupConfig, 'optionalAccess', _330 => _330.plugins]);
15250
15329
  nitroConfig.rollupConfig = {
15251
15330
  ...nitroConfig.rollupConfig,
15252
15331
  plugins: [
@@ -15285,21 +15364,21 @@ function toFarmNodeResponse(request, response) {
15285
15364
  let skippedNonHtmlPrerenderRoute = false;
15286
15365
  nitroInstance.hooks.hook("prerender:generate", (route) => {
15287
15366
  if (route.error || !prerenderPagePaths.has(route.route)) return;
15288
- if (_optionalChain([route, 'access', _349 => _349.contentType, 'optionalAccess', _350 => _350.toLowerCase, 'call', _351 => _351(), 'access', _352 => _352.includes, 'call', _353 => _353("html")])) return;
15367
+ if (_optionalChain([route, 'access', _331 => _331.contentType, 'optionalAccess', _332 => _332.toLowerCase, 'call', _333 => _333(), 'access', _334 => _334.includes, 'call', _335 => _335("html")])) return;
15289
15368
  route.skip = true;
15290
15369
  skippedNonHtmlPrerenderRoute = true;
15291
15370
  const configuredRule = configuredNitroRouteRules[route.route];
15292
15371
  if (configuredRule) nitroInstance.options.routeRules[route.route] = configuredRule;
15293
15372
  else delete nitroInstance.options.routeRules[route.route];
15294
- _chunk7U4XF76Rcjs.logger.info(`\u21AA Keeping SSG route ${route.route} server-handled (it does not render HTML)`);
15373
+ _chunk7ZDLE77Pcjs.logger.info(`\u21AA Keeping SSG route ${route.route} server-handled (it does not render HTML)`);
15295
15374
  });
15296
15375
  nitroInstance.hooks.hook("prerender:done", () => {
15297
15376
  if (skippedNonHtmlPrerenderRoute) nitroInstance.routing.sync();
15298
15377
  });
15299
- if (_optionalChain([config, 'access', _354 => _354.md, 'optionalAccess', _355 => _355.enabled])) {
15378
+ if (_optionalChain([config, 'access', _336 => _336.md, 'optionalAccess', _337 => _337.enabled])) {
15300
15379
  nitroInstance.hooks.hook("prerender:generate", (route) => {
15301
- if (!route.contents || !_optionalChain([route, 'access', _356 => _356.contentType, 'optionalAccess', _357 => _357.toLowerCase, 'call', _358 => _358(), 'access', _359 => _359.includes, 'call', _360 => _360("html")])) return;
15302
- const alternatePath = _chunk5LJF4KUZcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
15380
+ if (!route.contents || !_optionalChain([route, 'access', _338 => _338.contentType, 'optionalAccess', _339 => _339.toLowerCase, 'call', _340 => _340(), 'access', _341 => _341.includes, 'call', _342 => _342("html")])) return;
15381
+ const alternatePath = _chunkU2HFXURZcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
15303
15382
  routePathname: (pathname) => routeManager.toRoutePathname(pathname)
15304
15383
  });
15305
15384
  if (!alternatePath) return;
@@ -15321,8 +15400,8 @@ function toFarmNodeResponse(request, response) {
15321
15400
  }
15322
15401
  if (config.security.csp && config.security.csp.nonce) {
15323
15402
  nitroInstance.hooks.hook("prerender:generate", async (route) => {
15324
- if (!route.contents || !_optionalChain([route, 'access', _361 => _361.contentType, 'optionalAccess', _362 => _362.toLowerCase, 'call', _363 => _363(), 'access', _364 => _364.includes, 'call', _365 => _365("html")])) return;
15325
- const staticCsp = await _chunk6JHZPB52cjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
15403
+ if (!route.contents || !_optionalChain([route, 'access', _343 => _343.contentType, 'optionalAccess', _344 => _344.toLowerCase, 'call', _345 => _345(), 'access', _346 => _346.includes, 'call', _347 => _347("html")])) return;
15404
+ const staticCsp = await _chunkIEZFFXSCcjs.applyFarmCspHashesToHtml.call(void 0, route.contents, config.security);
15326
15405
  if (!staticCsp) return;
15327
15406
  route.contents = staticCsp.html;
15328
15407
  const routeRule = nitroInstance.options.routeRules[route.route] || {};
@@ -15342,8 +15421,8 @@ function toFarmNodeResponse(request, response) {
15342
15421
  if (staticNotFoundPrerenderPath) {
15343
15422
  nitroInstance.hooks.hook("prerender:generate", (route) => {
15344
15423
  if (route.route !== staticNotFoundPrerenderPath) return;
15345
- const status = _nullishCoalesce(_optionalChain([route, 'access', _366 => _366.error, 'optionalAccess', _367 => _367.status]), () => ( 200));
15346
- const contentType = _nullishCoalesce(_optionalChain([route, 'access', _368 => _368.contentType, 'optionalAccess', _369 => _369.toLowerCase, 'call', _370 => _370()]), () => ( ""));
15424
+ const status = _nullishCoalesce(_optionalChain([route, 'access', _348 => _348.error, 'optionalAccess', _349 => _349.status]), () => ( 200));
15425
+ const contentType = _nullishCoalesce(_optionalChain([route, 'access', _350 => _350.contentType, 'optionalAccess', _351 => _351.toLowerCase, 'call', _352 => _352()]), () => ( ""));
15347
15426
  route.error = void 0;
15348
15427
  if (status === 404 && contentType.includes("text/html")) {
15349
15428
  staticNotFoundWritten = true;
@@ -15371,9 +15450,9 @@ function toFarmNodeResponse(request, response) {
15371
15450
  });
15372
15451
  await nitroBuilder.prepare(nitroInstance);
15373
15452
  await nitroBuilder.copyPublicAssets(nitroInstance);
15374
- if (prerenderReusesPrebuiltSSR && !canReusePrebuiltSSR) {
15453
+ if (prerenderReusesPrebuiltSSR && (!canReusePrebuiltSSR || preset !== "node-server")) {
15375
15454
  nitroInstance.hooks.hook("prerender:config", (prerendererConfig) => {
15376
- const configuredPlugins = _optionalChain([prerendererConfig, 'access', _371 => _371.rollupConfig, 'optionalAccess', _372 => _372.plugins]);
15455
+ const configuredPlugins = _optionalChain([prerendererConfig, 'access', _353 => _353.rollupConfig, 'optionalAccess', _354 => _354.plugins]);
15377
15456
  const plugins = Array.isArray(configuredPlugins) ? configuredPlugins : configuredPlugins ? [configuredPlugins] : [];
15378
15457
  prerendererConfig.rollupConfig = {
15379
15458
  ...prerendererConfig.rollupConfig,
@@ -15439,15 +15518,15 @@ function toFarmNodeResponse(request, response) {
15439
15518
  }
15440
15519
  if (prerenderRoutes.length > 0 || staticNotFoundPrerenderPath) {
15441
15520
  if (prerenderRoutes.length > 0) {
15442
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
15521
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
15443
15522
  }
15444
- const previousPrerender = process.env[_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV];
15445
- process.env[_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV] = "1";
15523
+ const previousPrerender = process.env[_chunkO47IT4CScjs.FARM_PRERENDER_ENV];
15524
+ process.env[_chunkO47IT4CScjs.FARM_PRERENDER_ENV] = "1";
15446
15525
  try {
15447
15526
  await nitroBuilder.prerender(nitroInstance);
15448
15527
  } finally {
15449
- if (previousPrerender === void 0) delete process.env[_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV];
15450
- else process.env[_chunkUGWKNZ4Ucjs.FARM_PRERENDER_ENV] = previousPrerender;
15528
+ if (previousPrerender === void 0) delete process.env[_chunkO47IT4CScjs.FARM_PRERENDER_ENV];
15529
+ else process.env[_chunkO47IT4CScjs.FARM_PRERENDER_ENV] = previousPrerender;
15451
15530
  }
15452
15531
  }
15453
15532
  const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs5, preset) : Promise.resolve(null);
@@ -15488,7 +15567,7 @@ function toFarmNodeResponse(request, response) {
15488
15567
  const copyResults = await Promise.allSettled([
15489
15568
  prebuiltSSRFilesResult.value ? writeSSRBundleFiles(
15490
15569
  prebuiltSSRFilesResult.value,
15491
- _path2.default.join(outputDir, "server", FARM_SSR_OUTPUT_DIR),
15570
+ _path2.default.join(expectedServerDir, FARM_SSR_OUTPUT_DIR),
15492
15571
  fs5
15493
15572
  ) : Promise.resolve(),
15494
15573
  runtimeCopyPromise
@@ -15498,11 +15577,11 @@ function toFarmNodeResponse(request, response) {
15498
15577
  );
15499
15578
  if (failedCopy) throw failedCopy.reason;
15500
15579
  if (canReusePrebuiltSSR) {
15501
- await registerPrebuiltSSRPackageImport(_path2.default.join(outputDir, "server"), ssrEntryFile, fs5);
15502
- _chunk7U4XF76Rcjs.logger.info("\u26A1 Reused Farm's prebuilt SSR bundle for the Node output");
15580
+ await registerPrebuiltSSRPackageImport(expectedServerDir, ssrEntryFile, fs5);
15581
+ _chunk7ZDLE77Pcjs.logger.info("\u26A1 Reused Farm's prebuilt SSR bundle for the Node output");
15503
15582
  }
15504
15583
  if (useRolldownBuilder) {
15505
- _chunk7U4XF76Rcjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
15584
+ _chunk7ZDLE77Pcjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
15506
15585
  }
15507
15586
  if (preset === "node-server" && !desktopServerEntry) {
15508
15587
  await installFarmCompileCacheLauncher(_path2.default.join(outputDir, "server"), fs5);
@@ -15515,12 +15594,13 @@ function toFarmNodeResponse(request, response) {
15515
15594
  root,
15516
15595
  preset,
15517
15596
  distDir,
15518
- outputDir
15597
+ outputDir,
15598
+ serverDir: _path2.default.resolve(nitroInstance.options.output.serverDir)
15519
15599
  });
15520
15600
  }
15521
15601
  let staticNotFoundRoutes;
15522
15602
  if (staticNotFoundPlan && "input" in staticNotFoundPlan && staticNotFoundPrerenderPath) {
15523
- const toHandlerKey = (handler) => _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _path2.default.resolve(root, handler));
15603
+ const toHandlerKey = (handler) => _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _path2.default.resolve(root, handler));
15524
15604
  const handlerSources = getFarmStaticNotFoundHandlerSources(
15525
15605
  nitroInstance.options.handlers.map((handler) => ({
15526
15606
  route: handler.route,
@@ -15537,7 +15617,7 @@ function toFarmNodeResponse(request, response) {
15537
15617
  ...staticNotFoundPlan.input,
15538
15618
  matcherSources: [...staticNotFoundPlan.input.matcherSources, ...handlerSources]
15539
15619
  });
15540
- const fileHeaders = _optionalChain([nitroInstance, 'access', _373 => _373.options, 'access', _374 => _374.routeRules, 'access', _375 => _375[staticNotFoundPrerenderPath], 'optionalAccess', _376 => _376.headers]);
15620
+ const fileHeaders = _optionalChain([nitroInstance, 'access', _355 => _355.options, 'access', _356 => _356.routeRules, 'access', _357 => _357[staticNotFoundPrerenderPath], 'optionalAccess', _358 => _358.headers]);
15541
15621
  const cspHeaders = Object.fromEntries(
15542
15622
  Object.entries(fileHeaders || {}).filter(
15543
15623
  ([name]) => name.toLowerCase().startsWith("content-security-policy")
@@ -15545,10 +15625,10 @@ function toFarmNodeResponse(request, response) {
15545
15625
  );
15546
15626
  const notFoundRoute = staticNotFoundRoutes[staticNotFoundRoutes.length - 1];
15547
15627
  if (notFoundRoute && Object.keys(cspHeaders).length > 0) notFoundRoute.headers = cspHeaders;
15548
- _chunk7U4XF76Rcjs.logger.info("\u{1F4C4} Serving the not-found page as a file to missing URLs");
15628
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4C4} Serving the not-found page as a file to missing URLs");
15549
15629
  }
15550
15630
  if (!staticNotFoundRoutes) {
15551
- _chunk7U4XF76Rcjs.logger.info(
15631
+ _chunk7ZDLE77Pcjs.logger.info(
15552
15632
  `\u21AA Keeping missing URLs server-handled: experimental.staticNotFound is off because ${_nullishCoalesce(staticNotFoundRefusal, () => ( "the build did not write the not-found page"))}`
15553
15633
  );
15554
15634
  }
@@ -15571,7 +15651,10 @@ function toFarmNodeResponse(request, response) {
15571
15651
  staticNotFoundRoutes
15572
15652
  );
15573
15653
  }
15574
- _chunk7U4XF76Rcjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
15654
+ _chunk7ZDLE77Pcjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
15655
+ }
15656
+ function resolveFarmPrerenderWorkers(routeCount) {
15657
+ return Math.max(1, Math.min(4, _os2.default.availableParallelism() - 1, Math.ceil(routeCount / 50)));
15575
15658
  }
15576
15659
  function resolveFarmNitroOutputConfig(preset, outputDir) {
15577
15660
  const isVercel = preset === "vercel";
@@ -15596,7 +15679,7 @@ async function populateCloudflareProcessEnv(serverDir, fs5) {
15596
15679
  throw error;
15597
15680
  }
15598
15681
  const wrangler = JSON.parse(source);
15599
- const flags = _chunkNLBHLPEOcjs.resolveCloudflareProcessEnvFlags.call(void 0, wrangler);
15682
+ const flags = _chunkVIDUNAQEcjs.resolveCloudflareProcessEnvFlags.call(void 0, wrangler);
15600
15683
  if (!flags) return;
15601
15684
  await fs5.writeFile(
15602
15685
  wranglerPath,
@@ -15626,16 +15709,16 @@ async function copyPrebuiltSSRBundle(ssrBundle, targetDir, minifyOptions, fs5) {
15626
15709
  }
15627
15710
  async function installFarmCompileCacheLauncher(serverDir, fs5) {
15628
15711
  const entryPath = _path2.default.join(serverDir, "index.mjs");
15629
- const serverPath = _path2.default.join(serverDir, _chunkEODGIFI7cjs.FARM_SERVER_MODULE_FILE);
15712
+ const serverPath = _path2.default.join(serverDir, _chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE);
15630
15713
  const entry = await fs5.readFile(entryPath, "utf8").catch((error) => {
15631
15714
  if (error.code === "ENOENT") return null;
15632
15715
  throw error;
15633
15716
  });
15634
15717
  if (entry === null) return false;
15635
- if (entry.includes(`./${_chunkEODGIFI7cjs.FARM_SERVER_MODULE_FILE}`)) return false;
15718
+ if (entry.includes(`./${_chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE}`)) return false;
15636
15719
  await fs5.rename(entryPath, serverPath);
15637
- await fs5.writeFile(entryPath, _chunkEODGIFI7cjs.createFarmCompileCacheLauncher.call(void 0, _chunkEODGIFI7cjs.FARM_SERVER_MODULE_FILE));
15638
- await fs5.rm(_path2.default.join(serverDir, _chunkEODGIFI7cjs.FARM_COMPILE_CACHE_DIR), { recursive: true, force: true });
15720
+ await fs5.writeFile(entryPath, _chunkJYQMGMKTcjs.createFarmCompileCacheLauncher.call(void 0, _chunkJYQMGMKTcjs.FARM_SERVER_MODULE_FILE));
15721
+ await fs5.rm(_path2.default.join(serverDir, _chunkJYQMGMKTcjs.FARM_COMPILE_CACHE_DIR), { recursive: true, force: true });
15639
15722
  return true;
15640
15723
  }
15641
15724
  async function registerPrebuiltSSRPackageImport(serverDir, ssrEntryFile, fs5) {
@@ -15660,8 +15743,8 @@ async function moveVercelOutputPath(src, dest, fs5) {
15660
15743
  await fs5.rename(src, dest);
15661
15744
  return;
15662
15745
  } catch (error) {
15663
- const code = _optionalChain([error, 'optionalAccess', _377 => _377.code]);
15664
- if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY") {
15746
+ const code = _optionalChain([error, 'optionalAccess', _359 => _359.code]);
15747
+ if (code !== "EPERM" && code !== "EACCES" && code !== "EXDEV" && code !== "ENOTEMPTY" && code !== "EEXIST") {
15665
15748
  throw error;
15666
15749
  }
15667
15750
  }
@@ -15686,7 +15769,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
15686
15769
  try {
15687
15770
  await moveVercelOutputPath(publicDir, staticDir, fs5);
15688
15771
  } catch (error) {
15689
- if (_optionalChain([error, 'optionalAccess', _378 => _378.code]) !== "ENOENT") throw error;
15772
+ if (_optionalChain([error, 'optionalAccess', _360 => _360.code]) !== "ENOENT") throw error;
15690
15773
  }
15691
15774
  await copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5);
15692
15775
  await copyPrismaClientForVercel(root, nitroFuncDir, fs5);
@@ -15700,7 +15783,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
15700
15783
  config.basePath
15701
15784
  );
15702
15785
  const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
15703
- (route) => edgeMiddleware.guardedPages.some((pathname) => _chunkYSRZSKQBcjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
15786
+ (route) => edgeMiddleware.guardedPages.some((pathname) => _chunkIGBQSUT5cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
15704
15787
  );
15705
15788
  if (edgeMiddlewareRoutes.length > 0) {
15706
15789
  await writeFarmVercelEdgeMiddlewareFunction({
@@ -15721,17 +15804,17 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
15721
15804
  markdownRoutes: createFarmVercelMarkdownRoutes(prerenderedPages),
15722
15805
  notFoundRoutes
15723
15806
  });
15724
- const vercelConfigWithWorkflowCrons = _chunkBSX5OGSDcjs.applyFarmWorkflowVercelCrons.call(void 0,
15807
+ const vercelConfigWithWorkflowCrons = _chunkXE3E4MERcjs.applyFarmWorkflowVercelCrons.call(void 0,
15725
15808
  vercelConfig,
15726
15809
  farmWorkflows.workflows
15727
15810
  );
15728
- const vercelConfigWithCrons = _chunkHQKCSJEHcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
15811
+ const vercelConfigWithCrons = _chunkXH4GQ7MTcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
15729
15812
  await fs5.writeFile(configPath, JSON.stringify(vercelConfigWithCrons, null, 2));
15730
- _chunk7U4XF76Rcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
15813
+ _chunk7ZDLE77Pcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
15731
15814
  }
15732
15815
  async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5, options = {}) {
15733
- if (!_optionalChain([config, 'access', _379 => _379.docs, 'optionalAccess', _380 => _380.enabled])) return;
15734
- const [mainRoot, ...extraRoots] = _chunkILQSRLKKcjs.getFarmDocsRoots.call(void 0, config.docs);
15816
+ if (!_optionalChain([config, 'access', _361 => _361.docs, 'optionalAccess', _362 => _362.enabled])) return;
15817
+ const [mainRoot, ...extraRoots] = _chunk4A6WSOZHcjs.getFarmDocsRoots.call(void 0, config.docs);
15735
15818
  await copyFarmDocsRootContent(
15736
15819
  mainRoot,
15737
15820
  root,
@@ -15757,12 +15840,12 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5, opt
15757
15840
  async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs5, { log = true } = {}) {
15758
15841
  const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
15759
15842
  if (!docsContentDir) return;
15760
- const lastModifiedManifest = _chunkILQSRLKKcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
15843
+ const lastModifiedManifest = _chunk4A6WSOZHcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
15761
15844
  fallback: "now"
15762
15845
  });
15763
- const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _381 => _381.unknown, 'optionalAccess', _382 => _382.length]), () => ( 0));
15846
+ const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _363 => _363.unknown, 'optionalAccess', _364 => _364.length]), () => ( 0));
15764
15847
  if (log && undatedPages > 0) {
15765
- _chunk7U4XF76Rcjs.logger.warn(
15848
+ _chunk7ZDLE77Pcjs.logger.warn(
15766
15849
  `${undatedPages} docs page(s) were last changed before this shallow clone's Git history, so they show no "Last updated" date. Build from a full clone (git fetch --unshallow) or set lastModified in the page's frontmatter.`
15767
15850
  );
15768
15851
  }
@@ -15774,12 +15857,12 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
15774
15857
  dereference: true
15775
15858
  });
15776
15859
  await fs5.writeFile(
15777
- _path2.default.join(bundledContentDir, _chunkILQSRLKKcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
15860
+ _path2.default.join(bundledContentDir, _chunk4A6WSOZHcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
15778
15861
  `${JSON.stringify(lastModifiedManifest, null, 2)}
15779
15862
  `
15780
15863
  );
15781
15864
  if (log) {
15782
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${_path2.default.relative(root, docsContentDir)}`);
15865
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${_path2.default.relative(root, docsContentDir)}`);
15783
15866
  }
15784
15867
  }
15785
15868
  function resolveServerFunctionPlatform(preset) {
@@ -15847,7 +15930,7 @@ async function stageSharpRuntime(config, root, distDir, fs5, preset) {
15847
15930
  try {
15848
15931
  await copyPackage("sharp", sharpRequire);
15849
15932
  if (!copiedPackages.has("sharp")) {
15850
- throw new Error(`Farm image optimization requires sharp. ${_chunkM4YXD6MDcjs.SHARP_INSTALL_HINT}`);
15933
+ throw new Error(`Farm image optimization requires sharp. ${_chunkVWPGK6UVcjs.SHARP_INSTALL_HINT}`);
15851
15934
  }
15852
15935
  } catch (error) {
15853
15936
  await fs5.rm(stageDir, { recursive: true, force: true });
@@ -15874,7 +15957,7 @@ async function installStagedSharpRuntime(staged, nitroFuncDir, fs5) {
15874
15957
  } finally {
15875
15958
  await fs5.rm(staged.stageDir, { recursive: true, force: true });
15876
15959
  }
15877
- _chunk7U4XF76Rcjs.logger.info(
15960
+ _chunk7ZDLE77Pcjs.logger.info(
15878
15961
  `\u{1F5BC}\uFE0F Bundled Sharp image runtime (${Object.keys(staged.dependencies).length} packages)`
15879
15962
  );
15880
15963
  }
@@ -15918,9 +16001,9 @@ async function mergeStagedDirectory(sourceDir, targetDir, fs5) {
15918
16001
  function assertMetadataImageRuntimeInstalled(root, metadataImageRoutes) {
15919
16002
  const generated = metadataImageRoutes.find((image) => image.sourceType === "module");
15920
16003
  if (!generated || resolveMetadataImageRuntimePackageJson(root)) return;
15921
- const file = generated.modulePath ? _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _path2.default.relative(root, generated.modulePath)) : "";
16004
+ const file = generated.modulePath ? _chunk7ZDLE77Pcjs.toPosixPath.call(void 0, _path2.default.relative(root, generated.modulePath)) : "";
15922
16005
  throw new Error(
15923
- `${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${_chunkKORZ6PREcjs.VERCEL_OG_INSTALL_HINT}`
16006
+ `${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${_chunkIDUGG7VRcjs.VERCEL_OG_INSTALL_HINT}`
15924
16007
  );
15925
16008
  }
15926
16009
  function resolveMetadataImageRuntimePackageJson(root) {
@@ -15952,7 +16035,7 @@ async function copyMetadataImageRuntime(root, nitroFuncDir, fs5) {
15952
16035
  "@vercel/og": String(packageJson.version || "0.11.1")
15953
16036
  };
15954
16037
  await writeNitroOutputPackage(nitroFuncDir, functionPackage, fs5);
15955
- _chunk7U4XF76Rcjs.logger.info("\u{1F5BC}\uFE0F Bundled generated metadata image runtime");
16038
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F5BC}\uFE0F Bundled generated metadata image runtime");
15956
16039
  }
15957
16040
  async function readNitroOutputPackage(outputDir, fs5) {
15958
16041
  const packagePath = _path2.default.join(outputDir, "package.json");
@@ -16055,6 +16138,7 @@ __farmIslxBuildDefaults({ key: ${JSON.stringify(key)} });`;
16055
16138
  }
16056
16139
 
16057
16140
  // src/build/project-module-runner.ts
16141
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
16058
16142
  async function createFarmProjectModuleSsrEnvironment() {
16059
16143
  const vite = await import("vite");
16060
16144
  const { ModuleRunner, createNodeImportMeta } = await import("vite/module-runner");
@@ -16069,7 +16153,7 @@ async function createFarmProjectModuleSsrEnvironment() {
16069
16153
  },
16070
16154
  hmr: false,
16071
16155
  createImportMeta: createNodeImportMeta,
16072
- sourcemapInterceptor: "node"
16156
+ sourcemapInterceptor: "prepareStackTrace"
16073
16157
  })
16074
16158
  });
16075
16159
  }
@@ -16079,8 +16163,8 @@ async function createFarmProjectModuleSsrEnvironment() {
16079
16163
 
16080
16164
  // src/build/index.ts
16081
16165
  async function build(config, options = {}) {
16082
- return _chunkEODGIFI7cjs.withProductionNodeEnv.call(void 0,
16083
- () => _chunkRTAWQXMEcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
16166
+ return _chunkJYQMGMKTcjs.withProductionNodeEnv.call(void 0,
16167
+ () => _chunkZCT6B5PQcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
16084
16168
  );
16085
16169
  }
16086
16170
  function createBuildTargetBaseline(config) {
@@ -16091,7 +16175,7 @@ function createBuildTargetBaseline(config) {
16091
16175
  preset,
16092
16176
  distDir,
16093
16177
  outputDir,
16094
- outputWasDerived: outputDir === _chunkUOMSGJHKcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
16178
+ outputWasDerived: outputDir === _chunkOAAVIFOJcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
16095
16179
  };
16096
16180
  }
16097
16181
  function resolveBuildTargets(config, options, baseline) {
@@ -16100,8 +16184,8 @@ function resolveBuildTargets(config, options, baseline) {
16100
16184
  const distDir = config.distDir || ".farm";
16101
16185
  const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
16102
16186
  const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
16103
- const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkUOMSGJHKcjs.getDeployTargetForPreset.call(void 0, preset);
16104
- const outputDir = shouldRefreshDerivedOutput ? _chunkUOMSGJHKcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
16187
+ const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkOAAVIFOJcjs.getDeployTargetForPreset.call(void 0, preset);
16188
+ const outputDir = shouldRefreshDerivedOutput ? _chunkOAAVIFOJcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
16105
16189
  return {
16106
16190
  root,
16107
16191
  preset,
@@ -16109,15 +16193,15 @@ function resolveBuildTargets(config, options, baseline) {
16109
16193
  distDir,
16110
16194
  deployTarget,
16111
16195
  outputDir,
16112
- deployOutputDir: _chunkUOMSGJHKcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
16196
+ deployOutputDir: _chunkOAAVIFOJcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
16113
16197
  };
16114
16198
  }
16115
16199
  async function buildWithProductionNodeEnv(inputConfig, options) {
16116
16200
  let config = inputConfig;
16117
16201
  const targetBaseline = createBuildTargetBaseline(config);
16118
16202
  let targets;
16119
- const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))]);
16120
- const pluginManager = new (0, _chunkVACYUMXWcjs.PluginManager)({
16203
+ const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunk2L4M6YUGcjs.loadFarmProductionVite.call(void 0, ))))]);
16204
+ const pluginManager = new (0, _chunkIGA3OTFYcjs.PluginManager)({
16121
16205
  config,
16122
16206
  isDev: false,
16123
16207
  isProd: true
@@ -16146,16 +16230,16 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16146
16230
  };
16147
16231
  config = {
16148
16232
  ...config,
16149
- images: _chunkM4YXD6MDcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
16233
+ images: _chunkVWPGK6UVcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
16150
16234
  root: targets.root,
16151
16235
  preset: targets.preset
16152
16236
  })
16153
16237
  };
16154
- if (_optionalChain([config, 'access', _383 => _383.docs, 'optionalAccess', _384 => _384.enabled])) await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
16238
+ if (_optionalChain([config, 'access', _365 => _365.docs, 'optionalAccess', _366 => _366.enabled])) await _chunkTDAH76RRcjs.loadFarmDocsEngine.call(void 0, );
16155
16239
  pluginManager.updateContext({ config });
16156
16240
  const { root, preset, srcDir, distDir, deployOutputDir } = targets;
16157
- _chunkRTAWQXMEcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkRTAWQXMEcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
16158
- _chunk7U4XF76Rcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
16241
+ _chunkZCT6B5PQcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkZCT6B5PQcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
16242
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
16159
16243
  await pluginManager.setupPlugins();
16160
16244
  await pluginManager.runHookParallel("beforeBundle", {
16161
16245
  root,
@@ -16164,10 +16248,10 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16164
16248
  distDir,
16165
16249
  outputDir: deployOutputDir
16166
16250
  });
16167
- _chunk7U4XF76Rcjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
16251
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
16168
16252
  const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
16169
- if (_optionalChain([productionViteResult, 'optionalAccess', _385 => _385.status]) === "rejected") throw productionViteResult.reason;
16170
- const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _386 => _386.value]);
16253
+ if (_optionalChain([productionViteResult, 'optionalAccess', _367 => _367.status]) === "rejected") throw productionViteResult.reason;
16254
+ const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _368 => _368.value]);
16171
16255
  const createViteServer = productionVite ? productionVite.createServer : (await import("vite")).createServer;
16172
16256
  projectModuleServer = await createProjectModuleServer(
16173
16257
  createViteServer,
@@ -16175,20 +16259,20 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16175
16259
  root,
16176
16260
  rendererBuild.signal
16177
16261
  );
16178
- const farmApp = _chunkM4YXD6MDcjs.createFarmApp.call(void 0, config, projectModuleServer);
16262
+ const farmApp = _chunkVWPGK6UVcjs.createFarmApp.call(void 0, config, projectModuleServer);
16179
16263
  if (options.universal !== false) farmApp.getRouteManager().keepBuildSourceSnapshot();
16180
16264
  await farmApp.initialize();
16181
16265
  const routeManager = farmApp.getRouteManager();
16182
16266
  const serverRenderer = farmApp.getServerRenderer();
16183
- const typeArtifacts = _chunkEXPVSFAGcjs.generateFarmTypeArtifacts.call(void 0, {
16267
+ const typeArtifacts = _chunkT4VF6BYVcjs.generateFarmTypeArtifacts.call(void 0, {
16184
16268
  root,
16185
16269
  srcDir,
16186
16270
  layers: config.layers,
16187
16271
  storage: config.storage,
16188
16272
  plugins: config.plugins,
16189
16273
  extraRoutes: [
16190
- ..._optionalChain([config, 'access', _387 => _387.openapi, 'optionalAccess', _388 => _388.enabled]) && config.openapi.route ? [config.openapi.route] : [],
16191
- ..._chunkILQSRLKKcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
16274
+ ..._optionalChain([config, 'access', _369 => _369.openapi, 'optionalAccess', _370 => _370.enabled]) && config.openapi.route ? [config.openapi.route] : [],
16275
+ ..._chunk4A6WSOZHcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
16192
16276
  ],
16193
16277
  suppressLintOnLink: config.suppressLintOnLink,
16194
16278
  componentExtensions: config.renderer.componentExtensions,
@@ -16196,17 +16280,17 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16196
16280
  i18nConfig: config.i18n
16197
16281
  }).catch((error) => {
16198
16282
  const message = error instanceof Error ? error.message : String(error);
16199
- _chunk7U4XF76Rcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
16283
+ _chunk7ZDLE77Pcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
16200
16284
  });
16201
- const apiRouteManager = new (0, _chunkTWFJJPE7cjs.APIRouteManager)(
16202
- _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config),
16285
+ const apiRouteManager = new (0, _chunkZTNU4XCCcjs.APIRouteManager)(
16286
+ _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config),
16203
16287
  projectModuleServer,
16204
16288
  {
16205
16289
  throwOnLoadError: true,
16206
16290
  plugins: config.plugins,
16207
16291
  i18n: farmApp.getI18nRuntime(),
16208
16292
  bodySizeLimit: config.server.bodySizeLimit,
16209
- basePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
16293
+ basePath: _chunkH5AC3XSEcjs.resolveFarmAPIServerBasePath.call(void 0, config.api)
16210
16294
  }
16211
16295
  );
16212
16296
  const [, apiDiscovery] = await Promise.allSettled([
@@ -16224,11 +16308,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16224
16308
  });
16225
16309
  } else {
16226
16310
  const { build: legacyViteBuild } = await import("vite");
16227
- _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Building client bundle...");
16311
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Building client bundle...");
16228
16312
  await buildClient2(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "client"));
16229
- _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Building SSR bundle...");
16313
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Building SSR bundle...");
16230
16314
  await buildSSR(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "server"));
16231
- _chunk7U4XF76Rcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
16315
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
16232
16316
  await buildNitro(
16233
16317
  config,
16234
16318
  routeManager,
@@ -16249,8 +16333,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16249
16333
  outputDir: deployOutputDir,
16250
16334
  success: true
16251
16335
  });
16252
- _chunk7U4XF76Rcjs.logger.success(`\u2705 Build completed successfully! (preset: ${preset})`);
16253
- _chunk7U4XF76Rcjs.logger.info(`\u{1F4C1} Output directory: ${deployOutputDir}`);
16336
+ _chunk7ZDLE77Pcjs.logger.success(`\u2705 Build completed successfully! (preset: ${preset})`);
16337
+ _chunk7ZDLE77Pcjs.logger.info(`\u{1F4C1} Output directory: ${deployOutputDir}`);
16254
16338
  } catch (error) {
16255
16339
  const { root, preset, distDir, deployOutputDir } = _nullishCoalesce(targets, () => ( resolveBuildTargets(config, options, targetBaseline)));
16256
16340
  await pluginManager.runHookParallel("onError", {
@@ -16269,11 +16353,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16269
16353
  outputDir: deployOutputDir,
16270
16354
  success: false
16271
16355
  });
16272
- _chunk7U4XF76Rcjs.logger.error(`\u274C Build failed: ${error}`);
16356
+ _chunk7ZDLE77Pcjs.logger.error(`\u274C Build failed: ${error}`);
16273
16357
  throw error;
16274
16358
  } finally {
16275
16359
  try {
16276
- await _optionalChain([projectModuleServer, 'optionalAccess', _389 => _389.close, 'call', _390 => _390()]);
16360
+ await _optionalChain([projectModuleServer, 'optionalAccess', _371 => _371.close, 'call', _372 => _372()]);
16277
16361
  } finally {
16278
16362
  rendererBuild.abort();
16279
16363
  }
@@ -16281,11 +16365,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
16281
16365
  }
16282
16366
  async function createProjectModuleServer(createViteServer, config, root, buildLifetime) {
16283
16367
  const { farmNavigationPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
16284
- const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
16368
+ const rendererVitePlugins = await _chunkLEZJZX4Ccjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, root, {
16285
16369
  ssr: true,
16286
16370
  buildLifetime
16287
16371
  });
16288
- const viteConfig = _chunkM4YXD6MDcjs.mergeFarmViteConfig.call(void 0,
16372
+ const viteConfig = _chunkVWPGK6UVcjs.mergeFarmViteConfig.call(void 0,
16289
16373
  {
16290
16374
  root,
16291
16375
  appType: "custom",
@@ -16297,13 +16381,13 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
16297
16381
  },
16298
16382
  plugins: [
16299
16383
  ...rendererVitePlugins,
16300
- _chunkM4YXD6MDcjs.farmFontImportsPlugin.call(void 0, {
16384
+ _chunkVWPGK6UVcjs.farmFontImportsPlugin.call(void 0, {
16301
16385
  root,
16302
16386
  basePath: config.basePath,
16303
16387
  publicDir: config.publicDir,
16304
- isLayoutModule: (id) => _chunkM4YXD6MDcjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, config))
16388
+ isLayoutModule: (id) => _chunkVWPGK6UVcjs.isFarmLayoutModule.call(void 0, id, _chunkPFVNPOKNcjs.getFarmAppDirectories.call(void 0, config))
16305
16389
  }),
16306
- _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
16390
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
16307
16391
  // Route modules load here at build time (rendering config, prerendering): `server-only`
16308
16392
  // resolves as it does in the server build. Module-entry packages load pre-bundled, as in
16309
16393
  // `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
@@ -16319,7 +16403,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
16319
16403
  hmr: false
16320
16404
  },
16321
16405
  resolve: {
16322
- alias: _chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
16406
+ alias: _chunkVWPGK6UVcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
16323
16407
  dedupe: [...config.renderer.dedupe || []]
16324
16408
  },
16325
16409
  optimizeDeps: {
@@ -16358,10 +16442,10 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
16358
16442
  noDiscovery: true
16359
16443
  },
16360
16444
  // An app or plugin that brings its own SSR environment keeps it.
16361
- environments: _optionalChain([viteConfig, 'access', _391 => _391.environments, 'optionalAccess', _392 => _392.ssr, 'optionalAccess', _393 => _393.dev, 'optionalAccess', _394 => _394.createEnvironment]) ? viteConfig.environments : {
16445
+ environments: _optionalChain([viteConfig, 'access', _373 => _373.environments, 'optionalAccess', _374 => _374.ssr, 'optionalAccess', _375 => _375.dev, 'optionalAccess', _376 => _376.createEnvironment]) ? viteConfig.environments : {
16362
16446
  ...viteConfig.environments,
16363
16447
  ssr: {
16364
- ..._optionalChain([viteConfig, 'access', _395 => _395.environments, 'optionalAccess', _396 => _396.ssr]),
16448
+ ..._optionalChain([viteConfig, 'access', _377 => _377.environments, 'optionalAccess', _378 => _378.ssr]),
16365
16449
  ...await createFarmProjectModuleSsrEnvironment()
16366
16450
  }
16367
16451
  }
@@ -16375,7 +16459,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
16375
16459
  farmPlugin,
16376
16460
  farmServerOnlyEntriesPlugin
16377
16461
  } = await import("./vite.cjs");
16378
- const { PluginManager: PluginManager2 } = await import("./plugin-MWO3G2XM.cjs");
16462
+ const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
16379
16463
  const pluginManager = new PluginManager2({
16380
16464
  config,
16381
16465
  isDev: false,
@@ -16397,14 +16481,14 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
16397
16481
  farmNavigationPlugin(config.renderer),
16398
16482
  farmIslandContainersPlugin(config),
16399
16483
  farmPlugin(config, pluginManager),
16400
- _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
16484
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
16401
16485
  ],
16402
16486
  mode: "production"
16403
16487
  });
16404
16488
  }
16405
16489
  async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
16406
16490
  const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
16407
- const { PluginManager: PluginManager2 } = await import("./plugin-MWO3G2XM.cjs");
16491
+ const { PluginManager: PluginManager2 } = await import("./plugin-QYBJSGHG.cjs");
16408
16492
  const pluginManager = new PluginManager2({
16409
16493
  config,
16410
16494
  isDev: false,
@@ -16424,21 +16508,21 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
16424
16508
  },
16425
16509
  define: {
16426
16510
  __FARM_API_BASE_URL__: JSON.stringify(config.api.baseURL),
16427
- __FARM_ENV__: JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env)),
16428
- __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _397 => _397.env, 'optionalAccess', _398 => _398.public]) || {})
16511
+ __FARM_ENV__: JSON.stringify(_chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env)),
16512
+ __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _379 => _379.env, 'optionalAccess', _380 => _380.public]) || {})
16429
16513
  },
16430
16514
  plugins: [
16431
16515
  farmI18nClientBridgePlugin(),
16432
16516
  farmIslandContainersPlugin(config),
16433
16517
  farmPlugin(config, pluginManager),
16434
- _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
16518
+ _chunkZCT6B5PQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
16435
16519
  ],
16436
16520
  mode: "production"
16437
16521
  });
16438
16522
  }
16439
16523
  function resolveLegacyPageEntry(config, root, srcDir) {
16440
16524
  const appDir = _path2.default.join(root, srcDir, "app");
16441
- for (const extension of _chunkT7UC2ORAcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer)) {
16525
+ for (const extension of _chunkLEZJZX4Ccjs.getFarmRendererComponentExtensions.call(void 0, config.renderer)) {
16442
16526
  const candidate = _path2.default.join(appDir, `page${extension}`);
16443
16527
  if (_fs.existsSync.call(void 0, candidate)) return candidate;
16444
16528
  }
@@ -16446,7 +16530,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
16446
16530
  }
16447
16531
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
16448
16532
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
16449
- import("./nitro-YDFMH5PY.cjs"),
16533
+ import("./nitro-K4MCBBB6.cjs"),
16450
16534
  import("nitro/builder")
16451
16535
  ]);
16452
16536
  let nitroConfig = await createNitroConfig(
@@ -16459,7 +16543,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16459
16543
  if (pluginManager) {
16460
16544
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
16461
16545
  }
16462
- const outputDir = _chunkUOMSGJHKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
16546
+ const outputDir = _chunkOAAVIFOJcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
16463
16547
  const serverOutputDir = _path2.default.join(outputDir, "server");
16464
16548
  const publicOutputDir = _path2.default.join(outputDir, "public");
16465
16549
  const { mkdir, cp } = await import("fs/promises");
@@ -16469,7 +16553,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16469
16553
  try {
16470
16554
  await mkdir(publicOutputDir, { recursive: true });
16471
16555
  await cp(clientDir, publicOutputDir, { recursive: true });
16472
- _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Copied client assets to public directory");
16556
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Copied client assets to public directory");
16473
16557
  const manifestPath = _path2.default.join(publicOutputDir, "farm-client-manifest.json");
16474
16558
  const assetsDir = _path2.default.join(publicOutputDir, "assets");
16475
16559
  const manifestExists = await import("fs/promises").then(
@@ -16479,12 +16563,12 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16479
16563
  (fs5) => fs5.access(assetsDir).then(() => true).catch(() => false)
16480
16564
  );
16481
16565
  if (manifestExists && assetsExist) {
16482
- _chunk7U4XF76Rcjs.logger.info("\u2705 Verified client assets are present");
16566
+ _chunk7ZDLE77Pcjs.logger.info("\u2705 Verified client assets are present");
16483
16567
  } else {
16484
- _chunk7U4XF76Rcjs.logger.warn("\u26A0\uFE0F Some client assets may be missing");
16568
+ _chunk7ZDLE77Pcjs.logger.warn("\u26A0\uFE0F Some client assets may be missing");
16485
16569
  }
16486
16570
  } catch (error) {
16487
- _chunk7U4XF76Rcjs.logger.error(`\u274C Failed to copy client assets: ${error}`);
16571
+ _chunk7ZDLE77Pcjs.logger.error(`\u274C Failed to copy client assets: ${error}`);
16488
16572
  throw error;
16489
16573
  }
16490
16574
  const serverDir = _path2.default.join(root, distDir, "server");
@@ -16492,9 +16576,9 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16492
16576
  try {
16493
16577
  await mkdir(nitroServerDir, { recursive: true });
16494
16578
  await cp(serverDir, nitroServerDir, { recursive: true });
16495
- _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Copied SSR bundles to Nitro server directory");
16579
+ _chunk7ZDLE77Pcjs.logger.info("\u{1F4E6} Copied SSR bundles to Nitro server directory");
16496
16580
  } catch (error) {
16497
- _chunk7U4XF76Rcjs.logger.warn(`Could not copy SSR bundles: ${error}`);
16581
+ _chunk7ZDLE77Pcjs.logger.warn(`Could not copy SSR bundles: ${error}`);
16498
16582
  }
16499
16583
  const nitro = await createNitro(nitroConfig);
16500
16584
  const registryPath = _path2.default.join(root, distDir, ".nitro", "server", "farm-registry.ts");
@@ -16506,7 +16590,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16506
16590
  farmRegistry.apiRouteManager = apiRouteManager;
16507
16591
  farmRegistry.routeManager = routeManager;
16508
16592
  farmRegistry.serverRenderer = serverRenderer;
16509
- farmRegistry.env = _chunk3EIPOTZVcjs.createBundledEnv.call(void 0, config.env);
16593
+ farmRegistry.env = _chunkTP7JAC3Tcjs.createBundledEnv.call(void 0, config.env);
16510
16594
  const routePaths = {};
16511
16595
  for (const [pattern, entry] of routeManager.getRoutes()) {
16512
16596
  const bundledPath = entry.modulePath.replace(/.*\/src\/app\//, "").replace(/\.(tsx?|jsx?)$/, ".js");
@@ -16522,7 +16606,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16522
16606
  farmRegistry.clientManifest = {};
16523
16607
  }
16524
16608
  } catch (error) {
16525
- _chunk7U4XF76Rcjs.logger.warn(`Could not populate registry: ${error}`);
16609
+ _chunk7ZDLE77Pcjs.logger.warn(`Could not populate registry: ${error}`);
16526
16610
  }
16527
16611
  await nitroBuild(nitro);
16528
16612
  if (pluginManager) {
@@ -16530,7 +16614,8 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
16530
16614
  root,
16531
16615
  preset,
16532
16616
  distDir,
16533
- outputDir: _chunkUOMSGJHKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
16617
+ outputDir: _chunkOAAVIFOJcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir),
16618
+ serverDir: _path2.default.resolve(nitro.options.output.serverDir)
16534
16619
  });
16535
16620
  }
16536
16621
  }