@farm.js/core 0.1.62 → 0.1.64

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 (194) hide show
  1. package/dist/{agent-mcp-handler-OV4WRFBL.cjs → agent-mcp-handler-OXT73ZBY.cjs} +5 -5
  2. package/dist/{agent-mcp-handler-7QMX2LUY.mjs → agent-mcp-handler-QLFDDTYN.mjs} +4 -4
  3. package/dist/{agent-mcp.d-BKZ3UNbt.d.mts → agent-mcp.d-CO_ABmNK.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-C1zr_nGS.d.ts → agent-mcp.d-QD2WZ9BS.d.ts} +1 -1
  5. package/dist/agent-runtime.d.mts +1 -1
  6. package/dist/agent-runtime.d.ts +1 -1
  7. package/dist/analyzer-ODLF2Z6O.cjs +16 -0
  8. package/dist/{analyzer-YESYU3GK.mjs → analyzer-Q3QXC6PD.mjs} +3 -2
  9. package/dist/api/route-manager.d.mts +3 -3
  10. package/dist/api/route-manager.d.ts +3 -3
  11. package/dist/api/runtime.d.mts +2 -2
  12. package/dist/api/runtime.d.ts +2 -2
  13. package/dist/api.d.mts +3 -3
  14. package/dist/api.d.ts +3 -3
  15. package/dist/{app-manifest.d-ntch_bvA.d.ts → app-manifest.d-BpKxiU_E.d.mts} +9 -1
  16. package/dist/{app-manifest.d-BpvhfKRH.d.mts → app-manifest.d-DDmNkYQQ.d.ts} +9 -1
  17. package/dist/app-markdown.cjs +4 -4
  18. package/dist/app-markdown.d.mts +2 -2
  19. package/dist/app-markdown.d.ts +2 -2
  20. package/dist/app-markdown.mjs +3 -3
  21. package/dist/{app.d-CysWA_8v.d.mts → app.d-kuoVWhWM.d.mts} +4 -4
  22. package/dist/{app.d-AE8_v3Db.d.ts → app.d-x68Cwr0_.d.ts} +4 -4
  23. package/dist/{chunk-LT4VAF5Z.cjs → chunk-2C5L5RPM.cjs} +7 -6
  24. package/dist/{chunk-RMUD75WT.cjs → chunk-3EBHJET2.cjs} +355 -270
  25. package/dist/{chunk-RZNCMRD3.mjs → chunk-6NHSGVVA.mjs} +1 -1
  26. package/dist/{chunk-LVWGURLD.mjs → chunk-6NNYPY5W.mjs} +327 -13
  27. package/dist/{chunk-PRFNLQSP.cjs → chunk-7XGWBPQQ.cjs} +4 -4
  28. package/dist/{chunk-SG57PX7K.cjs → chunk-BTVDYS4B.cjs} +7 -2
  29. package/dist/{chunk-545WJ5UG.cjs → chunk-DUSHDZQL.cjs} +11 -11
  30. package/dist/{chunk-GVOMPU3Y.cjs → chunk-EL4364S2.cjs} +209 -32
  31. package/dist/{chunk-GGNJAGGE.cjs → chunk-FAP7CX7C.cjs} +1056 -529
  32. package/dist/{chunk-T46NNU4D.mjs → chunk-FH45OB37.mjs} +2 -2
  33. package/dist/{chunk-55U5QIXQ.mjs → chunk-FIR62CR3.mjs} +1 -1
  34. package/dist/{chunk-MEQN6DDA.cjs → chunk-FJWN7RV4.cjs} +5 -5
  35. package/dist/chunk-IOEXXZK3.mjs +88 -0
  36. package/dist/{chunk-EXXFSZOC.cjs → chunk-JCPSA4X5.cjs} +135 -134
  37. package/dist/{chunk-YSXTNSXS.mjs → chunk-K7OZAVOI.mjs} +7 -6
  38. package/dist/{chunk-KVW2M6PI.mjs → chunk-KL7SHLQB.mjs} +1 -1
  39. package/dist/{chunk-NT3QDN2E.mjs → chunk-LQDLEWPO.mjs} +1 -1
  40. package/dist/{chunk-UZZ6IEQP.mjs → chunk-MESQF2JC.mjs} +2 -2
  41. package/dist/{chunk-WKJQ2FJA.cjs → chunk-MG356ROI.cjs} +5 -5
  42. package/dist/{chunk-AJB3DHN6.cjs → chunk-N3Z3PLHC.cjs} +2 -2
  43. package/dist/{chunk-2CNKQC3G.mjs → chunk-NNLFW3P4.mjs} +2 -2
  44. package/dist/{chunk-XX32BOMM.cjs → chunk-NXFA7G3Y.cjs} +52 -26
  45. package/dist/{chunk-SM25ZC4S.cjs → chunk-O2XFIPNL.cjs} +1 -1
  46. package/dist/{chunk-VWW4Q3BJ.mjs → chunk-O4FWNLQK.mjs} +4 -4
  47. package/dist/{chunk-DZPR2W6U.cjs → chunk-O6L3YYPM.cjs} +5 -5
  48. package/dist/{chunk-UWI3SJAK.cjs → chunk-O7IEMY55.cjs} +3 -3
  49. package/dist/{chunk-6BJJYOFL.cjs → chunk-OLIGNTWU.cjs} +7 -7
  50. package/dist/{chunk-OUWRNHTV.mjs → chunk-OYF23QLG.mjs} +17 -16
  51. package/dist/{chunk-IQIKPKFP.mjs → chunk-RAH5MT53.mjs} +110 -25
  52. package/dist/{chunk-E72UD6ME.mjs → chunk-RVGSVQWT.mjs} +1 -1
  53. package/dist/{chunk-ZVIEFTUA.cjs → chunk-S25BQIFW.cjs} +16 -16
  54. package/dist/chunk-S7ZW72JH.cjs +254 -0
  55. package/dist/{chunk-VM7X5CKC.mjs → chunk-SLYDIHLW.mjs} +31 -5
  56. package/dist/chunk-SNFTMSHX.mjs +254 -0
  57. package/dist/{chunk-2WZTGPK6.mjs → chunk-SQ5O7I3L.mjs} +7 -2
  58. package/dist/{chunk-PCXIJKPM.mjs → chunk-TNBJ4LZG.mjs} +2 -2
  59. package/dist/{chunk-O27PLNQZ.cjs → chunk-UJ3R2AH2.cjs} +4 -4
  60. package/dist/{chunk-T4TBK5NY.mjs → chunk-VQ4NWOWO.mjs} +2 -2
  61. package/dist/{chunk-ZZ2QKCKW.mjs → chunk-WAY6LOQH.mjs} +1 -1
  62. package/dist/chunk-WBTHHTBO.cjs +88 -0
  63. package/dist/{chunk-ZBUAOGMY.mjs → chunk-WFNAOWH4.mjs} +1 -1
  64. package/dist/{chunk-IWRLV46X.cjs → chunk-WMTBBQHY.cjs} +4 -4
  65. package/dist/{chunk-2JYBLE63.mjs → chunk-WNYRYI4D.mjs} +770 -243
  66. package/dist/{chunk-CI4UNQHO.cjs → chunk-XBSKPLHF.cjs} +2 -2
  67. package/dist/{chunk-IOF4KXMP.mjs → chunk-XVWSDSUM.mjs} +201 -24
  68. package/dist/{chunk-JEJQGZI7.cjs → chunk-XZLZ6YPP.cjs} +346 -32
  69. package/dist/{chunk-QAS7KE7J.cjs → chunk-Y5TOT5F6.cjs} +5 -5
  70. package/dist/{chunk-DPE53XWL.mjs → chunk-ZEXE4TGY.mjs} +1 -1
  71. package/dist/{client-component.d-BoqC2MLC.d.mts → client-component.d-D74pqdea.d.mts} +14 -3
  72. package/dist/{client-component.d-Bgt3x5Fu.d.ts → client-component.d-D8VcypQA.d.ts} +14 -3
  73. package/dist/{client-plugins.d-BcqIy4au.d.ts → client-plugins.d-CXElzotB.d.ts} +18 -2
  74. package/dist/{client-plugins.d-CWyYBxXf.d.mts → client-plugins.d-D4-6hNx7.d.mts} +18 -2
  75. package/dist/client-plugins.d.mts +1 -1
  76. package/dist/client-plugins.d.ts +1 -1
  77. package/dist/client.d.mts +6 -6
  78. package/dist/client.d.ts +6 -6
  79. package/dist/config.d.mts +1 -1
  80. package/dist/config.d.ts +1 -1
  81. package/dist/desktop.d.mts +2 -2
  82. package/dist/desktop.d.ts +2 -2
  83. package/dist/{devtools-NUVXYG7I.mjs → devtools-MX3FE733.mjs} +5 -5
  84. package/dist/{devtools-SVRSGPNC.cjs → devtools-WET5NAKO.cjs} +6 -6
  85. package/dist/docs.cjs +8 -8
  86. package/dist/docs.d.mts +2 -2
  87. package/dist/docs.d.ts +2 -2
  88. package/dist/docs.mjs +7 -7
  89. package/dist/index.cjs +21 -20
  90. package/dist/{index.d-nAncqTXz.d.ts → index.d-A_x10zGS.d.ts} +1 -1
  91. package/dist/{index.d-BDaiu2i5.d.mts → index.d-SSgYDv4D.d.mts} +1 -1
  92. package/dist/index.d.mts +16 -16
  93. package/dist/index.d.ts +16 -16
  94. package/dist/index.mjs +20 -19
  95. package/dist/integrations.d.mts +1 -1
  96. package/dist/integrations.d.ts +1 -1
  97. package/dist/internal/app-markdown-runtime.cjs +3 -3
  98. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  99. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  100. package/dist/internal/app-markdown-runtime.mjs +2 -2
  101. package/dist/internal/build-runtime.cjs +22 -21
  102. package/dist/internal/build-runtime.d.mts +3 -3
  103. package/dist/internal/build-runtime.d.ts +3 -3
  104. package/dist/internal/build-runtime.mjs +21 -20
  105. package/dist/internal/cli-runtime.cjs +7 -7
  106. package/dist/internal/cli-runtime.mjs +6 -6
  107. package/dist/internal/client-error-overlay.cjs +4 -4
  108. package/dist/internal/client-error-overlay.mjs +1 -1
  109. package/dist/internal/client-runtime.d.mts +4 -4
  110. package/dist/internal/client-runtime.d.ts +4 -4
  111. package/dist/internal/compression-runtime.d.mts +1 -1
  112. package/dist/internal/compression-runtime.d.ts +1 -1
  113. package/dist/internal/config-runtime.cjs +7 -7
  114. package/dist/internal/config-runtime.d.mts +4 -4
  115. package/dist/internal/config-runtime.d.ts +4 -4
  116. package/dist/internal/config-runtime.mjs +6 -6
  117. package/dist/internal/infra-analytics-runtime.cjs +11 -9
  118. package/dist/internal/infra-analytics-runtime.mjs +9 -7
  119. package/dist/internal/native-server-fns.cjs +5 -4
  120. package/dist/internal/native-server-fns.mjs +4 -3
  121. package/dist/internal/product-telemetry-runtime.cjs +17 -211
  122. package/dist/internal/product-telemetry-runtime.mjs +10 -204
  123. package/dist/internal/production-runtime.cjs +13 -12
  124. package/dist/internal/production-runtime.d.mts +13 -12
  125. package/dist/internal/production-runtime.d.ts +13 -12
  126. package/dist/internal/production-runtime.mjs +14 -13
  127. package/dist/internal/react-cache.cjs +21 -1
  128. package/dist/internal/react-cache.d.mts +8 -1
  129. package/dist/internal/react-cache.d.ts +8 -1
  130. package/dist/internal/react-cache.mjs +21 -1
  131. package/dist/markdown.cjs +2 -2
  132. package/dist/markdown.d.mts +1 -1
  133. package/dist/markdown.d.ts +1 -1
  134. package/dist/markdown.mjs +1 -1
  135. package/dist/middleware.d.mts +3 -3
  136. package/dist/middleware.d.ts +3 -3
  137. package/dist/mobile.d.mts +2 -2
  138. package/dist/mobile.d.ts +2 -2
  139. package/dist/{native-tree-AS5L3ID3.mjs → native-tree-BPEE2LAL.mjs} +2 -2
  140. package/dist/{native-tree-Z2WYUJEV.cjs → native-tree-WOX3JMBG.cjs} +3 -3
  141. package/dist/{navigation-delegate.d-CSCm8ZxL.d.mts → navigation-delegate.d-DQVYKoaZ.d.mts} +1 -1
  142. package/dist/{navigation-delegate.d-BbUHRXxG.d.ts → navigation-delegate.d-GghbHJuK.d.ts} +1 -1
  143. package/dist/navigation.d.mts +4 -4
  144. package/dist/navigation.d.ts +4 -4
  145. package/dist/plugin.cjs +14 -14
  146. package/dist/plugin.d.mts +3 -3
  147. package/dist/plugin.d.ts +3 -3
  148. package/dist/plugin.mjs +13 -13
  149. package/dist/{production-runtime.d-DgT24A0f.d.ts → production-runtime.d-Bzns3NW9.d.ts} +1 -1
  150. package/dist/{production-runtime.d-CcQiDko5.d.mts → production-runtime.d-DiFa5vHW.d.mts} +1 -1
  151. package/dist/{render-plan.d-CyrX6MDs.d.ts → render-plan.d-CL_Ikfg_.d.ts} +1 -1
  152. package/dist/{render-plan.d-BH9WF-JZ.d.mts → render-plan.d-CcF0MeCf.d.mts} +1 -1
  153. package/dist/renderer-client.d.mts +4 -4
  154. package/dist/renderer-client.d.ts +4 -4
  155. package/dist/{request.d-BB8M8bcD.d.ts → request.d-B1RnTLri.d.ts} +1 -1
  156. package/dist/{request.d-CUrPnCW7.d.mts → request.d-DarDOCk9.d.mts} +1 -1
  157. package/dist/request.d.mts +2 -2
  158. package/dist/request.d.ts +2 -2
  159. package/dist/{route-rendering.d-DYqZMIf4.d.ts → route-rendering.d-BTUYCIj4.d.ts} +1 -1
  160. package/dist/{route-rendering.d-CYxlzaFm.d.mts → route-rendering.d-D_2Ual0-.d.mts} +1 -1
  161. package/dist/{router.d-DaKo507j.d.ts → router.d-CMANF6da.d.ts} +1 -1
  162. package/dist/{router.d-7o24CD8u.d.mts → router.d-Cuv1jntg.d.mts} +1 -1
  163. package/dist/{routes.d-BknKQcTu.d.ts → routes.d-B6yFe6jm.d.ts} +1 -1
  164. package/dist/{routes.d-D1IrO9KK.d.mts → routes.d-c2HKfrfL.d.mts} +1 -1
  165. package/dist/routes.d.mts +1 -1
  166. package/dist/routes.d.ts +1 -1
  167. package/dist/{rsc-pipeline-RFLHDAKD.mjs → rsc-pipeline-3LNVP2OO.mjs} +6 -6
  168. package/dist/{rsc-pipeline-OF2I7PCX.cjs → rsc-pipeline-G5WELVW3.cjs} +7 -7
  169. package/dist/{runtime-LBTK62AD.cjs → runtime-DMEULPE7.cjs} +22 -11
  170. package/dist/{runtime-M6UJCSLA.mjs → runtime-HQJ2LLQL.mjs} +20 -9
  171. package/dist/{runtime.d-CN73a-IL.d.ts → runtime.d-C3RQUj6_.d.ts} +1 -1
  172. package/dist/{runtime.d-CcNuzhX6.d.mts → runtime.d-wvh4ngU0.d.mts} +1 -1
  173. package/dist/server-plugins.d.mts +2 -2
  174. package/dist/server-plugins.d.ts +2 -2
  175. package/dist/server.cjs +31 -31
  176. package/dist/server.d.mts +9 -9
  177. package/dist/server.d.ts +9 -9
  178. package/dist/server.mjs +16 -16
  179. package/dist/{spa-router.d-CNi77LZm.d.mts → spa-router.d-WU_qS5gJ.d.mts} +2 -2
  180. package/dist/{spa-router.d-Cvgf5QP4.d.ts → spa-router.d-m8H_Kl_B.d.ts} +2 -2
  181. package/dist/testing.d.mts +1 -1
  182. package/dist/testing.d.ts +1 -1
  183. package/dist/{utils.d-C3H-14_Y.d.ts → utils.d-C9dQD5Zg.d.ts} +1 -1
  184. package/dist/{utils.d-D8VfzZYn.d.mts → utils.d-W9IiEqmW.d.mts} +1 -1
  185. package/dist/version.cjs +2 -2
  186. package/dist/version.mjs +1 -1
  187. package/dist/vite.cjs +18 -14
  188. package/dist/vite.d.mts +23 -5
  189. package/dist/vite.d.ts +23 -5
  190. package/dist/vite.mjs +17 -13
  191. package/package.json +1 -1
  192. package/dist/analyzer-2AHWJJR7.cjs +0 -15
  193. package/dist/chunk-CSLUBKGG.mjs +0 -44
  194. package/dist/chunk-SGBNF56S.cjs +0 -44
@@ -37,7 +37,12 @@ var _chunk5IQ2ERQAcjs = require('./chunk-5IQ2ERQA.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkGGNJAGGEcjs = require('./chunk-GGNJAGGE.cjs');
40
+
41
+
42
+
43
+
44
+
45
+ var _chunkFAP7CX7Ccjs = require('./chunk-FAP7CX7C.cjs');
41
46
 
42
47
 
43
48
  var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
@@ -61,13 +66,12 @@ var _chunkX4K7TYN6cjs = require('./chunk-X4K7TYN6.cjs');
61
66
 
62
67
 
63
68
 
64
- var _chunkO27PLNQZcjs = require('./chunk-O27PLNQZ.cjs');
69
+ var _chunkUJ3R2AH2cjs = require('./chunk-UJ3R2AH2.cjs');
65
70
 
66
71
 
67
72
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
68
73
 
69
74
 
70
- var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
71
75
 
72
76
 
73
77
 
@@ -80,12 +84,13 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
80
84
 
81
85
 
82
86
 
87
+ var _chunkNXFA7G3Ycjs = require('./chunk-NXFA7G3Y.cjs');
83
88
 
84
89
 
85
- var _chunkXX32BOMMcjs = require('./chunk-XX32BOMM.cjs');
90
+ var _chunkY5TOT5F6cjs = require('./chunk-Y5TOT5F6.cjs');
86
91
 
87
92
 
88
- var _chunkQAS7KE7Jcjs = require('./chunk-QAS7KE7J.cjs');
93
+ var _chunkS7ZW72JHcjs = require('./chunk-S7ZW72JH.cjs');
89
94
 
90
95
 
91
96
 
@@ -132,10 +137,10 @@ var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
132
137
 
133
138
 
134
139
 
135
- var _chunkDZPR2W6Ucjs = require('./chunk-DZPR2W6U.cjs');
140
+ var _chunkO6L3YYPMcjs = require('./chunk-O6L3YYPM.cjs');
136
141
 
137
142
 
138
- var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
143
+ var _chunkFJWN7RV4cjs = require('./chunk-FJWN7RV4.cjs');
139
144
 
140
145
 
141
146
 
@@ -152,7 +157,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
152
157
 
153
158
 
154
159
 
155
- var _chunkPRFNLQSPcjs = require('./chunk-PRFNLQSP.cjs');
160
+ var _chunk7XGWBPQQcjs = require('./chunk-7XGWBPQQ.cjs');
156
161
 
157
162
 
158
163
 
@@ -161,7 +166,7 @@ var _chunkPRFNLQSPcjs = require('./chunk-PRFNLQSP.cjs');
161
166
 
162
167
 
163
168
 
164
- var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
169
+ var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
165
170
 
166
171
 
167
172
 
@@ -252,7 +257,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
252
257
  var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
253
258
 
254
259
 
255
- var _chunkSM25ZC4Scjs = require('./chunk-SM25ZC4S.cjs');
260
+ var _chunkO2XFIPNLcjs = require('./chunk-O2XFIPNL.cjs');
256
261
 
257
262
 
258
263
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -692,6 +697,11 @@ async function createBlurDataURL(bytes) {
692
697
 
693
698
  var _parseAst = require('rolldown/parseAst');
694
699
  var FARM_REACT_CACHE_MODULE = "@farm.js/core/internal/react-cache";
700
+ var REACT_CACHE_LOCAL = "__farm_react_cache__";
701
+ var REACT_CACHE_APIS = {
702
+ cache: REACT_CACHE_LOCAL,
703
+ cacheSignal: "__farm_react_cache_signal__"
704
+ };
695
705
  function rewriteFarmReactCacheImport(code, file) {
696
706
  if (!code.includes("cache") || !code.includes("react")) return null;
697
707
  const extension = path2.default.extname(file).slice(1);
@@ -702,15 +712,25 @@ function rewriteFarmReactCacheImport(code, file) {
702
712
  } catch (e8) {
703
713
  return null;
704
714
  }
705
- let output = code;
715
+ const edits = [];
706
716
  const declarations = (_nullishCoalesce(program.body, () => ( []))).filter(
707
717
  (node) => node.type === "ImportDeclaration" && _optionalChain([node, 'access', _39 => _39.source, 'optionalAccess', _40 => _40.value]) === "react" && node.importKind !== "type"
708
718
  );
709
- let changed = false;
710
- for (const node of [...declarations].sort((left, right) => right.start - left.start)) {
719
+ const namespaces = /* @__PURE__ */ new Set();
720
+ let memberImportAt = null;
721
+ for (const node of declarations) {
711
722
  const specifiers = _nullishCoalesce(node.specifiers, () => ( []));
723
+ for (const specifier of specifiers) {
724
+ if (specifier.type === "ImportDefaultSpecifier" || specifier.type === "ImportNamespaceSpecifier") {
725
+ namespaces.add(specifier.local.name);
726
+ _nullishCoalesce(memberImportAt, () => ( (memberImportAt = node.end)));
727
+ }
728
+ }
712
729
  const caches = specifiers.filter(
713
- (specifier) => specifier.type === "ImportSpecifier" && specifier.importKind !== "type" && (_nullishCoalesce(_optionalChain([specifier, 'access', _41 => _41.imported, 'optionalAccess', _42 => _42.name]), () => ( _optionalChain([specifier, 'access', _43 => _43.imported, 'optionalAccess', _44 => _44.value])))) === "cache"
730
+ (specifier) => specifier.type === "ImportSpecifier" && specifier.importKind !== "type" && Object.prototype.hasOwnProperty.call(
731
+ REACT_CACHE_APIS,
732
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([specifier, 'access', _41 => _41.imported, 'optionalAccess', _42 => _42.name]), () => ( _optionalChain([specifier, 'access', _43 => _43.imported, 'optionalAccess', _44 => _44.value]))), () => ( ""))
733
+ )
714
734
  );
715
735
  if (caches.length === 0) continue;
716
736
  const others = specifiers.filter((specifier) => !caches.includes(specifier));
@@ -723,12 +743,48 @@ function rewriteFarmReactCacheImport(code, file) {
723
743
  ].join(", ");
724
744
  const lines = [
725
745
  ...clause ? [`import ${clause} from "react";`] : [],
726
- `import { ${caches.map((specifier) => `cache as ${specifier.local.name}`).join(", ")} } from ${JSON.stringify(FARM_REACT_CACHE_MODULE)};`
746
+ `import { ${caches.map((specifier) => `${_nullishCoalesce(_optionalChain([specifier, 'access', _45 => _45.imported, 'optionalAccess', _46 => _46.name]), () => ( _optionalChain([specifier, 'access', _47 => _47.imported, 'optionalAccess', _48 => _48.value])))} as ${specifier.local.name}`).join(", ")} } from ${JSON.stringify(FARM_REACT_CACHE_MODULE)};`
727
747
  ];
728
- output = output.slice(0, node.start) + lines.join("\n") + output.slice(node.end);
729
- changed = true;
748
+ edits.push({ start: node.start, end: node.end, text: lines.join("\n") });
749
+ }
750
+ if (namespaces.size > 0 && memberImportAt !== null) {
751
+ const used = /* @__PURE__ */ new Set();
752
+ const visit = (node) => {
753
+ if (!node || typeof node !== "object") return;
754
+ if (Array.isArray(node)) {
755
+ for (const child of node) visit(child);
756
+ return;
757
+ }
758
+ const current = node;
759
+ if (typeof current.type !== "string") return;
760
+ if (current.type === "ImportDeclaration") return;
761
+ if (current.type === "MemberExpression" && !current.computed && _optionalChain([current, 'access', _49 => _49.object, 'optionalAccess', _50 => _50.type]) === "Identifier" && namespaces.has(current.object.name) && Object.prototype.hasOwnProperty.call(REACT_CACHE_APIS, _nullishCoalesce(_optionalChain([current, 'access', _51 => _51.property, 'optionalAccess', _52 => _52.name]), () => ( "")))) {
762
+ const name = current.property.name;
763
+ edits.push({ start: current.start, end: current.end, text: REACT_CACHE_APIS[name] });
764
+ used.add(name);
765
+ return;
766
+ }
767
+ for (const [key, value] of Object.entries(current)) {
768
+ if (key === "start" || key === "end" || key === "loc" || key === "range") continue;
769
+ if (value && typeof value === "object") visit(value);
770
+ }
771
+ };
772
+ visit(program);
773
+ if (used.size > 0) {
774
+ edits.push({
775
+ start: memberImportAt,
776
+ end: memberImportAt,
777
+ text: `
778
+ import { ${[...used].map((name) => `${name} as ${REACT_CACHE_APIS[name]}`).join(", ")} } from ${JSON.stringify(FARM_REACT_CACHE_MODULE)};`
779
+ });
780
+ }
781
+ }
782
+ if (edits.length === 0) return null;
783
+ let output = code;
784
+ for (const edit of edits.sort((left, right) => right.start - left.start)) {
785
+ output = output.slice(0, edit.start) + edit.text + output.slice(edit.end);
730
786
  }
731
- return changed ? output : null;
787
+ return output;
732
788
  }
733
789
 
734
790
  // src/navigation/page-data-error.ts
@@ -773,13 +829,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logge
773
829
  // src/vite.ts
774
830
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
775
831
  function farmLlmsTxtGeneratedPaths(config) {
776
- const llms = _chunkMEQN6DDAcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _45 => _45.agent, 'optionalAccess', _46 => _46.llmsTxt]));
832
+ const llms = _chunkFJWN7RV4cjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _53 => _53.agent, 'optionalAccess', _54 => _54.llmsTxt]));
777
833
  if (!llms.enabled) return [];
778
834
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
779
835
  }
780
836
  function farmAgentGeneratedPaths(config) {
781
- const crawlers = _chunkDZPR2W6Ucjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _47 => _47.agent, 'optionalAccess', _48 => _48.crawlers]));
782
- const sitemap = _chunkDZPR2W6Ucjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _49 => _49.agent, 'optionalAccess', _50 => _50.sitemap]));
837
+ const crawlers = _chunkO6L3YYPMcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _55 => _55.agent, 'optionalAccess', _56 => _56.crawlers]));
838
+ const sitemap = _chunkO6L3YYPMcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.sitemap]));
783
839
  return [
784
840
  ...farmLlmsTxtGeneratedPaths(config),
785
841
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -824,7 +880,7 @@ function loadFarmWorkflowsDevRuntime() {
824
880
  return import("./workflows.cjs");
825
881
  }
826
882
  function loadFarmDevtoolsSnapshotRuntime() {
827
- return import("./devtools-SVRSGPNC.cjs");
883
+ return import("./devtools-WET5NAKO.cjs");
828
884
  }
829
885
  function loadFarmDevtoolsUIRuntime() {
830
886
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -837,7 +893,7 @@ function farmI18nClientBridgePlugin() {
837
893
  name: "farm:i18n-client-bridge",
838
894
  enforce: "pre",
839
895
  resolveId(id, _importer, options) {
840
- if (id === "@farm.js/core/i18n/server" && !_optionalChain([options, 'optionalAccess', _51 => _51.ssr])) {
896
+ if (id === "@farm.js/core/i18n/server" && !_optionalChain([options, 'optionalAccess', _59 => _59.ssr])) {
841
897
  return FARM_I18N_CLIENT_BRIDGE_ID;
842
898
  }
843
899
  return null;
@@ -850,6 +906,7 @@ function farmI18nClientBridgePlugin() {
850
906
  }
851
907
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
852
908
  var SERVER_ONLY_PACKAGE = "server-only";
909
+ var farmReactServerFiles = /* @__PURE__ */ new Set();
853
910
  var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
854
911
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
855
912
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
@@ -877,21 +934,21 @@ function farmServerOnlyEntriesPlugin(options = {}) {
877
934
  root = config.root;
878
935
  },
879
936
  resolveId(id, importer, options2) {
880
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _52 => _52.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
937
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _60 => _60.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
881
938
  if (id === SERVER_ONLY_PACKAGE) {
882
- if (_optionalChain([options2, 'optionalAccess', _53 => _53.ssr]) || _optionalChain([options2, 'optionalAccess', _54 => _54.scan])) {
939
+ if (_optionalChain([options2, 'optionalAccess', _61 => _61.ssr]) || _optionalChain([options2, 'optionalAccess', _62 => _62.scan])) {
883
940
  return FARM_SERVER_ONLY_PACKAGE_ID;
884
941
  }
885
942
  this.error(
886
943
  `${_nullishCoalesce(importer, () => ( "A module"))} imports "server-only", so it must not reach the browser, but client code imports it. Move what the client needs out of that module, or call it from a server component, server function or API route.`
887
944
  );
888
945
  }
889
- if (!_optionalChain([options2, 'optionalAccess', _55 => _55.ssr]) && _module.isBuiltin.call(void 0, id)) {
946
+ if (!_optionalChain([options2, 'optionalAccess', _63 => _63.ssr]) && _module.isBuiltin.call(void 0, id)) {
890
947
  return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
891
948
  }
892
949
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
893
950
  const importedBy = importer ? ` (imported by ${importer})` : "";
894
- if (!_optionalChain([options2, 'optionalAccess', _56 => _56.ssr])) {
951
+ if (!_optionalChain([options2, 'optionalAccess', _64 => _64.ssr])) {
895
952
  this.error(
896
953
  `${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
897
954
  );
@@ -941,10 +998,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
941
998
  if (!snapshot) return "";
942
999
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
943
1000
  if (snapshot.routing === "none") return runtime;
944
- return `${_chunkO27PLNQZcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1001
+ return `${_chunkUJ3R2AH2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
945
1002
  }
946
1003
  function getPublicEnvDefine(config) {
947
- const publicEnv = _optionalChain([config, 'access', _57 => _57.env, 'optionalAccess', _58 => _58.public]);
1004
+ const publicEnv = _optionalChain([config, 'access', _65 => _65.env, 'optionalAccess', _66 => _66.public]);
948
1005
  if (!isResolvedEnvScope(publicEnv)) {
949
1006
  return {};
950
1007
  }
@@ -983,7 +1040,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
983
1040
  return;
984
1041
  }
985
1042
  if (res.headersSent) {
986
- _optionalChain([res, 'access', _59 => _59.destroy, 'optionalCall', _60 => _60(error instanceof Error ? error : new Error(String(error)))]);
1043
+ _optionalChain([res, 'access', _67 => _67.destroy, 'optionalCall', _68 => _68(error instanceof Error ? error : new Error(String(error)))]);
987
1044
  return;
988
1045
  }
989
1046
  res.statusCode = 500;
@@ -1086,7 +1143,7 @@ function interceptFarmDevPageResponse(options) {
1086
1143
  const originalWrite = res.write.bind(res);
1087
1144
  const originalEnd = res.end.bind(res);
1088
1145
  const originalWriteHead = res.writeHead.bind(res);
1089
- const originalFlushHeaders = _optionalChain([res, 'access', _61 => _61.flushHeaders, 'optionalAccess', _62 => _62.bind, 'call', _63 => _63(res)]);
1146
+ const originalFlushHeaders = _optionalChain([res, 'access', _69 => _69.flushHeaders, 'optionalAccess', _70 => _70.bind, 'call', _71 => _71(res)]);
1090
1147
  let afterResponseCalled = false;
1091
1148
  let interceptedEnd = false;
1092
1149
  const htmlChunks = [];
@@ -1126,7 +1183,7 @@ function interceptFarmDevPageResponse(options) {
1126
1183
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1127
1184
  if (shouldBufferResponse) {
1128
1185
  const callback = args.find((arg) => typeof arg === "function");
1129
- _optionalChain([callback, 'optionalCall', _64 => _64()]);
1186
+ _optionalChain([callback, 'optionalCall', _72 => _72()]);
1130
1187
  return true;
1131
1188
  }
1132
1189
  const writeResult = originalWrite(chunk, ...args);
@@ -1239,13 +1296,13 @@ function getEnvDefines(config, configEnv) {
1239
1296
  _chunkHEPJIKKQcjs.getPublicFarmImageConfig.call(void 0, _chunkHEPJIKKQcjs.resolveFarmImageConfig.call(void 0, config.images))
1240
1297
  )
1241
1298
  };
1242
- if (_optionalChain([configEnv, 'optionalAccess', _65 => _65.isSsrBuild])) {
1299
+ if (_optionalChain([configEnv, 'optionalAccess', _73 => _73.isSsrBuild])) {
1243
1300
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1244
1301
  }
1245
1302
  return defines;
1246
1303
  }
1247
1304
  function getFarmAPIBaseURLDefine(config) {
1248
- const baseURL = _optionalChain([config, 'access', _66 => _66.api, 'optionalAccess', _67 => _67.baseURL]);
1305
+ const baseURL = _optionalChain([config, 'access', _74 => _74.api, 'optionalAccess', _75 => _75.baseURL]);
1249
1306
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1250
1307
  }
1251
1308
  function isResolvedEnvScope(value) {
@@ -1346,9 +1403,9 @@ function transformIsolatedClientBoundaryModule(options) {
1346
1403
  transformedExports++;
1347
1404
  };
1348
1405
  for (const node of body) {
1349
- if (_optionalChain([node, 'optionalAccess', _68 => _68.type]) === "ExportDefaultDeclaration" && node.declaration) {
1406
+ if (_optionalChain([node, 'optionalAccess', _76 => _76.type]) === "ExportDefaultDeclaration" && node.declaration) {
1350
1407
  const declaration2 = node.declaration;
1351
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _69 => _69.id, 'optionalAccess', _70 => _70.name])) {
1408
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _77 => _77.id, 'optionalAccess', _78 => _78.name])) {
1352
1409
  replacements.push({
1353
1410
  start: node.start,
1354
1411
  end: node.end,
@@ -1366,11 +1423,11 @@ function transformIsolatedClientBoundaryModule(options) {
1366
1423
  }
1367
1424
  continue;
1368
1425
  }
1369
- if (_optionalChain([node, 'optionalAccess', _71 => _71.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1426
+ if (_optionalChain([node, 'optionalAccess', _79 => _79.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1370
1427
  const specifiers = (node.specifiers || []).filter(
1371
1428
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
1372
1429
  );
1373
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _72 => _72.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _73 => _73.value]), () => ( "")))));
1430
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _80 => _80.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _81 => _81.value]), () => ( "")))));
1374
1431
  const isComponentExport = (specifier) => {
1375
1432
  const exported = specifierName(specifier.exported);
1376
1433
  return exported === "default" || /^[A-Z]/.test(exported);
@@ -1397,14 +1454,14 @@ function transformIsolatedClientBoundaryModule(options) {
1397
1454
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
1398
1455
  continue;
1399
1456
  }
1400
- if (_optionalChain([node, 'optionalAccess', _74 => _74.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1457
+ if (_optionalChain([node, 'optionalAccess', _82 => _82.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1401
1458
  const declaration = node.declaration;
1402
1459
  const declaredNames = [];
1403
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _75 => _75.id, 'optionalAccess', _76 => _76.name])) {
1460
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _83 => _83.id, 'optionalAccess', _84 => _84.name])) {
1404
1461
  declaredNames.push(declaration.id.name);
1405
1462
  } else if (declaration.type === "VariableDeclaration") {
1406
1463
  for (const declarator of declaration.declarations || []) {
1407
- if (_optionalChain([declarator, 'access', _77 => _77.id, 'optionalAccess', _78 => _78.type]) === "Identifier") declaredNames.push(declarator.id.name);
1464
+ if (_optionalChain([declarator, 'access', _85 => _85.id, 'optionalAccess', _86 => _86.type]) === "Identifier") declaredNames.push(declarator.id.name);
1408
1465
  }
1409
1466
  }
1410
1467
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -1468,7 +1525,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1468
1525
  } catch (e13) {
1469
1526
  return;
1470
1527
  }
1471
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _79 => _79.env, 'optionalAccess', _80 => _80.public]), () => ( {}))));
1528
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _87 => _87.env, 'optionalAccess', _88 => _88.public]), () => ( {}))));
1472
1529
  const findings = analyzeClientBoundary(program, publicKeys);
1473
1530
  if (findings.envKeys.length === 0 && findings.publicEnvKeys.length === 0 && findings.builtinImports.length === 0) {
1474
1531
  return;
@@ -1488,7 +1545,7 @@ function hasViteAlias(alias, find) {
1488
1545
  }
1489
1546
  function farmPlugin(options = {}, initialPluginManager) {
1490
1547
  const imageImports = farmImageImportsPlugin();
1491
- const fontImports = _chunkGGNJAGGEcjs.farmFontImportsPlugin.call(void 0, {
1548
+ const fontImports = _chunkFAP7CX7Ccjs.farmFontImportsPlugin.call(void 0, {
1492
1549
  root: options.root,
1493
1550
  basePath: options.basePath,
1494
1551
  publicDir: options.publicDir
@@ -1496,8 +1553,8 @@ function farmPlugin(options = {}, initialPluginManager) {
1496
1553
  let farmApp;
1497
1554
  let serverFnTransformActive = false;
1498
1555
  const islandsServerFns = () => {
1499
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _81 => _81.getConfig, 'call', _82 => _82()]), () => ( options));
1500
- return _optionalChain([config, 'access', _83 => _83.experimental, 'optionalAccess', _84 => _84.serverActions]) === true && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _85 => _85.experimental, 'optionalAccess', _86 => _86.serverComponents])) === "islands";
1556
+ const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _89 => _89.getConfig, 'call', _90 => _90()]), () => ( options));
1557
+ return _optionalChain([config, 'access', _91 => _91.experimental, 'optionalAccess', _92 => _92.serverActions]) === true && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _93 => _93.experimental, 'optionalAccess', _94 => _94.serverComponents])) === "islands";
1501
1558
  };
1502
1559
  let reactRefreshActive = false;
1503
1560
  let server;
@@ -1522,14 +1579,14 @@ function farmPlugin(options = {}, initialPluginManager) {
1522
1579
  ].join(" ");
1523
1580
  console.log(log);
1524
1581
  };
1525
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _87 => _87.getRouteManager, 'call', _88 => _88(), 'access', _89 => _89.getProgrammaticClientRoutes, 'call', _90 => _90()])));
1582
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _95 => _95.getRouteManager, 'call', _96 => _96(), 'access', _97 => _97.getProgrammaticClientRoutes, 'call', _98 => _98()])));
1526
1583
  return {
1527
1584
  name: "farm",
1528
1585
  api: { getProgrammaticClientRoutes },
1529
1586
  config(userConfig, configEnv) {
1530
1587
  isBuild = configEnv.command === "build";
1531
1588
  const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
1532
- const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _91 => _91.resolve, 'optionalAccess', _92 => _92.alias]), "@") ? {} : _chunkGGNJAGGEcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1589
+ const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _99 => _99.resolve, 'optionalAccess', _100 => _100.alias]), "@") ? {} : _chunkFAP7CX7Ccjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1533
1590
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
1534
1591
  return {
1535
1592
  // Honor Farm's publicDir so the dev server serves the same static
@@ -1545,7 +1602,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1545
1602
  server: {
1546
1603
  fs: {
1547
1604
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
1548
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _93 => _93.server, 'optionalAccess', _94 => _94.fs, 'optionalAccess', _95 => _95.deny]), options)
1605
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _101 => _101.server, 'optionalAccess', _102 => _102.fs, 'optionalAccess', _103 => _103.deny]), options)
1549
1606
  }
1550
1607
  }
1551
1608
  };
@@ -1558,7 +1615,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1558
1615
  (plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
1559
1616
  );
1560
1617
  reactRefreshActive = _chunk65Y5SIBHcjs.isFarmReactRefreshActive.call(void 0, config);
1561
- if (_optionalChain([options, 'access', _96 => _96.experimental, 'optionalAccess', _97 => _97.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
1618
+ if (_optionalChain([options, 'access', _104 => _104.experimental, 'optionalAccess', _105 => _105.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
1562
1619
  _chunkQMNWKQL4cjs.logger.warn(
1563
1620
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
1564
1621
  );
@@ -1567,7 +1624,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1567
1624
  async configureServer(viteServer) {
1568
1625
  viteServer.middlewares.use(
1569
1626
  createFarmDevPreviewGuard(viteServer, {
1570
- getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _98 => _98.getConfig, 'call', _99 => _99()]), () => ( options)))
1627
+ getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _106 => _106.getConfig, 'call', _107 => _107()]), () => ( options)))
1571
1628
  })
1572
1629
  );
1573
1630
  if (typeof fontImports.configureServer === "function") {
@@ -1582,7 +1639,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1582
1639
  } catch (e14) {
1583
1640
  }
1584
1641
  };
1585
- farmApp = new (0, _chunkGGNJAGGEcjs.FarmApp)(
1642
+ farmApp = new (0, _chunkFAP7CX7Ccjs.FarmApp)(
1586
1643
  {
1587
1644
  ...options,
1588
1645
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -1592,17 +1649,17 @@ function farmPlugin(options = {}, initialPluginManager) {
1592
1649
  await farmApp.initialize();
1593
1650
  const farmConfig = farmApp.getConfig();
1594
1651
  let farmAppPackages;
1595
- if (_optionalChain([farmConfig, 'access', _100 => _100.agent, 'optionalAccess', _101 => _101.noindexPreviews])) {
1652
+ if (_optionalChain([farmConfig, 'access', _108 => _108.agent, 'optionalAccess', _109 => _109.noindexPreviews])) {
1596
1653
  server.middlewares.use((_req, res, next) => {
1597
- if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
1598
- res.setHeader("X-Robots-Tag", _chunkDZPR2W6Ucjs.FARM_PREVIEW_ROBOTS_TAG);
1654
+ if (_chunkS7ZW72JHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
1655
+ res.setHeader("X-Robots-Tag", _chunkO6L3YYPMcjs.FARM_PREVIEW_ROBOTS_TAG);
1599
1656
  }
1600
1657
  next();
1601
1658
  });
1602
1659
  }
1603
1660
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1604
1661
  const devBuiltInRoutePaths = new Set(
1605
- _chunkXX32BOMMcjs.listFarmBuiltInRoutePaths.call(void 0, {
1662
+ _chunkNXFA7G3Ycjs.listFarmBuiltInRoutePaths.call(void 0, {
1606
1663
  agent: {
1607
1664
  apiCatalog: true,
1608
1665
  mcp: true,
@@ -1624,7 +1681,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1624
1681
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
1625
1682
  // Vite owns this address. Unlike request.url, it cannot be replaced by
1626
1683
  // a caller-controlled Host header.
1627
- trustedLocalOrigin: () => _optionalChain([server, 'access', _102 => _102.resolvedUrls, 'optionalAccess', _103 => _103.local, 'access', _104 => _104[0]]),
1684
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _110 => _110.resolvedUrls, 'optionalAccess', _111 => _111.local, 'access', _112 => _112[0]]),
1628
1685
  onError(error) {
1629
1686
  _chunkQMNWKQL4cjs.logger.error(
1630
1687
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -1644,8 +1701,8 @@ function farmPlugin(options = {}, initialPluginManager) {
1644
1701
  const workflowConfig = farmConfig.workflows;
1645
1702
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
1646
1703
  const getExtraRouteTypes = () => [
1647
- ..._optionalChain([options, 'access', _105 => _105.openapi, 'optionalAccess', _106 => _106.enabled]) && options.openapi.route ? [options.openapi.route] : [],
1648
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _107 => _107.getFarmDocsRouteTypeEntries, 'call', _108 => _108(farmConfig.docs)]), () => ( []))
1704
+ ..._optionalChain([options, 'access', _113 => _113.openapi, 'optionalAccess', _114 => _114.enabled]) && options.openapi.route ? [options.openapi.route] : [],
1705
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _115 => _115.getFarmDocsRouteTypeEntries, 'call', _116 => _116(farmConfig.docs)]), () => ( []))
1649
1706
  ];
1650
1707
  const appDirSlugs = sourceRoots.map(
1651
1708
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
@@ -1692,7 +1749,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1692
1749
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
1693
1750
  );
1694
1751
  const layerConfigFiles = new Set(
1695
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _109 => _109.configFile, 'optionalAccess', _110 => _110.replace, 'call', _111 => _111(/\\/g, "/")])).filter((file) => Boolean(file))
1752
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _117 => _117.configFile, 'optionalAccess', _118 => _118.replace, 'call', _119 => _119(/\\/g, "/")])).filter((file) => Boolean(file))
1696
1753
  );
1697
1754
  const routeModuleExtensions = /* @__PURE__ */ new Set([
1698
1755
  ..._chunkRD623KW4cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -1771,7 +1828,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1771
1828
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
1772
1829
  }
1773
1830
  if (isI18nCatalogFile(file)) {
1774
- _optionalChain([farmApp, 'optionalAccess', _112 => _112.getI18nRuntime, 'call', _113 => _113(), 'access', _114 => _114.reload, 'call', _115 => _115(), 'access', _116 => _116.then, 'call', _117 => _117(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _118 => _118.catch, 'call', _119 => _119((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1831
+ _optionalChain([farmApp, 'optionalAccess', _120 => _120.getI18nRuntime, 'call', _121 => _121(), 'access', _122 => _122.reload, 'call', _123 => _123(), 'access', _124 => _124.then, 'call', _125 => _125(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _126 => _126.catch, 'call', _127 => _127((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1775
1832
  }
1776
1833
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
1777
1834
  if (isRouteRefreshEvent) {
@@ -1784,8 +1841,8 @@ function farmPlugin(options = {}, initialPluginManager) {
1784
1841
  const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
1785
1842
  pendingRouteRefreshIncludesMiddleware = false;
1786
1843
  Promise.all([
1787
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _120 => _120(`${ev} ${file}`)]),
1788
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _121 => _121.reload, 'call', _122 => _122()]) : void 0
1844
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _128 => _128(`${ev} ${file}`)]),
1845
+ reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _129 => _129.reload, 'call', _130 => _130()]) : void 0
1789
1846
  ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
1790
1847
  }, 50);
1791
1848
  }
@@ -1824,7 +1881,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1824
1881
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
1825
1882
  const load = (file) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
1826
1883
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
1827
- _optionalChain([server, 'access', _123 => _123.httpServer, 'optionalAccess', _124 => _124.once, 'call', _125 => _125("close", () => {
1884
+ _optionalChain([server, 'access', _131 => _131.httpServer, 'optionalAccess', _132 => _132.once, 'call', _133 => _133("close", () => {
1828
1885
  const globals = globalThis;
1829
1886
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
1830
1887
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
@@ -1898,11 +1955,11 @@ function farmPlugin(options = {}, initialPluginManager) {
1898
1955
  });
1899
1956
  }
1900
1957
  }
1901
- if (_optionalChain([options, 'access', _126 => _126.openapi, 'optionalAccess', _127 => _127.enabled])) {
1958
+ if (_optionalChain([options, 'access', _134 => _134.openapi, 'optionalAccess', _135 => _135.enabled])) {
1902
1959
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
1903
1960
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
1904
1961
  mode: "development",
1905
- apiBaseURL: typeof _optionalChain([options, 'access', _128 => _128.api, 'optionalAccess', _129 => _129.baseURL]) === "string" ? options.api.baseURL : void 0
1962
+ apiBaseURL: typeof _optionalChain([options, 'access', _136 => _136.api, 'optionalAccess', _137 => _137.baseURL]) === "string" ? options.api.baseURL : void 0
1906
1963
  });
1907
1964
  const spec = await openAPIManager.generateSpec();
1908
1965
  reportOpenAPIDevGenerationResult(spec);
@@ -1931,7 +1988,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1931
1988
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
1932
1989
  };
1933
1990
  releaseDocsMCPServers();
1934
- const isFarmDocsPathGuarded = (href) => _chunkO27PLNQZcjs.farmPathGuardCoversPage.call(void 0,
1991
+ const isFarmDocsPathGuarded = (href) => _chunkUJ3R2AH2cjs.farmPathGuardCoversPage.call(void 0,
1935
1992
  {
1936
1993
  config: farmConfig,
1937
1994
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -1944,19 +2001,19 @@ function farmPlugin(options = {}, initialPluginManager) {
1944
2001
  clientEntry: "/@farm/client.js",
1945
2002
  resolveLayoutFonts: resolveDocsLayoutFonts,
1946
2003
  fontStylesheetHref: "/@farm/fonts.css",
1947
- globalStylesheetHref: _chunkGGNJAGGEcjs.resolveDevGlobalStylesheetHref.call(void 0,
2004
+ globalStylesheetHref: _chunkFAP7CX7Ccjs.resolveDevGlobalStylesheetHref.call(void 0,
1948
2005
  farmConfig.root,
1949
2006
  farmConfig.srcDir
1950
2007
  ),
1951
2008
  loadModule: async (specifier) => {
1952
2009
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
1953
- if (specifier === _optionalChain([farmConfig, 'access', _130 => _130.docs, 'access', _131 => _131.adapter, 'optionalAccess', _132 => _132.server]) && _optionalChain([resolved, 'optionalAccess', _133 => _133.id])) {
2010
+ if (specifier === _optionalChain([farmConfig, 'access', _138 => _138.docs, 'access', _139 => _139.adapter, 'optionalAccess', _140 => _140.server]) && _optionalChain([resolved, 'optionalAccess', _141 => _141.id])) {
1954
2011
  return import(
1955
2012
  /* @vite-ignore */
1956
2013
  _url.pathToFileURL.call(void 0, resolved.id).href
1957
2014
  );
1958
2015
  }
1959
- return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _134 => _134.id]), () => ( specifier)));
2016
+ return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _142 => _142.id]), () => ( specifier)));
1960
2017
  },
1961
2018
  registerMCPServer: (mcpServer) => {
1962
2019
  const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -1974,21 +2031,21 @@ function farmPlugin(options = {}, initialPluginManager) {
1974
2031
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
1975
2032
  resolveLayoutFonts: resolveDocsLayoutFonts,
1976
2033
  fontStylesheetHref: "/@farm/fonts.css",
1977
- globalStylesheetHref: _chunkGGNJAGGEcjs.resolveDevGlobalStylesheetHref.call(void 0,
2034
+ globalStylesheetHref: _chunkFAP7CX7Ccjs.resolveDevGlobalStylesheetHref.call(void 0,
1978
2035
  farmConfig.root,
1979
2036
  farmConfig.srcDir
1980
2037
  ),
1981
2038
  isPathGuarded: isFarmDocsPathGuarded
1982
2039
  }) : null;
1983
2040
  const wrapFarmDocsResponseWithLayouts = async (request, response) => {
1984
- if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _135 => _135.headers, 'access', _136 => _136.get, 'call', _137 => _137("content-type"), 'optionalAccess', _138 => _138.toLowerCase, 'call', _139 => _139(), 'access', _140 => _140.includes, 'call', _141 => _141("text/html")])) {
2041
+ if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _143 => _143.headers, 'access', _144 => _144.get, 'call', _145 => _145("content-type"), 'optionalAccess', _146 => _146.toLowerCase, 'call', _147 => _147(), 'access', _148 => _148.includes, 'call', _149 => _149("text/html")])) {
1985
2042
  return response;
1986
2043
  }
1987
2044
  const pathname = new URL(request.url).pathname;
1988
2045
  const matchedRoute = routeManager.matchRoute(pathname);
1989
2046
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
1990
2047
  ...layout,
1991
- metadata: _chunkGGNJAGGEcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
2048
+ metadata: _chunkFAP7CX7Ccjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1992
2049
  }));
1993
2050
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
1994
2051
  return response;
@@ -2002,7 +2059,7 @@ function farmPlugin(options = {}, initialPluginManager) {
2002
2059
  headers: response.headers
2003
2060
  });
2004
2061
  }
2005
- const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _142 => _142.getConfig, 'call', _143 => _143()]), () => ( options))).renderer);
2062
+ const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _150 => _150.getConfig, 'call', _151 => _151()]), () => ( options))).renderer);
2006
2063
  const [rendererRuntime, layoutModules] = await Promise.all([
2007
2064
  _chunkRD623KW4cjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
2008
2065
  Promise.all(
@@ -2031,7 +2088,7 @@ function farmPlugin(options = {}, initialPluginManager) {
2031
2088
  ])
2032
2089
  );
2033
2090
  const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
2034
- const pageModulePath = _optionalChain([matchedRoute, 'access', _144 => _144.route, 'optionalAccess', _145 => _145.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2091
+ const pageModulePath = _optionalChain([matchedRoute, 'access', _152 => _152.route, 'optionalAccess', _153 => _153.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2035
2092
  const bootstrapScript = `<script>
2036
2093
  window.__FARM_PROPS__ = ${inlineValue({ params })};
2037
2094
  window.__FARM_ROUTE_SLOTS__ = [];
@@ -2127,7 +2184,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2127
2184
  }
2128
2185
  },
2129
2186
  (request) => {
2130
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _146 => _146.getConfig, 'call', _147 => _147()]), () => ( options));
2187
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _154 => _154.getConfig, 'call', _155 => _155()]), () => ( options));
2131
2188
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2132
2189
  return _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, request, {
2133
2190
  trustProxy: currentServerConfig.trustProxy
@@ -2138,7 +2195,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2138
2195
  withAPIRequestTracing(async (req, res, next) => {
2139
2196
  const requestUrl = req.url || "/";
2140
2197
  const requestMethod = req.method || "GET";
2141
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _148 => _148.getConfig, 'call', _149 => _149()]), () => ( options));
2198
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _156 => _156.getConfig, 'call', _157 => _157()]), () => ( options));
2142
2199
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2143
2200
  const parsedRequestUrl = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
2144
2201
  trustProxy: currentServerConfig.trustProxy
@@ -2206,7 +2263,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2206
2263
  openapi: options.openapi
2207
2264
  },
2208
2265
  workflows: discoveredWorkflows,
2209
- plugins: _optionalChain([pm, 'optionalAccess', _150 => _150.getSortedPlugins, 'call', _151 => _151()])
2266
+ plugins: _optionalChain([pm, 'optionalAccess', _158 => _158.getSortedPlugins, 'call', _159 => _159()])
2210
2267
  });
2211
2268
  res.statusCode = 200;
2212
2269
  res.setHeader(
@@ -2229,7 +2286,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2229
2286
  return;
2230
2287
  }
2231
2288
  const runAppMiddlewareForContentRoute = async () => {
2232
- if (!_optionalChain([middlewareManager, 'optionalAccess', _152 => _152.hasMiddleware, 'call', _153 => _153()])) return false;
2289
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _160 => _160.hasMiddleware, 'call', _161 => _161()])) return false;
2233
2290
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
2234
2291
  return runFarmMiddlewareWithNavigation(
2235
2292
  farmApp.getServerRenderer(),
@@ -2245,16 +2302,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2245
2302
  label
2246
2303
  } = {}) => {
2247
2304
  const discard = async () => {
2248
- await _optionalChain([computed, 'optionalAccess', _154 => _154.body, 'optionalAccess', _155 => _155.cancel, 'call', _156 => _156(), 'access', _157 => _157.catch, 'call', _158 => _158(() => {
2305
+ await _optionalChain([computed, 'optionalAccess', _162 => _162.body, 'optionalAccess', _163 => _163.cancel, 'call', _164 => _164(), 'access', _165 => _165.catch, 'call', _166 => _166(() => {
2249
2306
  })]);
2250
2307
  };
2251
2308
  let runtimeSession2;
2252
- if (_optionalChain([pm, 'optionalAccess', _159 => _159.hasRuntimeRequestHooks, 'call', _160 => _160()])) {
2309
+ if (_optionalChain([pm, 'optionalAccess', _167 => _167.hasRuntimeRequestHooks, 'call', _168 => _168()])) {
2253
2310
  try {
2254
2311
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
2255
- const route = _chunkXX32BOMMcjs.setFarmRouteLabel.call(void 0,
2312
+ const route = _chunkNXFA7G3Ycjs.setFarmRouteLabel.call(void 0,
2256
2313
  { pathname: requestPathname },
2257
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkXX32BOMMcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2314
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkNXFA7G3Ycjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2258
2315
  );
2259
2316
  runtimeSession2 = await pm.beginRuntimeRequest(
2260
2317
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -2286,7 +2343,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2286
2343
  let response;
2287
2344
  try {
2288
2345
  response = await respond(
2289
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _161 => _161.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
2346
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _169 => _169.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
2290
2347
  );
2291
2348
  } catch (error) {
2292
2349
  if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
@@ -2299,7 +2356,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2299
2356
  );
2300
2357
  };
2301
2358
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
2302
- if (openAPIManager && _optionalChain([options, 'access', _162 => _162.openapi, 'optionalAccess', _163 => _163.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
2359
+ if (openAPIManager && _optionalChain([options, 'access', _170 => _170.openapi, 'optionalAccess', _171 => _171.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
2303
2360
  const specManager = openAPIManager;
2304
2361
  await serveBuiltInRoute(async () => {
2305
2362
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -2319,7 +2376,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2319
2376
  });
2320
2377
  return;
2321
2378
  }
2322
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.route])) {
2379
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _172 => _172.openapi, 'optionalAccess', _173 => _173.route])) {
2323
2380
  const docsManager = openAPIManager;
2324
2381
  await serveBuiltInRoute(
2325
2382
  async () => {
@@ -2330,24 +2387,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2330
2387
  );
2331
2388
  return;
2332
2389
  }
2333
- if (_optionalChain([options, 'access', _166 => _166.agent, 'optionalAccess', _167 => _167.manifest]) !== false && _chunkXX32BOMMcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2390
+ if (_optionalChain([options, 'access', _174 => _174.agent, 'optionalAccess', _175 => _175.manifest]) !== false && _chunkNXFA7G3Ycjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2334
2391
  await serveBuiltInRoute(async () => {
2335
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkGGNJAGGEcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2336
- const manifest = await _chunkXX32BOMMcjs.createFarmAppManifestResponse.call(void 0,
2392
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkFAP7CX7Ccjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2393
+ const manifest = await _chunkNXFA7G3Ycjs.createFarmAppManifestResponse.call(void 0,
2337
2394
  new Request(parsedRequestUrl, {
2338
2395
  method: requestMethod,
2339
2396
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
2340
2397
  }),
2341
2398
  {
2342
- ..._chunkXX32BOMMcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2399
+ ..._chunkNXFA7G3Ycjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2343
2400
  build: "development",
2344
2401
  packages: farmAppPackages,
2345
2402
  // Read again on each request; unchanged files come from a cache.
2346
- webmcpTools: _optionalChain([farmConfig, 'access', _168 => _168.plugins, 'optionalAccess', _169 => _169.some, 'call', _170 => _170(({ name }) => name === "farm:webmcp")]) ? _chunkGGNJAGGEcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2403
+ webmcpTools: _optionalChain([farmConfig, 'access', _176 => _176.plugins, 'optionalAccess', _177 => _177.some, 'call', _178 => _178(({ name }) => name === "farm:webmcp")]) ? _chunkFAP7CX7Ccjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2347
2404
  }),
2348
2405
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
2349
2406
  // A guard written for an MCP server's path keeps its tools out of the public view.
2350
- guardCoversPath: (path7) => _chunkO27PLNQZcjs.farmPathGuardCoversEndpoint.call(void 0,
2407
+ guardCoversPath: (path7) => _chunkUJ3R2AH2cjs.farmPathGuardCoversEndpoint.call(void 0,
2351
2408
  {
2352
2409
  config: farmConfig,
2353
2410
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2361,11 +2418,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2361
2418
  });
2362
2419
  return;
2363
2420
  }
2364
- if (_optionalChain([options, 'access', _171 => _171.agent, 'optionalAccess', _172 => _172.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkXX32BOMMcjs.FARM_API_CATALOG_PATH) {
2421
+ if (_optionalChain([options, 'access', _179 => _179.agent, 'optionalAccess', _180 => _180.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkNXFA7G3Ycjs.FARM_API_CATALOG_PATH) {
2365
2422
  await serveBuiltInRoute(
2366
- () => _chunkXX32BOMMcjs.createFarmApiCatalogResponse.call(void 0,
2423
+ () => _chunkNXFA7G3Ycjs.createFarmApiCatalogResponse.call(void 0,
2367
2424
  requestMethod,
2368
- _chunkXX32BOMMcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2425
+ _chunkNXFA7G3Ycjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2369
2426
  new Request(parsedRequestUrl, {
2370
2427
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
2371
2428
  })
@@ -2373,8 +2430,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2373
2430
  );
2374
2431
  return;
2375
2432
  }
2376
- if (_optionalChain([options, 'access', _173 => _173.agent, 'optionalAccess', _174 => _174.aiCatalog]) !== false) {
2377
- const aiCatalog = _chunkXX32BOMMcjs.createFarmAiCatalogResponse.call(void 0,
2433
+ if (_optionalChain([options, 'access', _181 => _181.agent, 'optionalAccess', _182 => _182.aiCatalog]) !== false) {
2434
+ const aiCatalog = _chunkNXFA7G3Ycjs.createFarmAiCatalogResponse.call(void 0,
2378
2435
  new Request(parsedRequestUrl, {
2379
2436
  method: requestMethod,
2380
2437
  headers: {
@@ -2418,11 +2475,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2418
2475
  {
2419
2476
  kind: "docs",
2420
2477
  computed: docsResponse,
2421
- label: _chunkXX32BOMMcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2478
+ label: _chunkNXFA7G3Ycjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2422
2479
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2423
2480
  {
2424
- path: _optionalChain([farmConfig, 'access', _175 => _175.docs, 'optionalAccess', _176 => _176.entry]) || "/docs",
2425
- roots: _optionalChain([farmConfig, 'access', _177 => _177.docs, 'optionalAccess', _178 => _178.roots, 'optionalAccess', _179 => _179.map, 'call', _180 => _180((root) => root.entry)])
2481
+ path: _optionalChain([farmConfig, 'access', _183 => _183.docs, 'optionalAccess', _184 => _184.entry]) || "/docs",
2482
+ roots: _optionalChain([farmConfig, 'access', _185 => _185.docs, 'optionalAccess', _186 => _186.roots, 'optionalAccess', _187 => _187.map, 'call', _188 => _188((root) => root.entry)])
2426
2483
  }
2427
2484
  )
2428
2485
  }
@@ -2430,10 +2487,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2430
2487
  return;
2431
2488
  }
2432
2489
  }
2433
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && _optionalChain([req, 'access', _181 => _181.headers, 'access', _182 => _182.accept, 'optionalAccess', _183 => _183.includes, 'call', _184 => _184(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
2434
- const { createFarmNativeTreeResponse } = await import("./native-tree-Z2WYUJEV.cjs");
2490
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _189 => _189.headers, 'access', _190 => _190.accept, 'optionalAccess', _191 => _191.includes, 'call', _192 => _192(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
2491
+ const { createFarmNativeTreeResponse } = await import("./native-tree-WOX3JMBG.cjs");
2492
+ const treeBodyInit = requestMethod === "POST" ? { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
2435
2493
  const treeResponse = await createFarmNativeTreeResponse({
2436
- request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
2494
+ request: new Request(fullUrl, {
2495
+ method: requestMethod,
2496
+ headers: docsHeaders,
2497
+ ...treeBodyInit
2498
+ }),
2437
2499
  // As for the Markdown mirror: this server's own listener, redirects not followed.
2438
2500
  renderPage: (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
2439
2501
  new Request(request, {
@@ -2443,15 +2505,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2443
2505
  });
2444
2506
  await serveBuiltInRoute(() => treeResponse, {
2445
2507
  computed: treeResponse,
2446
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _185 => _185.getRouteManager, 'call', _186 => _186(), 'access', _187 => _187.matchRoute, 'call', _188 => _188(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _189 => _189.route, 'optionalAccess', _190 => _190.pattern]), () => ( null))
2508
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _193 => _193.getRouteManager, 'call', _194 => _194(), 'access', _195 => _195.matchRoute, 'call', _196 => _196(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _197 => _197.route, 'optionalAccess', _198 => _198.pattern]), () => ( null))
2447
2509
  });
2448
2510
  return;
2449
2511
  }
2450
- const markdownRouteLabel = () => _chunkXX32BOMMcjs.resolveFarmMarkdownRouteLabel.call(void 0,
2512
+ const markdownRouteLabel = () => _chunkNXFA7G3Ycjs.resolveFarmMarkdownRouteLabel.call(void 0,
2451
2513
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2452
- (page) => _optionalChain([farmApp, 'access', _191 => _191.getRouteManager, 'call', _192 => _192(), 'access', _193 => _193.matchRoute, 'call', _194 => _194(page), 'access', _195 => _195.route, 'optionalAccess', _196 => _196.pattern])
2514
+ (page) => _optionalChain([farmApp, 'access', _199 => _199.getRouteManager, 'call', _200 => _200(), 'access', _201 => _201.matchRoute, 'call', _202 => _202(page), 'access', _203 => _203.route, 'optionalAccess', _204 => _204.pattern])
2453
2515
  );
2454
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkPRFNLQSPcjs.createFarmMarkdownSourceResponse.call(void 0, {
2516
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunk7XGWBPQQcjs.createFarmMarkdownSourceResponse.call(void 0, {
2455
2517
  request: new Request(fullUrl, {
2456
2518
  method: requestMethod,
2457
2519
  headers: docsHeaders
@@ -2459,7 +2521,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2459
2521
  config: farmApp.getConfig().mdx,
2460
2522
  resolveSource: async (pathname2) => {
2461
2523
  const match = farmApp.getRouteManager().matchRoute(pathname2);
2462
- const sourcePath = _optionalChain([match, 'access', _197 => _197.route, 'optionalAccess', _198 => _198.markdownSourcePath]) || (match.route && _chunkPRFNLQSPcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2524
+ const sourcePath = _optionalChain([match, 'access', _205 => _205.route, 'optionalAccess', _206 => _206.markdownSourcePath]) || (match.route && _chunk7XGWBPQQcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2463
2525
  if (!sourcePath) {
2464
2526
  return null;
2465
2527
  }
@@ -2484,7 +2546,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2484
2546
  });
2485
2547
  return;
2486
2548
  }
2487
- const markdownResponse = viteModuleRequest ? null : await _chunkLT4VAF5Zcjs.createMarkdownMirrorResponse.call(void 0, {
2549
+ const markdownResponse = viteModuleRequest ? null : await _chunk2C5L5RPMcjs.createMarkdownMirrorResponse.call(void 0, {
2488
2550
  request: new Request(fullUrl, {
2489
2551
  method: requestMethod,
2490
2552
  headers: docsHeaders
@@ -2515,16 +2577,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2515
2577
  });
2516
2578
  return;
2517
2579
  }
2518
- if (!viteModuleRequest && _chunkLT4VAF5Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2519
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPRFNLQSPcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2580
+ if (!viteModuleRequest && _chunk2C5L5RPMcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2581
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk7XGWBPQQcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2520
2582
  if (!markdownRoute.route) {
2521
2583
  await serveBuiltInRoute(
2522
2584
  () => new Response(
2523
- _chunkLT4VAF5Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2585
+ _chunk2C5L5RPMcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2524
2586
  {
2525
2587
  status: 404,
2526
2588
  headers: {
2527
- "Content-Type": _chunkLT4VAF5Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
2589
+ "Content-Type": _chunk2C5L5RPMcjs.FARM_MARKDOWN_CONTENT_TYPE,
2528
2590
  "X-Farm-Markdown-Error": "404",
2529
2591
  "Cache-Control": "no-store"
2530
2592
  }
@@ -2534,7 +2596,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2534
2596
  return;
2535
2597
  }
2536
2598
  }
2537
- const markdownPageTarget = _chunkLT4VAF5Zcjs.resolveMarkdownMirrorTarget.call(void 0,
2599
+ const markdownPageTarget = _chunk2C5L5RPMcjs.resolveMarkdownMirrorTarget.call(void 0,
2538
2600
  farmApp.getConfig().md,
2539
2601
  requestPathname,
2540
2602
  {
@@ -2547,7 +2609,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2547
2609
  if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
2548
2610
  res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
2549
2611
  }
2550
- const alternatePath = _chunkLT4VAF5Zcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2612
+ const alternatePath = _chunk2C5L5RPMcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2551
2613
  const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
2552
2614
  const currentLink = res.getHeader("Link");
2553
2615
  res.setHeader(
@@ -2599,7 +2661,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2599
2661
  "beforeRequest",
2600
2662
  (plugin) => {
2601
2663
  const owner = _chunkI32V5CZLcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2602
- return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _199 => _199.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2664
+ return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _207 => _207.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2603
2665
  },
2604
2666
  req,
2605
2667
  res
@@ -2635,7 +2697,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2635
2697
  isProd: false
2636
2698
  },
2637
2699
  request,
2638
- { clientAddress: _optionalChain([req, 'access', _200 => _200.socket, 'optionalAccess', _201 => _201.remoteAddress]) }
2700
+ { clientAddress: _optionalChain([req, 'access', _208 => _208.socket, 'optionalAccess', _209 => _209.remoteAddress]) }
2639
2701
  );
2640
2702
  if (!result) {
2641
2703
  throw new Error(`Matched integration route did not return a response`);
@@ -2699,7 +2761,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2699
2761
  trustProxy: currentServerConfig.trustProxy
2700
2762
  }).pathname;
2701
2763
  const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
2702
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _202 => _202.isFarmDocsAPIRequest, 'call', _203 => _203(requestPathname)])
2764
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _210 => _210.isFarmDocsAPIRequest, 'call', _211 => _211(requestPathname)])
2703
2765
  );
2704
2766
  try {
2705
2767
  if (pm) {
@@ -2743,7 +2805,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2743
2805
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
2744
2806
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
2745
2807
  if (apiHandler && hasExplicitAPIRoute) {
2746
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _204 => _204.route, 'access', _205 => _205.path]) || urlPath2;
2808
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _212 => _212.route, 'access', _213 => _213.path]) || urlPath2;
2747
2809
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
2748
2810
  type: "route.matched",
2749
2811
  pathname: pathname2,
@@ -2833,7 +2895,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2833
2895
  return;
2834
2896
  }
2835
2897
  }
2836
- if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _206 => _206.isFarmDocsAPIRequest, 'call', _207 => _207(pathname2)])) {
2898
+ if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _214 => _214.isFarmDocsAPIRequest, 'call', _215 => _215(pathname2)])) {
2837
2899
  try {
2838
2900
  const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
2839
2901
  const headers = new Headers();
@@ -2871,11 +2933,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2871
2933
  };
2872
2934
  const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
2873
2935
  kind: "docs",
2874
- route: _chunkXX32BOMMcjs.setFarmRouteLabel.call(void 0,
2936
+ route: _chunkNXFA7G3Ycjs.setFarmRouteLabel.call(void 0,
2875
2937
  { pathname: pathname2, pattern: apiLifecyclePayload.routePath },
2876
- _chunkXX32BOMMcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2877
- path: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.entry]) || "/docs",
2878
- roots: _optionalChain([farmConfig, 'access', _210 => _210.docs, 'optionalAccess', _211 => _211.roots, 'optionalAccess', _212 => _212.map, 'call', _213 => _213((root) => root.entry)])
2938
+ _chunkNXFA7G3Ycjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2939
+ path: _optionalChain([farmConfig, 'access', _216 => _216.docs, 'optionalAccess', _217 => _217.entry]) || "/docs",
2940
+ roots: _optionalChain([farmConfig, 'access', _218 => _218.docs, 'optionalAccess', _219 => _219.roots, 'optionalAccess', _220 => _220.map, 'call', _221 => _221((root) => root.entry)])
2879
2941
  })
2880
2942
  )
2881
2943
  }) : await invokeDocsAPIHandler(request);
@@ -2909,18 +2971,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2909
2971
  res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
2910
2972
  return;
2911
2973
  }
2912
- if (_optionalChain([req, 'access', _214 => _214.url, 'optionalAccess', _215 => _215.startsWith, 'call', _216 => _216("/@")]) || _optionalChain([req, 'access', _217 => _217.url, 'optionalAccess', _218 => _218.startsWith, 'call', _219 => _219("/node_modules")])) {
2974
+ if (_optionalChain([req, 'access', _222 => _222.url, 'optionalAccess', _223 => _223.startsWith, 'call', _224 => _224("/@")]) || _optionalChain([req, 'access', _225 => _225.url, 'optionalAccess', _226 => _226.startsWith, 'call', _227 => _227("/node_modules")])) {
2913
2975
  return next();
2914
2976
  }
2915
2977
  if (shouldBypassFarmRouterForDottedPath(
2916
2978
  requestPathname,
2917
- _optionalChain([farmApp, 'optionalAccess', _220 => _220.getRouteManager, 'call', _221 => _221()]),
2979
+ _optionalChain([farmApp, 'optionalAccess', _228 => _228.getRouteManager, 'call', _229 => _229()]),
2918
2980
  [server.config.publicDir, server.config.root],
2919
2981
  farmAgentGeneratedPaths(farmConfig)
2920
2982
  )) {
2921
2983
  return next();
2922
2984
  }
2923
- if (_optionalChain([req, 'access', _222 => _222.url, 'optionalAccess', _223 => _223.startsWith, 'call', _224 => _224("/__farm/page-data")])) {
2985
+ if (_optionalChain([req, 'access', _230 => _230.url, 'optionalAccess', _231 => _231.startsWith, 'call', _232 => _232("/__farm/page-data")])) {
2924
2986
  const urlObj = parsedRequestUrl;
2925
2987
  const targetPath = urlObj.searchParams.get("path") || "/";
2926
2988
  try {
@@ -2948,7 +3010,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2948
3010
  });
2949
3011
  let middlewareMap = /* @__PURE__ */ new Map();
2950
3012
  let middlewareContext = /* @__PURE__ */ new Map();
2951
- if (_optionalChain([middlewareManager, 'optionalAccess', _225 => _225.hasMiddleware, 'call', _226 => _226()])) {
3013
+ if (_optionalChain([middlewareManager, 'optionalAccess', _233 => _233.hasMiddleware, 'call', _234 => _234()])) {
2952
3014
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
2953
3015
  const handled = await runFarmMiddlewareWithNavigation(
2954
3016
  farmApp.getServerRenderer(),
@@ -2976,10 +3038,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2976
3038
  if (pm) {
2977
3039
  await pm.runHookParallel("afterRouteMatch", {
2978
3040
  pathname: targetPath,
2979
- matched: !!_optionalChain([match, 'optionalAccess', _227 => _227.route]),
2980
- routePattern: _optionalChain([match, 'optionalAccess', _228 => _228.route, 'optionalAccess', _229 => _229.pattern]) || null,
2981
- params: _optionalChain([match, 'optionalAccess', _230 => _230.params]) || {},
2982
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _231 => _231.layouts]) || []).map((l) => l.pattern)
3041
+ matched: !!_optionalChain([match, 'optionalAccess', _235 => _235.route]),
3042
+ routePattern: _optionalChain([match, 'optionalAccess', _236 => _236.route, 'optionalAccess', _237 => _237.pattern]) || null,
3043
+ params: _optionalChain([match, 'optionalAccess', _238 => _238.params]) || {},
3044
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _239 => _239.layouts]) || []).map((l) => l.pattern)
2983
3045
  });
2984
3046
  }
2985
3047
  if (!match) {
@@ -3002,7 +3064,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3002
3064
  );
3003
3065
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
3004
3066
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
3005
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkGGNJAGGEcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
3067
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkFAP7CX7Ccjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
3006
3068
  const isClientComponent = moduleMetadata.isClientComponent;
3007
3069
  const shouldHydrate = moduleMetadata.shouldHydrate;
3008
3070
  let mergedMetadata = {};
@@ -3010,7 +3072,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3010
3072
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
3011
3073
  );
3012
3074
  const layoutHydrationMetadata = layouts.map(
3013
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkGGNJAGGEcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
3075
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkFAP7CX7Ccjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
3014
3076
  );
3015
3077
  const shouldHydrateLayout = layoutHydrationMetadata.some(
3016
3078
  (metadata) => metadata.shouldHydrate
@@ -3022,17 +3084,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3022
3084
  )
3023
3085
  ];
3024
3086
  const hydrationIslandStrategy = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0,
3025
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _232 => _232.getConfig, 'call', _233 => _233()]), () => ( options))), 'access', _234 => _234.experimental, 'optionalAccess', _235 => _235.serverComponents])
3026
- ) === "islands" ? _chunkGGNJAGGEcjs.resolveFarmRouteRootStrategy.call(void 0,
3087
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _240 => _240.getConfig, 'call', _241 => _241()]), () => ( options))), 'access', _242 => _242.experimental, 'optionalAccess', _243 => _243.serverComponents])
3088
+ ) === "islands" ? _chunkFAP7CX7Ccjs.resolveFarmRouteRootStrategy.call(void 0,
3027
3089
  route,
3028
3090
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
3029
3091
  layouts.map((layout, index) => ({
3030
3092
  pattern: layout.pattern,
3031
3093
  modulePath: layout.modulePath,
3032
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _236 => _236[index], 'optionalAccess', _237 => _237.shouldHydrate]) === true,
3094
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _244 => _244[index], 'optionalAccess', _245 => _245.shouldHydrate]) === true,
3033
3095
  // Manifest entries carry it; metadata read from source does not.
3034
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _238 => _238[index], 'optionalAccess', _239 => _239.hasIsolatedClientBoundaries]) === true,
3035
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _240 => _240[index], 'optionalAccess', _241 => _241.islandStrategy]), () => ( null))
3096
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _246 => _246[index], 'optionalAccess', _247 => _247.hasIsolatedClientBoundaries]) === true,
3097
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _248 => _248[index], 'optionalAccess', _249 => _249.islandStrategy]), () => ( null))
3036
3098
  })),
3037
3099
  server.config.root,
3038
3100
  true
@@ -3080,14 +3142,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3080
3142
  mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
3081
3143
  mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
3082
3144
  mergedMetadata,
3083
- _chunkLT4VAF5Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
3145
+ _chunk2C5L5RPMcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
3084
3146
  );
3085
3147
  const routeSlots = await Promise.all(
3086
3148
  slots.map(async (slot) => {
3087
3149
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
3088
3150
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
3089
3151
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
3090
- ), () => ( _chunkGGNJAGGEcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
3152
+ ), () => ( _chunkFAP7CX7Ccjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
3091
3153
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
3092
3154
  request: targetRequest,
3093
3155
  params: slot.params,
@@ -3133,15 +3195,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3133
3195
  );
3134
3196
  const projectRoot = server.config.root;
3135
3197
  const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
3136
- const renderPlan = _chunkO27PLNQZcjs.createFarmRouteRenderPlan.call(void 0, {
3198
+ const renderPlan = _chunkUJ3R2AH2cjs.createFarmRouteRenderPlan.call(void 0, {
3137
3199
  pageShouldHydrate: shouldHydrate,
3138
3200
  layoutShouldHydrate: shouldHydrateLayout,
3139
3201
  islandStrategy: hydrationIslandStrategy,
3140
3202
  rendering: _chunkX4K7TYN6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
3141
3203
  });
3142
3204
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
3143
- const layoutStartIndex = _chunkO27PLNQZcjs.getSharedLayoutPrefixLength.call(void 0,
3144
- _chunkO27PLNQZcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3205
+ const layoutStartIndex = _chunkUJ3R2AH2cjs.getSharedLayoutPrefixLength.call(void 0,
3206
+ _chunkUJ3R2AH2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3145
3207
  destinationLayoutPatterns
3146
3208
  );
3147
3209
  const renderer = farmApp.getServerRenderer();
@@ -3151,7 +3213,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3151
3213
  middlewareContext,
3152
3214
  () => renderer.renderNavigationFragment({
3153
3215
  PageComponent: routeModule.default,
3154
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _242 => _242.default]),
3216
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _250 => _250.default]),
3155
3217
  pageProps: routeProps,
3156
3218
  params,
3157
3219
  layouts: layouts.map((layout, index) => ({
@@ -3222,7 +3284,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3222
3284
  {
3223
3285
  status: 200,
3224
3286
  headers: {
3225
- "Cache-Control": _chunkO27PLNQZcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3287
+ "Cache-Control": _chunkUJ3R2AH2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3226
3288
  "X-Farm-Navigation": "html-fragment",
3227
3289
  Vary: "X-Farm-Layout-Chain",
3228
3290
  [_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -3259,21 +3321,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3259
3321
  trustProxy: currentServerConfig.trustProxy
3260
3322
  }).pathname;
3261
3323
  const routeManager2 = farmApp.getRouteManager();
3262
- const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _243 => _243.hasHook, 'call', _244 => _244("beforeRouteMatch")]), () => ( false));
3263
- const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _245 => _245.hasHook, 'call', _246 => _246("afterRouteMatch")]), () => ( false));
3264
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _247 => _247.hasHook, 'call', _248 => _248("beforeRequest")]), () => ( false));
3265
- const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _249 => _249.hasHook, 'call', _250 => _250("beforeRender")]), () => ( false));
3266
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _251 => _251.hasHook, 'call', _252 => _252("afterResponse")]), () => ( false));
3267
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _253 => _253.hasHook, 'call', _254 => _254("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _255 => _255.hasHook, 'call', _256 => _256("afterRender")]), () => ( false)));
3268
- const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _257 => _257.hasRuntimeRequestHooks, 'call', _258 => _258()]), () => ( false));
3269
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _259 => _259.hasRuntimeHook, 'call', _260 => _260("after")]), () => ( false));
3324
+ const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _251 => _251.hasHook, 'call', _252 => _252("beforeRouteMatch")]), () => ( false));
3325
+ const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _253 => _253.hasHook, 'call', _254 => _254("afterRouteMatch")]), () => ( false));
3326
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _255 => _255.hasHook, 'call', _256 => _256("beforeRequest")]), () => ( false));
3327
+ const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _257 => _257.hasHook, 'call', _258 => _258("beforeRender")]), () => ( false));
3328
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _259 => _259.hasHook, 'call', _260 => _260("afterResponse")]), () => ( false));
3329
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _261 => _261.hasHook, 'call', _262 => _262("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _263 => _263.hasHook, 'call', _264 => _264("afterRender")]), () => ( false)));
3330
+ const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _265 => _265.hasRuntimeRequestHooks, 'call', _266 => _266()]), () => ( false));
3331
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _267 => _267.hasRuntimeHook, 'call', _268 => _268("after")]), () => ( false));
3270
3332
  const requestedMatch = routeManager2.matchRoute(requestedPathname);
3271
3333
  const pageBuiltInRouteLabel = (pathname2) => {
3272
3334
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
3273
- const mcpLabel = _chunkXX32BOMMcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3335
+ const mcpLabel = _chunkNXFA7G3Ycjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3274
3336
  if (mcpLabel) return mcpLabel;
3275
3337
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
3276
- return routePathname === _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH : null;
3338
+ return routePathname === _chunkY5TOT5F6cjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkY5TOT5F6cjs.FARM_DEFAULT_MCP_PATH : null;
3277
3339
  };
3278
3340
  let runtimeSession;
3279
3341
  if (pm && hasRuntimeRequestHooks) {
@@ -3282,13 +3344,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3282
3344
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3283
3345
  {
3284
3346
  kind: "page",
3285
- route: _chunkXX32BOMMcjs.setFarmRouteLabel.call(void 0,
3347
+ route: _chunkNXFA7G3Ycjs.setFarmRouteLabel.call(void 0,
3286
3348
  {
3287
3349
  pathname: requestedPathname,
3288
- pattern: _optionalChain([requestedMatch, 'optionalAccess', _261 => _261.route, 'optionalAccess', _262 => _262.pattern]) || null,
3289
- params: _optionalChain([requestedMatch, 'optionalAccess', _263 => _263.params]) || {}
3350
+ pattern: _optionalChain([requestedMatch, 'optionalAccess', _269 => _269.route, 'optionalAccess', _270 => _270.pattern]) || null,
3351
+ params: _optionalChain([requestedMatch, 'optionalAccess', _271 => _271.params]) || {}
3290
3352
  },
3291
- _optionalChain([requestedMatch, 'optionalAccess', _264 => _264.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3353
+ _optionalChain([requestedMatch, 'optionalAccess', _272 => _272.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3292
3354
  )
3293
3355
  }
3294
3356
  );
@@ -3321,17 +3383,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3321
3383
  if (pm && hasAfterRouteMatchHook) {
3322
3384
  await pm.runHookParallel("afterRouteMatch", {
3323
3385
  pathname,
3324
- matched: !!_optionalChain([routeMatch, 'optionalAccess', _265 => _265.route]),
3325
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _266 => _266.route, 'optionalAccess', _267 => _267.pattern]) || null,
3326
- params: _optionalChain([routeMatch, 'optionalAccess', _268 => _268.params]) || {},
3327
- layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _269 => _269.layouts]) || []).map((l) => l.pattern)
3386
+ matched: !!_optionalChain([routeMatch, 'optionalAccess', _273 => _273.route]),
3387
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _274 => _274.route, 'optionalAccess', _275 => _275.pattern]) || null,
3388
+ params: _optionalChain([routeMatch, 'optionalAccess', _276 => _276.params]) || {},
3389
+ layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _277 => _277.layouts]) || []).map((l) => l.pattern)
3328
3390
  });
3329
3391
  }
3330
3392
  const renderPayload = {
3331
3393
  pathname,
3332
3394
  method,
3333
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _270 => _270.route, 'optionalAccess', _271 => _271.pattern]) || null,
3334
- params: _optionalChain([routeMatch, 'optionalAccess', _272 => _272.params]) || {}
3395
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _278 => _278.route, 'optionalAccess', _279 => _279.pattern]) || null,
3396
+ params: _optionalChain([routeMatch, 'optionalAccess', _280 => _280.params]) || {}
3335
3397
  };
3336
3398
  const shouldInterceptResponse = Boolean(
3337
3399
  pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
@@ -3353,7 +3415,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3353
3415
  emitError: (error) => emitPluginError("response-end", error, { pathname })
3354
3416
  }) : void 0;
3355
3417
  try {
3356
- if (_optionalChain([middlewareManager, 'optionalAccess', _273 => _273.hasMiddleware, 'call', _274 => _274()])) {
3418
+ if (_optionalChain([middlewareManager, 'optionalAccess', _281 => _281.hasMiddleware, 'call', _282 => _282()])) {
3357
3419
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3358
3420
  const handled = await runFarmMiddlewareWithNavigation(
3359
3421
  farmApp.getServerRenderer(),
@@ -3363,7 +3425,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3363
3425
  () => middlewareManager.execute(req, res)
3364
3426
  );
3365
3427
  if (handled) {
3366
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _275 => _275.isEnded, 'call', _276 => _276()])) {
3428
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _283 => _283.isEnded, 'call', _284 => _284()])) {
3367
3429
  const duration = Date.now() - startTime;
3368
3430
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3369
3431
  }
@@ -3376,14 +3438,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3376
3438
  req.url || "/",
3377
3439
  `http://${req.headers.host || "localhost:3000"}`
3378
3440
  ).pathname;
3379
- const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _277 => _277.matchRoute, 'call', _278 => _278(currentPathname), 'optionalAccess', _279 => _279.route]));
3441
+ const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _285 => _285.matchRoute, 'call', _286 => _286(currentPathname), 'optionalAccess', _287 => _287.route]));
3380
3442
  await pm.runHookParallelFiltered(
3381
3443
  "beforeRequest",
3382
3444
  (plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
3383
3445
  req,
3384
3446
  res
3385
3447
  );
3386
- if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _280 => _280.url, 'optionalAccess', _281 => _281.startsWith, 'call', _282 => _282("/")]) && !res.writableEnded) {
3448
+ if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/")]) && !res.writableEnded) {
3387
3449
  const destinationUrl = new URL(req.url, fullUrl);
3388
3450
  const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
3389
3451
  const guarded = await pm.runRuntimeBeforeForRewrite(
@@ -3393,8 +3455,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3393
3455
  kind: "page",
3394
3456
  route: {
3395
3457
  pathname: destinationUrl.pathname,
3396
- pattern: _optionalChain([destinationMatch, 'optionalAccess', _283 => _283.route, 'optionalAccess', _284 => _284.pattern]) || null,
3397
- params: _optionalChain([destinationMatch, 'optionalAccess', _285 => _285.params]) || {}
3458
+ pattern: _optionalChain([destinationMatch, 'optionalAccess', _291 => _291.route, 'optionalAccess', _292 => _292.pattern]) || null,
3459
+ params: _optionalChain([destinationMatch, 'optionalAccess', _293 => _293.params]) || {}
3398
3460
  }
3399
3461
  }
3400
3462
  );
@@ -3406,8 +3468,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3406
3468
  }
3407
3469
  }
3408
3470
  }
3409
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _286 => _286.isEnded, 'call', _287 => _287()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3410
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _288 => _288.isEnded, 'call', _289 => _289()])) {
3471
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _294 => _294.isEnded, 'call', _295 => _295()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3472
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _296 => _296.isEnded, 'call', _297 => _297()])) {
3411
3473
  const duration = Date.now() - startTime;
3412
3474
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3413
3475
  }
@@ -3471,8 +3533,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3471
3533
  if (imageModule) return imageModule;
3472
3534
  }
3473
3535
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3474
- const renderer = _optionalChain([farmApp, 'optionalAccess', _290 => _290.getConfig, 'call', _291 => _291(), 'access', _292 => _292.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3475
- const root = _optionalChain([server, 'optionalAccess', _293 => _293.config, 'access', _294 => _294.root]) || options.root;
3536
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _298 => _298.getConfig, 'call', _299 => _299(), 'access', _300 => _300.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3537
+ const root = _optionalChain([server, 'optionalAccess', _301 => _301.config, 'access', _302 => _302.root]) || options.root;
3476
3538
  if (isClientEnvironment(this, loadOptions)) {
3477
3539
  return generateProgrammaticClientRouteModuleForId(
3478
3540
  id,
@@ -3488,21 +3550,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3488
3550
  return FARM_DEV_CLIENT_BOOT_MODULE;
3489
3551
  }
3490
3552
  if (isFarmClientVirtualId(id)) {
3491
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _295 => _295.getConfig, 'call', _296 => _296()]);
3492
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _297 => _297.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3493
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _298 => _298.integrations]) || options.integrations;
3494
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _299 => _299.root]) || _optionalChain([server, 'optionalAccess', _300 => _300.config, 'access', _301 => _301.root]) || process.cwd();
3495
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _302 => _302.docs]);
3553
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]);
3554
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3555
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _306 => _306.integrations]) || options.integrations;
3556
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _307 => _307.root]) || _optionalChain([server, 'optionalAccess', _308 => _308.config, 'access', _309 => _309.root]) || process.cwd();
3557
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _310 => _310.docs]);
3496
3558
  const adapterOwnsDocsRuntime = Boolean(
3497
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _303 => _303.adapter, 'optionalAccess', _304 => _304.server]) && docs.adapter.react
3559
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _311 => _311.adapter, 'optionalAccess', _312 => _312.server]) && docs.adapter.react
3498
3560
  );
3499
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3561
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _313 => _313.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3500
3562
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
3501
- _optionalChain([docs, 'optionalAccess', _306 => _306.enabled]) ? loadFarmDocsDevRuntime() : null,
3502
- _optionalChain([docs, 'optionalAccess', _307 => _307.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3563
+ _optionalChain([docs, 'optionalAccess', _314 => _314.enabled]) ? loadFarmDocsDevRuntime() : null,
3564
+ _optionalChain([docs, 'optionalAccess', _315 => _315.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3503
3565
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
3504
3566
  ]);
3505
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _308 => _308.isFarmDocsSearchEnabled, 'call', _309 => _309(docs)]), () => ( false));
3567
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _316 => _316.isFarmDocsSearchEnabled, 'call', _317 => _317(docs)]), () => ( false));
3506
3568
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
3507
3569
  docsSearchEnabled,
3508
3570
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -3510,10 +3572,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3510
3572
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
3511
3573
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
3512
3574
  const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkI32V5CZLcjs.getIntegrationProviders.call(void 0, integrations) : [];
3513
- const isolatedHydrationMode = _chunkGGNJAGGEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3514
- _optionalChain([resolvedConfig, 'optionalAccess', _310 => _310.experimental, 'optionalAccess', _311 => _311.isolatedClientHydration]),
3575
+ const isolatedHydrationMode = _chunkFAP7CX7Ccjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3576
+ _optionalChain([resolvedConfig, 'optionalAccess', _318 => _318.experimental, 'optionalAccess', _319 => _319.isolatedClientHydration]),
3515
3577
  {
3516
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _312 => _312.experimental, 'optionalAccess', _313 => _313.serverComponents])) === "rsc",
3578
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])) === "rsc",
3517
3579
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
3518
3580
  }
3519
3581
  );
@@ -3521,32 +3583,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3521
3583
  integrationProviders,
3522
3584
  [
3523
3585
  ..._chunkI32V5CZLcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3524
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _314 => _314.getFarmDocsDocumentNavigationMatchers, 'call', _315 => _315(docs)]), () => ( []))
3586
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _322 => _322.getFarmDocsDocumentNavigationMatchers, 'call', _323 => _323(docs)]), () => ( []))
3525
3587
  ],
3526
3588
  generatedDocsSearchRuntime,
3527
3589
  `${generatedDevtoolsClientRuntime}
3528
3590
  ${generatedDevIndicatorsClientRuntime}`,
3529
- _optionalChain([resolvedConfig, 'optionalAccess', _316 => _316.plugins]) || [],
3591
+ _optionalChain([resolvedConfig, 'optionalAccess', _324 => _324.plugins]) || [],
3530
3592
  root,
3531
- _optionalChain([resolvedConfig, 'optionalAccess', _317 => _317.srcDir]) || options.srcDir || "src",
3532
- _optionalChain([resolvedConfig, 'optionalAccess', _318 => _318.publicRuntimeConfig]) || options.publicRuntimeConfig,
3533
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _319 => _319.adapter, 'optionalAccess', _320 => _320.react]) : void 0,
3593
+ _optionalChain([resolvedConfig, 'optionalAccess', _325 => _325.srcDir]) || options.srcDir || "src",
3594
+ _optionalChain([resolvedConfig, 'optionalAccess', _326 => _326.publicRuntimeConfig]) || options.publicRuntimeConfig,
3595
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _327 => _327.adapter, 'optionalAccess', _328 => _328.react]) : void 0,
3534
3596
  renderer,
3535
- isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _321 => _321.getRouteManager, 'call', _322 => _322(), 'access', _323 => _323.getIsolatedClientBoundaryModules, 'call', _324 => _324(root)])))), 'optionalAccess', _325 => _325.size]) > 0,
3536
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _326 => _326.trailingSlash]), () => ( false)),
3537
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _327 => _327.basePath]), () => ( "/")),
3538
- _chunkGGNJAGGEcjs.generateClientCachePersistenceCode.call(void 0,
3539
- _chunkGGNJAGGEcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _328 => _328.cache]))
3597
+ isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _329 => _329.getRouteManager, 'call', _330 => _330(), 'access', _331 => _331.getIsolatedClientBoundaryModules, 'call', _332 => _332(root)])))), 'optionalAccess', _333 => _333.size]) > 0,
3598
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _334 => _334.trailingSlash]), () => ( false)),
3599
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _335 => _335.basePath]), () => ( "/")),
3600
+ _chunkFAP7CX7Ccjs.generateClientCachePersistenceCode.call(void 0,
3601
+ _chunkFAP7CX7Ccjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _336 => _336.cache]))
3540
3602
  ),
3541
3603
  _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
3542
- _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _329 => _329.experimental, 'optionalAccess', _330 => _330.serverComponents])) === "islands"
3604
+ _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _337 => _337.experimental, 'optionalAccess', _338 => _338.serverComponents])) === "islands"
3543
3605
  );
3544
3606
  }
3545
3607
  if (id === "/@farm/server") {
3546
3608
  return generateServerCode();
3547
3609
  }
3548
3610
  if (id === "/@farm/manifest") {
3549
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _331 => _331.getRouteManager, 'call', _332 => _332()]);
3611
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _339 => _339.getRouteManager, 'call', _340 => _340()]);
3550
3612
  if (!routeManager) {
3551
3613
  return `
3552
3614
  export const getManifest = () => ({
@@ -3559,9 +3621,9 @@ export const getManifest = () => ({
3559
3621
  `;
3560
3622
  }
3561
3623
  const manifest = routeManager.generateClientManifest(server.config.root);
3562
- const globalStylesheetHref = _chunkGGNJAGGEcjs.resolveDevGlobalStylesheetHref.call(void 0,
3624
+ const globalStylesheetHref = _chunkFAP7CX7Ccjs.resolveDevGlobalStylesheetHref.call(void 0,
3563
3625
  server.config.root,
3564
- _optionalChain([farmApp, 'optionalAccess', _333 => _333.getConfig, 'call', _334 => _334(), 'access', _335 => _335.srcDir])
3626
+ _optionalChain([farmApp, 'optionalAccess', _341 => _341.getConfig, 'call', _342 => _342(), 'access', _343 => _343.srcDir])
3565
3627
  );
3566
3628
  const fullManifest = {
3567
3629
  clientEntry: "/@farm/client.js",
@@ -3587,11 +3649,11 @@ export const getManifest = () => ({
3587
3649
  };
3588
3650
  }
3589
3651
  for (const layout of manifest.layouts) {
3590
- const groupScope = _chunkO27PLNQZcjs.getRouteGroupScope.call(void 0, layout.pattern);
3652
+ const groupScope = _chunkUJ3R2AH2cjs.getRouteGroupScope.call(void 0, layout.pattern);
3591
3653
  fullManifest.layouts[layout.pattern] = {
3592
3654
  modulePath: layout.modulePath,
3593
3655
  pattern: layout.pattern,
3594
- ...groupScope ? { urlPattern: _chunkO27PLNQZcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3656
+ ...groupScope ? { urlPattern: _chunkUJ3R2AH2cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3595
3657
  shouldHydrate: layout.shouldHydrate,
3596
3658
  islandStrategy: layout.islandStrategy,
3597
3659
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -3617,22 +3679,42 @@ export const manifest = getManifest();
3617
3679
  }
3618
3680
  },
3619
3681
  async transform(code, id, transformOptions) {
3620
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _336 => _336.getConfig, 'call', _337 => _337()]), () => ( options));
3682
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _344 => _344.getConfig, 'call', _345 => _345()]), () => ( options));
3621
3683
  let rewrotePackageImports = false;
3622
- if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _338 => _338.experimental, 'optionalAccess', _339 => _339.serverComponents])) === "islands" && !id.includes("/node_modules/") && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkGGNJAGGEcjs.hasUseClientDirective.call(void 0, code)) {
3684
+ if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _346 => _346.experimental, 'optionalAccess', _347 => _347.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _348 => _348.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkFAP7CX7Ccjs.hasUseClientDirective.call(void 0, code)) {
3623
3685
  const file = id.split("?", 1)[0];
3624
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _340 => _340.config, 'access', _341 => _341.root]) || process.cwd();
3625
- const referenced = _chunkGGNJAGGEcjs.rewriteFarmPackageClientImports.call(void 0, {
3686
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || process.cwd();
3687
+ if (_optionalChain([transformOptions, 'optionalAccess', _351 => _351.ssr]) === true) {
3688
+ if (farmReactServerFiles.has(file)) {
3689
+ for (const child of _chunkFAP7CX7Ccjs.farmRelativeImportFiles.call(void 0, code, file))
3690
+ farmReactServerFiles.add(child);
3691
+ }
3692
+ const serverModule = farmReactServerFiles.has(file) || !_chunkFAP7CX7Ccjs.getFarmClientReachableModules.call(void 0,
3693
+ path6.resolve(projectRoot, actionConfig.srcDir || "src"),
3694
+ projectRoot
3695
+ ).has(path6.resolve(file));
3696
+ const reactServer = !serverModule ? null : _chunkFAP7CX7Ccjs.rewriteFarmReactServerImports.call(void 0, {
3697
+ code,
3698
+ file,
3699
+ reference: (specifier, exportName) => _chunkFAP7CX7Ccjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName),
3700
+ onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
3701
+ });
3702
+ if (reactServer !== null) {
3703
+ code = reactServer;
3704
+ rewrotePackageImports = true;
3705
+ }
3706
+ }
3707
+ const referenced = _chunkFAP7CX7Ccjs.rewriteFarmPackageClientImports.call(void 0, {
3626
3708
  code,
3627
3709
  file,
3628
3710
  root: projectRoot,
3629
- isClientPackage: (specifier) => _chunkGGNJAGGEcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
3711
+ isClientPackage: (specifier) => _chunkFAP7CX7Ccjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
3630
3712
  });
3631
3713
  if (referenced !== null) {
3632
3714
  code = referenced;
3633
3715
  rewrotePackageImports = true;
3634
3716
  }
3635
- if (_optionalChain([transformOptions, 'optionalAccess', _342 => _342.ssr]) === true) {
3717
+ if (_optionalChain([transformOptions, 'optionalAccess', _352 => _352.ssr]) === true) {
3636
3718
  const cached = rewriteFarmReactCacheImport(code, file);
3637
3719
  if (cached !== null) {
3638
3720
  code = cached;
@@ -3642,43 +3724,43 @@ export const manifest = getManifest();
3642
3724
  }
3643
3725
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3644
3726
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
3645
- environment: _optionalChain([transformOptions, 'optionalAccess', _343 => _343.ssr]) === true ? "rsc" : "client"
3727
+ environment: _optionalChain([transformOptions, 'optionalAccess', _353 => _353.ssr]) === true ? "rsc" : "client"
3646
3728
  });
3647
3729
  if (serverFns) {
3648
3730
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
3649
3731
  code = serverFns.code;
3650
3732
  }
3651
3733
  }
3652
- if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _344 => _344.experimental, 'optionalAccess', _345 => _345.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3734
+ if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _354 => _354.experimental, 'optionalAccess', _355 => _355.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3653
3735
  const file = id.split("?", 1)[0];
3654
3736
  const actionModule = transformFarmFormActionModule({
3655
3737
  code,
3656
3738
  id,
3657
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _346 => _346.config, 'access', _347 => _347.root]) || process.cwd(),
3658
- ssr: _optionalChain([transformOptions, 'optionalAccess', _348 => _348.ssr]) === true,
3739
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _356 => _356.config, 'access', _357 => _357.root]) || process.cwd(),
3740
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _358 => _358.ssr]) === true,
3659
3741
  // Parsed by file type: page components are TSX.
3660
3742
  parse: (source) => _vite.parseSync.call(void 0, file, source).program
3661
3743
  });
3662
3744
  if (actionModule) return { code: actionModule, map: null };
3663
3745
  }
3664
- if (!_optionalChain([transformOptions, 'optionalAccess', _349 => _349.ssr])) {
3665
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _350 => _350.getConfig, 'call', _351 => _351(), 'optionalAccess', _352 => _352.docs]));
3666
- if (_chunkGGNJAGGEcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3667
- const redacted = _chunkGGNJAGGEcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3746
+ if (!_optionalChain([transformOptions, 'optionalAccess', _359 => _359.ssr])) {
3747
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _360 => _360.getConfig, 'call', _361 => _361(), 'optionalAccess', _362 => _362.docs]));
3748
+ if (_chunkFAP7CX7Ccjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3749
+ const redacted = _chunkFAP7CX7Ccjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3668
3750
  if (redacted !== null) return { code: redacted, map: null };
3669
3751
  }
3670
3752
  }
3671
- if (!_optionalChain([transformOptions, 'optionalAccess', _353 => _353.ssr])) {
3672
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _354 => _354.getConfig, 'call', _355 => _355()]), () => ( options));
3673
- if ((_optionalChain([currentConfig, 'access', _356 => _356.experimental, 'optionalAccess', _357 => _357.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3753
+ if (!_optionalChain([transformOptions, 'optionalAccess', _363 => _363.ssr])) {
3754
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _364 => _364.getConfig, 'call', _365 => _365()]), () => ( options));
3755
+ if ((_optionalChain([currentConfig, 'access', _366 => _366.experimental, 'optionalAccess', _367 => _367.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3674
3756
  const violation = findClientServerFnViolation(code, id);
3675
3757
  if (violation) {
3676
3758
  this.error(formatServerFnBoundaryError(violation, id));
3677
3759
  }
3678
3760
  }
3679
3761
  }
3680
- if (!_optionalChain([transformOptions, 'optionalAccess', _358 => _358.ssr]) && shouldInspectClientBoundary(id, code)) {
3681
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _359 => _359.getConfig, 'call', _360 => _360()]), () => ( options)));
3762
+ if (!_optionalChain([transformOptions, 'optionalAccess', _368 => _368.ssr]) && shouldInspectClientBoundary(id, code)) {
3763
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _369 => _369.getConfig, 'call', _370 => _370()]), () => ( options)));
3682
3764
  }
3683
3765
  if (typeof imageImports.transform === "function") {
3684
3766
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -3693,13 +3775,13 @@ export const manifest = getManifest();
3693
3775
  id,
3694
3776
  transformOptions
3695
3777
  );
3696
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _361 => _361.code, 'optionalAccess', _362 => _362.toString, 'call', _363 => _363()]);
3778
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _371 => _371.code, 'optionalAccess', _372 => _372.toString, 'call', _373 => _373()]);
3697
3779
  if (fontCode) {
3698
3780
  transformedCode = fontCode;
3699
3781
  transformed = true;
3700
3782
  }
3701
3783
  }
3702
- if (_optionalChain([transformOptions, 'optionalAccess', _364 => _364.ssr]) && server) {
3784
+ if (_optionalChain([transformOptions, 'optionalAccess', _374 => _374.ssr]) && server) {
3703
3785
  const rewrittenImports = rewriteEarlySsrRelativeImports({
3704
3786
  code: transformedCode,
3705
3787
  id,
@@ -3711,25 +3793,25 @@ export const manifest = getManifest();
3711
3793
  transformed = true;
3712
3794
  }
3713
3795
  }
3714
- if (_chunkGGNJAGGEcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3796
+ if (_chunkFAP7CX7Ccjs.hasUseClientDirective.call(void 0, transformedCode)) {
3715
3797
  const clientBoundarySource = transformedCode;
3716
3798
  const moduleInfo = this.getModuleInfo(id);
3717
3799
  if (moduleInfo) {
3718
3800
  moduleInfo.isClientComponent = true;
3719
3801
  }
3720
- transformedCode = _chunkGGNJAGGEcjs.stripUseClientDirective.call(void 0, transformedCode);
3802
+ transformedCode = _chunkFAP7CX7Ccjs.stripUseClientDirective.call(void 0, transformedCode);
3721
3803
  transformed = true;
3722
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _365 => _365.getConfig, 'call', _366 => _366()]), () => ( options));
3804
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _375 => _375.getConfig, 'call', _376 => _376()]), () => ( options));
3723
3805
  let isolatedModuleReference = null;
3724
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _367 => _367.config, 'access', _368 => _368.root]) || process.cwd();
3806
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
3725
3807
  const cleanId = id.split("?", 1)[0];
3726
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _369 => _369.getRouteManager, 'call', _370 => _370(), 'access', _371 => _371.getIsolatedClientBoundaryModules, 'call', _372 => _372(root)])));
3727
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _373 => _373.has, 'call', _374 => _374(path6.resolve(cleanId))]) === true;
3728
- if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkGGNJAGGEcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3808
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _379 => _379.getRouteManager, 'call', _380 => _380(), 'access', _381 => _381.getIsolatedClientBoundaryModules, 'call', _382 => _382(root)])));
3809
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _383 => _383.has, 'call', _384 => _384(path6.resolve(cleanId))]) === true;
3810
+ if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkFAP7CX7Ccjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3729
3811
  isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
3730
- const islandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _375 => _375.experimental, 'optionalAccess', _376 => _376.serverComponents])) === "islands";
3731
- const explicitStrategy = _chunkGGNJAGGEcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
3732
- const inference = islandsMode && explicitStrategy === null ? _chunkGGNJAGGEcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
3812
+ const islandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _385 => _385.experimental, 'optionalAccess', _386 => _386.serverComponents])) === "islands";
3813
+ const explicitStrategy = _chunkFAP7CX7Ccjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
3814
+ const inference = islandsMode && explicitStrategy === null ? _chunkFAP7CX7Ccjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
3733
3815
  if (inference) {
3734
3816
  for (const file of inference.files) {
3735
3817
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -3742,7 +3824,7 @@ export const manifest = getManifest();
3742
3824
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
3743
3825
  parse: (source) => this.parse(source),
3744
3826
  slots: islandsMode,
3745
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _377 => _377.strategy]) === "interaction"
3827
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _387 => _387.strategy]) === "interaction"
3746
3828
  });
3747
3829
  if (!transformedBoundary) {
3748
3830
  this.error(
@@ -3772,7 +3854,7 @@ export const manifest = getManifest();
3772
3854
  );
3773
3855
  return;
3774
3856
  }` : "";
3775
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _378 => _378.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3857
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _388 => _388.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3776
3858
  if (import.meta.hot) {
3777
3859
  import.meta.hot.accept((newModule) => {
3778
3860
  ${isolatedHmrUpdate}
@@ -3827,14 +3909,14 @@ if (import.meta.hot) {
3827
3909
  }
3828
3910
  _chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3829
3911
  _chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
3830
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _379 => _379.config, 'access', _380 => _380.root]) || process.cwd(), options.outDir || "dist");
3912
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _389 => _389.config, 'access', _390 => _390.root]) || process.cwd(), options.outDir || "dist");
3831
3913
  const clientDir = path6.join(outDir, "client");
3832
3914
  for (const page of ssgPages) {
3833
3915
  try {
3834
3916
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
3835
3917
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
3836
3918
  const mod = await routeManager.loadRouteModule(page.filePath);
3837
- if (!_optionalChain([mod, 'optionalAccess', _381 => _381.default])) return;
3919
+ if (!_optionalChain([mod, 'optionalAccess', _391 => _391.default])) return;
3838
3920
  const { layouts } = routeManager.matchRoute(page.urlPath);
3839
3921
  const layoutModules = await Promise.all(
3840
3922
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -3866,7 +3948,7 @@ if (import.meta.hot) {
3866
3948
  const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
3867
3949
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
3868
3950
  const fullHtml = `<!DOCTYPE html>
3869
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _382 => _382.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3951
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _392 => _392.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3870
3952
  <head>
3871
3953
  <meta charset="utf-8">
3872
3954
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -3908,6 +3990,9 @@ if (import.meta.hot) {
3908
3990
  _chunkQMNWKQL4cjs.logger.error(`SSG build failed: ${error}`);
3909
3991
  }
3910
3992
  },
3993
+ watchChange() {
3994
+ _chunkFAP7CX7Ccjs.invalidateFarmClientReachableModules.call(void 0, );
3995
+ },
3911
3996
  async handleHotUpdate(ctx) {
3912
3997
  const { file, server: server2, modules } = ctx;
3913
3998
  if (initialPluginManager) {
@@ -3930,13 +4015,13 @@ if (import.meta.hot) {
3930
4015
  server2.moduleGraph.invalidateModule(mod);
3931
4016
  }
3932
4017
  }
3933
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _383 => _383.getConfig, 'call', _384 => _384()]);
4018
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getConfig, 'call', _394 => _394()]);
3934
4019
  const normalizedFile = file.replace(/\\/g, "/");
3935
4020
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
3936
4021
  (appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
3937
4022
  )) {
3938
4023
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3939
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _385 => _385(`updated ${file}`)]);
4024
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _395 => _395(`updated ${file}`)]);
3940
4025
  server2.ws.send({ type: "full-reload", path: "*" });
3941
4026
  return [];
3942
4027
  }
@@ -3946,7 +4031,7 @@ if (import.meta.hot) {
3946
4031
  for (const mod of modules) {
3947
4032
  server2.moduleGraph.invalidateModule(mod);
3948
4033
  }
3949
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _386 => _386(`updated ${file}`)]);
4034
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _396 => _396(`updated ${file}`)]);
3950
4035
  server2.ws.send({
3951
4036
  type: "full-reload",
3952
4037
  path: "*"
@@ -3959,7 +4044,7 @@ if (import.meta.hot) {
3959
4044
  for (const mod of modules) {
3960
4045
  server2.moduleGraph.invalidateModule(mod);
3961
4046
  }
3962
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _387 => _387(`updated ${file}`)]);
4047
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _397 => _397(`updated ${file}`)]);
3963
4048
  server2.ws.send({
3964
4049
  type: "full-reload",
3965
4050
  path: "*"
@@ -3967,12 +4052,12 @@ if (import.meta.hot) {
3967
4052
  return [];
3968
4053
  }
3969
4054
  if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
3970
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _388 => _388(`updated ${file}`)]);
4055
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _398 => _398(`updated ${file}`)]);
3971
4056
  }
3972
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.isolatedClientHydration]);
3973
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _391 => _391.getRouteManager, 'call', _392 => _392()]);
4057
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _399 => _399.experimental, 'optionalAccess', _400 => _400.isolatedClientHydration]);
4058
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _401 => _401.getRouteManager, 'call', _402 => _402()]);
3974
4059
  const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
3975
- const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _393 => _393.renderer])) && planRouteManager !== void 0;
4060
+ const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _403 => _403.renderer])) && planRouteManager !== void 0;
3976
4061
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
3977
4062
  const routeManager = planRouteManager;
3978
4063
  if (routeManager) {
@@ -4032,7 +4117,7 @@ if (import.meta.hot) {
4032
4117
  }
4033
4118
  return [];
4034
4119
  }
4035
- _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395(), 'access', _396 => _396.invalidateClientManifest, 'call', _397 => _397()]);
4120
+ _optionalChain([farmApp, 'optionalAccess', _404 => _404.getRouteManager, 'call', _405 => _405(), 'access', _406 => _406.invalidateClientManifest, 'call', _407 => _407()]);
4036
4121
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
4037
4122
  if (manifestModule) {
4038
4123
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -4097,12 +4182,12 @@ function isFarmClientVirtualId(id) {
4097
4182
  }
4098
4183
  function isClientEnvironment(context, loadOptions) {
4099
4184
  const environment = context.environment;
4100
- if (_optionalChain([environment, 'optionalAccess', _398 => _398.config, 'optionalAccess', _399 => _399.consumer])) return environment.config.consumer === "client";
4101
- if (_optionalChain([environment, 'optionalAccess', _400 => _400.name])) return environment.name === "client";
4102
- return _optionalChain([loadOptions, 'optionalAccess', _401 => _401.ssr]) !== true;
4185
+ if (_optionalChain([environment, 'optionalAccess', _408 => _408.config, 'optionalAccess', _409 => _409.consumer])) return environment.config.consumer === "client";
4186
+ if (_optionalChain([environment, 'optionalAccess', _410 => _410.name])) return environment.name === "client";
4187
+ return _optionalChain([loadOptions, 'optionalAccess', _411 => _411.ssr]) !== true;
4103
4188
  }
4104
4189
  function invalidateProgrammaticClientRouteModules(server) {
4105
- const graph = _optionalChain([server, 'access', _402 => _402.environments, 'optionalAccess', _403 => _403.client, 'optionalAccess', _404 => _404.moduleGraph]);
4190
+ const graph = _optionalChain([server, 'access', _412 => _412.environments, 'optionalAccess', _413 => _413.client, 'optionalAccess', _414 => _414.moduleGraph]);
4106
4191
  if (!graph) return;
4107
4192
  for (const [id, module] of graph.idToModuleMap) {
4108
4193
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -4116,7 +4201,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
4116
4201
  kind: parsed.kind,
4117
4202
  routePath: parsed.routePath,
4118
4203
  routesFile,
4119
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _405 => _405.routes, 'access', _406 => _406.get, 'call', _407 => _407(
4204
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _415 => _415.routes, 'access', _416 => _416.get, 'call', _417 => _417(
4120
4205
  _chunkNK2VWS7Pcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
4121
4206
  )]),
4122
4207
  rendererServer: renderer.server,
@@ -4124,7 +4209,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
4124
4209
  });
4125
4210
  }
4126
4211
  function resolveRealModuleFile(filePath, root) {
4127
- const resolved = _nullishCoalesce(_chunkGGNJAGGEcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
4212
+ const resolved = _nullishCoalesce(_chunkFAP7CX7Ccjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
4128
4213
  try {
4129
4214
  return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
4130
4215
  } catch (e17) {
@@ -4438,12 +4523,12 @@ async function parseRouteModuleProps(routeModule, input) {
4438
4523
  }
4439
4524
  const schemas = routeModule.__farmRouteSchemas;
4440
4525
  const params = parseRouteModuleSchema(
4441
- _optionalChain([schemas, 'optionalAccess', _408 => _408.params]),
4526
+ _optionalChain([schemas, 'optionalAccess', _418 => _418.params]),
4442
4527
  input.props.params,
4443
4528
  "params",
4444
4529
  input.routePath
4445
4530
  );
4446
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _409 => _409.search]), input.search, "search", input.routePath);
4531
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _419 => _419.search]), input.search, "search", input.routePath);
4447
4532
  return {
4448
4533
  ...input.props,
4449
4534
  params,
@@ -4463,12 +4548,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
4463
4548
  }
4464
4549
  }
4465
4550
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
4466
- const providerClientCode = _chunkGGNJAGGEcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4551
+ const providerClientCode = _chunkFAP7CX7Ccjs.generateFarmIntegrationProviderClientCode.call(void 0,
4467
4552
  integrationProviders,
4468
4553
  root,
4469
4554
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
4470
4555
  );
4471
- const clientPluginEntry = _chunkGGNJAGGEcjs.generateFarmClientPluginEntryCode.call(void 0,
4556
+ const clientPluginEntry = _chunkFAP7CX7Ccjs.generateFarmClientPluginEntryCode.call(void 0,
4472
4557
  plugins,
4473
4558
  root,
4474
4559
  srcDir,
@@ -4516,7 +4601,7 @@ async function createFarmServerTreePageElement(source, pathname) {
4516
4601
  return null;
4517
4602
  }
4518
4603
  }
4519
- ${islandValues ? `${_chunkGGNJAGGEcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4604
+ ${islandValues ? `${_chunkFAP7CX7Ccjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4520
4605
  let farmLastRouteState = null;
4521
4606
 
4522
4607
  // A hot update to a layout tree's client module renders the route again.
@@ -5327,7 +5412,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
5327
5412
  return loadedLayouts;
5328
5413
  }
5329
5414
 
5330
- ${_chunkGGNJAGGEcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5415
+ ${_chunkFAP7CX7Ccjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5331
5416
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
5332
5417
  let wrapped = element;
5333
5418
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -5684,7 +5769,7 @@ function replaceNavigationBoundary(
5684
5769
  return nextTarget;
5685
5770
  }
5686
5771
 
5687
- ${islandValues ? `${_chunkGGNJAGGEcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
5772
+ ${islandValues ? `${_chunkFAP7CX7Ccjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
5688
5773
 
5689
5774
  // Islands mode navigates as the production client does: it fetches the page itself, names the
5690
5775
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -6368,7 +6453,7 @@ function generateClientManifest(bundle) {
6368
6453
  async function defineConfig(config = {}) {
6369
6454
  const tailwindVitePlugin = await _chunkR53QDV6Tcjs.loadTailwindVitePlugin.call(void 0, );
6370
6455
  const appRoot = path6.resolve(config.root || process.cwd());
6371
- if (_optionalChain([config, 'access', _410 => _410.extends, 'optionalAccess', _411 => _411.length])) {
6456
+ if (_optionalChain([config, 'access', _420 => _420.extends, 'optionalAccess', _421 => _421.length])) {
6372
6457
  const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
6373
6458
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
6374
6459
  root: appRoot,
@@ -6378,7 +6463,7 @@ async function defineConfig(config = {}) {
6378
6463
  config = layeredConfig;
6379
6464
  }
6380
6465
  config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
6381
- config.images = _chunkGGNJAGGEcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6466
+ config.images = _chunkFAP7CX7Ccjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6382
6467
  const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
6383
6468
  ssr: true
6384
6469
  });
@@ -6470,13 +6555,13 @@ async function defineConfig(config = {}) {
6470
6555
  if (!serverStarted) {
6471
6556
  serverStarted = true;
6472
6557
  const elapsed = Date.now() - startTime;
6473
- const address = _optionalChain([server, 'access', _412 => _412.httpServer, 'optionalAccess', _413 => _413.address, 'call', _414 => _414()]);
6558
+ const address = _optionalChain([server, 'access', _422 => _422.httpServer, 'optionalAccess', _423 => _423.address, 'call', _424 => _424()]);
6474
6559
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
6475
6560
  const hostConfig = server.config.server.host;
6476
6561
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
6477
6562
  console.log("");
6478
6563
  console.log(
6479
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkSM25ZC4Scjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6564
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkO2XFIPNLcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6480
6565
  );
6481
6566
  console.log("");
6482
6567
  console.log(
@@ -6510,7 +6595,7 @@ async function defineConfig(config = {}) {
6510
6595
  plugins: [
6511
6596
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
6512
6597
  _chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
6513
- _chunkGGNJAGGEcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6598
+ _chunkFAP7CX7Ccjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6514
6599
  tailwindVitePlugin,
6515
6600
  ...rendererVitePlugins,
6516
6601
  ...reactRefreshPlugins,
@@ -6524,8 +6609,8 @@ async function defineConfig(config = {}) {
6524
6609
  customLogger: farmLogger,
6525
6610
  clearScreen: false,
6526
6611
  optimizeDeps: {
6527
- ..._chunkGGNJAGGEcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6528
- _chunkGGNJAGGEcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6612
+ ..._chunkFAP7CX7Ccjs.createFarmClientOptimizeDepsConfig.call(void 0,
6613
+ _chunkFAP7CX7Ccjs.createFarmClientOptimizeDepsEntries.call(void 0,
6529
6614
  appRoot,
6530
6615
  _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
6531
6616
  ),
@@ -6568,7 +6653,7 @@ async function defineConfig(config = {}) {
6568
6653
  // Stub out problematic server-only modules during dev mode
6569
6654
  alias: {
6570
6655
  ..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
6571
- ..._chunkGGNJAGGEcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6656
+ ..._chunkFAP7CX7Ccjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6572
6657
  // Nitro internals that should not be resolved in browser
6573
6658
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
6574
6659
  "@poppinss/dumper": "data:text/javascript,export default {};",