@farm.js/core 0.1.61 → 0.1.63

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 (1294) hide show
  1. package/dist/after.cjs +3 -3
  2. package/dist/after.d.mts +25 -0
  3. package/dist/after.d.ts +25 -0
  4. package/dist/after.mjs +2 -2
  5. package/dist/agent-mcp-handler-7QMX2LUY.mjs +18 -0
  6. package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
  7. package/dist/agent-mcp.d-CCQ-wKwg.d.mts +115 -0
  8. package/dist/agent-mcp.d-DOJCBSh9.d.ts +115 -0
  9. package/dist/agent-runtime.cjs +36 -59
  10. package/dist/agent-runtime.d.mts +105 -0
  11. package/dist/agent-runtime.d.ts +105 -0
  12. package/dist/agent-runtime.mjs +35 -58
  13. package/dist/analyzer-KEA5JVDR.cjs +15 -0
  14. package/dist/analyzer-WNPQPWFR.mjs +15 -0
  15. package/dist/api/client.cjs +16 -15
  16. package/dist/api/client.d.mts +5 -0
  17. package/dist/api/client.d.ts +5 -0
  18. package/dist/api/client.mjs +14 -13
  19. package/dist/api/client.native.cjs +45 -0
  20. package/dist/api/client.native.d.mts +23 -0
  21. package/dist/api/client.native.d.ts +23 -0
  22. package/dist/api/client.native.mjs +45 -0
  23. package/dist/api/route-manager.cjs +41 -39
  24. package/dist/api/route-manager.d.mts +119 -0
  25. package/dist/api/route-manager.d.ts +119 -0
  26. package/dist/api/route-manager.mjs +40 -38
  27. package/dist/api/runtime.cjs +24 -22
  28. package/dist/api/runtime.d.mts +35 -0
  29. package/dist/api/runtime.d.ts +35 -0
  30. package/dist/api/runtime.mjs +24 -22
  31. package/dist/api-client.d-BNLXNCXJ.d.mts +622 -0
  32. package/dist/api-client.d-ddQBNGtu.d.ts +622 -0
  33. package/dist/api.cjs +52 -50
  34. package/dist/api.d.mts +103 -0
  35. package/dist/api.d.ts +103 -0
  36. package/dist/api.mjs +51 -49
  37. package/dist/app-manifest.d-BaA0omsv.d.mts +128 -0
  38. package/dist/app-manifest.d-poayV4lq.d.ts +128 -0
  39. package/dist/app-markdown.cjs +15 -15
  40. package/dist/app-markdown.d.mts +48 -0
  41. package/dist/app-markdown.d.ts +48 -0
  42. package/dist/app-markdown.mjs +14 -14
  43. package/dist/app.d-D4Dn03E3.d.ts +563 -0
  44. package/dist/app.d-DdWxeIGU.d.mts +563 -0
  45. package/dist/base-path.d-BOUV5ozD.d.mts +10 -0
  46. package/dist/base-path.d-BOUV5ozD.d.ts +10 -0
  47. package/dist/cache.cjs +10 -7
  48. package/dist/cache.d.mts +333 -0
  49. package/dist/cache.d.ts +333 -0
  50. package/dist/cache.mjs +9 -6
  51. package/dist/chunk-22W4FNTG.mjs +538 -0
  52. package/dist/chunk-23LVFSID.mjs +182 -0
  53. package/dist/chunk-25T5VXOE.mjs +1093 -0
  54. package/dist/chunk-2DA7CLY7.mjs +560 -0
  55. package/dist/chunk-2DLGV2ZG.mjs +71 -0
  56. package/dist/chunk-2HW5LWAH.cjs +19 -0
  57. package/dist/chunk-2I6PUKWJ.mjs +44 -0
  58. package/dist/chunk-2KMIJDY6.cjs +20 -0
  59. package/dist/chunk-2NGZFOKG.mjs +190 -0
  60. package/dist/chunk-2OF5RPVU.cjs +44 -0
  61. package/dist/chunk-2XGBJSDV.cjs +408 -0
  62. package/dist/chunk-3BIASUGR.cjs +59 -0
  63. package/dist/chunk-3CCAICF7.cjs +651 -0
  64. package/dist/chunk-3EEET2Q5.cjs +1044 -0
  65. package/dist/chunk-3EIPOTZV.cjs +272 -0
  66. package/dist/chunk-3HLQTOVU.cjs +6 -0
  67. package/dist/chunk-3OJNNCDL.cjs +2250 -0
  68. package/dist/chunk-3TXKFRSO.mjs +657 -0
  69. package/dist/chunk-3UZVPO72.mjs +387 -0
  70. package/dist/chunk-43V3ANPQ.mjs +251 -0
  71. package/dist/chunk-46P5KNTE.mjs +8 -0
  72. package/dist/chunk-47JV57DA.cjs +69 -0
  73. package/dist/chunk-4BS3HSY7.cjs +541 -0
  74. package/dist/chunk-4DCWVSL2.cjs +15 -0
  75. package/dist/chunk-4DIKLG56.mjs +141 -0
  76. package/dist/chunk-4EBC7EMW.cjs +8 -0
  77. package/dist/chunk-4IHMHFQB.cjs +458 -0
  78. package/dist/chunk-4MU4QCX4.mjs +158 -0
  79. package/dist/chunk-4P5634G6.cjs +386 -0
  80. package/dist/chunk-4ZJ5C7UJ.cjs +75 -0
  81. package/dist/chunk-52Y3C3HG.mjs +421 -0
  82. package/dist/chunk-53EHWHT2.cjs +166 -0
  83. package/dist/chunk-53ZCZ46B.cjs +137 -0
  84. package/dist/chunk-55U5QIXQ.mjs +35 -0
  85. package/dist/chunk-5A77OEIG.cjs +778 -0
  86. package/dist/chunk-5C7XMKQ4.cjs +410 -0
  87. package/dist/chunk-5DX3O6TT.cjs +266 -0
  88. package/dist/chunk-5FE5YT2N.mjs +458 -0
  89. package/dist/chunk-5IKQ7BIR.cjs +716 -0
  90. package/dist/chunk-5IQ2ERQA.cjs +657 -0
  91. package/dist/chunk-5J45H65F.mjs +48 -0
  92. package/dist/chunk-5L7I6AMY.cjs +433 -0
  93. package/dist/chunk-5OJVKXFV.cjs +2072 -0
  94. package/dist/chunk-5PZJ63PK.mjs +17 -0
  95. package/dist/chunk-5Y22WNTO.mjs +237 -0
  96. package/dist/chunk-5Y2P454O.cjs +421 -0
  97. package/dist/chunk-5Y4GYKKH.mjs +13 -0
  98. package/dist/chunk-5YPBFMBN.cjs +19 -0
  99. package/dist/chunk-65Y5SIBH.cjs +112 -0
  100. package/dist/chunk-6BJJYOFL.cjs +293 -0
  101. package/dist/chunk-6BLAY2VQ.mjs +45 -0
  102. package/dist/chunk-6CTFVBAT.cjs +29 -0
  103. package/dist/chunk-6FXBJPF5.cjs +35 -0
  104. package/dist/chunk-6HRAK7I5.mjs +215 -0
  105. package/dist/chunk-6IOZPJ3I.cjs +549 -0
  106. package/dist/chunk-6JHZPB52.cjs +538 -0
  107. package/dist/chunk-6XQSPIN6.cjs +155 -0
  108. package/dist/chunk-6YFC3ZFX.mjs +449 -0
  109. package/dist/chunk-6ZFRWRHO.mjs +54 -0
  110. package/dist/chunk-724WT3NI.mjs +83 -0
  111. package/dist/chunk-72KABRWN.mjs +2072 -0
  112. package/dist/chunk-72KCTHLV.cjs +723 -0
  113. package/dist/chunk-752XUZIM.cjs +229 -0
  114. package/dist/chunk-75XSZIRE.mjs +180 -0
  115. package/dist/chunk-7EPYN7GW.cjs +30 -0
  116. package/dist/chunk-7FFW7DC4.mjs +517 -0
  117. package/dist/chunk-7H45IJWO.mjs +2250 -0
  118. package/dist/chunk-7H4SVNC4.cjs +700 -0
  119. package/dist/chunk-7JUIK547.cjs +62 -0
  120. package/dist/chunk-7KJJ4SBS.cjs +13 -0
  121. package/dist/chunk-7PTISZSQ.cjs +176 -0
  122. package/dist/chunk-7PZVXMWG.mjs +113 -0
  123. package/dist/chunk-7S7AAK2D.mjs +82 -0
  124. package/dist/chunk-A25FXJ7D.cjs +38 -0
  125. package/dist/chunk-A2MN5PQJ.mjs +527 -0
  126. package/dist/chunk-A4PWGL46.mjs +141 -0
  127. package/dist/chunk-ALEUMLJN.mjs +190 -0
  128. package/dist/chunk-ANXU3D32.cjs +1232 -0
  129. package/dist/chunk-AOKXITZ6.cjs +16 -0
  130. package/dist/chunk-AQLHD6HZ.cjs +196 -0
  131. package/dist/chunk-ATYTLVSI.cjs +45 -0
  132. package/dist/chunk-AXVRUDMB.cjs +203 -0
  133. package/dist/chunk-AY2YD5ZX.mjs +34 -0
  134. package/dist/chunk-AYP2YFVN.mjs +168 -0
  135. package/dist/chunk-AZQXXXDX.mjs +80 -0
  136. package/dist/chunk-B4CWYGCG.mjs +541 -0
  137. package/dist/chunk-BA2IA32Q.mjs +1291 -0
  138. package/dist/chunk-BBPDJGCU.cjs +157 -0
  139. package/dist/chunk-BM2LH2JM.mjs +1040 -0
  140. package/dist/chunk-BMQAPZXD.mjs +31 -0
  141. package/dist/chunk-BNH53KOT.cjs +69 -0
  142. package/dist/chunk-BPAXGCKX.mjs +166 -0
  143. package/dist/chunk-BPNOYILC.cjs +450 -0
  144. package/dist/chunk-BQWBHWEW.mjs +252 -0
  145. package/dist/chunk-BRWIVOV4.cjs +48 -0
  146. package/dist/chunk-BRYPZIMB.mjs +6 -0
  147. package/dist/chunk-BT4SEFLC.cjs +660 -0
  148. package/dist/chunk-BTVDYS4B.cjs +70 -0
  149. package/dist/chunk-BTZ5O6VM.cjs +14 -0
  150. package/dist/chunk-BUC3FDYC.cjs +158 -0
  151. package/dist/chunk-C64XOPBZ.mjs +380 -0
  152. package/dist/chunk-C7GJDVN4.mjs +124 -0
  153. package/dist/chunk-C7LCTVJ2.cjs +30 -0
  154. package/dist/chunk-CA7DNRHO.cjs +164 -0
  155. package/dist/chunk-CBDRR3J3.mjs +6680 -0
  156. package/dist/chunk-CBOEJ5Z4.cjs +1093 -0
  157. package/dist/chunk-CFG4QERR.cjs +434 -0
  158. package/dist/chunk-CI4UNQHO.cjs +35 -0
  159. package/dist/chunk-CKPTIEDX.cjs +12 -0
  160. package/dist/chunk-CL2ONP73.cjs +180 -0
  161. package/dist/chunk-CLFEQGET.cjs +60 -0
  162. package/dist/chunk-CNNBFGL5.cjs +252 -0
  163. package/dist/chunk-CO6UYM2D.mjs +172 -0
  164. package/dist/chunk-CQL5ZGFU.cjs +50 -0
  165. package/dist/chunk-CROAFCMW.mjs +203 -0
  166. package/dist/chunk-CU5SYTJG.mjs +23 -0
  167. package/dist/chunk-CV6MFQ4Y.mjs +259 -0
  168. package/dist/chunk-D22BUQKW.cjs +82 -0
  169. package/dist/chunk-D2LCAV6L.mjs +79 -0
  170. package/dist/chunk-D4MRNBVF.cjs +1462 -0
  171. package/dist/chunk-D4XGKF67.cjs +127 -0
  172. package/dist/chunk-D7Y63SOY.mjs +15 -0
  173. package/dist/chunk-DMAP4RND.cjs +998 -0
  174. package/dist/chunk-DPE53XWL.mjs +1980 -0
  175. package/dist/chunk-DQF3QLOH.mjs +660 -0
  176. package/dist/chunk-DQJ2CIH7.cjs +87 -0
  177. package/dist/chunk-DU4VHHPJ.mjs +157 -0
  178. package/dist/chunk-DUIP64BF.cjs +16 -0
  179. package/dist/chunk-DV52ZS53.cjs +40 -0
  180. package/dist/chunk-DXUXQP2T.cjs +142 -0
  181. package/dist/chunk-DZPR2W6U.cjs +593 -0
  182. package/dist/chunk-DZZHTMWM.cjs +190 -0
  183. package/dist/chunk-E46NXBNJ.mjs +386 -0
  184. package/dist/chunk-E4RDMG3K.mjs +697 -0
  185. package/dist/chunk-E552H232.cjs +154 -0
  186. package/dist/chunk-E72UD6ME.mjs +277 -0
  187. package/dist/chunk-E7QOEV5Z.cjs +449 -0
  188. package/dist/chunk-ECKQFEX2.mjs +712 -0
  189. package/dist/chunk-EDPENAVO.mjs +266 -0
  190. package/dist/chunk-EENTT56C.mjs +12733 -0
  191. package/dist/chunk-EFLNOZGH.mjs +30 -0
  192. package/dist/chunk-EFZGB7JC.cjs +114 -0
  193. package/dist/chunk-EGHPFXPZ.cjs +590 -0
  194. package/dist/chunk-EJCVG25Z.mjs +49 -0
  195. package/dist/chunk-EMDGXYUD.mjs +75 -0
  196. package/dist/chunk-EOXPRC2C.cjs +48 -0
  197. package/dist/chunk-ERMUL73L.cjs +39 -0
  198. package/dist/chunk-ES2LD2YD.mjs +203 -0
  199. package/dist/chunk-EV4SBMPX.mjs +208 -0
  200. package/dist/chunk-EVIWKPJV.cjs +560 -0
  201. package/dist/chunk-EVMXPJCB.mjs +133 -0
  202. package/dist/chunk-EX6ZSN5P.cjs +224 -0
  203. package/dist/chunk-EYLC6GD6.cjs +517 -0
  204. package/dist/chunk-EZ34EHQP.mjs +462 -0
  205. package/dist/chunk-EZTKXD6P.cjs +182 -0
  206. package/dist/chunk-F3N52U7S.mjs +138 -0
  207. package/dist/chunk-FBEBSAVI.cjs +225 -0
  208. package/dist/chunk-FEFCISOX.cjs +102 -0
  209. package/dist/chunk-FHURJABM.mjs +45 -0
  210. package/dist/chunk-FN5UEC7I.mjs +55 -0
  211. package/dist/chunk-FNHN3RBD.cjs +9 -0
  212. package/dist/chunk-FSXSQQTV.mjs +79 -0
  213. package/dist/chunk-GBMWLDCC.cjs +138 -0
  214. package/dist/chunk-GHNW564E.mjs +1044 -0
  215. package/dist/chunk-GL3ZDHKI.mjs +274 -0
  216. package/dist/chunk-GLOICKDO.mjs +142 -0
  217. package/dist/chunk-GNZIAJGB.mjs +358 -0
  218. package/dist/chunk-GPKBUME5.mjs +716 -0
  219. package/dist/chunk-GSVJ3IIF.cjs +173 -0
  220. package/dist/chunk-GUZC226X.mjs +164 -0
  221. package/dist/chunk-GVOMPU3Y.cjs +537 -0
  222. package/dist/chunk-GWXZS7K5.mjs +24 -0
  223. package/dist/chunk-GYMGK467.mjs +214 -0
  224. package/dist/chunk-H227LYHT.mjs +88 -0
  225. package/dist/chunk-H3ASZDT7.mjs +42 -0
  226. package/dist/chunk-H4WUWLQR.mjs +16 -0
  227. package/dist/chunk-HA7YRO53.cjs +214 -0
  228. package/dist/chunk-HEPJIKKQ.cjs +190 -0
  229. package/dist/chunk-HLYRXN2I.cjs +242 -0
  230. package/dist/chunk-HNAISJFD.cjs +215 -0
  231. package/dist/chunk-HPP2II4Z.mjs +332 -0
  232. package/dist/chunk-HXNLKCWH.cjs +13 -0
  233. package/dist/chunk-HZOMT5DY.mjs +30 -0
  234. package/dist/chunk-I2BYNELA.cjs +380 -0
  235. package/dist/chunk-I32V5CZL.cjs +1965 -0
  236. package/dist/chunk-IAPTECEB.mjs +48 -0
  237. package/dist/chunk-IFTGERT3.mjs +408 -0
  238. package/dist/chunk-IGL6CO6M.mjs +9 -0
  239. package/dist/chunk-IOF4KXMP.mjs +537 -0
  240. package/dist/chunk-ITV4QQL2.cjs +93 -0
  241. package/dist/chunk-IWRLV46X.cjs +1980 -0
  242. package/dist/chunk-IYEY3JWJ.mjs +186 -0
  243. package/dist/chunk-J3GFOQOL.cjs +237 -0
  244. package/dist/chunk-JCEFKP5M.mjs +1473 -0
  245. package/dist/chunk-JGAE5XPL.cjs +26 -0
  246. package/dist/chunk-JIBEFLQ7.cjs +44 -0
  247. package/dist/chunk-JLDNXURZ.cjs +588 -0
  248. package/dist/chunk-JMYXO572.cjs +531 -0
  249. package/dist/chunk-JNYFXL7X.mjs +62 -0
  250. package/dist/chunk-JRHGJVJH.mjs +44 -0
  251. package/dist/chunk-JSDV2NUN.mjs +206 -0
  252. package/dist/chunk-JXIYH2NO.cjs +24 -0
  253. package/dist/chunk-JYNNIGQO.cjs +87 -0
  254. package/dist/chunk-JYT7AN37.cjs +79 -0
  255. package/dist/chunk-K3RU5MOR.mjs +80 -0
  256. package/dist/chunk-K5EW7GUU.mjs +417 -0
  257. package/dist/chunk-K76CBYQM.mjs +157 -0
  258. package/dist/chunk-KBGZ5FD6.cjs +17 -0
  259. package/dist/chunk-KORZ6PRE.cjs +64 -0
  260. package/dist/chunk-KPAJWD3N.mjs +168 -0
  261. package/dist/chunk-KQH2COEJ.mjs +42 -0
  262. package/dist/chunk-KVW2M6PI.mjs +341 -0
  263. package/dist/chunk-L2JG337G.cjs +712 -0
  264. package/dist/chunk-L4RTTTVE.mjs +8 -0
  265. package/dist/chunk-L5JDKFMQ.cjs +44 -0
  266. package/dist/chunk-LA45FN37.mjs +10009 -0
  267. package/dist/chunk-LA6O5EL2.mjs +254 -0
  268. package/dist/chunk-LEJDW34D.cjs +115 -0
  269. package/dist/chunk-LFFSDZ4Y.cjs +141 -0
  270. package/dist/chunk-LLZSYFOM.mjs +6 -0
  271. package/dist/chunk-LM55GS4R.mjs +38 -0
  272. package/dist/chunk-LNVGXUL3.cjs +172 -0
  273. package/dist/chunk-LQNW3ABP.cjs +527 -0
  274. package/dist/chunk-LRB5OVRT.cjs +124 -0
  275. package/dist/chunk-LSHX2H5G.cjs +57 -0
  276. package/dist/chunk-LT4VAF5Z.cjs +1359 -0
  277. package/dist/chunk-LWWDTBGL.cjs +254 -0
  278. package/dist/chunk-M25IONJP.mjs +16 -0
  279. package/dist/chunk-M53MIIXY.mjs +172 -0
  280. package/dist/chunk-MEQN6DDA.cjs +341 -0
  281. package/dist/chunk-MF3IA2AW.cjs +25 -0
  282. package/dist/chunk-MFQGU5CC.mjs +127 -0
  283. package/dist/chunk-MGKW5XZE.cjs +40 -0
  284. package/dist/chunk-MHLNWRCJ.cjs +36 -0
  285. package/dist/chunk-MK5E44WP.mjs +60 -0
  286. package/dist/chunk-MMK4MZUN.mjs +36 -0
  287. package/dist/chunk-MNIR7I7B.mjs +217 -0
  288. package/dist/chunk-MPU5DOXX.cjs +21 -0
  289. package/dist/chunk-MU5V7XHL.mjs +172 -0
  290. package/dist/chunk-N33DLJBC.mjs +272 -0
  291. package/dist/chunk-N35YPV4N.mjs +48 -0
  292. package/dist/chunk-N4AQNEXR.cjs +17 -0
  293. package/dist/chunk-N7XWC6BN.mjs +21 -0
  294. package/dist/chunk-NBIVGHAT.mjs +50 -0
  295. package/dist/chunk-NCIAP562.mjs +27 -0
  296. package/dist/chunk-NK2VWS7P.cjs +954 -0
  297. package/dist/chunk-NKRZLQUK.mjs +150 -0
  298. package/dist/chunk-NR63PD3P.mjs +64 -0
  299. package/dist/chunk-NRNAHZ57.mjs +39 -0
  300. package/dist/chunk-NWUHS6GV.cjs +79 -0
  301. package/dist/chunk-O27PLNQZ.cjs +878 -0
  302. package/dist/chunk-O4F3JUST.mjs +176 -0
  303. package/dist/chunk-O5FCWI6O.mjs +156 -0
  304. package/dist/chunk-OAJOQU5J.mjs +225 -0
  305. package/dist/chunk-OCS3PSYR.cjs +51 -0
  306. package/dist/chunk-OHWM2VI4.mjs +29 -0
  307. package/dist/chunk-OJO2GOM3.mjs +69 -0
  308. package/dist/chunk-OLGQZRW6.mjs +700 -0
  309. package/dist/chunk-OM7WILES.mjs +100 -0
  310. package/dist/chunk-ONG4RDW3.mjs +155 -0
  311. package/dist/chunk-OOJBBHYW.cjs +38 -0
  312. package/dist/chunk-OOZEU5KK.cjs +18 -0
  313. package/dist/chunk-OWQV6MLM.cjs +82 -0
  314. package/dist/chunk-OY5XDG24.cjs +113 -0
  315. package/dist/chunk-OYZXVBZP.cjs +133 -0
  316. package/dist/chunk-OZC2JPW6.cjs +10 -0
  317. package/dist/chunk-P2355C6E.cjs +186 -0
  318. package/dist/chunk-PAKCHVUS.mjs +450 -0
  319. package/dist/chunk-PCXIJKPM.mjs +878 -0
  320. package/dist/chunk-PENBZAHJ.cjs +88 -0
  321. package/dist/chunk-PIUTGRDI.cjs +358 -0
  322. package/dist/chunk-PMJSG4JS.cjs +152 -0
  323. package/dist/chunk-PO5MXV5X.cjs +13 -0
  324. package/dist/chunk-PRFNLQSP.cjs +277 -0
  325. package/dist/chunk-PSUYE5HR.mjs +25 -0
  326. package/dist/chunk-PTLXHRJZ.mjs +57 -0
  327. package/dist/chunk-PVJX4UPA.cjs +6680 -0
  328. package/dist/chunk-PZXYAWYG.cjs +274 -0
  329. package/dist/chunk-Q5B4LNON.mjs +19 -0
  330. package/dist/chunk-QAS7KE7J.cjs +169 -0
  331. package/dist/chunk-QDWMCFTH.mjs +434 -0
  332. package/dist/chunk-QGJ4FI2G.mjs +723 -0
  333. package/dist/chunk-QGOZLGVP.mjs +0 -0
  334. package/dist/chunk-QISW423S.cjs +335 -0
  335. package/dist/chunk-QMDU6QHN.mjs +778 -0
  336. package/dist/chunk-QMNWKQL4.cjs +206 -0
  337. package/dist/chunk-QN5WRQSQ.cjs +10012 -0
  338. package/dist/chunk-QOSDWGKT.mjs +109 -0
  339. package/dist/chunk-QPJ4MZTO.mjs +60 -0
  340. package/dist/chunk-QPNVDSFZ.mjs +18 -0
  341. package/dist/chunk-QQ44FYRO.cjs +27 -0
  342. package/dist/chunk-QSTRBKHZ.mjs +102 -0
  343. package/dist/chunk-QTD6EMN2.mjs +368 -0
  344. package/dist/chunk-R53QDV6T.cjs +100 -0
  345. package/dist/chunk-R5U7OIPI.cjs +34 -0
  346. package/dist/chunk-R62SF5R4.mjs +410 -0
  347. package/dist/chunk-RD623KW4.cjs +203 -0
  348. package/dist/chunk-RFKTJTWZ.mjs +26 -0
  349. package/dist/chunk-RFYL5OLP.mjs +9 -0
  350. package/dist/chunk-RI3EVPKD.cjs +57 -0
  351. package/dist/chunk-RLEALQEN.mjs +998 -0
  352. package/dist/chunk-RSEAX5MW.mjs +44 -0
  353. package/dist/chunk-RVGLYMJM.cjs +259 -0
  354. package/dist/chunk-S2NUYHRY.mjs +1232 -0
  355. package/dist/chunk-S32PDOLO.mjs +13 -0
  356. package/dist/chunk-S6O2L47H.mjs +549 -0
  357. package/dist/chunk-SA7MLSP4.mjs +229 -0
  358. package/dist/chunk-SBDWCDS6.cjs +8 -0
  359. package/dist/chunk-SF3JB56B.mjs +82 -0
  360. package/dist/chunk-SHD265HW.cjs +19 -0
  361. package/dist/chunk-SHIWRBFI.cjs +17 -0
  362. package/dist/chunk-SM2SYWAR.cjs +49 -0
  363. package/dist/chunk-SMUW7UST.mjs +196 -0
  364. package/dist/chunk-SNP33A33.cjs +9 -0
  365. package/dist/chunk-SQ5O7I3L.mjs +70 -0
  366. package/dist/chunk-STF6VDYQ.cjs +23 -0
  367. package/dist/chunk-SUCDVKUB.cjs +42 -0
  368. package/dist/chunk-SVCUSOEF.mjs +590 -0
  369. package/dist/chunk-SVXOCTQ2.cjs +251 -0
  370. package/dist/chunk-SXCL2MIN.cjs +208 -0
  371. package/dist/chunk-SYW346ZN.cjs +71 -0
  372. package/dist/chunk-SYXPWJ7N.cjs +387 -0
  373. package/dist/chunk-T4TBK5NY.mjs +593 -0
  374. package/dist/chunk-TGSEVBPO.mjs +93 -0
  375. package/dist/chunk-TGULJSHD.mjs +1965 -0
  376. package/dist/chunk-TJVUTGED.mjs +531 -0
  377. package/dist/chunk-TUOO6IK3.mjs +87 -0
  378. package/dist/chunk-TUPKMMXT.mjs +173 -0
  379. package/dist/chunk-TVCFY3KK.cjs +217 -0
  380. package/dist/chunk-TZVUF5JJ.mjs +651 -0
  381. package/dist/chunk-U6WCUVSV.cjs +1294 -0
  382. package/dist/chunk-UAQD67HM.mjs +154 -0
  383. package/dist/chunk-UB7RVEMX.mjs +73 -0
  384. package/dist/chunk-UIJOLBUL.mjs +19 -0
  385. package/dist/chunk-UNJZGVPU.cjs +6 -0
  386. package/dist/chunk-UPYIFH2H.cjs +168 -0
  387. package/dist/chunk-UR25Z5Z6.mjs +135 -0
  388. package/dist/chunk-UUMKLGUU.mjs +69 -0
  389. package/dist/chunk-UYRI6U3P.mjs +137 -0
  390. package/dist/chunk-UYTAP4FQ.cjs +60 -0
  391. package/dist/chunk-UZCMMJJT.cjs +80 -0
  392. package/dist/chunk-UZZ6IEQP.mjs +169 -0
  393. package/dist/chunk-V3UOEWCB.cjs +46 -0
  394. package/dist/chunk-V56632LA.cjs +141 -0
  395. package/dist/chunk-V727H3RI.cjs +1473 -0
  396. package/dist/chunk-VE3FWJBO.mjs +46 -0
  397. package/dist/chunk-VFXE6NWR.mjs +87 -0
  398. package/dist/chunk-VHIXGZYH.mjs +9 -0
  399. package/dist/chunk-VISQDC6W.mjs +10 -0
  400. package/dist/chunk-VIXTAVEA.mjs +59 -0
  401. package/dist/chunk-VM57CK74.cjs +42 -0
  402. package/dist/chunk-VOQ7XZZT.cjs +157 -0
  403. package/dist/chunk-VQJHT2ND.mjs +40 -0
  404. package/dist/chunk-VR6QLTTX.mjs +59 -0
  405. package/dist/chunk-VVTJTMGQ.cjs +135 -0
  406. package/dist/chunk-VXCFJWK5.cjs +59 -0
  407. package/dist/chunk-W2ZXMMHA.mjs +1462 -0
  408. package/dist/chunk-W6QLRQ3V.mjs +152 -0
  409. package/dist/chunk-WCLLPR6H.mjs +35 -0
  410. package/dist/chunk-WEGAVN37.cjs +45 -0
  411. package/dist/chunk-WFVSAT7Y.cjs +83 -0
  412. package/dist/chunk-WKPBIT5Q.cjs +150 -0
  413. package/dist/chunk-WNDAISB7.mjs +51 -0
  414. package/dist/chunk-WNLPQW7W.mjs +19 -0
  415. package/dist/chunk-WT6RAN2I.cjs +41 -0
  416. package/dist/chunk-WXFY5JIY.mjs +20 -0
  417. package/dist/chunk-WYAXRIYP.cjs +697 -0
  418. package/dist/chunk-WYL4ODZ4.mjs +38 -0
  419. package/dist/chunk-X333W5KV.cjs +31 -0
  420. package/dist/chunk-X3EFRVXY.mjs +12 -0
  421. package/dist/chunk-X3XUZWRB.mjs +141 -0
  422. package/dist/chunk-X4K7TYN6.cjs +1040 -0
  423. package/dist/chunk-XCXHQBMM.mjs +115 -0
  424. package/dist/chunk-XGJVRPYL.cjs +141 -0
  425. package/dist/chunk-XICXQXYE.mjs +433 -0
  426. package/dist/chunk-XMHERKSE.mjs +224 -0
  427. package/dist/chunk-XPIPMWY3.cjs +1 -0
  428. package/dist/chunk-XQ4DPO4G.mjs +13 -0
  429. package/dist/chunk-XQSYOVCW.cjs +417 -0
  430. package/dist/chunk-XR2ZIBQK.mjs +57 -0
  431. package/dist/chunk-XURDCXNH.cjs +48 -0
  432. package/dist/chunk-XVSBALOY.cjs +55 -0
  433. package/dist/chunk-Y2YBNQ3D.cjs +156 -0
  434. package/dist/chunk-Y3WG64CP.cjs +9 -0
  435. package/dist/chunk-Y6FXYEAI.mjs +10 -0
  436. package/dist/chunk-Y7NN63LS.mjs +40 -0
  437. package/dist/chunk-YDXLC4DW.cjs +54 -0
  438. package/dist/chunk-YIHRZBD7.cjs +172 -0
  439. package/dist/chunk-YKHRCY4T.cjs +73 -0
  440. package/dist/chunk-YN6BHOYY.cjs +368 -0
  441. package/dist/chunk-YP7YO3S3.mjs +17 -0
  442. package/dist/chunk-YSXTNSXS.mjs +1359 -0
  443. package/dist/chunk-YT3SLLZK.mjs +242 -0
  444. package/dist/chunk-YTVSWXEZ.cjs +168 -0
  445. package/dist/chunk-YWPNIYUP.mjs +41 -0
  446. package/dist/chunk-YX6AFPXC.mjs +8 -0
  447. package/dist/chunk-Z64V4WZI.mjs +17 -0
  448. package/dist/chunk-Z74NNER4.cjs +12736 -0
  449. package/dist/chunk-Z7P2BTZ3.cjs +454 -0
  450. package/dist/chunk-ZDAEHG2O.cjs +80 -0
  451. package/dist/chunk-ZFWYCVKS.mjs +454 -0
  452. package/dist/chunk-ZNH6NR3H.cjs +462 -0
  453. package/dist/chunk-ZNXTU4YH.mjs +114 -0
  454. package/dist/chunk-ZOYKJBP5.cjs +172 -0
  455. package/dist/chunk-ZQ5BDNKW.mjs +954 -0
  456. package/dist/chunk-ZXK2EYQW.cjs +8 -0
  457. package/dist/chunk-ZZ2QKCKW.mjs +293 -0
  458. package/dist/chunk-ZZI56IUY.mjs +588 -0
  459. package/dist/chunk-recovery.d-lnQFzcQP.d.mts +26 -0
  460. package/dist/chunk-recovery.d-lnQFzcQP.d.ts +26 -0
  461. package/dist/client/lifecycle.cjs +3 -3
  462. package/dist/client/lifecycle.d.mts +1 -0
  463. package/dist/client/lifecycle.d.ts +1 -0
  464. package/dist/client/lifecycle.mjs +2 -2
  465. package/dist/client-cache.d-Deoqq-nM.d.ts +76 -0
  466. package/dist/client-cache.d-di_Nasxa.d.mts +76 -0
  467. package/dist/client-component.d-CQLvqLAJ.d.ts +218 -0
  468. package/dist/client-component.d-CSEFlHfG.d.mts +218 -0
  469. package/dist/client-plugins.cjs +3 -3
  470. package/dist/client-plugins.d-BTF0gZm4.d.mts +4018 -0
  471. package/dist/client-plugins.d-BgPUYPc9.d.ts +4018 -0
  472. package/dist/client-plugins.d.mts +33 -0
  473. package/dist/client-plugins.d.ts +33 -0
  474. package/dist/client-plugins.mjs +2 -2
  475. package/dist/client.cjs +45 -40
  476. package/dist/client.d.mts +452 -0
  477. package/dist/client.d.ts +452 -0
  478. package/dist/client.mjs +44 -39
  479. package/dist/client.react-server.mjs +2 -0
  480. package/dist/config.cjs +3 -3
  481. package/dist/config.d-qt-mE8O5.d.mts +341 -0
  482. package/dist/config.d-qt-mE8O5.d.ts +341 -0
  483. package/dist/config.d.mts +40 -0
  484. package/dist/config.d.ts +40 -0
  485. package/dist/config.mjs +2 -2
  486. package/dist/cron.cjs +19 -9
  487. package/dist/cron.d.mts +186 -0
  488. package/dist/cron.d.ts +186 -0
  489. package/dist/cron.mjs +18 -8
  490. package/dist/deferred.cjs +3 -3
  491. package/dist/deferred.d.mts +44 -0
  492. package/dist/deferred.d.ts +44 -0
  493. package/dist/deferred.mjs +2 -2
  494. package/dist/deployment.cjs +3 -3
  495. package/dist/deployment.d.mts +36 -0
  496. package/dist/deployment.d.ts +36 -0
  497. package/dist/deployment.mjs +2 -2
  498. package/dist/desktop.cjs +13 -0
  499. package/dist/desktop.d.mts +120 -0
  500. package/dist/desktop.d.ts +120 -0
  501. package/dist/desktop.mjs +13 -0
  502. package/dist/dev-guard-2UW2KERP.cjs +59 -0
  503. package/dist/dev-guard-ONNMVQUN.mjs +59 -0
  504. package/dist/devtools-HDKTYIZF.mjs +463 -0
  505. package/dist/devtools-ZHN5JLVI.cjs +463 -0
  506. package/dist/devtools-client-SU4XH46J.mjs +250 -0
  507. package/dist/devtools-client-X5OQCXDF.cjs +250 -0
  508. package/dist/devtools-ui-CYBVFLPH.mjs +1265 -0
  509. package/dist/devtools-ui-SYRUXUA7.cjs +1265 -0
  510. package/dist/docs.cjs +66 -58
  511. package/dist/docs.d.mts +169 -0
  512. package/dist/docs.d.ts +169 -0
  513. package/dist/docs.mjs +65 -57
  514. package/dist/endpoint.d-BgHn0lhl.d.ts +370 -0
  515. package/dist/endpoint.d-BkMSCRf6.d.mts +370 -0
  516. package/dist/env-types.cjs +4 -4
  517. package/dist/env-types.d.mts +12 -0
  518. package/dist/env-types.d.ts +12 -0
  519. package/dist/env-types.mjs +3 -3
  520. package/dist/env.cjs +4 -4
  521. package/dist/env.d.mts +65 -0
  522. package/dist/env.d.ts +65 -0
  523. package/dist/env.mjs +3 -3
  524. package/dist/environment/vite.cjs +7 -3
  525. package/dist/environment/vite.d.mts +31 -0
  526. package/dist/environment/vite.d.ts +31 -0
  527. package/dist/environment/vite.mjs +6 -2
  528. package/dist/environment.cjs +3 -3
  529. package/dist/environment.d.mts +18 -0
  530. package/dist/environment.d.ts +18 -0
  531. package/dist/environment.mjs +2 -2
  532. package/dist/font.cjs +3 -3
  533. package/dist/font.d.mts +95 -0
  534. package/dist/font.d.ts +95 -0
  535. package/dist/font.mjs +2 -2
  536. package/dist/generate-route-types.d-BL2pq6xC.d.ts +33 -0
  537. package/dist/generate-route-types.d-BoVDU8qX.d.mts +33 -0
  538. package/dist/headers.cjs +8 -6
  539. package/dist/headers.d.mts +32 -0
  540. package/dist/headers.d.ts +32 -0
  541. package/dist/headers.mjs +7 -5
  542. package/dist/i18n/client.cjs +19 -30
  543. package/dist/i18n/client.d.mts +32 -0
  544. package/dist/i18n/client.d.ts +32 -0
  545. package/dist/i18n/client.mjs +9 -20
  546. package/dist/i18n/index.cjs +6 -6
  547. package/dist/i18n/index.d.mts +3 -0
  548. package/dist/i18n/index.d.ts +3 -0
  549. package/dist/i18n/index.mjs +5 -5
  550. package/dist/i18n/server.cjs +10 -10
  551. package/dist/i18n/server.d.mts +30 -0
  552. package/dist/i18n/server.d.ts +30 -0
  553. package/dist/i18n/server.mjs +9 -9
  554. package/dist/image/server.cjs +9 -5
  555. package/dist/image/server.d.mts +59 -0
  556. package/dist/image/server.d.ts +59 -0
  557. package/dist/image/server.mjs +8 -4
  558. package/dist/image/sharp.cjs +16 -20
  559. package/dist/image/sharp.d.mts +20 -0
  560. package/dist/image/sharp.d.ts +20 -0
  561. package/dist/image/sharp.mjs +8 -12
  562. package/dist/image-config.d-CeDgNyX4.d.mts +53 -0
  563. package/dist/image-config.d-CeDgNyX4.d.ts +53 -0
  564. package/dist/image.cjs +9 -18
  565. package/dist/image.d.mts +39 -0
  566. package/dist/image.d.ts +39 -0
  567. package/dist/image.mjs +4 -13
  568. package/dist/index.cjs +250 -174
  569. package/dist/index.d-BNNDpql4.d.ts +20 -0
  570. package/dist/index.d-BqcfqJvt.d.mts +20 -0
  571. package/dist/index.d-Coow7bD4.d.ts +54 -0
  572. package/dist/index.d-Dbjx0ku7.d.mts +54 -0
  573. package/dist/index.d.mts +1053 -0
  574. package/dist/index.d.ts +1053 -0
  575. package/dist/index.mjs +318 -242
  576. package/dist/instrumentation-runtime.d-CX9Zh-16.d.mts +22 -0
  577. package/dist/instrumentation-runtime.d-CX9Zh-16.d.ts +22 -0
  578. package/dist/instrumentation.cjs +5 -5
  579. package/dist/instrumentation.d.mts +7 -0
  580. package/dist/instrumentation.d.ts +7 -0
  581. package/dist/instrumentation.mjs +4 -4
  582. package/dist/integration-orm-52GPGTHO.cjs +14 -0
  583. package/dist/integration-orm-CO23MSFE.mjs +14 -0
  584. package/dist/integrations.cjs +23 -17
  585. package/dist/integrations.d.mts +33 -0
  586. package/dist/integrations.d.ts +33 -0
  587. package/dist/integrations.mjs +24 -18
  588. package/dist/internal/app-markdown-runtime.cjs +13 -13
  589. package/dist/internal/app-markdown-runtime.d.mts +86 -0
  590. package/dist/internal/app-markdown-runtime.d.ts +86 -0
  591. package/dist/internal/app-markdown-runtime.mjs +12 -12
  592. package/dist/internal/build-runtime.cjs +166 -133
  593. package/dist/internal/build-runtime.d.mts +46 -0
  594. package/dist/internal/build-runtime.d.ts +46 -0
  595. package/dist/internal/build-runtime.mjs +154 -121
  596. package/dist/internal/cli-runtime.cjs +102 -79
  597. package/dist/internal/cli-runtime.mjs +102 -79
  598. package/dist/internal/client-error-overlay.cjs +18 -49
  599. package/dist/internal/client-error-overlay.d.mts +25 -0
  600. package/dist/internal/client-error-overlay.d.ts +25 -0
  601. package/dist/internal/client-error-overlay.mjs +14 -45
  602. package/dist/internal/client-runtime.cjs +73 -59
  603. package/dist/internal/client-runtime.d.mts +93 -0
  604. package/dist/internal/client-runtime.d.ts +93 -0
  605. package/dist/internal/client-runtime.mjs +66 -52
  606. package/dist/internal/compression-runtime.cjs +4 -4
  607. package/dist/internal/compression-runtime.d.mts +48 -0
  608. package/dist/internal/compression-runtime.d.ts +48 -0
  609. package/dist/internal/compression-runtime.mjs +3 -3
  610. package/dist/internal/config-runtime.cjs +94 -65
  611. package/dist/internal/config-runtime.d.mts +336 -0
  612. package/dist/internal/config-runtime.d.ts +336 -0
  613. package/dist/internal/config-runtime.mjs +80 -51
  614. package/dist/internal/desktop-guard.cjs +17 -0
  615. package/dist/internal/desktop-guard.d.mts +52 -0
  616. package/dist/internal/desktop-guard.d.ts +52 -0
  617. package/dist/internal/desktop-guard.mjs +17 -0
  618. package/dist/internal/docs-precompiled-runtime.cjs +18 -24
  619. package/dist/internal/docs-precompiled-runtime.d.mts +43 -0
  620. package/dist/internal/docs-precompiled-runtime.d.ts +43 -0
  621. package/dist/internal/docs-precompiled-runtime.mjs +14 -20
  622. package/dist/internal/form-actions-client.cjs +14 -0
  623. package/dist/internal/form-actions-client.d.mts +5 -0
  624. package/dist/internal/form-actions-client.d.ts +5 -0
  625. package/dist/internal/form-actions-client.mjs +14 -0
  626. package/dist/internal/form-actions.cjs +19 -0
  627. package/dist/internal/form-actions.d.mts +14 -0
  628. package/dist/internal/form-actions.d.ts +14 -0
  629. package/dist/internal/form-actions.mjs +19 -0
  630. package/dist/internal/infra-analytics-runtime.cjs +24 -8
  631. package/dist/internal/infra-analytics-runtime.d.mts +16 -0
  632. package/dist/internal/infra-analytics-runtime.d.ts +16 -0
  633. package/dist/internal/infra-analytics-runtime.mjs +22 -6
  634. package/dist/internal/island-codec.cjs +22 -0
  635. package/dist/internal/island-codec.d.mts +29 -0
  636. package/dist/internal/island-codec.d.ts +29 -0
  637. package/dist/internal/island-codec.mjs +22 -0
  638. package/dist/internal/island-value-store.cjs +10 -0
  639. package/dist/internal/island-value-store.d.mts +6 -0
  640. package/dist/internal/island-value-store.d.ts +6 -0
  641. package/dist/internal/island-value-store.mjs +10 -0
  642. package/dist/internal/islands-boot.cjs +211 -0
  643. package/dist/internal/islands-boot.d.mts +8 -0
  644. package/dist/internal/islands-boot.d.ts +8 -0
  645. package/dist/internal/islands-boot.mjs +211 -0
  646. package/dist/internal/islands-runtime.cjs +161 -0
  647. package/dist/internal/islands-runtime.d.mts +66 -0
  648. package/dist/internal/islands-runtime.d.ts +66 -0
  649. package/dist/internal/islands-runtime.mjs +161 -0
  650. package/dist/internal/islands-server.cjs +16 -0
  651. package/dist/internal/islands-server.d.mts +3 -0
  652. package/dist/internal/islands-server.d.ts +3 -0
  653. package/dist/internal/islands-server.mjs +16 -0
  654. package/dist/internal/islx-client.cjs +5 -0
  655. package/dist/internal/islx-client.d.mts +6 -0
  656. package/dist/internal/islx-client.d.ts +6 -0
  657. package/dist/internal/islx-client.mjs +3 -0
  658. package/dist/internal/islx-react.cjs +4 -0
  659. package/dist/internal/islx-react.d.mts +1 -0
  660. package/dist/internal/islx-react.d.ts +1 -0
  661. package/dist/internal/islx-react.mjs +2 -0
  662. package/dist/internal/islx-server.cjs +5 -0
  663. package/dist/internal/islx-server.d.mts +2 -0
  664. package/dist/internal/islx-server.d.ts +2 -0
  665. package/dist/internal/islx-server.mjs +3 -0
  666. package/dist/internal/isolated-boundary.cjs +5 -4
  667. package/dist/internal/isolated-boundary.d.mts +66 -0
  668. package/dist/internal/isolated-boundary.d.ts +66 -0
  669. package/dist/internal/isolated-boundary.mjs +4 -3
  670. package/dist/internal/metadata-image-runtime.cjs +8 -7
  671. package/dist/internal/metadata-image-runtime.d.mts +30 -0
  672. package/dist/internal/metadata-image-runtime.d.ts +30 -0
  673. package/dist/internal/metadata-image-runtime.mjs +7 -6
  674. package/dist/internal/native-server-fns.cjs +25 -0
  675. package/dist/internal/native-server-fns.d.mts +42 -0
  676. package/dist/internal/native-server-fns.d.ts +42 -0
  677. package/dist/internal/native-server-fns.mjs +25 -0
  678. package/dist/internal/product-telemetry-runtime.cjs +22 -228
  679. package/dist/internal/product-telemetry-runtime.d.mts +45 -0
  680. package/dist/internal/product-telemetry-runtime.d.ts +45 -0
  681. package/dist/internal/product-telemetry-runtime.mjs +11 -217
  682. package/dist/internal/production-node-env.cjs +7 -3
  683. package/dist/internal/production-node-env.d.mts +21 -0
  684. package/dist/internal/production-node-env.d.ts +21 -0
  685. package/dist/internal/production-node-env.mjs +6 -2
  686. package/dist/internal/production-runtime.cjs +179 -90
  687. package/dist/internal/production-runtime.d.mts +566 -0
  688. package/dist/internal/production-runtime.d.ts +566 -0
  689. package/dist/internal/production-runtime.mjs +203 -114
  690. package/dist/internal/react-cache.cjs +71 -0
  691. package/dist/internal/react-cache.d.mts +10 -0
  692. package/dist/internal/react-cache.d.ts +10 -0
  693. package/dist/internal/react-cache.mjs +71 -0
  694. package/dist/internal/request-cookies.cjs +3 -3
  695. package/dist/internal/request-cookies.d.mts +16 -0
  696. package/dist/internal/request-cookies.d.ts +16 -0
  697. package/dist/internal/request-cookies.mjs +2 -2
  698. package/dist/internal/server-fn-transform.cjs +13 -0
  699. package/dist/internal/server-fn-transform.d.mts +24 -0
  700. package/dist/internal/server-fn-transform.d.ts +24 -0
  701. package/dist/internal/server-fn-transform.mjs +13 -0
  702. package/dist/internal/server-tree.cjs +7 -4
  703. package/dist/internal/server-tree.d.mts +50 -0
  704. package/dist/internal/server-tree.d.ts +50 -0
  705. package/dist/internal/server-tree.mjs +8 -5
  706. package/dist/island-value-protocol.d-BRayRghM.d.mts +12 -0
  707. package/dist/island-value-protocol.d-BRayRghM.d.ts +12 -0
  708. package/dist/island.d-CfGru1MO.d.mts +9 -0
  709. package/dist/island.d-CfGru1MO.d.ts +9 -0
  710. package/dist/json-ld.cjs +3 -16
  711. package/dist/json-ld.d.mts +94 -0
  712. package/dist/json-ld.d.ts +94 -0
  713. package/dist/json-ld.mjs +3 -16
  714. package/dist/layers-DMRXRL7F.cjs +18 -0
  715. package/dist/layers-T55SA47E.mjs +18 -0
  716. package/dist/layers.d-CcS42OGR.d.mts +55 -0
  717. package/dist/layers.d-CcS42OGR.d.ts +55 -0
  718. package/dist/lifecycle.d-C2aLBOwu.d.mts +176 -0
  719. package/dist/lifecycle.d-C2aLBOwu.d.ts +176 -0
  720. package/dist/manager-2LUKNX2N.cjs +14 -0
  721. package/dist/manager-H5ZM3HAM.mjs +14 -0
  722. package/dist/markdown.cjs +19 -12
  723. package/dist/markdown.d.mts +33 -0
  724. package/dist/markdown.d.ts +33 -0
  725. package/dist/markdown.mjs +18 -11
  726. package/dist/middleware.cjs +34 -26
  727. package/dist/middleware.d.mts +225 -0
  728. package/dist/middleware.d.ts +225 -0
  729. package/dist/middleware.mjs +38 -30
  730. package/dist/mobile.cjs +9 -0
  731. package/dist/mobile.d.mts +138 -0
  732. package/dist/mobile.d.ts +138 -0
  733. package/dist/mobile.mjs +9 -0
  734. package/dist/modules-KOKD4XS6.mjs +13 -0
  735. package/dist/modules-QTP7WJPD.cjs +13 -0
  736. package/dist/native-server-fn-handler-GLRHAYWV.mjs +28 -0
  737. package/dist/native-server-fn-handler-J5MYRXN6.cjs +28 -0
  738. package/dist/native-specs-5OLED4MM.cjs +15 -0
  739. package/dist/native-specs-LDV6IZ4N.mjs +15 -0
  740. package/dist/native-tree-AS5L3ID3.mjs +27 -0
  741. package/dist/native-tree-Z2WYUJEV.cjs +27 -0
  742. package/dist/native.cjs +87 -0
  743. package/dist/native.d.mts +72 -0
  744. package/dist/native.d.ts +72 -0
  745. package/dist/native.mjs +87 -0
  746. package/dist/navigation-delegate.d-Ca_BV0Wu.d.mts +29 -0
  747. package/dist/navigation-delegate.d-aHiPI6GL.d.ts +29 -0
  748. package/dist/navigation.cjs +22 -21
  749. package/dist/navigation.d.mts +51 -0
  750. package/dist/navigation.d.ts +51 -0
  751. package/dist/navigation.mjs +21 -20
  752. package/dist/nitro-DD4QCA66.mjs +650 -0
  753. package/dist/nitro-VRDX2H4M.cjs +650 -0
  754. package/dist/node-module-bundle-7JHPPF6B.mjs +11 -0
  755. package/dist/node-module-bundle-YJGYBOGK.cjs +11 -0
  756. package/dist/observability.cjs +3 -3
  757. package/dist/observability.d-B2363jB6.d.mts +448 -0
  758. package/dist/observability.d-B2363jB6.d.ts +448 -0
  759. package/dist/observability.d.mts +2 -0
  760. package/dist/observability.d.ts +2 -0
  761. package/dist/observability.mjs +2 -2
  762. package/dist/og.cjs +1 -1
  763. package/dist/og.d.mts +1 -0
  764. package/dist/og.d.ts +1 -0
  765. package/dist/og.mjs +1 -1
  766. package/dist/params.d-BALtrRim.d.ts +15 -0
  767. package/dist/params.d-ry-lxqmy.d.mts +15 -0
  768. package/dist/platform.cjs +29 -0
  769. package/dist/platform.d.mts +24 -0
  770. package/dist/platform.d.ts +24 -0
  771. package/dist/platform.mjs +29 -0
  772. package/dist/plugin-53SY5YBS.mjs +32 -0
  773. package/dist/plugin-HZIBL3DW.cjs +32 -0
  774. package/dist/plugin.cjs +154 -124
  775. package/dist/plugin.d.mts +58 -0
  776. package/dist/plugin.d.ts +58 -0
  777. package/dist/plugin.mjs +137 -107
  778. package/dist/port-UFUZL6RI.mjs +419 -0
  779. package/dist/port-VTLHPZOI.cjs +419 -0
  780. package/dist/production-runtime.d-C0rF7a10.d.ts +123 -0
  781. package/dist/production-runtime.d-CnAsSWgF.d.mts +123 -0
  782. package/dist/production-vite.d-BQFAlG7n.d.mts +13 -0
  783. package/dist/production-vite.d-BQFAlG7n.d.ts +13 -0
  784. package/dist/query/client.cjs +59 -69
  785. package/dist/query/client.d.mts +61 -0
  786. package/dist/query/client.d.ts +61 -0
  787. package/dist/query/client.mjs +51 -61
  788. package/dist/query/index.cjs +4 -4
  789. package/dist/query/index.d.mts +90 -0
  790. package/dist/query/index.d.ts +90 -0
  791. package/dist/query/index.mjs +3 -3
  792. package/dist/query/parsers.cjs +3 -3
  793. package/dist/query/parsers.d.mts +29 -0
  794. package/dist/query/parsers.d.ts +29 -0
  795. package/dist/query/parsers.mjs +2 -2
  796. package/dist/query/server.cjs +5 -11
  797. package/dist/query/server.d.mts +55 -0
  798. package/dist/query/server.d.ts +55 -0
  799. package/dist/query/server.mjs +3 -9
  800. package/dist/render-plan.d-BxeITFT1.d.ts +25 -0
  801. package/dist/render-plan.d-Z-93m5GZ.d.mts +25 -0
  802. package/dist/renderer/react/client.cjs +1 -1
  803. package/dist/renderer/react/client.d.mts +3 -0
  804. package/dist/renderer/react/client.d.ts +3 -0
  805. package/dist/renderer/react/client.mjs +1 -1
  806. package/dist/renderer/react/server.cjs +10 -14
  807. package/dist/renderer/react/server.d.mts +48 -0
  808. package/dist/renderer/react/server.d.ts +48 -0
  809. package/dist/renderer/react/server.mjs +12 -16
  810. package/dist/renderer/react/vite.cjs +1 -4
  811. package/dist/renderer/react/vite.d.mts +4 -0
  812. package/dist/renderer/react/vite.d.ts +4 -0
  813. package/dist/renderer/react/vite.mjs +1 -4
  814. package/dist/renderer-client.cjs +71 -77
  815. package/dist/renderer-client.d.mts +126 -0
  816. package/dist/renderer-client.d.ts +126 -0
  817. package/dist/renderer-client.mjs +51 -57
  818. package/dist/renderer.cjs +3 -3
  819. package/dist/renderer.d.mts +260 -0
  820. package/dist/renderer.d.ts +260 -0
  821. package/dist/renderer.mjs +2 -2
  822. package/dist/request.cjs +4 -4
  823. package/dist/request.d-8_fMFNEb.d.mts +24 -0
  824. package/dist/request.d-X7Q1vmGF.d.ts +24 -0
  825. package/dist/request.d.mts +34 -0
  826. package/dist/request.d.ts +34 -0
  827. package/dist/request.mjs +3 -3
  828. package/dist/resolver.d-BHyZgpa7.d.ts +14 -0
  829. package/dist/resolver.d-JnZKKsc5.d.mts +14 -0
  830. package/dist/response.d-BolW0Vx_.d.mts +10 -0
  831. package/dist/response.d-BolW0Vx_.d.ts +10 -0
  832. package/dist/route-pattern.d-CVsVbq5n.d.mts +13 -0
  833. package/dist/route-pattern.d-CVsVbq5n.d.ts +13 -0
  834. package/dist/route-rendering.d-BInmBmul.d.mts +44 -0
  835. package/dist/route-rendering.d-BUr3Jp8S.d.ts +44 -0
  836. package/dist/route.d-BaVH3V0w.d.mts +224 -0
  837. package/dist/route.d-DBTEqifW.d.ts +224 -0
  838. package/dist/router.cjs +5 -5
  839. package/dist/router.d-CZQmbpHx.d.mts +50 -0
  840. package/dist/router.d-crorSRiW.d.ts +50 -0
  841. package/dist/router.d.mts +36 -0
  842. package/dist/router.d.ts +36 -0
  843. package/dist/router.mjs +4 -4
  844. package/dist/routes.cjs +14 -12
  845. package/dist/routes.d-BknKQcTu.d.ts +237 -0
  846. package/dist/routes.d-D1IrO9KK.d.mts +237 -0
  847. package/dist/routes.d.mts +273 -0
  848. package/dist/routes.d.ts +273 -0
  849. package/dist/routes.mjs +13 -11
  850. package/dist/rsc-pipeline-3MPRULGA.mjs +83 -0
  851. package/dist/rsc-pipeline-RHEZNBFQ.cjs +83 -0
  852. package/dist/runtime-OZKFZQCU.cjs +1336 -0
  853. package/dist/runtime-X5UR7VHP.mjs +1336 -0
  854. package/dist/runtime.d-3iJAKptR.d.mts +28 -0
  855. package/dist/runtime.d-BtL3PCL3.d.ts +28 -0
  856. package/dist/runtime.d-CCsjTZJW.d.ts +69 -0
  857. package/dist/runtime.d-CETtpLb-.d.mts +69 -0
  858. package/dist/schema-dev-notice-JMXEQWIQ.mjs +54 -0
  859. package/dist/schema-dev-notice-PLBFDTOF.cjs +54 -0
  860. package/dist/schema.cjs +3 -3
  861. package/dist/schema.d.mts +115 -0
  862. package/dist/schema.d.ts +115 -0
  863. package/dist/schema.mjs +2 -2
  864. package/dist/search-client-OXH6GBNO.mjs +15 -0
  865. package/dist/search-client-ZZLKVO5R.cjs +15 -0
  866. package/dist/server-action-security.cjs +8 -7
  867. package/dist/server-action-security.d.mts +45 -0
  868. package/dist/server-action-security.d.ts +45 -0
  869. package/dist/server-action-security.mjs +7 -6
  870. package/dist/server-client-bridge.d-DKWDl5NB.d.mts +7 -0
  871. package/dist/server-client-bridge.d-DKWDl5NB.d.ts +7 -0
  872. package/dist/server-fn-client.cjs +4 -4
  873. package/dist/server-fn-client.d.mts +60 -0
  874. package/dist/server-fn-client.d.ts +60 -0
  875. package/dist/server-fn-client.mjs +3 -3
  876. package/dist/server-fn-error.d-DrcH9cc1.d.mts +26 -0
  877. package/dist/server-fn-error.d-DrcH9cc1.d.ts +26 -0
  878. package/dist/server-fn.cjs +15 -14
  879. package/dist/server-fn.d.mts +192 -0
  880. package/dist/server-fn.d.ts +192 -0
  881. package/dist/server-fn.mjs +14 -13
  882. package/dist/server-plugins.cjs +15 -15
  883. package/dist/server-plugins.d.mts +65 -0
  884. package/dist/server-plugins.d.ts +65 -0
  885. package/dist/server-plugins.mjs +14 -14
  886. package/dist/server-query-client.cjs +9 -8
  887. package/dist/server-query-client.d.mts +26 -0
  888. package/dist/server-query-client.d.ts +26 -0
  889. package/dist/server-query-client.mjs +8 -7
  890. package/dist/server-query-runtime.d-DXRNhX_3.d.ts +36 -0
  891. package/dist/server-query-runtime.d-aP52iuL5.d.mts +36 -0
  892. package/dist/server-query.cjs +17 -16
  893. package/dist/server-query.d.mts +46 -0
  894. package/dist/server-query.d.ts +46 -0
  895. package/dist/server-query.mjs +16 -15
  896. package/dist/server.cjs +266 -199
  897. package/dist/server.d.mts +78 -0
  898. package/dist/server.d.ts +78 -0
  899. package/dist/server.mjs +239 -172
  900. package/dist/session-2Q72D4QV.cjs +23 -0
  901. package/dist/session-QZXZOPR2.mjs +23 -0
  902. package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
  903. package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
  904. package/dist/spa-router.d-CCADbSqJ.d.ts +248 -0
  905. package/dist/spa-router.d-CtSHzXlC.d.mts +248 -0
  906. package/dist/storage.cjs +7 -3
  907. package/dist/storage.d.mts +60 -0
  908. package/dist/storage.d.ts +60 -0
  909. package/dist/storage.mjs +6 -2
  910. package/dist/testing.cjs +59 -76
  911. package/dist/testing.d.mts +110 -0
  912. package/dist/testing.d.ts +110 -0
  913. package/dist/testing.mjs +49 -66
  914. package/dist/theme/client.cjs +5 -5
  915. package/dist/theme/client.d.mts +10 -0
  916. package/dist/theme/client.d.ts +10 -0
  917. package/dist/theme/client.mjs +4 -4
  918. package/dist/theme/index.cjs +3 -3
  919. package/dist/theme/index.d.mts +6 -0
  920. package/dist/theme/index.d.ts +6 -0
  921. package/dist/theme/index.mjs +2 -2
  922. package/dist/theme/runtime.cjs +3 -3
  923. package/dist/theme/runtime.d.mts +13 -0
  924. package/dist/theme/runtime.d.ts +13 -0
  925. package/dist/theme/runtime.mjs +2 -2
  926. package/dist/theme/server.cjs +8 -8
  927. package/dist/theme/server.d.mts +8 -0
  928. package/dist/theme/server.d.ts +8 -0
  929. package/dist/theme/server.mjs +7 -7
  930. package/dist/types.d-BnIqOn9w.d.mts +73 -0
  931. package/dist/types.d-BnIqOn9w.d.ts +73 -0
  932. package/dist/types.d-C41ePjvP.d.mts +85 -0
  933. package/dist/types.d-C41ePjvP.d.ts +85 -0
  934. package/dist/types.d-DQnyD3VD.d.mts +30 -0
  935. package/dist/types.d-DQnyD3VD.d.ts +30 -0
  936. package/dist/utils.d-CjyE-npA.d.ts +54 -0
  937. package/dist/utils.d-zFPHKFFJ.d.mts +54 -0
  938. package/dist/version.cjs +3 -3
  939. package/dist/version.d.mts +3 -0
  940. package/dist/version.d.ts +3 -0
  941. package/dist/version.mjs +2 -2
  942. package/dist/vite.cjs +172 -120
  943. package/dist/vite.d.mts +186 -0
  944. package/dist/vite.d.ts +186 -0
  945. package/dist/vite.mjs +159 -107
  946. package/dist/workflows.cjs +14 -13
  947. package/dist/workflows.d-CRMzQZ3k.d.mts +188 -0
  948. package/dist/workflows.d-CRMzQZ3k.d.ts +188 -0
  949. package/dist/workflows.d.mts +1 -0
  950. package/dist/workflows.d.ts +1 -0
  951. package/dist/workflows.mjs +13 -12
  952. package/package.json +7 -2
  953. package/dist/agent-mcp-handler-LPJ2CADR.mjs +0 -19
  954. package/dist/agent-mcp-handler-SJAHFSPI.cjs +0 -19
  955. package/dist/chunk-23MGIV4X.mjs +0 -579
  956. package/dist/chunk-27ZWSI3W.cjs +0 -64
  957. package/dist/chunk-2A3EQHXX.mjs +0 -173
  958. package/dist/chunk-2CQ74SP6.cjs +0 -13
  959. package/dist/chunk-2ELDTQRN.mjs +0 -85
  960. package/dist/chunk-2J7W2WND.mjs +0 -149
  961. package/dist/chunk-2NNMOPDN.mjs +0 -237
  962. package/dist/chunk-2PQNJXFM.mjs +0 -20
  963. package/dist/chunk-2SJ4RQ6P.cjs +0 -57
  964. package/dist/chunk-2UC36WAC.mjs +0 -22
  965. package/dist/chunk-2VQKKQ6D.mjs +0 -51
  966. package/dist/chunk-2Y3JRYVG.mjs +0 -71
  967. package/dist/chunk-35GKZR22.mjs +0 -157
  968. package/dist/chunk-3BU22U3M.cjs +0 -237
  969. package/dist/chunk-3KZS4SUS.mjs +0 -414
  970. package/dist/chunk-3SDFA7UF.cjs +0 -701
  971. package/dist/chunk-3TLO7SBY.cjs +0 -240
  972. package/dist/chunk-3UEVPCGW.mjs +0 -435
  973. package/dist/chunk-3WNDJT2E.cjs +0 -109
  974. package/dist/chunk-44SYJEG3.mjs +0 -13
  975. package/dist/chunk-45ZSJLDT.mjs +0 -183
  976. package/dist/chunk-4E5AEDKY.mjs +0 -696
  977. package/dist/chunk-4E5WBPEG.mjs +0 -1157
  978. package/dist/chunk-4GLOOWKE.mjs +0 -1344
  979. package/dist/chunk-4JCQDWPX.mjs +0 -24
  980. package/dist/chunk-4NU4GGTC.cjs +0 -484
  981. package/dist/chunk-4OOBRCJX.mjs +0 -300
  982. package/dist/chunk-4PPEPOZZ.cjs +0 -21
  983. package/dist/chunk-4RB44K6Z.mjs +0 -94
  984. package/dist/chunk-4SIYUGRY.mjs +0 -93
  985. package/dist/chunk-4WQ6PGSJ.cjs +0 -367
  986. package/dist/chunk-4WVJLURN.mjs +0 -417
  987. package/dist/chunk-4ZFL5GFN.cjs +0 -520
  988. package/dist/chunk-54UPOYFS.mjs +0 -35
  989. package/dist/chunk-55YI3RRB.mjs +0 -192
  990. package/dist/chunk-5I3OT426.cjs +0 -11021
  991. package/dist/chunk-5QIKR7RR.cjs +0 -224
  992. package/dist/chunk-5SJWVY6R.mjs +0 -26
  993. package/dist/chunk-5WI2S4CO.mjs +0 -20
  994. package/dist/chunk-63H6BKXG.cjs +0 -389
  995. package/dist/chunk-655RLQQL.mjs +0 -43
  996. package/dist/chunk-6EODJYCX.cjs +0 -183
  997. package/dist/chunk-6EXBPJ24.cjs +0 -434
  998. package/dist/chunk-6MVFL3R5.cjs +0 -506
  999. package/dist/chunk-6NT6S2VQ.mjs +0 -180
  1000. package/dist/chunk-6QQDAAAZ.cjs +0 -38
  1001. package/dist/chunk-6SJ2KJTA.mjs +0 -314
  1002. package/dist/chunk-6SM5XXFS.cjs +0 -70
  1003. package/dist/chunk-6V4TDWEC.cjs +0 -455
  1004. package/dist/chunk-72ADZ6GQ.cjs +0 -19
  1005. package/dist/chunk-72AK62H5.mjs +0 -55
  1006. package/dist/chunk-75RZHGLS.cjs +0 -135
  1007. package/dist/chunk-77GNHH2Z.cjs +0 -236
  1008. package/dist/chunk-7DBXEASO.cjs +0 -40
  1009. package/dist/chunk-7LTCDQRS.mjs +0 -166
  1010. package/dist/chunk-7W3CPVXS.cjs +0 -24
  1011. package/dist/chunk-A6WIQH5Z.cjs +0 -31
  1012. package/dist/chunk-ADEA7PN3.cjs +0 -1101
  1013. package/dist/chunk-AELACLOB.mjs +0 -47
  1014. package/dist/chunk-AHGECQEW.mjs +0 -49
  1015. package/dist/chunk-AI7QMY7O.cjs +0 -41
  1016. package/dist/chunk-AJQTP4OO.mjs +0 -212
  1017. package/dist/chunk-AMDMVWMI.cjs +0 -39
  1018. package/dist/chunk-ARJWXNQL.cjs +0 -256
  1019. package/dist/chunk-BCMSYSN2.mjs +0 -183
  1020. package/dist/chunk-BIDYX3SL.cjs +0 -91
  1021. package/dist/chunk-BJIYRUGQ.mjs +0 -35
  1022. package/dist/chunk-BJPBQNIE.cjs +0 -2355
  1023. package/dist/chunk-BO36SELV.cjs +0 -395
  1024. package/dist/chunk-BOYNDCZL.mjs +0 -54
  1025. package/dist/chunk-BPMATOP2.cjs +0 -687
  1026. package/dist/chunk-BPOF5U4N.mjs +0 -566
  1027. package/dist/chunk-BRYHOB4X.mjs +0 -18
  1028. package/dist/chunk-BSC7JTOK.mjs +0 -70
  1029. package/dist/chunk-BTHHUD7Q.mjs +0 -51
  1030. package/dist/chunk-BUGNQIHC.mjs +0 -449
  1031. package/dist/chunk-C4NCTZLM.mjs +0 -22
  1032. package/dist/chunk-C4SPBWFM.cjs +0 -26
  1033. package/dist/chunk-C5GUTBZK.cjs +0 -173
  1034. package/dist/chunk-CBBLJMR5.mjs +0 -74
  1035. package/dist/chunk-CBJJH36A.cjs +0 -2187
  1036. package/dist/chunk-CGBDNNSM.cjs +0 -664
  1037. package/dist/chunk-CI6E3UOH.cjs +0 -314
  1038. package/dist/chunk-CMGMGHUZ.cjs +0 -27
  1039. package/dist/chunk-CNOQY6Z7.mjs +0 -156
  1040. package/dist/chunk-CQ6OSQ3K.mjs +0 -36
  1041. package/dist/chunk-CU625VAY.mjs +0 -13
  1042. package/dist/chunk-CVOSWIQA.mjs +0 -15300
  1043. package/dist/chunk-CXEN47J3.mjs +0 -550
  1044. package/dist/chunk-CXP5U3RW.cjs +0 -54
  1045. package/dist/chunk-D227TIEN.cjs +0 -1114
  1046. package/dist/chunk-D2BB47NB.cjs +0 -157
  1047. package/dist/chunk-D2ULAULS.cjs +0 -166
  1048. package/dist/chunk-D7JTOLFK.cjs +0 -285
  1049. package/dist/chunk-DAATZTKJ.mjs +0 -220
  1050. package/dist/chunk-DAO7JGTS.mjs +0 -73
  1051. package/dist/chunk-DQQOKWYA.cjs +0 -42
  1052. package/dist/chunk-DTSROJ5J.mjs +0 -367
  1053. package/dist/chunk-DVM4FKZL.cjs +0 -169
  1054. package/dist/chunk-DZ5ZVB2K.cjs +0 -9
  1055. package/dist/chunk-E2ROOWQC.cjs +0 -2225
  1056. package/dist/chunk-E3UK5IIB.cjs +0 -593
  1057. package/dist/chunk-E5GNDG5F.mjs +0 -701
  1058. package/dist/chunk-EA5K5BKU.mjs +0 -455
  1059. package/dist/chunk-ECKF2BAM.cjs +0 -403
  1060. package/dist/chunk-EK4QAEFZ.cjs +0 -550
  1061. package/dist/chunk-EMLAPBEM.mjs +0 -256
  1062. package/dist/chunk-ENLZ4R3Y.mjs +0 -55
  1063. package/dist/chunk-EUV4YR3V.cjs +0 -1362
  1064. package/dist/chunk-EWET4D2Y.mjs +0 -395
  1065. package/dist/chunk-EZDQRNQ7.mjs +0 -1496
  1066. package/dist/chunk-F2SE2VDO.mjs +0 -65
  1067. package/dist/chunk-F3LTXB63.mjs +0 -40
  1068. package/dist/chunk-F3VB7ONA.mjs +0 -338
  1069. package/dist/chunk-F5QO4FNE.mjs +0 -664
  1070. package/dist/chunk-FA2W42OV.mjs +0 -25
  1071. package/dist/chunk-FDR64H6B.mjs +0 -140
  1072. package/dist/chunk-FFFW3OQ7.cjs +0 -65
  1073. package/dist/chunk-FJ3M4CUX.cjs +0 -46
  1074. package/dist/chunk-FK6GO24V.cjs +0 -54
  1075. package/dist/chunk-FNO7A7CM.cjs +0 -1496
  1076. package/dist/chunk-FO427P6I.cjs +0 -392
  1077. package/dist/chunk-FP2INE7H.mjs +0 -113
  1078. package/dist/chunk-FUZEBRP3.mjs +0 -593
  1079. package/dist/chunk-FZ6YYU2W.mjs +0 -65
  1080. package/dist/chunk-G2KY33I6.mjs +0 -202
  1081. package/dist/chunk-G4MWPDSE.mjs +0 -19
  1082. package/dist/chunk-G643DQCH.cjs +0 -13
  1083. package/dist/chunk-G7HXGLEC.cjs +0 -175
  1084. package/dist/chunk-GC3SUL6M.mjs +0 -109
  1085. package/dist/chunk-GCXWJJKH.mjs +0 -169
  1086. package/dist/chunk-GHFS7RUB.mjs +0 -152
  1087. package/dist/chunk-GQ3Z3IZI.cjs +0 -241
  1088. package/dist/chunk-H4AMB6ZE.mjs +0 -421
  1089. package/dist/chunk-H77NVNJ2.mjs +0 -57
  1090. package/dist/chunk-HALDNTIV.mjs +0 -2225
  1091. package/dist/chunk-HITLGIAO.cjs +0 -55
  1092. package/dist/chunk-HLJ6MBUZ.cjs +0 -183
  1093. package/dist/chunk-HOXTWRGB.mjs +0 -484
  1094. package/dist/chunk-HREOKQWT.cjs +0 -45
  1095. package/dist/chunk-I2BHUNBU.mjs +0 -14
  1096. package/dist/chunk-I57LW5VZ.cjs +0 -94
  1097. package/dist/chunk-IE7XCHH3.cjs +0 -85
  1098. package/dist/chunk-IHNIDL6H.cjs +0 -772
  1099. package/dist/chunk-IK6LVLKC.cjs +0 -51
  1100. package/dist/chunk-IOEH4VWN.mjs +0 -202
  1101. package/dist/chunk-IWZKTWHZ.cjs +0 -435
  1102. package/dist/chunk-IZY3V5XW.mjs +0 -23
  1103. package/dist/chunk-J63ZH5OQ.cjs +0 -62
  1104. package/dist/chunk-J7FSKED3.cjs +0 -93
  1105. package/dist/chunk-JBSVKMC5.mjs +0 -28
  1106. package/dist/chunk-JDNHKPTD.cjs +0 -22
  1107. package/dist/chunk-JG6DJF5A.mjs +0 -238
  1108. package/dist/chunk-JGLC4TO3.cjs +0 -192
  1109. package/dist/chunk-JM5XPKWH.mjs +0 -41
  1110. package/dist/chunk-JNUWCDTF.cjs +0 -1344
  1111. package/dist/chunk-JNZ4TDWM.mjs +0 -445
  1112. package/dist/chunk-JPLUGGRV.mjs +0 -230
  1113. package/dist/chunk-JSROZYYO.cjs +0 -164
  1114. package/dist/chunk-KCMTCM6I.cjs +0 -53
  1115. package/dist/chunk-KGB5UXJJ.mjs +0 -27
  1116. package/dist/chunk-KGZIORNL.cjs +0 -43
  1117. package/dist/chunk-KI3MESHB.mjs +0 -224
  1118. package/dist/chunk-KIIMAWOJ.cjs +0 -505
  1119. package/dist/chunk-KMTGADN3.mjs +0 -95
  1120. package/dist/chunk-KN7K4VQN.mjs +0 -236
  1121. package/dist/chunk-KNBBQHO2.cjs +0 -51
  1122. package/dist/chunk-KR6CKSXT.cjs +0 -15
  1123. package/dist/chunk-KXWRO25S.cjs +0 -85
  1124. package/dist/chunk-L3KT7IXV.mjs +0 -91
  1125. package/dist/chunk-LCCBO7PJ.cjs +0 -46
  1126. package/dist/chunk-LIUGYUX3.cjs +0 -22
  1127. package/dist/chunk-LPEX4YW6.mjs +0 -13
  1128. package/dist/chunk-LSKZMJMP.cjs +0 -65
  1129. package/dist/chunk-LSZAVSGY.mjs +0 -1101
  1130. package/dist/chunk-LTNGXMQ6.cjs +0 -55
  1131. package/dist/chunk-LYLEZIG3.cjs +0 -73
  1132. package/dist/chunk-LYV44OIR.mjs +0 -256
  1133. package/dist/chunk-M2L4MYDQ.cjs +0 -14
  1134. package/dist/chunk-M7MKQXAF.cjs +0 -87
  1135. package/dist/chunk-MKYBIIAQ.mjs +0 -2187
  1136. package/dist/chunk-MQ3H6LT5.cjs +0 -202
  1137. package/dist/chunk-MRMI32SN.cjs +0 -1157
  1138. package/dist/chunk-MSSFIQGM.mjs +0 -1002
  1139. package/dist/chunk-MT763TDW.cjs +0 -43
  1140. package/dist/chunk-MVL2RAJW.mjs +0 -62
  1141. package/dist/chunk-MWSK6C4J.cjs +0 -18
  1142. package/dist/chunk-MWWVKDW3.cjs +0 -169
  1143. package/dist/chunk-N2NAS2AM.cjs +0 -725
  1144. package/dist/chunk-N46M65CI.mjs +0 -54
  1145. package/dist/chunk-N4UOK6ZI.cjs +0 -256
  1146. package/dist/chunk-NI2TCCTG.mjs +0 -11020
  1147. package/dist/chunk-NO3WWW3N.cjs +0 -192
  1148. package/dist/chunk-NPC7VWJE.mjs +0 -277
  1149. package/dist/chunk-NRDBW4MP.mjs +0 -45
  1150. package/dist/chunk-NRSN7G7E.mjs +0 -42
  1151. package/dist/chunk-NYJMY3JA.cjs +0 -156
  1152. package/dist/chunk-NZKJGRB3.cjs +0 -230
  1153. package/dist/chunk-O6BCQV2T.mjs +0 -46
  1154. package/dist/chunk-O6I6VWKK.mjs +0 -493
  1155. package/dist/chunk-O6WAEAX3.mjs +0 -2028
  1156. package/dist/chunk-O7BH5O46.mjs +0 -175
  1157. package/dist/chunk-OFZUJMCU.mjs +0 -601
  1158. package/dist/chunk-OHLSEQ57.mjs +0 -910
  1159. package/dist/chunk-OHY2ZWUG.cjs +0 -25
  1160. package/dist/chunk-OI6CMLWX.cjs +0 -47
  1161. package/dist/chunk-ONUEYC6N.mjs +0 -27
  1162. package/dist/chunk-OO7GXVSR.mjs +0 -9
  1163. package/dist/chunk-OT6ZEW74.mjs +0 -139
  1164. package/dist/chunk-OTC5BDGO.mjs +0 -687
  1165. package/dist/chunk-OX6O6WVA.cjs +0 -74
  1166. package/dist/chunk-OYEUREB6.cjs +0 -35
  1167. package/dist/chunk-OZVEHHMA.cjs +0 -194
  1168. package/dist/chunk-P5TJO5IS.mjs +0 -240
  1169. package/dist/chunk-PCOTGFSM.cjs +0 -139
  1170. package/dist/chunk-PNGWZFUQ.mjs +0 -39
  1171. package/dist/chunk-PSV6XKPO.cjs +0 -220
  1172. package/dist/chunk-PTZ2TVNE.cjs +0 -178
  1173. package/dist/chunk-PZNL3WEG.mjs +0 -772
  1174. package/dist/chunk-PZYCPSCC.cjs +0 -35
  1175. package/dist/chunk-Q2KB32T4.mjs +0 -690
  1176. package/dist/chunk-Q5B3KJBP.cjs +0 -152
  1177. package/dist/chunk-QBK2AA4U.cjs +0 -445
  1178. package/dist/chunk-QCFBDFRS.mjs +0 -169
  1179. package/dist/chunk-QCVE2OCI.cjs +0 -169
  1180. package/dist/chunk-QE6VAKLT.mjs +0 -85
  1181. package/dist/chunk-QNPEUFHQ.cjs +0 -27
  1182. package/dist/chunk-QORUJDIV.mjs +0 -46
  1183. package/dist/chunk-QV4VE2OW.mjs +0 -166
  1184. package/dist/chunk-QVKYGNVM.mjs +0 -27
  1185. package/dist/chunk-QVYLBY73.mjs +0 -93
  1186. package/dist/chunk-R3DS7A2T.mjs +0 -21
  1187. package/dist/chunk-R5A5KNVX.cjs +0 -20
  1188. package/dist/chunk-R5JIFR6B.cjs +0 -42
  1189. package/dist/chunk-RHAZ22ZN.mjs +0 -87
  1190. package/dist/chunk-RKPDESVW.cjs +0 -15301
  1191. package/dist/chunk-RSOJ7DRT.mjs +0 -506
  1192. package/dist/chunk-S3A45T7F.cjs +0 -166
  1193. package/dist/chunk-S3FNNQHR.mjs +0 -31
  1194. package/dist/chunk-S3JO3N4H.cjs +0 -17
  1195. package/dist/chunk-S67OYZU7.mjs +0 -711
  1196. package/dist/chunk-S6VYG6XU.cjs +0 -493
  1197. package/dist/chunk-SAXPH6G5.mjs +0 -169
  1198. package/dist/chunk-SC2WYWPF.mjs +0 -241
  1199. package/dist/chunk-SDOTRX3V.cjs +0 -690
  1200. package/dist/chunk-SEJ5N6SL.mjs +0 -38
  1201. package/dist/chunk-SFGWNC43.mjs +0 -97
  1202. package/dist/chunk-SHB3GYXI.mjs +0 -285
  1203. package/dist/chunk-SHLXACIO.cjs +0 -95
  1204. package/dist/chunk-SJNMVDDF.cjs +0 -86
  1205. package/dist/chunk-SK35NQKK.cjs +0 -27
  1206. package/dist/chunk-SKNL7VA2.mjs +0 -42
  1207. package/dist/chunk-SLQCDJSO.mjs +0 -18
  1208. package/dist/chunk-SOR334EB.cjs +0 -149
  1209. package/dist/chunk-SU7MH53P.cjs +0 -180
  1210. package/dist/chunk-SVRTJOUF.cjs +0 -113
  1211. package/dist/chunk-SYQ3MOWW.cjs +0 -73
  1212. package/dist/chunk-T4OGRVNS.mjs +0 -392
  1213. package/dist/chunk-T5OJPTVN.cjs +0 -417
  1214. package/dist/chunk-TE2G5ION.cjs +0 -2028
  1215. package/dist/chunk-TFQG7TBC.mjs +0 -43
  1216. package/dist/chunk-TIWHTW3Q.cjs +0 -24
  1217. package/dist/chunk-TKJZFIML.cjs +0 -20
  1218. package/dist/chunk-TKSCR644.cjs +0 -414
  1219. package/dist/chunk-TVGP4BBZ.mjs +0 -45
  1220. package/dist/chunk-U4KT7QP3.cjs +0 -23
  1221. package/dist/chunk-UDNPLXW7.mjs +0 -86
  1222. package/dist/chunk-UFDAAQFX.cjs +0 -169
  1223. package/dist/chunk-UFDV5N3C.cjs +0 -711
  1224. package/dist/chunk-UH6QN5NL.mjs +0 -178
  1225. package/dist/chunk-UP4CW6WP.mjs +0 -169
  1226. package/dist/chunk-UQZ4AYTH.cjs +0 -168
  1227. package/dist/chunk-US2QVW3E.cjs +0 -36
  1228. package/dist/chunk-UVW64BCB.cjs +0 -910
  1229. package/dist/chunk-UWPLULNK.mjs +0 -520
  1230. package/dist/chunk-UXFQ3UDA.cjs +0 -140
  1231. package/dist/chunk-UYIHRDE4.cjs +0 -97
  1232. package/dist/chunk-V2FTMRS7.mjs +0 -223
  1233. package/dist/chunk-VB6UCX3V.cjs +0 -421
  1234. package/dist/chunk-VEKFLAQM.cjs +0 -300
  1235. package/dist/chunk-VILIPRS6.mjs +0 -725
  1236. package/dist/chunk-VQLJWDVW.cjs +0 -696
  1237. package/dist/chunk-W3B4PKAW.mjs +0 -28
  1238. package/dist/chunk-W4E7WMXE.cjs +0 -71
  1239. package/dist/chunk-W7LF2J2S.mjs +0 -64
  1240. package/dist/chunk-WBKEZXWE.cjs +0 -449
  1241. package/dist/chunk-WC5UV2HQ.cjs +0 -212
  1242. package/dist/chunk-WMAPPDMM.cjs +0 -28
  1243. package/dist/chunk-WMOGFOUJ.cjs +0 -223
  1244. package/dist/chunk-WNSDDRNU.mjs +0 -24
  1245. package/dist/chunk-WWFTAUFG.cjs +0 -45
  1246. package/dist/chunk-WWIKMBRN.mjs +0 -1362
  1247. package/dist/chunk-XCMCS4DA.mjs +0 -1114
  1248. package/dist/chunk-XJJVLDM6.mjs +0 -194
  1249. package/dist/chunk-XJXBIP67.cjs +0 -277
  1250. package/dist/chunk-XNPDONUH.mjs +0 -389
  1251. package/dist/chunk-XSIRSMAS.cjs +0 -339
  1252. package/dist/chunk-XZNTNMHT.mjs +0 -15
  1253. package/dist/chunk-Y5SJM2W7.cjs +0 -579
  1254. package/dist/chunk-YDQZGSDS.mjs +0 -2355
  1255. package/dist/chunk-YFILVET3.mjs +0 -192
  1256. package/dist/chunk-YFPGHF5F.cjs +0 -202
  1257. package/dist/chunk-YHOCRI4H.mjs +0 -434
  1258. package/dist/chunk-YJRZR7VU.cjs +0 -28
  1259. package/dist/chunk-YKX5BK66.cjs +0 -46
  1260. package/dist/chunk-YOZYCI6Z.mjs +0 -73
  1261. package/dist/chunk-YSCV4SJF.cjs +0 -49
  1262. package/dist/chunk-YSLWRWWP.cjs +0 -601
  1263. package/dist/chunk-YWMZUGIS.mjs +0 -403
  1264. package/dist/chunk-YWN746US.cjs +0 -1002
  1265. package/dist/chunk-YX3DBN4M.cjs +0 -18
  1266. package/dist/chunk-Z2HLU4IX.cjs +0 -238
  1267. package/dist/chunk-Z2RZJZIZ.mjs +0 -168
  1268. package/dist/chunk-Z3HATSKO.mjs +0 -46
  1269. package/dist/chunk-ZEG3OPIB.cjs +0 -93
  1270. package/dist/chunk-ZLAT2CWY.mjs +0 -135
  1271. package/dist/chunk-ZMMBIVQM.mjs +0 -505
  1272. package/dist/chunk-ZMSZZXOR.mjs +0 -164
  1273. package/dist/chunk-ZWM5KGAA.cjs +0 -566
  1274. package/dist/chunk-ZZSRYEYU.mjs +0 -53
  1275. package/dist/devtools-ERIKFEXX.mjs +0 -472
  1276. package/dist/devtools-JZJJY5CK.cjs +0 -472
  1277. package/dist/devtools-client-CXQ6PXI6.cjs +0 -254
  1278. package/dist/devtools-client-HJS2T34Y.mjs +0 -254
  1279. package/dist/devtools-ui-5GBDIGMK.cjs +0 -1296
  1280. package/dist/devtools-ui-5KDAVPIF.mjs +0 -1296
  1281. package/dist/integration-orm-55F7CII5.cjs +0 -13
  1282. package/dist/integration-orm-KV5B3BGZ.mjs +0 -13
  1283. package/dist/layers-UTB43B7A.mjs +0 -18
  1284. package/dist/layers-VUWIOFEO.cjs +0 -18
  1285. package/dist/manager-RT733VRK.mjs +0 -14
  1286. package/dist/manager-XZ5TX7AO.cjs +0 -14
  1287. package/dist/nitro-7F65EZZS.cjs +0 -653
  1288. package/dist/nitro-MPZJGPXK.mjs +0 -653
  1289. package/dist/node-module-bundle-L5L7JCZ4.mjs +0 -11
  1290. package/dist/node-module-bundle-VAFZOXMJ.cjs +0 -11
  1291. package/dist/schema-dev-notice-O67CPXJ6.mjs +0 -56
  1292. package/dist/schema-dev-notice-Y7MQEFGN.cjs +0 -56
  1293. package/dist/search-client-G3RICOFU.cjs +0 -13
  1294. package/dist/search-client-KR7YRIVR.mjs +0 -13
@@ -0,0 +1,1980 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
5
+
6
+
7
+ var _chunkOOJBBHYWcjs = require('./chunk-OOJBBHYW.cjs');
8
+
9
+
10
+
11
+ var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
12
+
13
+
14
+
15
+ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
16
+
17
+
18
+ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
19
+
20
+
21
+ var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
22
+
23
+
24
+ var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
25
+
26
+ // src/docs/handler.ts
27
+
28
+
29
+
30
+
31
+
32
+
33
+ var _fs = require('fs');
34
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
35
+ var _marked = require('marked');
36
+ var _sugarhigh = require('sugar-high');
37
+
38
+ // src/docs/last-modified.ts
39
+ var _child_process = require('child_process');
40
+
41
+
42
+ var FARM_DOCS_LAST_MODIFIED_MANIFEST = ".farm-docs-last-modified.json";
43
+ var COMMIT_MARKER = "__FARM_DOCS_COMMIT__";
44
+ var DOCS_FILE_EXTENSIONS = /* @__PURE__ */ new Set([".md", ".mdx"]);
45
+ var manifestCache = /* @__PURE__ */ new Map();
46
+ function normalizeRelativePath(value) {
47
+ return value.replace(/\\/g, "/").replace(/^\.\/+/, "");
48
+ }
49
+ function resolveExistingPath(filePath) {
50
+ try {
51
+ return _fs.realpathSync.call(void 0, filePath);
52
+ } catch (e) {
53
+ return _path2.default.resolve(filePath);
54
+ }
55
+ }
56
+ function isDocsSourceFile(filePath) {
57
+ return DOCS_FILE_EXTENSIONS.has(_path2.default.extname(filePath).toLowerCase());
58
+ }
59
+ function discoverDocsSourceFiles(contentDir) {
60
+ const files = [];
61
+ const visit = (dir) => {
62
+ for (const entry of _fs.readdirSync.call(void 0, dir, { withFileTypes: true }).sort(
63
+ (a, b) => a.name.localeCompare(b.name)
64
+ )) {
65
+ if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
66
+ const absolutePath = _path2.default.join(dir, entry.name);
67
+ if (entry.isDirectory()) {
68
+ visit(absolutePath);
69
+ } else if (entry.isFile() && isDocsSourceFile(absolutePath)) {
70
+ files.push(absolutePath);
71
+ }
72
+ }
73
+ };
74
+ if (_fs.existsSync.call(void 0, contentDir)) visit(contentDir);
75
+ return files;
76
+ }
77
+ function getGitLastModifiedDates(contentDir) {
78
+ try {
79
+ const gitRoot = _child_process.execFileSync.call(void 0, "git", ["-C", contentDir, "rev-parse", "--show-toplevel"], {
80
+ encoding: "utf8",
81
+ stdio: ["ignore", "pipe", "ignore"]
82
+ }).trim();
83
+ if (!gitRoot) return {};
84
+ const contentPathspec = normalizeRelativePath(_path2.default.relative(gitRoot, contentDir)) || ".";
85
+ const contentPrefix = contentPathspec === "." ? "" : `${contentPathspec}/`;
86
+ const history = _child_process.execFileSync.call(void 0,
87
+ "git",
88
+ [
89
+ "-C",
90
+ gitRoot,
91
+ "-c",
92
+ "core.quotePath=false",
93
+ "log",
94
+ `--format=${COMMIT_MARKER}%cI`,
95
+ "--name-only",
96
+ "--",
97
+ contentPathspec
98
+ ],
99
+ {
100
+ encoding: "utf8",
101
+ stdio: ["ignore", "pipe", "ignore"],
102
+ maxBuffer: 32 * 1024 * 1024
103
+ }
104
+ );
105
+ const pages = {};
106
+ let commitDate;
107
+ for (const rawLine of history.split(/\r?\n/)) {
108
+ const line = normalizeRelativePath(rawLine.trim());
109
+ if (!line) continue;
110
+ if (line.startsWith(COMMIT_MARKER)) {
111
+ commitDate = line.slice(COMMIT_MARKER.length);
112
+ continue;
113
+ }
114
+ if (!commitDate || contentPrefix && !line.startsWith(contentPrefix)) continue;
115
+ const relativePath = contentPrefix ? line.slice(contentPrefix.length) : line;
116
+ if (isDocsSourceFile(relativePath) && !pages[relativePath]) {
117
+ pages[relativePath] = commitDate;
118
+ }
119
+ }
120
+ return pages;
121
+ } catch (e2) {
122
+ return {};
123
+ }
124
+ }
125
+ function readManifest(contentDir) {
126
+ const manifestPath = _path2.default.join(contentDir, FARM_DOCS_LAST_MODIFIED_MANIFEST);
127
+ if (!_fs.existsSync.call(void 0, manifestPath)) return null;
128
+ try {
129
+ const parsed = JSON.parse(
130
+ _fs.readFileSync.call(void 0, manifestPath, "utf8")
131
+ );
132
+ if (parsed.version !== 1 || !parsed.pages || typeof parsed.pages !== "object") return null;
133
+ const pages = Object.fromEntries(
134
+ Object.entries(parsed.pages).filter(
135
+ (entry) => typeof entry[1] === "string" && entry[1].length > 0
136
+ )
137
+ );
138
+ return { version: 1, pages };
139
+ } catch (e3) {
140
+ return null;
141
+ }
142
+ }
143
+ function createFarmDocsLastModifiedManifest(contentDir, options = {}) {
144
+ const resolvedContentDir = resolveExistingPath(contentDir);
145
+ const gitDates = getGitLastModifiedDates(resolvedContentDir);
146
+ const fallbackDate = (_nullishCoalesce(options.now, () => ( /* @__PURE__ */ new Date()))).toISOString();
147
+ const pages = {};
148
+ for (const sourcePath of discoverDocsSourceFiles(resolvedContentDir)) {
149
+ const relativePath = normalizeRelativePath(_path2.default.relative(resolvedContentDir, sourcePath));
150
+ pages[relativePath] = gitDates[relativePath] || (options.fallback === "now" ? fallbackDate : _fs.statSync.call(void 0, sourcePath).mtime.toISOString());
151
+ }
152
+ return { version: 1, pages };
153
+ }
154
+ function getLastModifiedManifest(contentDir) {
155
+ const resolvedContentDir = resolveExistingPath(contentDir);
156
+ const manifestPath = _path2.default.join(resolvedContentDir, FARM_DOCS_LAST_MODIFIED_MANIFEST);
157
+ const manifestStat = _fs.existsSync.call(void 0, manifestPath) ? _fs.statSync.call(void 0, manifestPath) : null;
158
+ const signature = manifestStat ? `file:${manifestStat.mtimeMs}:${manifestStat.size}` : "generated";
159
+ const cached = manifestCache.get(resolvedContentDir);
160
+ if (_optionalChain([cached, 'optionalAccess', _ => _.signature]) === signature) return cached.manifest;
161
+ const manifest = _nullishCoalesce(readManifest(resolvedContentDir), () => ( createFarmDocsLastModifiedManifest(resolvedContentDir)));
162
+ manifestCache.set(resolvedContentDir, { signature, manifest });
163
+ return manifest;
164
+ }
165
+ function resolveFarmDocsPageLastModified(contentDir, sourcePath, frontmatter) {
166
+ const configured = frontmatter.lastModified || frontmatter.lastmod || frontmatter.lastUpdated || frontmatter.updatedAt;
167
+ if (configured) return configured;
168
+ const resolvedContentDir = resolveExistingPath(contentDir);
169
+ const resolvedSourcePath = resolveExistingPath(sourcePath);
170
+ const relativePath = normalizeRelativePath(_path2.default.relative(resolvedContentDir, resolvedSourcePath));
171
+ const isInsideContentDir = relativePath !== ".." && !relativePath.startsWith("../") && !_path2.default.isAbsolute(relativePath);
172
+ if (isInsideContentDir) {
173
+ const generated = getLastModifiedManifest(resolvedContentDir).pages[relativePath];
174
+ if (generated) return generated;
175
+ }
176
+ return _fs.statSync.call(void 0, resolvedSourcePath).mtime.toISOString();
177
+ }
178
+
179
+ // src/docs/social-image.ts
180
+ var _crypto = require('crypto');
181
+ var FARM_DOCS_SOCIAL_IMAGE_WIDTH = 1200;
182
+ var FARM_DOCS_SOCIAL_IMAGE_HEIGHT = 630;
183
+ var FARM_DOCS_SOCIAL_IMAGE_VERSION = 3;
184
+ function normalizeEntry(entry) {
185
+ if (!entry || entry === "/") return "";
186
+ return `/${entry.replace(/^\/+|\/+$/g, "")}`;
187
+ }
188
+ function encodeSlugPath(slug) {
189
+ return slug.split("/").filter(Boolean).map((segment) => encodeURIComponent(segment)).join("/");
190
+ }
191
+ function getSocialImageConfig(docs) {
192
+ return typeof docs.config.socialImage === "object" && docs.config.socialImage ? docs.config.socialImage : void 0;
193
+ }
194
+ function getNavTitle(docs) {
195
+ if (typeof docs.config.nav !== "object" || !docs.config.nav || !("title" in docs.config.nav)) {
196
+ return "Farm.js";
197
+ }
198
+ return String(docs.config.nav.title || "Farm.js");
199
+ }
200
+ function isFalse(value) {
201
+ return value ? /^(false|no|none|off|disabled)$/i.test(value.trim()) : false;
202
+ }
203
+ function isExternalOrRootPath(value) {
204
+ return /^(https?:)?\/\//i.test(value) || value.startsWith("/");
205
+ }
206
+ function isFarmDocsSocialImageEnabled(page, docs) {
207
+ if (docs.config.socialImage === false || _optionalChain([getSocialImageConfig, 'call', _2 => _2(docs), 'optionalAccess', _3 => _3.enabled]) === false) {
208
+ return false;
209
+ }
210
+ return !isFalse(page.frontmatter.socialImage);
211
+ }
212
+ function getFarmDocsCustomSocialImage(page) {
213
+ const value = page.frontmatter.socialImage || page.frontmatter.openGraphImage || page.frontmatter.ogImage;
214
+ return value && !isFalse(value) && isExternalOrRootPath(value) ? value : void 0;
215
+ }
216
+ function resolveIllustration(page) {
217
+ const explicit = _optionalChain([page, 'access', _4 => _4.frontmatter, 'access', _5 => _5.socialIllustration, 'optionalAccess', _6 => _6.toLowerCase, 'call', _7 => _7()]);
218
+ if (explicit === "auth" || explicit === "cache" || explicit === "cli" || explicit === "integrations" || explicit === "project" || explicit === "routing" || explicit === "runtime") {
219
+ return explicit;
220
+ }
221
+ const source = `${page.slug} ${page.title} ${page.section || ""}`.toLowerCase();
222
+ if (/auth|session|security|csrf/.test(source)) return "auth";
223
+ if (/cache|ppr|render|static|revalid|stream/.test(source)) return "cache";
224
+ if (/integration|stripe|prisma|better.auth|email|job|workflow/.test(source)) {
225
+ return "integrations";
226
+ }
227
+ if (/cli|test|deploy|preview|upgrade|migration|install/.test(source)) return "cli";
228
+ if (/project|structure|config|environment|markdown|docs.engine/.test(source)) {
229
+ return "project";
230
+ }
231
+ if (/rout|endpoint|middleware|navigation|server.function|server.action|api/.test(source)) {
232
+ return "routing";
233
+ }
234
+ return "runtime";
235
+ }
236
+ function createHashValue(value) {
237
+ return _crypto.createHash.call(void 0, "sha256").update(JSON.stringify(value)).digest("hex").slice(0, 16);
238
+ }
239
+ function resolveBaseUrl(requestUrl, config) {
240
+ return _optionalChain([config, 'optionalAccess', _8 => _8.baseUrl]) ? new URL(config.baseUrl) : new URL(requestUrl.origin);
241
+ }
242
+ function createFarmDocsSocialImageDescriptor(page, docs, requestUrl) {
243
+ const config = getSocialImageConfig(docs);
244
+ const siteName = _optionalChain([config, 'optionalAccess', _9 => _9.siteName]) || getNavTitle(docs);
245
+ const brand = _optionalChain([config, 'optionalAccess', _10 => _10.brand]) || siteName;
246
+ const title = page.frontmatter.socialTitle || page.title;
247
+ const description = page.frontmatter.socialDescription || page.description || _optionalChain([docs, 'access', _11 => _11.config, 'access', _12 => _12.metadata, 'optionalAccess', _13 => _13.description]) || `Documentation for ${siteName}`;
248
+ const section = page.frontmatter.section || page.section || "Documentation";
249
+ const illustration = resolveIllustration(page);
250
+ const entry = normalizeEntry(docs.entry);
251
+ const slugPath = encodeSlugPath(page.slug) || "index";
252
+ const imagePath = `${entry}/_social/${slugPath}/opengraph-image.svg`;
253
+ const baseUrl = resolveBaseUrl(requestUrl, config);
254
+ const pageUrl = new URL(page.href, baseUrl).href;
255
+ const imageAlt = `${title} \u2014 ${siteName} documentation`;
256
+ const hash = createHashValue({
257
+ version: FARM_DOCS_SOCIAL_IMAGE_VERSION,
258
+ title,
259
+ description,
260
+ section,
261
+ siteName,
262
+ brand,
263
+ pageHref: page.href,
264
+ illustration,
265
+ fonts: _optionalChain([config, 'optionalAccess', _14 => _14.fonts])
266
+ });
267
+ return {
268
+ title,
269
+ description,
270
+ section,
271
+ siteName,
272
+ brand,
273
+ pageHref: page.href,
274
+ pageUrl,
275
+ imagePath,
276
+ imageUrl: new URL(`${imagePath}?v=${hash}`, baseUrl).href,
277
+ imageAlt,
278
+ illustration,
279
+ fonts: _optionalChain([config, 'optionalAccess', _15 => _15.fonts]),
280
+ hash
281
+ };
282
+ }
283
+ function getFarmDocsSocialImageSlug(docs, requestUrl) {
284
+ const entry = normalizeEntry(docs.entry);
285
+ const prefix = `${entry}/_social/`;
286
+ const suffix = "/opengraph-image.svg";
287
+ if (!requestUrl.pathname.startsWith(prefix) || !requestUrl.pathname.endsWith(suffix)) {
288
+ return null;
289
+ }
290
+ const rawSlug = requestUrl.pathname.slice(prefix.length, -suffix.length);
291
+ if (!rawSlug) return null;
292
+ try {
293
+ const slug = rawSlug.split("/").map((segment) => decodeURIComponent(segment)).join("/");
294
+ if (slug.split("/").some((segment) => !segment || segment === ".." || segment === ".")) {
295
+ return null;
296
+ }
297
+ return slug === "index" ? "" : slug;
298
+ } catch (e4) {
299
+ return null;
300
+ }
301
+ }
302
+ function escapeXml(value) {
303
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
304
+ }
305
+ function truncate(value, length) {
306
+ if (value.length <= length) return value;
307
+ return `${value.slice(0, Math.max(0, length - 1)).trimEnd()}\u2026`;
308
+ }
309
+ function wrapText(value, maxCharacters, maxLines) {
310
+ const words = value.trim().split(/\s+/).filter(Boolean);
311
+ const lines = [];
312
+ let current = "";
313
+ let consumedWords = 0;
314
+ for (const word of words) {
315
+ const candidate = current ? `${current} ${word}` : word;
316
+ if (candidate.length <= maxCharacters || !current) {
317
+ current = candidate;
318
+ consumedWords += 1;
319
+ continue;
320
+ }
321
+ lines.push(current);
322
+ if (lines.length === maxLines) break;
323
+ current = word;
324
+ consumedWords += 1;
325
+ }
326
+ if (current && lines.length < maxLines) lines.push(current);
327
+ if (consumedWords < words.length && lines.length) {
328
+ lines[lines.length - 1] = truncate(`${lines[lines.length - 1]}\u2026`, maxCharacters);
329
+ }
330
+ return lines;
331
+ }
332
+ function renderTextLines(lines, x, y, lineHeight, attributes) {
333
+ return lines.map(
334
+ (line, index) => `<text x="${x}" y="${y + index * lineHeight}" ${attributes}>${escapeXml(line)}</text>`
335
+ ).join("");
336
+ }
337
+ function renderEmbeddedFont(name, source, weight) {
338
+ if (!source) return "";
339
+ return `@font-face{font-family:"${name}";src:url("${escapeXml(source)}") format("woff2");font-style:normal;font-weight:${weight};font-display:block;}`;
340
+ }
341
+ function renderArrow(x1, y, x2, color = "#8b8b8b") {
342
+ return `<path d="M${x1} ${y}H${x2 - 9}" fill="none" stroke="${color}"/><path d="m${x2 - 9} ${y - 5} 9 5-9 5" fill="none" stroke="${color}"/>`;
343
+ }
344
+ function renderPanelHeader(label, status) {
345
+ return `<text x="819" y="171" class="label">${escapeXml(label)}</text><text x="1134" y="171" class="label bright" text-anchor="end">${escapeXml(status)}</text>`;
346
+ }
347
+ function renderRoutingIllustration() {
348
+ return `${renderPanelHeader("ROUTE BLUEPRINT", "TYPED")}
349
+ <rect x="819" y="296" width="92" height="54" fill="#a3a3a3"/>
350
+ <text x="832" y="327" class="diagram-title ink">src/app</text>
351
+ <path d="M911 323h41M952 232v181M952 232h44M952 323h44M952 413h44" fill="none" stroke="#696969"/>
352
+ <rect x="996" y="205" width="138" height="54" fill="#0a0a0a" stroke="#414141"/>
353
+ <text x="1010" y="228" class="diagram-title">/</text><text x="1010" y="246" class="micro">STATIC</text>
354
+ <rect x="996" y="296" width="138" height="54" fill="#0a0a0a" stroke="#414141"/>
355
+ <text x="1010" y="319" class="diagram-title">/blog/:slug</text><text x="1010" y="337" class="micro">DYNAMIC</text>
356
+ <rect x="996" y="386" width="138" height="55" fill="#f0f0f0"/>
357
+ <text x="1010" y="410" class="diagram-title ink">/docs/:path*</text><text x="1010" y="428" class="micro ink-muted">CATCH-ALL</text>
358
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
359
+ <text x="819" y="475" class="label bright">FILE ROUTES</text><text x="1134" y="475" class="label" text-anchor="end">TYPES INCLUDED</text>`;
360
+ }
361
+ function renderAuthIllustration() {
362
+ return `${renderPanelHeader("REQUEST GUARD", "SERVER VERIFIED")}
363
+ <rect x="819" y="269" width="86" height="54" fill="#0a0a0a" stroke="#454545"/>
364
+ <text x="837" y="292" class="micro bright">REQUEST</text><text x="837" y="310" class="diagram-title">GET /app</text>
365
+ ${renderArrow(905, 296, 943)}
366
+ <rect x="943" y="224" width="104" height="118" fill="#f0f0f0"/>
367
+ <path d="M974 271v-12a21 21 0 0 1 42 0v12M968 271h54v45h-54z" fill="#050505"/>
368
+ <circle cx="995" cy="292" r="4" fill="#f0f0f0"/><path d="M995 296v8" stroke="#f0f0f0" stroke-width="3"/>
369
+ <text x="995" y="332" class="micro ink" text-anchor="middle">auth()</text>
370
+ ${renderArrow(1047, 296, 1071)}
371
+ <rect x="1071" y="269" width="63" height="54" fill="#0a0a0a" stroke="#454545"/>
372
+ <text x="1082" y="292" class="micro bright">ALLOW</text><text x="1082" y="310" class="micro">/app</text>
373
+ <rect x="819" y="372" width="315" height="38" fill="#090909" stroke="#3d3d3d"/>
374
+ <rect x="832" y="385" width="11" height="11" fill="#a3a3a3"/>
375
+ <text x="856" y="395" class="code">session.user / verified</text>
376
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
377
+ <text x="819" y="475" class="label bright">SESSION TYPED</text><text x="1134" y="475" class="label" text-anchor="end">CSRF PROTECTED</text>`;
378
+ }
379
+ function renderCacheIllustration() {
380
+ return `${renderPanelHeader("PAGE / PRODUCT", "CACHE + PPR")}
381
+ <rect x="819" y="204" width="315" height="54" fill="#f0f0f0"/>
382
+ <text x="836" y="235" class="diagram-title ink">STATIC SHELL</text><text x="1116" y="235" class="micro ink-muted" text-anchor="end">BUILD</text>
383
+ <rect x="819" y="271" width="198" height="76" fill="#a3a3a3"/>
384
+ <text x="836" y="301" class="diagram-title ink">CACHED DATA</text><text x="836" y="326" class="micro ink-muted">tag: products</text>
385
+ <rect x="1029" y="271" width="105" height="76" fill="#0a0a0a" stroke="#555"/>
386
+ <text x="1045" y="301" class="diagram-title">LIVE</text><text x="1045" y="326" class="micro">stream</text>
387
+ <path d="M1081 347v43m-8-9 8 9 8-9" fill="none" stroke="#d4d4d4"/>
388
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
389
+ <text x="819" y="475" class="label bright">STATIC FIRST</text><text x="1134" y="475" class="label" text-anchor="end">DYNAMIC WHERE NEEDED</text>`;
390
+ }
391
+ function renderIntegrationsIllustration() {
392
+ return `${renderPanelHeader("INTEGRATION GRAPH", "ONE PRODUCT")}
393
+ <path d="M976 309H879V247M976 309H879v87M1030 309h93V247M1030 309h93v87" fill="none" stroke="#4a4a4a"/>
394
+ <rect x="819" y="214" width="120" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="839" y="247" class="diagram-title">BETTER AUTH</text>
395
+ <rect x="819" y="368" width="120" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="851" y="401" class="diagram-title">PRISMA</text>
396
+ <rect x="1061" y="214" width="73" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="1077" y="247" class="diagram-title">STRIPE</text>
397
+ <rect x="1061" y="368" width="73" height="57" fill="#a3a3a3"/><text x="1075" y="401" class="diagram-title ink">VERCEL</text>
398
+ <rect x="976" y="277" width="94" height="64" fill="#f0f0f0"/>
399
+ <text x="994" y="304" class="diagram-title ink">FARM.JS</text><text x="994" y="324" class="micro ink-muted">CORE</text>
400
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
401
+ <text x="819" y="475" class="label bright">BRING YOUR STACK</text><text x="1134" y="475" class="label" text-anchor="end">CONNECTED ONCE</text>`;
402
+ }
403
+ function renderCliIllustration() {
404
+ return `${renderPanelHeader("TERMINAL", "PRODUCTION OUTPUT")}
405
+ <rect x="819" y="203" width="315" height="213" fill="#050505" stroke="#555"/>
406
+ <line x1="819" y1="236" x2="1134" y2="236" stroke="#555"/>
407
+ <circle cx="837" cy="220" r="4" fill="#5d5d5d"/><circle cx="850" cy="220" r="4" fill="#7a7a7a"/><circle cx="863" cy="220" r="4" fill="#a3a3a3"/>
408
+ <text x="837" y="273" class="code bright"><tspan fill="#7a7a7a">$</tspan> farm build</text>
409
+ <rect x="837" y="293" width="11" height="11" fill="#a3a3a3"/><path d="m839 298 3 3 6-7" fill="none" stroke="#050505" stroke-width="1.5"/>
410
+ <text x="861" y="303" class="code">64 routes discovered</text>
411
+ <rect x="837" y="320" width="11" height="11" fill="#a3a3a3"/><path d="m839 325 3 3 6-7" fill="none" stroke="#050505" stroke-width="1.5"/>
412
+ <text x="861" y="330" class="code">client + server bundles</text>
413
+ <rect x="837" y="355" width="126" height="30" fill="#f0f0f0"/><text x="853" y="374" class="micro ink">BUILD COMPLETE</text>
414
+ <text x="1115" y="374" class="micro" text-anchor="end">/dist</text>
415
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
416
+ <text x="819" y="475" class="label bright">REAL COMMANDS</text><text x="1134" y="475" class="label" text-anchor="end">842MS</text>`;
417
+ }
418
+ function renderProjectIllustration() {
419
+ return `${renderPanelHeader("PROJECT MAP", "CONVENTION TYPED")}
420
+ <rect x="819" y="202" width="315" height="216" fill="#050505" stroke="#555"/>
421
+ <text x="837" y="227" class="diagram-title bright">my-app/</text>
422
+ <path d="M847 243v143M847 259h23M847 293h23M847 327h23M847 361h23" fill="none" stroke="#666"/>
423
+ <rect x="870" y="243" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="264" class="code">src/app</text><text x="1098" y="264" class="micro" text-anchor="end">ROUTES</text>
424
+ <rect x="870" y="277" width="246" height="33" fill="#f0f0f0"/><text x="886" y="298" class="code ink">src/app/page.tsx</text>
425
+ <rect x="870" y="311" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="332" class="code">src/app/api/users/route.ts</text><text x="1098" y="332" class="micro" text-anchor="end">API</text>
426
+ <rect x="870" y="345" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="366" class="code">farm.config.ts</text><text x="1098" y="366" class="micro" text-anchor="end">CONFIG</text>
427
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
428
+ <text x="819" y="475" class="label bright">FILES BECOME FEATURES</text><text x="1134" y="475" class="label" text-anchor="end">ONE CONFIG</text>`;
429
+ }
430
+ function renderRuntimeIllustration() {
431
+ return `${renderPanelHeader("PRODUCT ARCHITECTURE", "FULL STACK")}
432
+ <rect x="819" y="211" width="315" height="55" fill="#f0f0f0"/>
433
+ <text x="836" y="244" class="diagram-title ink">PRODUCT SURFACE</text><text x="1116" y="244" class="micro ink-muted" text-anchor="end">UI + ROUTES</text>
434
+ <path d="M976 266v20m0 61v20" stroke="#727272"/>
435
+ <rect x="855" y="286" width="242" height="61" fill="#a3a3a3"/>
436
+ <text x="874" y="314" class="diagram-title ink">APPLICATION CORE</text><text x="874" y="334" class="micro ink-muted">APIS \xB7 MIDDLEWARE</text>
437
+ <rect x="819" y="367" width="315" height="55" fill="#4c4c4c"/>
438
+ <text x="836" y="400" class="diagram-title bright">CONNECTED STACK</text><text x="1116" y="400" class="micro" text-anchor="end">DATA \xB7 AUTH \xB7 DEPLOY</text>
439
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
440
+ <text x="819" y="475" class="label bright">ONE FRAMEWORK</text><text x="1134" y="475" class="label" text-anchor="end">ONE DEPLOYMENT MODEL</text>`;
441
+ }
442
+ function renderIllustration(type) {
443
+ switch (type) {
444
+ case "auth":
445
+ return renderAuthIllustration();
446
+ case "cache":
447
+ return renderCacheIllustration();
448
+ case "cli":
449
+ return renderCliIllustration();
450
+ case "integrations":
451
+ return renderIntegrationsIllustration();
452
+ case "project":
453
+ return renderProjectIllustration();
454
+ case "routing":
455
+ return renderRoutingIllustration();
456
+ default:
457
+ return renderRuntimeIllustration();
458
+ }
459
+ }
460
+ function renderFarmDocsSocialImageSvg(descriptor) {
461
+ const titleLines = wrapText(descriptor.title, 22, 2);
462
+ const longestTitleLine = Math.max(...titleLines.map((line) => line.length));
463
+ const titleSize = titleLines.length === 1 ? longestTitleLine > 17 ? 62 : 74 : 56;
464
+ const titleLineHeight = Math.round(titleSize * 0.98);
465
+ const titleY = titleLines.length === 1 ? 294 : 266;
466
+ const descriptionY = titleY + (titleLines.length - 1) * titleLineHeight + 59;
467
+ const descriptionLines = wrapText(descriptor.description, 68, 2);
468
+ const routeY = Math.max(418, descriptionY + descriptionLines.length * 29 + 24);
469
+ const section = truncate(descriptor.section.toUpperCase(), 27);
470
+ const route = truncate(descriptor.pageHref, 42);
471
+ const footerUrl = truncate(descriptor.pageUrl.replace(/^https?:\/\//, ""), 70);
472
+ const brand = truncate(descriptor.brand.toUpperCase(), 25);
473
+ const titleId = `farm-docs-og-${descriptor.hash}`;
474
+ return `<?xml version="1.0" encoding="UTF-8"?>
475
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${FARM_DOCS_SOCIAL_IMAGE_WIDTH}" height="${FARM_DOCS_SOCIAL_IMAGE_HEIGHT}" viewBox="0 0 ${FARM_DOCS_SOCIAL_IMAGE_WIDTH} ${FARM_DOCS_SOCIAL_IMAGE_HEIGHT}" role="img" aria-labelledby="${titleId}-title ${titleId}-description">
476
+ <title id="${titleId}-title">${escapeXml(descriptor.imageAlt)}</title>
477
+ <desc id="${titleId}-description">${escapeXml(descriptor.description)}</desc>
478
+ <metadata>${escapeXml(JSON.stringify({ generator: "Farm.js docs", page: descriptor.pageUrl, illustration: descriptor.illustration }))}</metadata>
479
+ <style type="text/css">
480
+ ${renderEmbeddedFont("Farm Sans", _optionalChain([descriptor, 'access', _16 => _16.fonts, 'optionalAccess', _17 => _17.sans]), "100 900")}
481
+ ${renderEmbeddedFont("Farm Mono", _optionalChain([descriptor, 'access', _18 => _18.fonts, 'optionalAccess', _19 => _19.mono]), "100 900")}
482
+ ${renderEmbeddedFont("Farm Pixel", _optionalChain([descriptor, 'access', _20 => _20.fonts, 'optionalAccess', _21 => _21.display]), "400 700")}
483
+ .sans{font-family:"Farm Sans","Arial",sans-serif}.mono,.label,.code,.diagram-title,.micro{font-family:"Farm Mono","Menlo","DejaVu Sans Mono",monospace}.pixel{font-family:"Farm Pixel","Farm Mono",monospace}.label{fill:#8b8b8b;font-size:10px;font-weight:600;letter-spacing:1.2px}.code{fill:#8b8b8b;font-size:11px}.diagram-title{fill:#e7e7e7;font-size:11px;font-weight:650}.micro{fill:#777;font-size:8px;letter-spacing:.45px}.bright{fill:#f5f5f4}.ink{fill:#050505}.ink-muted{fill:#4c4c4c}
484
+ </style>
485
+ <defs>
486
+ <pattern id="canvas-grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M40 0H0V40" fill="none" stroke="#151515"/></pattern>
487
+ <pattern id="diagonal" width="12" height="12" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><line x1="0" y1="0" x2="0" y2="12" stroke="#171717" stroke-width="2"/></pattern>
488
+ <clipPath id="frame-clip"><rect x="28" y="28" width="1144" height="574"/></clipPath>
489
+ </defs>
490
+ <rect width="1200" height="630" fill="#050505"/>
491
+ <rect width="1200" height="630" fill="url(#canvas-grid)"/>
492
+ <g clip-path="url(#frame-clip)">
493
+ <rect x="28" y="28" width="1144" height="574" fill="#020202"/>
494
+ <rect x="782" y="114" width="390" height="411" fill="url(#diagonal)"/>
495
+ </g>
496
+ <rect x="28.5" y="28.5" width="1143" height="573" fill="none" stroke="#323232"/>
497
+ <path d="M28 114.5h1144M28 525.5h1144M781.5 114v411" fill="none" stroke="#303030"/>
498
+
499
+ <g transform="translate(71 51)">
500
+ <rect width="11" height="11" rx="1" fill="#f5f5f4"/><rect x="15" width="28" height="11" rx="1" fill="#f5f5f4"/>
501
+ <rect y="15" width="11" height="11" rx="1" fill="#9b9b9b"/><rect x="15" y="15" width="28" height="11" rx="1" fill="#9b9b9b"/>
502
+ <rect y="30" width="11" height="11" rx="1" fill="#5f5f5f"/><rect x="15" y="30" width="20" height="11" rx="1" fill="#5f5f5f"/>
503
+ <text x="61" y="24" class="mono bright" font-size="24" font-weight="550">FARM<tspan fill="#777">.JS</tspan></text>
504
+ <text x="61" y="43" class="label">BY FARMING LABS</text>
505
+ </g>
506
+ <text x="1134" y="72" class="label" text-anchor="end">${escapeXml(brand)} \xB7 DOCUMENTATION</text>
507
+
508
+ <text x="71" y="198" class="mono bright" font-size="13" font-weight="650">DOCS</text>
509
+ <line x1="117" y1="193" x2="155" y2="193" stroke="#696969"/>
510
+ <text x="166" y="198" class="mono" fill="#9b9b9b" font-size="13">${escapeXml(section)}</text>
511
+ ${renderTextLines(titleLines, 71, titleY, titleLineHeight, `class="pixel bright" font-size="${titleSize}" font-weight="500" letter-spacing="-2.4"`)}
512
+ ${renderTextLines(descriptionLines, 71, descriptionY, 29, 'class="sans" fill="#a3a3a3" font-size="20" font-weight="430" letter-spacing="-.3"')}
513
+ <rect x="71" y="${routeY}" width="${Math.min(390, 56 + route.length * 8)}" height="36" fill="#050505" stroke="#3c3c3c"/>
514
+ <text x="85" y="${routeY + 23}" class="mono bright" font-size="11" font-weight="600">GET</text>
515
+ <text x="119" y="${routeY + 23}" class="mono" fill="#898989" font-size="11">${escapeXml(route)}</text>
516
+
517
+ ${renderIllustration(descriptor.illustration)}
518
+
519
+ <text x="71" y="570" class="mono bright" font-size="13" font-weight="550">${escapeXml(footerUrl)}</text>
520
+ <text x="1134" y="570" class="mono" fill="#9b9b9b" font-size="12" text-anchor="end">FARM.JS DOCUMENTATION</text>
521
+ <path d="M20 20h10M20 20v10M1180 20h-10M1180 20v10M20 610h10M20 610v-10M1180 610h-10M1180 610v-10" fill="none" stroke="#9b9b9b"/>
522
+ </svg>`;
523
+ }
524
+ function renderFarmDocsSocialMetadata(descriptor, customImage) {
525
+ const imageUrl = customImage ? new URL(customImage, descriptor.pageUrl).href : descriptor.imageUrl;
526
+ const customExtension = _optionalChain([customImage, 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23(), 'access', _24 => _24.split, 'call', _25 => _25(/[?#]/, 1), 'access', _26 => _26[0]]);
527
+ const imageType = _optionalChain([customExtension, 'optionalAccess', _27 => _27.endsWith, 'call', _28 => _28(".webp")]) ? "image/webp" : _optionalChain([customExtension, 'optionalAccess', _29 => _29.endsWith, 'call', _30 => _30(".png")]) ? "image/png" : _optionalChain([customExtension, 'optionalAccess', _31 => _31.match, 'call', _32 => _32(/\.jpe?g$/)]) ? "image/jpeg" : "image/svg+xml";
528
+ const tag = (property, content, name = false) => `<meta ${name ? "name" : "property"}="${property}" content="${escapeXml(content)}">`;
529
+ return [
530
+ tag("og:type", "article"),
531
+ tag("og:site_name", descriptor.siteName),
532
+ tag("og:title", descriptor.title),
533
+ tag("og:description", descriptor.description),
534
+ tag("og:url", descriptor.pageUrl),
535
+ tag("og:image", imageUrl),
536
+ tag("og:image:type", imageType),
537
+ ...customImage ? [] : [
538
+ tag("og:image:width", String(FARM_DOCS_SOCIAL_IMAGE_WIDTH)),
539
+ tag("og:image:height", String(FARM_DOCS_SOCIAL_IMAGE_HEIGHT))
540
+ ],
541
+ tag("og:image:alt", descriptor.imageAlt),
542
+ tag("twitter:card", "summary_large_image", true),
543
+ tag("twitter:title", descriptor.title, true),
544
+ tag("twitter:description", descriptor.description, true),
545
+ tag("twitter:image", imageUrl, true),
546
+ tag("twitter:image:alt", descriptor.imageAlt, true)
547
+ ].join("\n ");
548
+ }
549
+
550
+ // src/docs/handler.ts
551
+ var DOCS_FILE_NAMES = ["page.mdx", "page.md", "index.mdx", "index.md"];
552
+ var DOCS_FILE_EXTENSIONS2 = [".mdx", ".md"];
553
+ var FARM_DOCS_FALLBACK_FAVICON = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='black'/%3E%3Cpath d='M7 8h18v3H10v5h12v3H10v5H7z' fill='white'/%3E%3C/svg%3E";
554
+ var FARM_DOCS_FAVICON_FILES = ["favicon.svg", "favicon.ico", "favicon.png"];
555
+ function trimSlashes(value) {
556
+ return value.replace(/^\/+|\/+$/g, "");
557
+ }
558
+ function normalizeEntry2(entry) {
559
+ if (!entry || entry === "/") return "/";
560
+ return `/${trimSlashes(entry)}`;
561
+ }
562
+ function decodeDocsPath(value) {
563
+ try {
564
+ return decodeURIComponent(value);
565
+ } catch (e5) {
566
+ return value;
567
+ }
568
+ }
569
+ function normalizeSlug(value) {
570
+ return trimSlashes(decodeDocsPath(value)).replace(/\.(mdx?|markdown)$/i, "");
571
+ }
572
+ function resolveFarmDocsFavicon(docs, options) {
573
+ const configuredFavicon = _optionalChain([docs, 'optionalAccess', _33 => _33.config, 'access', _34 => _34.favicon]);
574
+ if (typeof configuredFavicon === "string" && configuredFavicon.trim()) {
575
+ return configuredFavicon.trim();
576
+ }
577
+ const publicDir = _path2.default.join(_path2.default.resolve(options.root), "public");
578
+ for (const fileName of FARM_DOCS_FAVICON_FILES) {
579
+ const faviconPath = _path2.default.join(publicDir, fileName);
580
+ if (_fs.existsSync.call(void 0, faviconPath) && _fs.statSync.call(void 0, faviconPath).isFile()) {
581
+ return `/${fileName}`;
582
+ }
583
+ }
584
+ return FARM_DOCS_FALLBACK_FAVICON;
585
+ }
586
+ function renderFarmDocsFaviconLink(faviconHref) {
587
+ const normalizedHref = _optionalChain([faviconHref, 'access', _35 => _35.split, 'call', _36 => _36(/[?#]/, 1), 'access', _37 => _37[0], 'optionalAccess', _38 => _38.toLowerCase, 'call', _39 => _39()]) || "";
588
+ const type = normalizedHref.endsWith(".svg") || faviconHref.startsWith("data:image/svg+xml") ? "image/svg+xml" : normalizedHref.endsWith(".png") ? "image/png" : normalizedHref.endsWith(".ico") ? "image/x-icon" : void 0;
589
+ const metadata = type === "image/svg+xml" ? ' sizes="any" type="image/svg+xml"' : type ? ` type="${type}"` : "";
590
+ return `<link rel="icon" href="${escapeAttribute(faviconHref)}"${metadata}>`;
591
+ }
592
+ function renderFarmDocsBrandMark() {
593
+ return `<svg class="sidebar-brand-logo" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
594
+ <rect x="2" y="2" width="5" height="5" rx="0.75" fill="currentColor"></rect>
595
+ <path d="M9.75 2h11.5c.41 0 .75.34.75.75v3.5c0 .41-.34.75-.75.75H9.75A.75.75 0 0 1 9 6.25v-3.5c0-.41.34-.75.75-.75Zm9.75 1.62a.38.38 0 0 0-.38.38v1c0 .21.17.38.38.38h.75c.21 0 .38-.17.38-.38V4a.38.38 0 0 0-.38-.38h-.75Z" fill="currentColor"></path>
596
+ <rect x="2" y="9.5" width="5" height="5" rx="0.75" fill="currentColor" opacity="0.64"></rect>
597
+ <rect x="9" y="9.5" width="13" height="5" rx="0.75" fill="currentColor" opacity="0.64"></rect>
598
+ <rect x="2" y="17" width="5" height="5" rx="0.75" fill="currentColor" opacity="0.34"></rect>
599
+ <rect x="9" y="17" width="7.5" height="5" rx="0.75" fill="currentColor" opacity="0.34"></rect>
600
+ </svg>`;
601
+ }
602
+ function renderFarmDocsBrandTitle(navTitle) {
603
+ const suffix = _optionalChain([navTitle, 'access', _40 => _40.match, 'call', _41 => _41(/\.js$/i), 'optionalAccess', _42 => _42[0]]);
604
+ if (!suffix) {
605
+ return `<span class="sidebar-brand-title">${escapeHtml(navTitle)}</span>`;
606
+ }
607
+ const productName = navTitle.slice(0, -suffix.length);
608
+ return `<span class="sidebar-brand-title">${escapeHtml(productName)}<span class="sidebar-brand-suffix">${escapeHtml(suffix)}</span></span>`;
609
+ }
610
+ function isSafeSegment(segment) {
611
+ return segment !== ".." && !segment.includes("/") && !segment.includes("\\");
612
+ }
613
+ function resolveInside(root, target) {
614
+ const resolvedRoot = _path2.default.resolve(root);
615
+ const resolvedTarget = _path2.default.resolve(target);
616
+ const relative = _path2.default.relative(resolvedRoot, resolvedTarget);
617
+ if (relative === "" || !relative.startsWith("..") && !_path2.default.isAbsolute(relative)) {
618
+ return resolvedTarget;
619
+ }
620
+ return null;
621
+ }
622
+ function resolveExistingFileInside(root, target) {
623
+ const safePath = resolveInside(root, target);
624
+ if (!safePath) return null;
625
+ try {
626
+ const realRoot = _fs.realpathSync.call(void 0, root);
627
+ const realTarget = _fs.realpathSync.call(void 0, safePath);
628
+ const containedTarget = resolveInside(realRoot, realTarget);
629
+ return containedTarget && _fs.statSync.call(void 0, containedTarget).isFile() ? containedTarget : null;
630
+ } catch (e6) {
631
+ return null;
632
+ }
633
+ }
634
+ function isFarmDocsRequest(docs, request) {
635
+ if (!_optionalChain([docs, 'optionalAccess', _43 => _43.enabled])) return false;
636
+ if (request.method !== "GET" && request.method !== "HEAD") return false;
637
+ const pathname = new URL(request.url).pathname;
638
+ const entry = normalizeEntry2(docs.entry);
639
+ if (entry === "/") return true;
640
+ return pathname === entry || pathname === `${entry}.md` || pathname.startsWith(`${entry}/`);
641
+ }
642
+ function resolveFarmDocsContentDir(docs, options) {
643
+ const root = _path2.default.resolve(options.root);
644
+ const srcDir = options.srcDir || "src";
645
+ const configuredContentDir = docs.contentDir || docs.config.contentDir;
646
+ if (configuredContentDir) {
647
+ return _path2.default.isAbsolute(configuredContentDir) ? configuredContentDir : _path2.default.join(root, configuredContentDir);
648
+ }
649
+ const entryDir = docs.config.entry || trimSlashes(docs.entry) || "docs";
650
+ const appDocsDir = _path2.default.join(root, srcDir, "app", entryDir);
651
+ if (_fs.existsSync.call(void 0, appDocsDir)) return appDocsDir;
652
+ return _path2.default.join(root, entryDir);
653
+ }
654
+ function getFarmDocsRoots(docs) {
655
+ return [
656
+ docs,
657
+ ...(_nullishCoalesce(docs.roots, () => ( []))).map((root) => ({
658
+ ...docs,
659
+ entry: root.entry,
660
+ contentDir: root.contentDir,
661
+ config: root.config,
662
+ runtimeConfig: root.runtimeConfig,
663
+ configOverrides: root.configOverrides,
664
+ roots: void 0
665
+ }))
666
+ ];
667
+ }
668
+ function getFarmDocsRouteTypeEntries(docs) {
669
+ if (!_optionalChain([docs, 'optionalAccess', _44 => _44.enabled])) return [];
670
+ return getFarmDocsRoots(docs).flatMap((root) => {
671
+ const entry = normalizeEntry2(root.entry);
672
+ if (entry === "/") return ["/", "/[...docs]"];
673
+ return [entry, `${entry}/[...docs]`];
674
+ });
675
+ }
676
+ function getFarmDocsDocumentNavigationMatchers(docs) {
677
+ if (!_optionalChain([docs, 'optionalAccess', _45 => _45.enabled])) return [];
678
+ return getFarmDocsRoots(docs).map((root) => {
679
+ const entry = normalizeEntry2(root.entry);
680
+ return entry === "/" ? "/(.*)" : `${entry}(.*)`;
681
+ });
682
+ }
683
+ function getRequestSlug(docs, request) {
684
+ const pathname = new URL(request.url).pathname;
685
+ const entry = normalizeEntry2(docs.entry);
686
+ if (entry === "/") return normalizeSlug(pathname);
687
+ if (pathname === entry || pathname === `${entry}.md`) return "";
688
+ return normalizeSlug(pathname.slice(entry.length));
689
+ }
690
+ function isDiscoverableDocsEntryName(name) {
691
+ return Boolean(name) && !name.startsWith(".") && name !== "node_modules";
692
+ }
693
+ function isDiscoverableDocsFile(contentDir, filePath) {
694
+ const segments = _path2.default.relative(contentDir, filePath).split(_path2.default.sep);
695
+ let dir = contentDir;
696
+ for (const [index, name] of segments.entries()) {
697
+ if (!isDiscoverableDocsEntryName(name)) return false;
698
+ let entry;
699
+ try {
700
+ entry = _fs.readdirSync.call(void 0, dir, { withFileTypes: true }).find(
701
+ (candidate) => candidate.name === name
702
+ );
703
+ } catch (e7) {
704
+ return false;
705
+ }
706
+ const isLast = index === segments.length - 1;
707
+ if (!entry || !(isLast ? entry.isFile() : entry.isDirectory())) return false;
708
+ dir = _path2.default.join(dir, name);
709
+ }
710
+ return true;
711
+ }
712
+ function findDocsPageFile(contentDir, slug) {
713
+ const canonicalSlug = trimSlashes(slug);
714
+ const segments = canonicalSlug ? canonicalSlug.split("/") : [];
715
+ if (!segments.every((segment) => isSafeSegment(segment) && isDiscoverableDocsEntryName(segment))) {
716
+ return null;
717
+ }
718
+ const slugDir = _path2.default.join(contentDir, ...segments);
719
+ const candidates = segments.length === 0 ? DOCS_FILE_NAMES.map((filename) => _path2.default.join(contentDir, filename)) : [
720
+ ...DOCS_FILE_NAMES.map((filename) => _path2.default.join(slugDir, filename)),
721
+ ...DOCS_FILE_EXTENSIONS2.map(
722
+ (extension) => _path2.default.join(contentDir, `${canonicalSlug}${extension}`)
723
+ )
724
+ ];
725
+ for (const candidate of candidates) {
726
+ if (pathToSlug(contentDir, candidate) !== canonicalSlug) continue;
727
+ if (!isDiscoverableDocsFile(contentDir, candidate)) continue;
728
+ const safePath = resolveExistingFileInside(contentDir, candidate);
729
+ if (safePath) {
730
+ return safePath;
731
+ }
732
+ }
733
+ return null;
734
+ }
735
+ function parseFrontmatter(source) {
736
+ if (!source.startsWith("---")) {
737
+ return { frontmatter: {}, body: source };
738
+ }
739
+ const endIndex = source.indexOf("\n---", 3);
740
+ if (endIndex === -1) return { frontmatter: {}, body: source };
741
+ const frontmatterSource = source.slice(3, endIndex).trim();
742
+ const body = source.slice(source.indexOf("\n", endIndex + 1) + 1);
743
+ const frontmatter = {};
744
+ for (const line of frontmatterSource.split(/\r?\n/)) {
745
+ const separator = line.indexOf(":");
746
+ if (separator === -1) continue;
747
+ const key = line.slice(0, separator).trim();
748
+ const value = line.slice(separator + 1).trim().replace(/^["']|["']$/g, "");
749
+ if (key && value) frontmatter[key] = value;
750
+ }
751
+ return { frontmatter, body };
752
+ }
753
+ function titleFromSlug(slug) {
754
+ const lastSegment = slug.split("/").filter(Boolean).pop() || "Docs";
755
+ return lastSegment.split(/[-_]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
756
+ }
757
+ function titleFromMarkdown(body, fallback) {
758
+ const heading = _optionalChain([body, 'access', _46 => _46.match, 'call', _47 => _47(/^#\s+(.+)$/m), 'optionalAccess', _48 => _48[1], 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()]);
759
+ return heading || fallback;
760
+ }
761
+ function createLastModifiedResolver(contentDir, sourcePath, frontmatter) {
762
+ let resolved = false;
763
+ let value;
764
+ return {
765
+ get() {
766
+ if (!resolved) {
767
+ value = resolveFarmDocsPageLastModified(contentDir, sourcePath, frontmatter);
768
+ resolved = true;
769
+ }
770
+ return value;
771
+ },
772
+ set(next) {
773
+ value = next;
774
+ resolved = true;
775
+ }
776
+ };
777
+ }
778
+ function loadFarmDocsPage(contentDir, docs, slug) {
779
+ const sourcePath = findDocsPageFile(contentDir, slug);
780
+ if (!sourcePath) return null;
781
+ const source = _fs.readFileSync.call(void 0, sourcePath, "utf8");
782
+ const { frontmatter, body } = parseFrontmatter(source);
783
+ const title = frontmatter.title || titleFromMarkdown(body, titleFromSlug(slug));
784
+ const href = createDocsHref(docs.entry, slug);
785
+ const lastModified = createLastModifiedResolver(contentDir, sourcePath, frontmatter);
786
+ return {
787
+ slug,
788
+ title,
789
+ description: frontmatter.description,
790
+ section: frontmatter.section,
791
+ href,
792
+ sourcePath,
793
+ get lastModified() {
794
+ return lastModified.get();
795
+ },
796
+ set lastModified(value) {
797
+ lastModified.set(value);
798
+ },
799
+ frontmatter,
800
+ body
801
+ };
802
+ }
803
+ function getFarmDocsMarkdownPath(href) {
804
+ return href === "/" ? "/.md" : `${href}.md`;
805
+ }
806
+ function createDocsHref(entry, slug) {
807
+ const normalizedEntry = normalizeEntry2(entry);
808
+ const normalizedSlug = trimSlashes(slug);
809
+ if (normalizedEntry === "/") return normalizedSlug ? `/${normalizedSlug}` : "/";
810
+ return normalizedSlug ? `${normalizedEntry}/${normalizedSlug}` : normalizedEntry;
811
+ }
812
+ function pathToSlug(contentDir, filePath) {
813
+ const relative = _path2.default.relative(contentDir, filePath).replace(/\\/g, "/");
814
+ if (relative.startsWith("..")) return null;
815
+ const extension = _path2.default.extname(relative);
816
+ if (!DOCS_FILE_EXTENSIONS2.includes(extension)) return null;
817
+ const withoutExtension = relative.slice(0, -extension.length);
818
+ if (withoutExtension === "page" || withoutExtension === "index") return "";
819
+ if (withoutExtension.endsWith("/page") || withoutExtension.endsWith("/index")) {
820
+ return withoutExtension.replace(/\/(page|index)$/, "");
821
+ }
822
+ return withoutExtension;
823
+ }
824
+ function loadPage(contentDir, docs, request) {
825
+ return loadFarmDocsPage(contentDir, docs, getRequestSlug(docs, request));
826
+ }
827
+ function discoverFarmDocsPages(contentDir, docs) {
828
+ if (!_fs.existsSync.call(void 0, contentDir)) return [];
829
+ const pages = [];
830
+ const visit = (dir) => {
831
+ for (const entry of _fs.readdirSync.call(void 0, dir, { withFileTypes: true })) {
832
+ if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
833
+ const absolutePath = _path2.default.join(dir, entry.name);
834
+ if (entry.isDirectory()) {
835
+ visit(absolutePath);
836
+ continue;
837
+ }
838
+ if (!entry.isFile()) continue;
839
+ const slug = pathToSlug(contentDir, absolutePath);
840
+ if (slug === null) continue;
841
+ const source = _fs.readFileSync.call(void 0, absolutePath, "utf8");
842
+ const { frontmatter, body } = parseFrontmatter(source);
843
+ const lastModified = createLastModifiedResolver(contentDir, absolutePath, frontmatter);
844
+ pages.push({
845
+ slug,
846
+ title: frontmatter.title || titleFromMarkdown(body, titleFromSlug(slug)),
847
+ description: frontmatter.description,
848
+ section: frontmatter.section,
849
+ href: createDocsHref(docs.entry, slug),
850
+ sourcePath: absolutePath,
851
+ get lastModified() {
852
+ return lastModified.get();
853
+ },
854
+ set lastModified(value) {
855
+ lastModified.set(value);
856
+ }
857
+ });
858
+ }
859
+ };
860
+ visit(contentDir);
861
+ return pages.sort((a, b) => a.href.localeCompare(b.href));
862
+ }
863
+ function toFarmDocsMarkdownPage(page) {
864
+ const lastModified = page.lastModified || page.frontmatter.lastModified || page.frontmatter.lastmod;
865
+ return {
866
+ slug: page.slug,
867
+ url: page.href,
868
+ title: page.title,
869
+ description: page.description,
870
+ lastModified,
871
+ lastmod: lastModified,
872
+ content: page.body,
873
+ rawContent: page.body
874
+ };
875
+ }
876
+ function getDocsTitle(docs) {
877
+ return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
878
+ }
879
+ function getDocsDescription(docs) {
880
+ return _optionalChain([docs, 'access', _51 => _51.config, 'access', _52 => _52.metadata, 'optionalAccess', _53 => _53.description]);
881
+ }
882
+ function getLoadedDocsPages(contentDir, docs, isPathGuarded) {
883
+ return discoverFarmDocsPages(contentDir, docs).filter((page) => !_optionalChain([isPathGuarded, 'optionalCall', _54 => _54(page.href)])).map((page) => loadFarmDocsPage(contentDir, docs, page.slug)).filter((page) => Boolean(page));
884
+ }
885
+ function toDocsLlmsPage(page) {
886
+ return toFarmDocsMarkdownPage(page);
887
+ }
888
+ function toDocsSitemapPage(page) {
889
+ return {
890
+ ...toFarmDocsMarkdownPage(page),
891
+ sourcePath: page.sourcePath
892
+ };
893
+ }
894
+ function resolvePageActionsConfig(docs) {
895
+ return isObjectRecord(docs.config.pageActions) ? docs.config.pageActions : {};
896
+ }
897
+ function resolvePageActionsAlignment(docs) {
898
+ return resolvePageActionsConfig(docs).alignment === "right" ? "right" : "left";
899
+ }
900
+ function resolveCopyMarkdownActionConfig(docs) {
901
+ const raw = resolvePageActionsConfig(docs).copyMarkdown;
902
+ if (raw === void 0 || raw === false) return null;
903
+ const options = isObjectRecord(raw) ? raw : {};
904
+ if (isObjectRecord(raw) && raw.enabled === false) return null;
905
+ return {
906
+ format: options.format === "text" ? "text" : "markdown",
907
+ includeTitle: options.includeTitle === true,
908
+ label: _nullishCoalesce(readString(options.label), () => ( "Copy page")),
909
+ copiedLabel: _nullishCoalesce(readString(options.copiedLabel), () => ( "Copied!"))
910
+ };
911
+ }
912
+ function resolveLastUpdatedDisplayConfig(docs) {
913
+ const raw = docs.config.lastUpdated;
914
+ const options = isObjectRecord(raw) ? raw : {};
915
+ return {
916
+ enabled: raw !== false && (!isObjectRecord(raw) || raw.enabled !== false),
917
+ label: typeof options.label === "string" ? options.label : "Last updated",
918
+ position: options.position === "below-title" ? "below-title" : "footer"
919
+ };
920
+ }
921
+ function formatLastModifiedDate(value) {
922
+ if (!value) return void 0;
923
+ const date = new Date(value);
924
+ if (Number.isNaN(date.getTime())) return value;
925
+ return new Intl.DateTimeFormat("en", {
926
+ day: "numeric",
927
+ month: "long",
928
+ year: "numeric"
929
+ }).format(date);
930
+ }
931
+ function renderLastUpdatedText(page, docs, position) {
932
+ const config = resolveLastUpdatedDisplayConfig(docs);
933
+ if (!config.enabled || config.position !== position) return "";
934
+ const formatted = formatLastModifiedDate(page.lastModified);
935
+ if (!formatted) return "";
936
+ const time = `<time datetime="${escapeAttribute(page.lastModified || "")}">${escapeHtml(formatted)}</time>`;
937
+ const label = config.label.trim();
938
+ return label ? `${escapeHtml(label)} ${time}` : time;
939
+ }
940
+ function resolveReadingTimeDisplayConfig(docs) {
941
+ const raw = docs.config.readingTime;
942
+ if (raw === void 0 || raw === false) return null;
943
+ const options = isObjectRecord(raw) ? raw : {};
944
+ if (isObjectRecord(raw) && options.enabled === false) return null;
945
+ const wordsPerMinute = typeof options.wordsPerMinute === "number" && options.wordsPerMinute > 0 ? options.wordsPerMinute : 220;
946
+ return {
947
+ wordsPerMinute,
948
+ format: options.format === "short" ? "short" : "long",
949
+ includeCode: options.includeCode === true
950
+ };
951
+ }
952
+ function countMarkdownWords(body, includeCode) {
953
+ const readable = (includeCode ? body : body.replace(/```[\s\S]*?```/g, " ").replace(/`[^`]*`/g, " ")).replace(/!\[[^\]]*]\([^)]*\)/g, " ").replace(/\[([^\]]+)]\([^)]*\)/g, "$1").replace(/<[^>]+>/g, " ").replace(/[#>*_~`|:-]/g, " ");
954
+ return _nullishCoalesce(_optionalChain([readable, 'access', _55 => _55.match, 'call', _56 => _56(/[A-Za-z0-9]+(?:[-'][A-Za-z0-9]+)*/g), 'optionalAccess', _57 => _57.length]), () => ( 0));
955
+ }
956
+ function renderReadingTimeMeta(page, docs) {
957
+ const config = resolveReadingTimeDisplayConfig(docs);
958
+ if (!config) return "";
959
+ const words = countMarkdownWords(page.body, config.includeCode);
960
+ const minutes = Math.max(1, Math.ceil(words / config.wordsPerMinute));
961
+ const label = config.format === "short" ? `${minutes} min` : `${minutes} min read`;
962
+ return `<div class="fd-page-meta not-prose" data-page-reading-time>
963
+ <span class="fd-page-meta-dot" aria-hidden="true">\xB7</span>
964
+ <span class="fd-page-meta-item">${escapeHtml(label)}</span>
965
+ </div>`;
966
+ }
967
+ function renderPixelPageActions(page, docs) {
968
+ const copyMarkdown = resolveCopyMarkdownActionConfig(docs);
969
+ if (!copyMarkdown) return "";
970
+ const markdownUrl = `${page.href}.md`;
971
+ const includeTitle = copyMarkdown.includeTitle ? "true" : "false";
972
+ return `<div class="fd-page-actions" data-page-actions data-actions-alignment="${resolvePageActionsAlignment(docs)}">
973
+ <button
974
+ type="button"
975
+ class="fd-page-action-btn"
976
+ data-page-action="copy-markdown"
977
+ data-copied="false"
978
+ data-markdown-url="${escapeAttribute(markdownUrl)}"
979
+ data-copy-markdown-format="${copyMarkdown.format}"
980
+ data-copy-markdown-include-title="${includeTitle}"
981
+ data-copy-label="${escapeAttribute(copyMarkdown.label)}"
982
+ data-copied-label="${escapeAttribute(copyMarkdown.copiedLabel)}"
983
+ aria-label="${escapeAttribute(copyMarkdown.label)}"
984
+ title="${escapeAttribute(copyMarkdown.label)}"
985
+ >
986
+ <svg class="fd-page-action-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
987
+ <svg class="fd-page-action-check-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg>
988
+ <span data-page-action-label>${escapeHtml(copyMarkdown.label)}</span>
989
+ </button>
990
+ </div>`;
991
+ }
992
+ function renderBelowTitleMeta(page, docs) {
993
+ const lastUpdated = renderLastUpdatedText(page, docs, "below-title");
994
+ const actions = renderPixelPageActions(page, docs);
995
+ const readingTime = renderReadingTimeMeta(page, docs);
996
+ if (!lastUpdated && !actions && !readingTime) return "";
997
+ return `<div class="fd-below-title-block not-prose">
998
+ ${lastUpdated ? `<p class="fd-last-updated-inline">${lastUpdated}</p>` : ""}
999
+ ${actions}
1000
+ ${readingTime}
1001
+ </div>`;
1002
+ }
1003
+ function renderMarkdownHtmlWithTitleMeta(page, docs, html) {
1004
+ const meta = renderBelowTitleMeta(page, docs);
1005
+ if (!meta) return html;
1006
+ const withTitleMeta = html.replace(/(<h1\b[\s\S]*?<\/h1>)/, `$1
1007
+ ${meta}`);
1008
+ return withTitleMeta === html ? `${meta}
1009
+ ${html}` : withTitleMeta;
1010
+ }
1011
+ function renderPixelPageFooter(page, docs) {
1012
+ const lastUpdated = renderLastUpdatedText(page, docs, "footer");
1013
+ if (!lastUpdated) return "";
1014
+ return `<div class="not-prose fd-page-footer">
1015
+ <span class="fd-last-updated-footer">${lastUpdated}</span>
1016
+ </div>`;
1017
+ }
1018
+ function getDocsLlmsOptions(docs, request) {
1019
+ const configured = typeof docs.config.llmsTxt === "object" && docs.config.llmsTxt !== null ? docs.config.llmsTxt : {};
1020
+ return {
1021
+ enabled: true,
1022
+ baseUrl: new URL(request.url).origin,
1023
+ siteTitle: getDocsTitle(docs),
1024
+ siteDescription: getDocsDescription(docs),
1025
+ ...configured
1026
+ };
1027
+ }
1028
+ function getDocsDiscoveryOptions(docs, request) {
1029
+ return {
1030
+ origin: new URL(request.url).origin,
1031
+ entry: docs.entry,
1032
+ i18n: null,
1033
+ search: _nullishCoalesce(docs.config.search, () => ( true)),
1034
+ mcp: {
1035
+ enabled: false,
1036
+ route: "/api/docs/mcp",
1037
+ name: `${getDocsTitle(docs)} MCP`,
1038
+ version: "1",
1039
+ tools: {
1040
+ listDocs: false,
1041
+ listPages: false,
1042
+ readPage: false,
1043
+ searchDocs: false,
1044
+ getNavigation: false,
1045
+ getCodeExamples: false,
1046
+ getConfigSchema: false,
1047
+ getContext: false
1048
+ }
1049
+ },
1050
+ feedback: void 0,
1051
+ llms: getDocsLlmsOptions(docs, request),
1052
+ sitemap: _nullishCoalesce(docs.config.sitemap, () => ( true)),
1053
+ robots: _nullishCoalesce(docs.config.robots, () => ( true)),
1054
+ openapi: void 0,
1055
+ markdown: {
1056
+ acceptHeader: true,
1057
+ signatureAgentHeader: true
1058
+ }
1059
+ };
1060
+ }
1061
+ function createFarmDocsPublicResponse(contentDir, docs, request, isPathGuarded) {
1062
+ const url = new URL(request.url);
1063
+ let loadedPages;
1064
+ const getPages = () => _nullishCoalesce(loadedPages, () => ( (loadedPages = getLoadedDocsPages(contentDir, docs, isPathGuarded))));
1065
+ const sitemapManifest = () => _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsSitemapManifest({
1066
+ pages: getPages().map(toDocsSitemapPage),
1067
+ entry: docs.entry,
1068
+ siteTitle: getDocsTitle(docs),
1069
+ baseUrl: url.origin
1070
+ });
1071
+ const textHeaders = (contentType) => ({
1072
+ "Content-Type": contentType,
1073
+ "Cache-Control": "public, max-age=60"
1074
+ });
1075
+ const llmsFormat = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsLlmsTxtFormat(url);
1076
+ if (llmsFormat) {
1077
+ const generated = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsLlmsTxt(
1078
+ getPages().map(toDocsLlmsPage),
1079
+ getDocsLlmsOptions(docs, request)
1080
+ );
1081
+ return new Response(llmsFormat === "llms-full" ? generated.llmsFullTxt : generated.llmsTxt, {
1082
+ status: 200,
1083
+ headers: textHeaders("text/plain; charset=utf-8")
1084
+ });
1085
+ }
1086
+ const sitemapFormat = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsSitemapRequest(url, _nullishCoalesce(docs.config.sitemap, () => ( true)));
1087
+ if (sitemapFormat === "xml") {
1088
+ return new Response(
1089
+ _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSitemapXml(sitemapManifest(), {
1090
+ baseUrl: url.origin,
1091
+ includeLastmod: true
1092
+ }),
1093
+ {
1094
+ status: 200,
1095
+ headers: textHeaders("application/xml; charset=utf-8")
1096
+ }
1097
+ );
1098
+ }
1099
+ if (sitemapFormat === "markdown") {
1100
+ return new Response(
1101
+ _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSitemapMarkdown(sitemapManifest(), {
1102
+ includeDescriptions: true
1103
+ }),
1104
+ {
1105
+ status: 200,
1106
+ headers: textHeaders("text/markdown; charset=utf-8")
1107
+ }
1108
+ );
1109
+ }
1110
+ if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).resolveDocsRobotsRequest(url, _nullishCoalesce(docs.config.robots, () => ( true)))) {
1111
+ return new Response(
1112
+ _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsRobotsTxt({
1113
+ entry: docs.entry,
1114
+ sitemap: _nullishCoalesce(docs.config.sitemap, () => ( true)),
1115
+ robots: _nullishCoalesce(docs.config.robots, () => ( true)),
1116
+ baseUrl: url.origin
1117
+ }),
1118
+ {
1119
+ status: 200,
1120
+ headers: textHeaders("text/plain; charset=utf-8")
1121
+ }
1122
+ );
1123
+ }
1124
+ if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsAgentDiscoveryRequest(url)) {
1125
+ const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(docs, request));
1126
+ const title = getDocsTitle(docs);
1127
+ return new Response(
1128
+ JSON.stringify({
1129
+ ...spec,
1130
+ name: title,
1131
+ site: {
1132
+ ...spec.site,
1133
+ title,
1134
+ description: getDocsDescription(docs),
1135
+ entry: docs.entry
1136
+ }
1137
+ }),
1138
+ {
1139
+ status: 200,
1140
+ headers: textHeaders("application/json; charset=utf-8")
1141
+ }
1142
+ );
1143
+ }
1144
+ if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsAgentsRequest(url)) {
1145
+ return new Response(
1146
+ `${_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsAgentsDocument(getDocsDiscoveryOptions(docs, request)).trim()}
1147
+ `,
1148
+ {
1149
+ status: 200,
1150
+ headers: textHeaders("text/markdown; charset=utf-8")
1151
+ }
1152
+ );
1153
+ }
1154
+ if (_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).isDocsSkillRequest(url)) {
1155
+ return new Response(
1156
+ `${_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsSkillDocument(getDocsDiscoveryOptions(docs, request)).trim()}
1157
+ `,
1158
+ {
1159
+ status: 200,
1160
+ headers: textHeaders("text/markdown; charset=utf-8")
1161
+ }
1162
+ );
1163
+ }
1164
+ return null;
1165
+ }
1166
+ function omitFarmDocsHeadBody(request, response) {
1167
+ if (request.method !== "HEAD") return response;
1168
+ return new Response(null, {
1169
+ status: response.status,
1170
+ statusText: response.statusText,
1171
+ headers: response.headers
1172
+ });
1173
+ }
1174
+ function escapeHtml(value) {
1175
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1176
+ }
1177
+ function shouldReturnMarkdown(request) {
1178
+ const url = new URL(request.url);
1179
+ if (url.pathname.endsWith(".md")) return true;
1180
+ const accept = request.headers.get("accept");
1181
+ const markdown = Math.max(
1182
+ _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1183
+ _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1184
+ );
1185
+ if (markdown <= 0) return false;
1186
+ return markdown >= _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1187
+ }
1188
+ function escapeAttribute(value) {
1189
+ return escapeHtml(value).replace(/'/g, "&#39;");
1190
+ }
1191
+ function slugify(value) {
1192
+ return value.toLowerCase().replace(/<[^>]+>/g, "").replace(/`([^`]+)`/g, "$1").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
1193
+ }
1194
+ function createSlugger() {
1195
+ const seen = /* @__PURE__ */ new Map();
1196
+ return (value) => {
1197
+ const base = slugify(value) || "section";
1198
+ const count = seen.get(base) || 0;
1199
+ seen.set(base, count + 1);
1200
+ return count === 0 ? base : `${base}-${count + 1}`;
1201
+ };
1202
+ }
1203
+ function stripHtml(value) {
1204
+ return value.replace(/<[^>]+>/g, "");
1205
+ }
1206
+ function getCodeFence(line) {
1207
+ const match = /^(?: {0,3})(`{3,}|~{3,})/.exec(line);
1208
+ const value = _optionalChain([match, 'optionalAccess', _58 => _58[1]]);
1209
+ if (!value) return null;
1210
+ return { marker: value[0], length: value.length };
1211
+ }
1212
+ function isClosingCodeFence(line, fence) {
1213
+ const trimmed = line.trim();
1214
+ return trimmed.length >= fence.length && Array.from(trimmed).every((char) => char === fence.marker);
1215
+ }
1216
+ function stripMdxRuntimeSyntax(body) {
1217
+ const output = [];
1218
+ let fence = null;
1219
+ for (const line of body.split("\n")) {
1220
+ const nextFence = getCodeFence(line);
1221
+ if (fence) {
1222
+ output.push(line);
1223
+ if (nextFence && nextFence.marker === fence.marker && isClosingCodeFence(line, fence)) {
1224
+ fence = null;
1225
+ }
1226
+ continue;
1227
+ }
1228
+ if (nextFence) {
1229
+ fence = nextFence;
1230
+ output.push(line);
1231
+ continue;
1232
+ }
1233
+ if (/^\s*import\s.+$/.test(line) || /^\s*export\s+(const|default)\s.+$/.test(line)) {
1234
+ continue;
1235
+ }
1236
+ output.push(line);
1237
+ }
1238
+ return output.join("\n");
1239
+ }
1240
+ function unescapeHtml(value) {
1241
+ return value.replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
1242
+ }
1243
+ var CODE_LANGUAGE_LABELS = /* @__PURE__ */ new Set([
1244
+ "bash",
1245
+ "cjs",
1246
+ "cmd",
1247
+ "console",
1248
+ "css",
1249
+ "html",
1250
+ "javascript",
1251
+ "js",
1252
+ "json",
1253
+ "jsx",
1254
+ "md",
1255
+ "mdx",
1256
+ "shell",
1257
+ "sh",
1258
+ "terminal",
1259
+ "text",
1260
+ "ts",
1261
+ "tsx",
1262
+ "txt",
1263
+ "typescript",
1264
+ "yaml",
1265
+ "yml",
1266
+ "zsh"
1267
+ ]);
1268
+ var EXTENSIONLESS_CODE_FILENAMES = /* @__PURE__ */ new Set([
1269
+ "dockerfile",
1270
+ "makefile",
1271
+ "procfile",
1272
+ "readme",
1273
+ "license"
1274
+ ]);
1275
+ function isCodePathLabel(label) {
1276
+ const trimmed = label.trim();
1277
+ if (!trimmed || /\s/.test(trimmed)) return false;
1278
+ const lower = trimmed.toLowerCase();
1279
+ if (CODE_LANGUAGE_LABELS.has(lower)) return false;
1280
+ const fileName = trimmed.split(/[\\/]/).filter(Boolean).pop() || trimmed;
1281
+ const lowerFileName = fileName.toLowerCase();
1282
+ if (EXTENSIONLESS_CODE_FILENAMES.has(lowerFileName)) return true;
1283
+ if (fileName.startsWith(".") && fileName.length > 1) return true;
1284
+ return /\.[a-z0-9][a-z0-9-]*$/i.test(fileName);
1285
+ }
1286
+ function parseCodeInfo(info) {
1287
+ const source = (info || "").trim();
1288
+ const language = _optionalChain([source, 'access', _59 => _59.match, 'call', _60 => _60(/^\S+/), 'optionalAccess', _61 => _61[0]]) || "text";
1289
+ const explicitLabel = _optionalChain([source, 'access', _62 => _62.match, 'call', _63 => _63(/\b(?:title|filename|file|label|name)=["']([^"']+)["']/), 'optionalAccess', _64 => _64[1], 'optionalAccess', _65 => _65.trim, 'call', _66 => _66()]);
1290
+ return { language, label: explicitLabel || language, hasExplicitLabel: Boolean(explicitLabel) };
1291
+ }
1292
+ function getStandaloneCodeLabel(line) {
1293
+ const trimmed = line.trim();
1294
+ const match = /^(?:\*\*([^*]+)\*\*|__([^_]+)__|`([^`]+)`)$/u.exec(trimmed);
1295
+ const label = _optionalChain([match, 'optionalAccess', _67 => _67[1]]) || _optionalChain([match, 'optionalAccess', _68 => _68[2]]) || _optionalChain([match, 'optionalAccess', _69 => _69[3]]);
1296
+ return _optionalChain([label, 'optionalAccess', _70 => _70.trim, 'call', _71 => _71()]) || null;
1297
+ }
1298
+ function hasCodeFenceTitle(info) {
1299
+ return /\b(?:title|filename|file|label|name)=["'][^"']+["']/.test(info);
1300
+ }
1301
+ function escapeCodeFenceTitle(value) {
1302
+ return value.replace(/"/g, "&quot;");
1303
+ }
1304
+ function addTitleToCodeFence(line, title) {
1305
+ const match = /^(\s{0,3})(`{3,}|~{3,})(.*)$/u.exec(line);
1306
+ if (!match) return line;
1307
+ const [, indent, marker, infoSource] = match;
1308
+ const info = infoSource.trim();
1309
+ if (hasCodeFenceTitle(info)) return line;
1310
+ const suffix = `title="${escapeCodeFenceTitle(title)}"`;
1311
+ return `${indent}${marker}${info ? `${info} ${suffix}` : `text ${suffix}`}`;
1312
+ }
1313
+ function attachCodeBlockLabels(body) {
1314
+ const lines = body.split("\n");
1315
+ const output = [];
1316
+ let fence = null;
1317
+ for (let index = 0; index < lines.length; index += 1) {
1318
+ const line = lines[index] || "";
1319
+ const nextFence = getCodeFence(line);
1320
+ if (fence) {
1321
+ output.push(line);
1322
+ if (nextFence && nextFence.marker === fence.marker && isClosingCodeFence(line, fence)) {
1323
+ fence = null;
1324
+ }
1325
+ continue;
1326
+ }
1327
+ if (nextFence) {
1328
+ fence = nextFence;
1329
+ output.push(line);
1330
+ continue;
1331
+ }
1332
+ const label = getStandaloneCodeLabel(line);
1333
+ if (!label) {
1334
+ output.push(line);
1335
+ continue;
1336
+ }
1337
+ let fenceIndex = index + 1;
1338
+ while (fenceIndex < lines.length && (lines[fenceIndex] || "").trim() === "") {
1339
+ fenceIndex += 1;
1340
+ }
1341
+ const labeledFence = getCodeFence(lines[fenceIndex] || "");
1342
+ if (!labeledFence) {
1343
+ output.push(line);
1344
+ continue;
1345
+ }
1346
+ output.push(addTitleToCodeFence(lines[fenceIndex] || "", label));
1347
+ fence = labeledFence;
1348
+ index = fenceIndex;
1349
+ }
1350
+ return output.join("\n");
1351
+ }
1352
+ function highlightCodeBlock(code) {
1353
+ return _sugarhigh.highlight.call(void 0, code.replace(/\n$/, "")).replace(/<\/span>\n<span/g, "</span><span");
1354
+ }
1355
+ function renderCodeCopyButton(className = "code-copy") {
1356
+ return `<button class="${className}" type="button" data-code-copy data-copied="false" aria-label="Copy code" title="Copy code"><svg class="code-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><svg class="code-copy-check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg></button>`;
1357
+ }
1358
+ var SCRIPT_URL_SCHEME = /^(?:javascript|vbscript|data):/i;
1359
+ function isScriptUrl(href) {
1360
+ const url = href.replace(/[\t\n\r]/g, "");
1361
+ let start = 0;
1362
+ while (start < url.length && url.charCodeAt(start) <= 32) start++;
1363
+ return SCRIPT_URL_SCHEME.test(url.slice(start));
1364
+ }
1365
+ function renderMarkdownDocument(body, depth) {
1366
+ const slug = createSlugger();
1367
+ const renderer = new (0, _marked.Renderer)();
1368
+ const maxLevel = Math.max(2, Math.min(depth, 6));
1369
+ const tocItems = [];
1370
+ renderer.heading = (text, level, raw) => {
1371
+ const title = raw || stripHtml(text);
1372
+ const id = slug(title);
1373
+ if (level >= 2 && level <= maxLevel) {
1374
+ tocItems.push({ id, title, level });
1375
+ }
1376
+ return `<h${level} id="${escapeAttribute(id)}"><a class="heading-anchor" href="#${escapeAttribute(id)}">${text}</a></h${level}>
1377
+ `;
1378
+ };
1379
+ renderer.code = (code, infostring, escaped) => {
1380
+ const { language, label, hasExplicitLabel } = parseCodeInfo(infostring);
1381
+ const rawCode = escaped ? unescapeHtml(code) : code;
1382
+ const highlighted = highlightCodeBlock(rawCode);
1383
+ const shouldRenderHeader = hasExplicitLabel && isCodePathLabel(label);
1384
+ const header = shouldRenderHeader ? `<div class="code-block-header">
1385
+ <span class="code-block-title">${escapeHtml(label)}</span>
1386
+ ${renderCodeCopyButton()}
1387
+ </div>` : renderCodeCopyButton("code-copy code-copy-floating");
1388
+ return `<figure class="shiki code-block ${shouldRenderHeader ? "code-block-framed" : "code-block-plain"}" data-language="${escapeAttribute(language)}">
1389
+ ${header}
1390
+ <pre><code class="sh-code language-${escapeAttribute(language)}">${highlighted}</code></pre>
1391
+ </figure>
1392
+ `;
1393
+ };
1394
+ renderer.table = (header, body2) => `<div class="fd-table-wrapper table-wrap relative overflow-auto prose-no-margin my-6"><table><thead>${header}</thead><tbody>${body2}</tbody></table></div>
1395
+ `;
1396
+ renderer.blockquote = (quote) => `<blockquote>${quote}</blockquote>
1397
+ `;
1398
+ renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
1399
+ renderer.link = (href, title, text) => {
1400
+ if (href && isScriptUrl(href)) return text;
1401
+ const safeHref = href || "";
1402
+ const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
1403
+ return `<a href="${escapeAttribute(safeHref)}"${titleAttribute}>${text}</a>`;
1404
+ };
1405
+ renderer.image = (href, title, text) => {
1406
+ const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
1407
+ return `<img src="${escapeAttribute(href)}" alt="${escapeAttribute(text)}"${titleAttribute}>`;
1408
+ };
1409
+ const html = _marked.marked.call(void 0, attachCodeBlockLabels(stripMdxRuntimeSyntax(body)), {
1410
+ async: false,
1411
+ breaks: false,
1412
+ gfm: true,
1413
+ renderer
1414
+ });
1415
+ return { html: html.trim(), tocItems };
1416
+ }
1417
+ function getThemeUI(docs) {
1418
+ const theme = docs.config.theme;
1419
+ return theme && typeof theme === "object" && "ui" in theme && typeof theme.ui === "object" ? theme.ui : {};
1420
+ }
1421
+ function getThemeName(docs) {
1422
+ const theme = docs.config.theme;
1423
+ return theme && typeof theme === "object" && "name" in theme ? String(theme.name || "farm-docs") : "farm-docs";
1424
+ }
1425
+ function getThemeTocDepth(docs) {
1426
+ const toc = _optionalChain([getThemeUI, 'call', _72 => _72(docs), 'access', _73 => _73.layout, 'optionalAccess', _74 => _74.toc]);
1427
+ return toc && typeof toc === "object" && typeof toc.depth === "number" ? toc.depth : 3;
1428
+ }
1429
+ var SIDEBAR_SECTION_ORDER = [
1430
+ "Start",
1431
+ "Core",
1432
+ "Data and APIs",
1433
+ "Integrations",
1434
+ "Runtime",
1435
+ "Content",
1436
+ "Extending",
1437
+ "Reference"
1438
+ ];
1439
+ var SIDEBAR_PAGE_ORDER = new Map(
1440
+ [
1441
+ "",
1442
+ "getting-started",
1443
+ "project-structure",
1444
+ "configuration",
1445
+ "routing",
1446
+ "layouts",
1447
+ "server-rendering",
1448
+ "middleware",
1449
+ "query",
1450
+ "api-routes",
1451
+ "api-client",
1452
+ "storage",
1453
+ "integrations",
1454
+ "integrations/stripe",
1455
+ "integrations/autumn",
1456
+ "integrations/polar",
1457
+ "integrations/auth",
1458
+ "integrations/email",
1459
+ "integrations/jobs",
1460
+ "integrations/unkey",
1461
+ "integrations/ui-registry",
1462
+ "integrations/orm-storage",
1463
+ "cache-ppr",
1464
+ "observability",
1465
+ "deployment",
1466
+ "docs-engine",
1467
+ "markdown",
1468
+ "openapi",
1469
+ "plugins",
1470
+ "plugins/create-plugin",
1471
+ "cli",
1472
+ "examples",
1473
+ "reference"
1474
+ ].map((slug, index) => [slug, index])
1475
+ );
1476
+ function isSidebarNavigationItem(value) {
1477
+ return value !== null;
1478
+ }
1479
+ function compareSidebarPages(a, b) {
1480
+ const aOrder = _nullishCoalesce(SIDEBAR_PAGE_ORDER.get(a.slug), () => ( 1e3));
1481
+ const bOrder = _nullishCoalesce(SIDEBAR_PAGE_ORDER.get(b.slug), () => ( 1e3));
1482
+ return aOrder - bOrder || a.title.localeCompare(b.title);
1483
+ }
1484
+ function getSidebarSection(page) {
1485
+ if (page.section) return page.section;
1486
+ if (page.slug.startsWith("integrations/")) return "Integrations";
1487
+ if (page.slug.startsWith("plugins/")) return "Extending";
1488
+ return "Reference";
1489
+ }
1490
+ function sidebarIdFor(section) {
1491
+ return `sidebar-${slugify(section)}`;
1492
+ }
1493
+ function isObjectRecord(value) {
1494
+ return !!value && typeof value === "object" && !Array.isArray(value);
1495
+ }
1496
+ function readString(value) {
1497
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
1498
+ }
1499
+ function readOptionalString(value) {
1500
+ return typeof value === "string" ? value.trim() : void 0;
1501
+ }
1502
+ function normalizeSidebarSlug(value) {
1503
+ if (value === "/" || value === ".") return "";
1504
+ return trimSlashes(value);
1505
+ }
1506
+ function getSidebarNavigation(docs) {
1507
+ const navigation = docs.config.navigation;
1508
+ if (!isObjectRecord(navigation) || !Array.isArray(navigation.sidebar)) return [];
1509
+ return navigation.sidebar.map(normalizeSidebarNavigationItem).filter(isSidebarNavigationItem);
1510
+ }
1511
+ function normalizeSidebarNavigationItem(value) {
1512
+ if (!isObjectRecord(value)) return null;
1513
+ const label = _nullishCoalesce(readString(value.label), () => ( readString(value.title)));
1514
+ const icon = readString(value.icon);
1515
+ const slug = _nullishCoalesce(readOptionalString(value.slug), () => ( readOptionalString(value.path)));
1516
+ const href = _nullishCoalesce(readString(value.href), () => ( readString(value.url)));
1517
+ const rawChildren = Array.isArray(value.children) ? value.children : Array.isArray(value.items) ? value.items : [];
1518
+ const children = rawChildren.map(normalizeSidebarNavigationItem).filter(isSidebarNavigationItem);
1519
+ if (!label && !slug && !href && children.length === 0) return null;
1520
+ return {
1521
+ ...label ? { label } : {},
1522
+ ...icon ? { icon } : {},
1523
+ ...slug !== void 0 ? { slug: normalizeSidebarSlug(slug) } : {},
1524
+ ...href ? { href } : {},
1525
+ children
1526
+ };
1527
+ }
1528
+ function createSidebarPageMaps(pages) {
1529
+ return {
1530
+ bySlug: new Map(pages.map((page) => [page.slug, page])),
1531
+ byHref: new Map(pages.map((page) => [page.href, page]))
1532
+ };
1533
+ }
1534
+ function resolveConfiguredSidebarPage(item, maps) {
1535
+ if (item.slug !== void 0) return maps.bySlug.get(item.slug);
1536
+ if (item.href) return maps.byHref.get(item.href);
1537
+ return void 0;
1538
+ }
1539
+ function getSidebarIconRegistry(docs) {
1540
+ return isObjectRecord(docs.config.icons) ? docs.config.icons : {};
1541
+ }
1542
+ function renderConfiguredIconSvg(value) {
1543
+ if (typeof value !== "string") return "";
1544
+ const icon = value.trim();
1545
+ if (!icon) return "";
1546
+ if (/^<svg[\s>]/i.test(icon)) return icon;
1547
+ if (/^<(path|circle|rect|line|polyline|polygon|ellipse|g)\b/i.test(icon)) {
1548
+ return `<svg viewBox="0 0 24 24" focusable="false">${icon}</svg>`;
1549
+ }
1550
+ return "";
1551
+ }
1552
+ function renderSidebarIcon(docs, icon, className = "sidebar-icon fd-sidebar-icon") {
1553
+ if (!icon) return "";
1554
+ const iconRegistry = getSidebarIconRegistry(docs);
1555
+ const configuredIcon = _nullishCoalesce(iconRegistry[icon], () => ( icon));
1556
+ const svg = renderConfiguredIconSvg(configuredIcon);
1557
+ if (!svg) return "";
1558
+ return `<span class="${className}" data-sidebar-icon="${escapeAttribute(icon)}" aria-hidden="true">${svg}</span>`;
1559
+ }
1560
+ function renderSidebarLabel(docs, icon, label, className) {
1561
+ return `<span class="${className}">${renderSidebarIcon(docs, icon)}<span class="sidebar-label-text">${escapeHtml(label)}</span></span>`;
1562
+ }
1563
+ function getSidebarPageLabel(item, configured) {
1564
+ if (_optionalChain([configured, 'optionalAccess', _75 => _75.label])) return configured.label;
1565
+ if (item.slug === "") return "Why?";
1566
+ if (item.slug === "integrations") return "Overview";
1567
+ if (item.slug === "integrations/ui-registry") return "UI Registry";
1568
+ if (item.slug === "integrations/orm-storage") return "ORM Storage";
1569
+ if (item.slug.startsWith("integrations/")) {
1570
+ return item.title.replace(/\s+Integrations?$/i, "");
1571
+ }
1572
+ return item.title;
1573
+ }
1574
+ function renderSidebarLink(item, activeHref, docs, configured) {
1575
+ const active = item.href === activeHref;
1576
+ return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(item.href)}">${renderSidebarLabel(docs, _optionalChain([configured, 'optionalAccess', _76 => _76.icon]), getSidebarPageLabel(item, configured), "sidebar-link-label fd-sidebar-link-label")}</a>`;
1577
+ }
1578
+ function collectConfiguredSidebarPages(items, maps, seen = /* @__PURE__ */ new Set()) {
1579
+ const ordered = [];
1580
+ for (const item of items) {
1581
+ const page = resolveConfiguredSidebarPage(item, maps);
1582
+ if (page && !seen.has(page.slug)) {
1583
+ seen.add(page.slug);
1584
+ ordered.push(page);
1585
+ }
1586
+ ordered.push(...collectConfiguredSidebarPages(item.children, maps, seen));
1587
+ }
1588
+ return ordered;
1589
+ }
1590
+ function getOrderedSidebarPages(pages, docs) {
1591
+ if (!docs) return [...pages].sort(compareSidebarPages);
1592
+ const maps = createSidebarPageMaps(pages);
1593
+ const configuredPages = collectConfiguredSidebarPages(getSidebarNavigation(docs), maps);
1594
+ if (configuredPages.length === 0) return [...pages].sort(compareSidebarPages);
1595
+ const configuredSlugs = new Set(configuredPages.map((page) => page.slug));
1596
+ const remainingPages = pages.filter((page) => !configuredSlugs.has(page.slug)).sort(compareSidebarPages);
1597
+ return [...configuredPages, ...remainingPages];
1598
+ }
1599
+ function renderExternalSidebarLink(item, activeHref, docs) {
1600
+ if (!item.href || !item.label) return "";
1601
+ const active = item.href === activeHref;
1602
+ return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(item.href)}">${renderSidebarLabel(docs, item.icon, item.label, "sidebar-link-label fd-sidebar-link-label")}</a>`;
1603
+ }
1604
+ function renderConfiguredSidebarSubgroup(item, childHtml, docs) {
1605
+ const label = item.label;
1606
+ if (!label) return childHtml;
1607
+ return `<div class="sidebar-subgroup fd-sidebar-folder" data-sidebar-subgroup="${escapeAttribute(slugify(label))}">
1608
+ <div class="sidebar-subgroup-title fd-sidebar-folder-trigger">${renderSidebarLabel(docs, item.icon, label, "sidebar-subgroup-label")}</div>
1609
+ <div class="sidebar-subgroup-content fd-sidebar-folder-content">
1610
+ ${childHtml}
1611
+ </div>
1612
+ </div>`;
1613
+ }
1614
+ function renderConfiguredSidebarItems(items, maps, activeHref, docs) {
1615
+ const renderedItems = [];
1616
+ for (const item of items) {
1617
+ const page = resolveConfiguredSidebarPage(item, maps);
1618
+ const childHtml = renderConfiguredSidebarItems(item.children, maps, activeHref, docs);
1619
+ if (item.children.length > 0) {
1620
+ renderedItems.push(renderConfiguredSidebarSubgroup(item, childHtml, docs));
1621
+ continue;
1622
+ }
1623
+ const linkHtml = page ? renderSidebarLink(page, activeHref, docs, item) : renderExternalSidebarLink(item, activeHref, docs);
1624
+ if (linkHtml) renderedItems.push(linkHtml);
1625
+ }
1626
+ return renderedItems.join("\n");
1627
+ }
1628
+ function renderConfiguredSidebarSection(section, maps, activeHref, docs) {
1629
+ const label = section.label || "Docs";
1630
+ const id = sidebarIdFor(label);
1631
+ const links = renderConfiguredSidebarItems(section.children, maps, activeHref, docs);
1632
+ return `<div class="sidebar-folder fd-sidebar-folder" data-state="open">
1633
+ <button class="text-fd-muted-foreground sidebar-folder-trigger fd-sidebar-folder-trigger" type="button" aria-controls="${escapeAttribute(id)}" aria-expanded="true">${renderSidebarLabel(docs, section.icon, label, "sidebar-folder-label")}</button>
1634
+ <div id="${escapeAttribute(id)}" class="overflow-hidden sidebar-folder-content fd-sidebar-folder-content" data-state="open">
1635
+ ${links}
1636
+ </div>
1637
+ </div>`;
1638
+ }
1639
+ function renderAutoSidebarSectionItems(items, activeHref, docs) {
1640
+ return [...items].sort(compareSidebarPages).map((item) => renderSidebarLink(item, activeHref, docs)).join("\n");
1641
+ }
1642
+ function renderPixelNavItems(pages, activeHref, docs) {
1643
+ const configuredSidebar = getSidebarNavigation(docs);
1644
+ if (configuredSidebar.length > 0) {
1645
+ const maps = createSidebarPageMaps(pages);
1646
+ const renderedSections2 = configuredSidebar.map((section) => {
1647
+ if (section.children.length > 0) {
1648
+ return renderConfiguredSidebarSection(section, maps, activeHref, docs);
1649
+ }
1650
+ const page = resolveConfiguredSidebarPage(section, maps);
1651
+ return page ? renderSidebarLink(page, activeHref, docs, section) : renderExternalSidebarLink(section, activeHref, docs);
1652
+ }).filter(Boolean).join("\n");
1653
+ return `<div class="sidebar-scroll overscroll-contain fd-sidebar-nav">
1654
+ <div class="sidebar-tree">
1655
+ ${renderedSections2}
1656
+ </div>
1657
+ </div>`;
1658
+ }
1659
+ const groups = /* @__PURE__ */ new Map();
1660
+ for (const item of pages) {
1661
+ const group = item.slug === "" ? "Start" : getSidebarSection(item);
1662
+ const entries = _nullishCoalesce(groups.get(group), () => ( []));
1663
+ entries.push(item);
1664
+ groups.set(group, entries);
1665
+ }
1666
+ const renderedSections = Array.from(groups.entries()).sort(([a], [b]) => {
1667
+ const aOrder = SIDEBAR_SECTION_ORDER.indexOf(a);
1668
+ const bOrder = SIDEBAR_SECTION_ORDER.indexOf(b);
1669
+ return (aOrder === -1 ? 100 : aOrder) - (bOrder === -1 ? 100 : bOrder) || a.localeCompare(b);
1670
+ }).map(([section, items]) => {
1671
+ const id = sidebarIdFor(section);
1672
+ const links = renderAutoSidebarSectionItems(items, activeHref, docs);
1673
+ return `<div class="sidebar-folder fd-sidebar-folder" data-state="open">
1674
+ <button class="text-fd-muted-foreground sidebar-folder-trigger fd-sidebar-folder-trigger" type="button" aria-controls="${escapeAttribute(id)}" aria-expanded="true">${renderSidebarLabel(docs, void 0, section, "sidebar-folder-label")}</button>
1675
+ <div id="${escapeAttribute(id)}" class="overflow-hidden sidebar-folder-content fd-sidebar-folder-content" data-state="open">
1676
+ ${links}
1677
+ </div>
1678
+ </div>`;
1679
+ }).join("\n");
1680
+ return `<div class="sidebar-scroll overscroll-contain fd-sidebar-nav">
1681
+ <div class="sidebar-tree">
1682
+ ${renderedSections}
1683
+ </div>
1684
+ </div>`;
1685
+ }
1686
+ function renderPixelPageNav(pages, activeHref, docs) {
1687
+ const orderedPages = getOrderedSidebarPages(pages, docs);
1688
+ const activeIndex = orderedPages.findIndex((item) => item.href === activeHref);
1689
+ if (activeIndex === -1) return "";
1690
+ const previous = orderedPages[activeIndex - 1];
1691
+ const next = orderedPages[activeIndex + 1];
1692
+ if (!previous && !next) return "";
1693
+ const renderChevron = (direction) => `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="${direction === "prev" ? "15 18 9 12 15 6" : "9 18 15 12 9 6"}" /></svg>`;
1694
+ const renderCard = (item, direction) => `<a class="fd-page-nav-card fd-page-nav-${direction}" href="${escapeAttribute(item.href)}">
1695
+ <span class="fd-page-nav-title fd-page-nav-title-${direction}">${direction === "prev" ? `${renderChevron(direction)}${escapeHtml(item.title)}` : `${escapeHtml(item.title)}${renderChevron(direction)}`}</span>
1696
+ <span class="fd-page-nav-description">${direction === "prev" ? "Previous Page" : "Next Page"}</span>
1697
+ </a>`;
1698
+ return `<nav class="not-prose fd-page-nav" aria-label="Page navigation">
1699
+ ${previous ? renderCard(previous, "prev") : ""}
1700
+ ${next ? renderCard(next, "next") : ""}
1701
+ </nav>`;
1702
+ }
1703
+ function titleizePathSegment(value) {
1704
+ return value.replace(/[-_]+/g, " ").replace(/\b\w/g, (character) => character.toUpperCase());
1705
+ }
1706
+ function isBreadcrumbEnabled(docs) {
1707
+ const breadcrumb = docs.config.breadcrumb;
1708
+ if (breadcrumb === false) return false;
1709
+ if (breadcrumb && typeof breadcrumb === "object" && "enabled" in breadcrumb) {
1710
+ return breadcrumb.enabled !== false;
1711
+ }
1712
+ return true;
1713
+ }
1714
+ function renderPixelBreadcrumb(page, docs) {
1715
+ if (!isBreadcrumbEnabled(docs)) return "";
1716
+ const segments = trimSlashes(page.slug).split("/").filter(Boolean);
1717
+ if (segments.length < 2) return "";
1718
+ const parentSegments = segments.slice(0, -1);
1719
+ const parentSegment = parentSegments[parentSegments.length - 1];
1720
+ const currentSegment = segments[segments.length - 1];
1721
+ const entry = normalizeEntry2(docs.entry);
1722
+ const parentPath = parentSegments.join("/");
1723
+ const parentHref = entry === "/" ? `/${parentPath}` : `${entry}/${parentPath}`;
1724
+ return `<nav class="fd-breadcrumb" aria-label="Breadcrumb">
1725
+ <span class="fd-breadcrumb-item">
1726
+ <a class="fd-breadcrumb-parent fd-breadcrumb-link" href="${escapeAttribute(parentHref)}">${escapeHtml(titleizePathSegment(parentSegment))}</a>
1727
+ </span>
1728
+ <span class="fd-breadcrumb-item">
1729
+ <span class="fd-breadcrumb-sep">/</span>
1730
+ <span class="fd-breadcrumb-current">${escapeHtml(titleizePathSegment(currentSegment))}</span>
1731
+ </span>
1732
+ </nav>`;
1733
+ }
1734
+ function renderDocsSearchTrigger(showIcon = true, className = "") {
1735
+ return `<button class="fd-docs-search-trigger ${className}" type="button" data-search-full="" aria-label="Search documentation" aria-haspopup="dialog" aria-keyshortcuts="Meta+K Control+K">
1736
+ ${showIcon ? '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-4-4"></path></svg>' : ""}
1737
+ <kbd><span>\u2318</span><span>K</span></kbd>
1738
+ </button>`;
1739
+ }
1740
+ function renderDocsSearchMount(clientEntry) {
1741
+ return `<div id="farm-docs-search-root" data-farm-docs-search-root data-api="/api/docs"></div>
1742
+ ${_chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script type="module" src="${escapeAttribute(clientEntry)}"></script>`)}`;
1743
+ }
1744
+ function renderDocsSearchBootstrapScript() {
1745
+ return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${_chunkDZZHTMWMcjs.generateFarmDocsSearchBootstrapRuntime.call(void 0, )}</script>`);
1746
+ }
1747
+ function renderPixelToc(items) {
1748
+ if (items.length === 0) return '<p class="toc-empty">No sections</p>';
1749
+ return `<div class="toc-track fd-toc-list">
1750
+ <div class="toc-thumb" data-toc-thumb style="clip-path: polygon(0 0px, 100% 0px, 100% 32px, 0 32px);"></div>
1751
+ <div class="toc-links">
1752
+ ${items.map(
1753
+ (item) => `<a class="toc-link fd-toc-link${items[0] === item ? " fd-toc-link-active" : ""}" data-active="${items[0] === item ? "true" : "false"}" data-toc-item data-depth="${item.level}" href="#${escapeAttribute(item.id)}">${escapeHtml(item.title)}</a>`
1754
+ ).join("\n")}
1755
+ </div>
1756
+ </div>`;
1757
+ }
1758
+ function renderDocsRuntimeScript(docs) {
1759
+ const docsEntry = JSON.stringify(normalizeEntry2(docs.entry));
1760
+ const reconcileHeadRuntime = `const farmNavigationHeadSelector=${JSON.stringify(_chunkOOJBBHYWcjs.FARM_NAVIGATION_HEAD_SELECTOR)};const reconcileDocsHead=(nextDoc)=>{const nextTitle=nextDoc.querySelector("title");document.title=nextTitle?.textContent||"";document.head.querySelectorAll(farmNavigationHeadSelector).forEach((node)=>node.remove());nextDoc.head.querySelectorAll(farmNavigationHeadSelector).forEach((node)=>document.head.appendChild(document.importNode(node,true)))}`;
1761
+ return `<script>(()=>{if(window.__farmDocsRuntime)return;window.__farmDocsRuntime=true;document.documentElement.dataset.farmDocsRuntime="true";document.documentElement.dataset.farmDocsRuntimeId=Math.random().toString(36).slice(2);${reconcileHeadRuntime};const docsEntry=${docsEntry};let cleanupToc=()=>{};let closeMobileSidebar=()=>{};const normalizePath=(path)=>path.length>1?path.replace(/\\/+$/,""):path;const isDocsPath=(path)=>{const next=normalizePath(path);const entry=normalizePath(docsEntry);if(next.endsWith(".md"))return false;if(entry==="/")return true;return next===entry||next.startsWith(entry+"/")};const initToc=()=>{cleanupToc();const toc=document.getElementById("nd-toc");if(!toc){cleanupToc=()=>{};return}const links=Array.from(toc.querySelectorAll("[data-toc-item]"));const thumb=toc.querySelector("[data-toc-thumb]");const pairs=links.map((link)=>{let id=link.hash.slice(1);try{id=decodeURIComponent(id)}catch{}return{link,heading:document.getElementById(id)}}).filter((item)=>item.heading);const setActive=(active)=>{for(const {link} of pairs){const selected=link===active.link;link.dataset.active=selected?"true":"false";link.classList.toggle("fd-toc-link-active",selected)}if(!thumb)return;const styles=getComputedStyle(active.link);const top=active.link.offsetTop+parseFloat(styles.paddingTop||"0");const bottom=active.link.offsetTop+active.link.clientHeight-parseFloat(styles.paddingBottom||"0");thumb.style.clipPath="polygon(0 "+top+"px,100% "+top+"px,100% "+bottom+"px,0 "+bottom+"px)"};const update=()=>{if(pairs.length===0)return;const offset=Math.min(window.innerHeight*0.3,160);let active=pairs[0];for(const pair of pairs){if(pair.heading.getBoundingClientRect().top<=offset)active=pair;else break}setActive(active)};let frame=0;const schedule=()=>{if(frame)return;frame=requestAnimationFrame(()=>{frame=0;update()})};const onHashChange=()=>setTimeout(schedule,0);window.addEventListener("scroll",schedule,{passive:true});window.addEventListener("resize",schedule);window.addEventListener("hashchange",onHashChange);cleanupToc=()=>{window.removeEventListener("scroll",schedule);window.removeEventListener("resize",schedule);window.removeEventListener("hashchange",onHashChange);if(frame)cancelAnimationFrame(frame);frame=0};update()};const getSidebar=()=>document.getElementById("nd-sidebar");const ensureActiveVisible=()=>{const sidebar=getSidebar();if(!sidebar)return;const active=sidebar.querySelector('a[data-active="true"]');if(!(active instanceof HTMLElement))return;const activeRect=active.getBoundingClientRect();const sidebarRect=sidebar.getBoundingClientRect();if(activeRect.top<sidebarRect.top||activeRect.bottom>sidebarRect.bottom)sidebar.scrollTop+=activeRect.top-sidebarRect.top-(sidebar.clientHeight-activeRect.height)/2};const setSidebarActive=(path)=>{const sidebar=getSidebar();if(!sidebar)return;const current=normalizePath(path);for(const link of Array.from(sidebar.querySelectorAll("a[href]"))){try{link.dataset.active=normalizePath(new URL(link.href,location.href).pathname)===current?"true":"false"}catch{}}ensureActiveVisible()};const initMobileSidebar=()=>{const layout=document.getElementById("nd-docs-layout");const sidebar=getSidebar();const toggle=document.querySelector("[data-sidebar-toggle]");const backdrop=document.querySelector("[data-sidebar-backdrop]");if(!layout||!sidebar||!(toggle instanceof HTMLButtonElement))return;const setOpen=(open)=>{layout.dataset.sidebarOpen=open?"true":"false";sidebar.classList.toggle("fd-sidebar-open",open);document.documentElement.dataset.farmDocsSidebar=open?"open":"closed";toggle.setAttribute("aria-expanded",open?"true":"false");toggle.setAttribute("aria-label",open?"Close menu":"Open menu")};const toggleOpen=()=>setOpen(layout.dataset.sidebarOpen!=="true");closeMobileSidebar=()=>setOpen(false);toggle.addEventListener("click",(event)=>{event.preventDefault();toggleOpen()});backdrop?.addEventListener("click",()=>closeMobileSidebar());document.addEventListener("keydown",(event)=>{if(event.key==="Escape")closeMobileSidebar()});sidebar.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(target)closeMobileSidebar()});closeMobileSidebar()};const initSidebarScroll=()=>{const sidebar=getSidebar();if(!sidebar)return;const key="farmdocs:sidebar-scroll:"+location.origin;const getStorage=()=>{try{return window.sessionStorage}catch{return null}};const readSaved=()=>{try{const raw=getStorage()?.getItem(key);if(!raw)return null;const parsed=JSON.parse(raw);return parsed&&typeof parsed==="object"?parsed:null}catch{return null}};const save=(path=location.pathname)=>{try{getStorage()?.setItem(key,JSON.stringify({path,scrollTop:sidebar.scrollTop}))}catch{}};const saved=readSaved();if(saved?.path===location.pathname&&Number.isFinite(Number(saved.scrollTop)))sidebar.scrollTop=Number(saved.scrollTop);ensureActiveVisible();save();sidebar.addEventListener("scroll",()=>save(),{passive:true});sidebar.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(!target)return;try{save(new URL(target.href,location.href).pathname)}catch{save()}});window.addEventListener("beforeunload",()=>save())};let navigateController=null;const getPageKey=(root)=>{const article=root.getElementById("nd-page");if(!article)return"";return article.querySelector("h1")?.textContent?.trim()||article.textContent?.replace(/\\s+/g," ").trim().slice(0,160)||""};const swapDocsPage=(html,url)=>{const nextDoc=new DOMParser().parseFromString(html,"text/html");const nextArticle=nextDoc.getElementById("nd-page");const currentArticle=document.getElementById("nd-page");if(!nextArticle||!currentArticle)return false;const nextKey=getPageKey(nextDoc);const importedArticle=document.importNode(nextArticle,true);currentArticle.replaceWith(importedArticle);const renderedArticle=document.getElementById("nd-page");if(!renderedArticle||renderedArticle===currentArticle||(nextKey&&getPageKey(document)!==nextKey))return false;const nextToc=nextDoc.getElementById("nd-toc");const currentToc=document.getElementById("nd-toc");if(nextToc&&currentToc)currentToc.replaceWith(document.importNode(nextToc,true));reconcileDocsHead(nextDoc);setSidebarActive(url.pathname);initToc();closeMobileSidebar();return true};const navigateDocs=async(url,{replace=false,scroll=true}={})=>{if(!isDocsPath(url.pathname))return false;if(navigateController)navigateController.abort();const controller=new AbortController();navigateController=controller;document.documentElement.dataset.farmDocsNavigating="true";try{const response=await fetch(url.href,{cache:"no-store",headers:{accept:"text/html","x-farm-docs-navigate":"1"},signal:controller.signal});if(!response.ok||!((response.headers.get("content-type")||"").includes("text/html")))return false;const html=await response.text();if(!swapDocsPage(html,url))return false;if(replace)history.replaceState({farmDocs:true},"",url.href);else history.pushState({farmDocs:true},"",url.href);if(scroll){if(url.hash){let id=url.hash.slice(1);try{id=decodeURIComponent(id)}catch{}document.getElementById(id)?.scrollIntoView({block:"start"})}else window.scrollTo({top:0,left:0})}return true}catch(error){if(error?.name==="AbortError")return true;return false}finally{if(navigateController===controller){delete document.documentElement.dataset.farmDocsNavigating;navigateController=null}}};const initClientNavigation=()=>{document.addEventListener("click",(event)=>{if(event.defaultPrevented||event.button!==0||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey)return;const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(!target||target.target||target.hasAttribute("download"))return;let url;try{url=new URL(target.href,location.href)}catch{return}if(url.origin!==location.origin||!isDocsPath(url.pathname))return;if(normalizePath(url.pathname)===normalizePath(location.pathname)&&url.hash)return;event.preventDefault();navigateDocs(url).then((handled)=>{if(!handled)location.href=url.href})});window.addEventListener("popstate",()=>{navigateDocs(new URL(location.href),{replace:true,scroll:false}).then((handled)=>{if(!handled)location.reload()})})};const init=()=>{initToc();initMobileSidebar();initSidebarScroll();initClientNavigation()};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",init,{once:true});else init()})();</script>`;
1762
+ }
1763
+ function renderDocsPageActionsRuntimeScript() {
1764
+ return `<script>(()=>{if(window.__farmDocsPageActionsRuntime)return;window.__farmDocsPageActionsRuntime=true;const readArticleText=()=>{const article=document.getElementById("nd-page");if(!article)return"";const clone=article.cloneNode(true);if(!(clone instanceof HTMLElement))return article.innerText||"";clone.querySelectorAll("[data-page-actions],.fd-page-footer,.fd-page-nav").forEach((node)=>node.remove());return clone.innerText||""};const withTitle=(content,format,includeTitle)=>{if(!includeTitle)return content;const title=document.querySelector("#nd-page h1")?.textContent?.trim()||document.title.trim();if(!title)return content;const trimmed=content.trimStart();if(trimmed.startsWith(title)||trimmed.startsWith("# "+title))return content;return format==="markdown"?"# "+title+"\\n\\n"+content:title+"\\n\\n"+content};const writeClipboard=async(text)=>{if(navigator.clipboard?.writeText){try{await navigator.clipboard.writeText(text);return}catch{}}const textarea=document.createElement("textarea");textarea.value=text;textarea.setAttribute("readonly","");textarea.style.position="fixed";textarea.style.opacity="0";textarea.style.pointerEvents="none";document.body.appendChild(textarea);textarea.select();document.execCommand("copy");textarea.remove()};const markCopied=(button)=>{const label=button.querySelector("[data-page-action-label]");button.dataset.copied="true";button.setAttribute("aria-label",button.dataset.copiedLabel||"Copied!");button.title=button.dataset.copiedLabel||"Copied!";if(label)label.textContent=button.dataset.copiedLabel||"Copied!";const previous=Number(button.dataset.copyTimeout||0);if(previous)clearTimeout(previous);button.dataset.copyTimeout=String(setTimeout(()=>{button.dataset.copied="false";button.setAttribute("aria-label",button.dataset.copyLabel||"Copy page");button.title=button.dataset.copyLabel||"Copy page";if(label)label.textContent=button.dataset.copyLabel||"Copy page";button.dataset.copyTimeout="0"},4500))};const markCodeCopied=(button)=>{button.dataset.copied="true";button.setAttribute("aria-label","Copied");button.title="Copied";const previous=Number(button.dataset.copyTimeout||0);if(previous)clearTimeout(previous);button.dataset.copyTimeout=String(setTimeout(()=>{button.dataset.copied="false";button.setAttribute("aria-label","Copy code");button.title="Copy code";button.dataset.copyTimeout="0"},4500))};document.addEventListener("click",async(event)=>{const source=event.target instanceof Element?event.target:null;const codeButton=source?.closest("[data-code-copy]");if(codeButton instanceof HTMLButtonElement){event.preventDefault();const code=codeButton.closest("figure")?.querySelector("code");if(!(code instanceof HTMLElement))return;const content=code.innerText||code.textContent||"";if(!content)return;await writeClipboard(content);markCodeCopied(codeButton);return}const target=source?.closest('[data-page-action="copy-markdown"]');if(!(target instanceof HTMLButtonElement))return;event.preventDefault();const format=target.dataset.copyMarkdownFormat==="text"?"text":"markdown";const includeTitle=target.dataset.copyMarkdownIncludeTitle==="true";let content="";target.disabled=true;try{if(format==="markdown"&&target.dataset.markdownUrl){try{const response=await fetch(target.dataset.markdownUrl,{headers:{Accept:"text/markdown"}});if(response.ok)content=await response.text()}catch{}}if(!content)content=readArticleText();content=withTitle(content,format,includeTitle);if(content.trim()){await writeClipboard(content);markCopied(target)}}finally{target.disabled=false}})})();</script>`;
1765
+ }
1766
+ function renderDocsHashRuntimeScript() {
1767
+ return `<script>(()=>{if(window.__farmDocsHashRuntime)return;window.__farmDocsHashRuntime=true;const scrollToHash=()=>{if(!location.hash)return;let id=location.hash.slice(1);try{id=decodeURIComponent(id)}catch{}document.getElementById(id)?.scrollIntoView({block:"start"})};const schedule=()=>requestAnimationFrame(()=>requestAnimationFrame(scrollToHash));if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",schedule,{once:true});else schedule();window.addEventListener("load",schedule,{once:true});window.addEventListener("hashchange",schedule)})();</script>`;
1768
+ }
1769
+ function renderDocsRuntimeScripts(docs) {
1770
+ return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `${renderDocsRuntimeScript(docs)}
1771
+ ${renderDocsHashRuntimeScript()}
1772
+ ${renderDocsPageActionsRuntimeScript()}`);
1773
+ }
1774
+ function renderFarmDocsFontPreloads(fontAssets) {
1775
+ return fontAssets.map(
1776
+ ({ url }) => `<link rel="preload" href="${escapeAttribute(url)}" as="font" type="font/woff2" crossorigin>`
1777
+ ).join("\n ");
1778
+ }
1779
+ function renderFarmDocsFontPreloadHeader(fontAssets) {
1780
+ return fontAssets.map(({ url }) => `<${url}>; rel=preload; as=font; type=font/woff2; crossorigin`).join(", ");
1781
+ }
1782
+ function getFarmLayoutFontPreloads(layoutFonts) {
1783
+ const seen = /* @__PURE__ */ new Set();
1784
+ return [_optionalChain([layoutFonts, 'optionalAccess', _77 => _77.body]), _optionalChain([layoutFonts, 'optionalAccess', _78 => _78.code])].flatMap(
1785
+ (font) => (_optionalChain([font, 'optionalAccess', _79 => _79.preloads]) || []).filter(({ href }) => {
1786
+ if (seen.has(href)) return false;
1787
+ seen.add(href);
1788
+ return true;
1789
+ })
1790
+ );
1791
+ }
1792
+ function renderFarmLayoutFontPreloadHeader(layoutFonts) {
1793
+ return getFarmLayoutFontPreloads(layoutFonts).map(({ href, type }) => `<${href}>; rel=preload; as=font; type=${type}; crossorigin`).join(", ");
1794
+ }
1795
+ function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, requestUrl, fontAssets, fontStylesheetHref, globalStylesheetHref) {
1796
+ const navTitle = typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Docs") : "Docs";
1797
+ const description = page.description || _optionalChain([docs, 'access', _80 => _80.config, 'access', _81 => _81.metadata, 'optionalAccess', _82 => _82.description]) || "";
1798
+ const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
1799
+ const tocItems = renderedMarkdown.tocItems;
1800
+ const themeName = getThemeName(docs);
1801
+ const searchEnabled = _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, docs);
1802
+ const socialMetadata = isFarmDocsSocialImageEnabled(page, docs) ? renderFarmDocsSocialMetadata(
1803
+ createFarmDocsSocialImageDescriptor(page, docs, requestUrl),
1804
+ getFarmDocsCustomSocialImage(page)
1805
+ ) : "";
1806
+ return `<!DOCTYPE html>
1807
+ <html class="dark" lang="en" data-docs-theme="${escapeAttribute(themeName)}">
1808
+ <head>
1809
+ <meta charset="utf-8">
1810
+ <meta name="viewport" content="width=device-width, initial-scale=1">
1811
+ <meta name="generator" content="@farming-labs/docs via Farm.js">
1812
+ <title>${escapeHtml(page.title)}</title>
1813
+ ${renderFarmDocsFaviconLink(faviconHref)}
1814
+ ${renderFarmDocsFontPreloads(fontAssets)}
1815
+ ${fontStylesheetHref ? `<link rel="stylesheet" href="${escapeAttribute(fontStylesheetHref)}">` : ""}
1816
+ ${globalStylesheetHref ? `<link rel="stylesheet" href="${escapeAttribute(globalStylesheetHref)}">` : ""}
1817
+ ${description ? `<meta name="description" content="${escapeHtml(description)}">` : ""}
1818
+ ${socialMetadata}
1819
+ ${searchEnabled ? renderDocsSearchBootstrapScript() : ""}
1820
+ </head>
1821
+ <body>
1822
+ <div id="nd-docs-layout" class="fd-layout" data-fd-framework="farmjs">
1823
+ <header class="mobile-topbar fd-header" aria-label="Mobile docs navigation">
1824
+ <button class="fd-mobile-nav-btn fd-menu-btn" type="button" data-sidebar-toggle aria-controls="nd-sidebar" aria-expanded="false" aria-label="Open menu">
1825
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
1826
+ </button>
1827
+ <a class="fd-header-title" href="/">${escapeHtml(navTitle)}</a>
1828
+ <div class="mobile-topbar-actions">
1829
+ ${searchEnabled ? renderDocsSearchTrigger(true, "fd-search-trigger-mobile") : ""}
1830
+ <a class="mobile-topbar-link" href="/llms.txt">llms.txt</a>
1831
+ </div>
1832
+ </header>
1833
+ <aside id="nd-sidebar" class="fd-sidebar">
1834
+ <div class="sidebar-brand fd-sidebar-header">
1835
+ <a class="fd-sidebar-title" href="/">${renderFarmDocsBrandMark()}${renderFarmDocsBrandTitle(navTitle)}</a>
1836
+ <span>/ docs</span>
1837
+ </div>
1838
+ ${searchEnabled ? `<div class="fd-sidebar-search">${renderDocsSearchTrigger(true, "fd-sidebar-search-btn")}</div>` : ""}
1839
+ ${renderPixelNavItems(pages, page.href, docs)}
1840
+ </aside>
1841
+ <div class="sidebar-backdrop fd-sidebar-overlay" data-sidebar-backdrop></div>
1842
+ <main class="fd-main">
1843
+ <div class="fd-page">
1844
+ <article id="nd-page" class="prose fd-page-article fd-page-body fd-docs-content">
1845
+ ${renderPixelBreadcrumb(page, docs)}
1846
+ ${renderMarkdownHtmlWithTitleMeta(page, docs, renderedMarkdown.html)}
1847
+ ${renderPixelPageFooter(page, docs)}
1848
+ ${renderPixelPageNav(pages, page.href, docs)}
1849
+ </article>
1850
+ <nav id="nd-toc" class="fd-toc sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden" data-toc aria-labelledby="toc-title">
1851
+ <div class="fd-toc-inner">
1852
+ <h3 id="toc-title" class="fd-toc-title inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground"><svg class="size-4" viewBox="0 0 24 24" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"></path><path d="M4 12h16"></path><path d="M4 17h16"></path></svg>On this page</h3>
1853
+ <div class="toc-scroll">
1854
+ ${renderPixelToc(tocItems)}
1855
+ </div>
1856
+ </div>
1857
+ </nav>
1858
+ </div>
1859
+ </main>
1860
+ </div>
1861
+ ${searchEnabled ? renderDocsSearchMount(clientEntry) : ""}
1862
+ ${renderDocsRuntimeScripts(docs)}
1863
+ </body>
1864
+ </html>`;
1865
+ }
1866
+ function createFarmDocsHandler(docs, options) {
1867
+ const faviconHref = resolveFarmDocsFavicon(docs, options);
1868
+ const fontAssets = _nullishCoalesce(options.fontAssets, () => ( _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, options.root))));
1869
+ const fallbackFontPreloadHeader = renderFarmDocsFontPreloadHeader(fontAssets);
1870
+ return async function handleFarmDocsRequest(request) {
1871
+ if (!_optionalChain([docs, 'optionalAccess', _83 => _83.enabled]) || request.method !== "GET" && request.method !== "HEAD") return null;
1872
+ await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
1873
+ const contentDir = resolveFarmDocsContentDir(docs, options);
1874
+ const requestUrl = new URL(request.url);
1875
+ const socialImageSlug = getFarmDocsSocialImageSlug(docs, requestUrl);
1876
+ if (socialImageSlug !== null) {
1877
+ const socialImagePage = loadFarmDocsPage(contentDir, docs, socialImageSlug);
1878
+ if (!socialImagePage || // The image sits outside the page's URL, where its guard does not reach, and
1879
+ // draws the page's title.
1880
+ _optionalChain([options, 'access', _84 => _84.isPathGuarded, 'optionalCall', _85 => _85(socialImagePage.href)]) || !isFarmDocsSocialImageEnabled(socialImagePage, docs) || getFarmDocsCustomSocialImage(socialImagePage)) {
1881
+ return null;
1882
+ }
1883
+ const descriptor = createFarmDocsSocialImageDescriptor(socialImagePage, docs, requestUrl);
1884
+ if (requestUrl.pathname !== descriptor.imagePath) return null;
1885
+ const etag = `"${descriptor.hash}"`;
1886
+ const immutable = requestUrl.searchParams.get("v") === descriptor.hash;
1887
+ const headers = new Headers({
1888
+ "Content-Type": "image/svg+xml; charset=utf-8",
1889
+ "Cache-Control": immutable ? "public, max-age=31536000, immutable" : "public, max-age=0, must-revalidate",
1890
+ ETag: etag,
1891
+ "X-Content-Type-Options": "nosniff"
1892
+ });
1893
+ if (_chunkCFG4QERRcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1894
+ return new Response(null, { status: 304, headers });
1895
+ }
1896
+ if (request.method === "HEAD") return new Response(null, { status: 200, headers });
1897
+ return new Response(renderFarmDocsSocialImageSvg(descriptor), { status: 200, headers });
1898
+ }
1899
+ const publicResponse = createFarmDocsPublicResponse(
1900
+ contentDir,
1901
+ docs,
1902
+ request,
1903
+ options.isPathGuarded
1904
+ );
1905
+ if (publicResponse) return omitFarmDocsHeadBody(request, publicResponse);
1906
+ if (!isFarmDocsRequest(docs, request)) return null;
1907
+ const page = loadPage(contentDir, docs, request);
1908
+ if (!page) return null;
1909
+ const negotiatesAccept = !requestUrl.pathname.endsWith(".md");
1910
+ if (!negotiatesAccept && _optionalChain([options, 'access', _86 => _86.isPathGuarded, 'optionalCall', _87 => _87(page.href)]) && !options.isPathGuarded(getFarmDocsMarkdownPath(page.href))) {
1911
+ return null;
1912
+ }
1913
+ if (shouldReturnMarkdown(request)) {
1914
+ const origin = new URL(request.url).origin;
1915
+ return omitFarmDocsHeadBody(
1916
+ request,
1917
+ new Response(
1918
+ _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(toFarmDocsMarkdownPage(page), {
1919
+ origin,
1920
+ llms: _nullishCoalesce(docs.config.llmsTxt, () => ( true)),
1921
+ sitemap: docs.config.sitemap
1922
+ }),
1923
+ {
1924
+ status: 200,
1925
+ headers: {
1926
+ "Content-Type": "text/markdown; charset=utf-8",
1927
+ "Cache-Control": "public, max-age=60",
1928
+ ...negotiatesAccept ? { Vary: "Accept" } : {}
1929
+ }
1930
+ }
1931
+ )
1932
+ );
1933
+ }
1934
+ const pathname = new URL(request.url).pathname;
1935
+ const layoutFonts = await _optionalChain([options, 'access', _88 => _88.resolveLayoutFonts, 'optionalCall', _89 => _89(pathname)]);
1936
+ const usesLayoutFonts = Boolean(_optionalChain([layoutFonts, 'optionalAccess', _90 => _90.body]) || _optionalChain([layoutFonts, 'optionalAccess', _91 => _91.code]));
1937
+ const activeFontAssets = usesLayoutFonts ? [] : fontAssets;
1938
+ const fontPreloadHeader = usesLayoutFonts ? renderFarmLayoutFontPreloadHeader(layoutFonts) : fallbackFontPreloadHeader;
1939
+ return omitFarmDocsHeadBody(
1940
+ request,
1941
+ new Response(
1942
+ renderPixelDocsHtml(
1943
+ page,
1944
+ discoverFarmDocsPages(contentDir, docs),
1945
+ docs,
1946
+ options.clientEntry || "/farm-client.js",
1947
+ faviconHref,
1948
+ requestUrl,
1949
+ activeFontAssets,
1950
+ usesLayoutFonts ? options.fontStylesheetHref : void 0,
1951
+ options.globalStylesheetHref
1952
+ ),
1953
+ {
1954
+ status: 200,
1955
+ headers: {
1956
+ "Content-Type": "text/html; charset=utf-8",
1957
+ "Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
1958
+ Vary: "Accept",
1959
+ ...fontPreloadHeader ? { Link: fontPreloadHeader } : {}
1960
+ }
1961
+ }
1962
+ )
1963
+ );
1964
+ };
1965
+ }
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+ exports.FARM_DOCS_LAST_MODIFIED_MANIFEST = FARM_DOCS_LAST_MODIFIED_MANIFEST; exports.createFarmDocsLastModifiedManifest = createFarmDocsLastModifiedManifest; exports.isFarmDocsRequest = isFarmDocsRequest; exports.resolveFarmDocsContentDir = resolveFarmDocsContentDir; exports.getFarmDocsRoots = getFarmDocsRoots; exports.getFarmDocsRouteTypeEntries = getFarmDocsRouteTypeEntries; exports.getFarmDocsDocumentNavigationMatchers = getFarmDocsDocumentNavigationMatchers; exports.loadFarmDocsPage = loadFarmDocsPage; exports.getFarmDocsMarkdownPath = getFarmDocsMarkdownPath; exports.discoverFarmDocsPages = discoverFarmDocsPages; exports.toFarmDocsMarkdownPage = toFarmDocsMarkdownPage; exports.createFarmDocsHandler = createFarmDocsHandler;