@vercel/cli-support 68.0.0 → 68.1.0-snapshot-3c48721091f5

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 (494) hide show
  1. package/dist/chunks/add-57EE2LQO.js +8 -0
  2. package/dist/chunks/{add-4ZXS4RRN.js → add-DNRNPUU7.js} +1 -1
  3. package/dist/chunks/{add-G2LGF4HL.js → add-FLVE2M3L.js} +1 -1
  4. package/dist/chunks/{alerts-3352VWDL.js → alerts-26PDHRBL.js} +1 -1
  5. package/dist/chunks/{api-endpoints-2IYXPLEG.js → api-endpoints-EY2DO75S.js} +1 -1
  6. package/dist/chunks/auth-4A5CXZOA.js +7 -0
  7. package/dist/chunks/auth-ZJV6OHMS.js +7 -0
  8. package/dist/chunks/{build-3UFKTTS5.js → build-6WTRWW2M.js} +1 -1
  9. package/dist/chunks/{chunk-D6REP5QQ.js → chunk-2GXP676X.js} +1 -1
  10. package/dist/chunks/{chunk-MXTC4ZAQ.js → chunk-2ILZM77F.js} +1 -1
  11. package/dist/chunks/{chunk-OFDTADPQ.js → chunk-2K7U64CN.js} +1 -1
  12. package/dist/chunks/{chunk-Y4YBQUQM.js → chunk-2STLJAXZ.js} +1 -1
  13. package/dist/chunks/{chunk-PAHYNO73.js → chunk-2TUJJIYU.js} +1 -1
  14. package/dist/chunks/chunk-2XQO6C7Q.js +7 -0
  15. package/dist/chunks/{chunk-DH4A4QMD.js → chunk-33ETNP4M.js} +1 -1
  16. package/dist/chunks/{chunk-L46V6VL3.js → chunk-37SWAKIV.js} +1 -1
  17. package/dist/chunks/{chunk-23FY4PR3.js → chunk-3F3WNT5K.js} +1 -1
  18. package/dist/chunks/{chunk-ZXSZH7N5.js → chunk-3GKXXGSO.js} +1 -1
  19. package/dist/chunks/{chunk-QSL6AG2B.js → chunk-3HP6FOOL.js} +1 -1
  20. package/dist/chunks/{chunk-M32HBBPK.js → chunk-3WXQHKSS.js} +1 -1
  21. package/dist/chunks/{chunk-JELLVPCM.js → chunk-3XMKTJ5T.js} +1 -1
  22. package/dist/chunks/{chunk-YLXXGQQQ.js → chunk-42D3CPWB.js} +1 -1
  23. package/dist/chunks/{chunk-5A3DDLQR.js → chunk-42RUDD27.js} +1 -1
  24. package/dist/chunks/{chunk-HRR57QNP.js → chunk-46R47IE5.js} +1 -1
  25. package/dist/chunks/{chunk-OOPF73RV.js → chunk-4FPYV37P.js} +1 -1
  26. package/dist/chunks/{chunk-CAJ2OUSR.js → chunk-4L7AKIX7.js} +1 -1
  27. package/dist/chunks/{chunk-SGNDE4YS.js → chunk-4MAA4BQD.js} +1 -1
  28. package/dist/chunks/{chunk-FTNLCQC6.js → chunk-4OOHXEKI.js} +1 -1
  29. package/dist/chunks/{chunk-NMIB4JYP.js → chunk-4R7ICESH.js} +1 -1
  30. package/dist/chunks/{chunk-MCYG7CCE.js → chunk-4SIQE2W4.js} +1 -1
  31. package/dist/chunks/chunk-4WEKKDOL.js +8 -0
  32. package/dist/chunks/{chunk-TU54LHNW.js → chunk-54W7S4EV.js} +1 -1
  33. package/dist/chunks/{chunk-NWGBDBZI.js → chunk-5F4RJ32E.js} +1 -1
  34. package/dist/chunks/{chunk-KRPY5FHJ.js → chunk-5QC4IKRZ.js} +1 -1
  35. package/dist/chunks/{chunk-2AMO2VMV.js → chunk-64GNDWWX.js} +1 -1
  36. package/dist/chunks/{chunk-J24BABG4.js → chunk-6G2AZBW5.js} +1 -1
  37. package/dist/chunks/{chunk-DY643UZ7.js → chunk-6JBKQ5LR.js} +2 -3
  38. package/dist/chunks/{chunk-AVCLYJNC.js → chunk-6KI5LJIB.js} +1 -1
  39. package/dist/chunks/{chunk-X755TPX6.js → chunk-6O2LDFGJ.js} +1 -1
  40. package/dist/chunks/chunk-6OOJFAF5.js +20 -0
  41. package/dist/chunks/{chunk-E7IN2DGU.js → chunk-6XXXPJBV.js} +1 -1
  42. package/dist/chunks/chunk-732HWE3P.js +181 -0
  43. package/dist/chunks/chunk-75TGTOZQ.js +8 -0
  44. package/dist/chunks/{chunk-4FBOQLPZ.js → chunk-76AOTUM2.js} +1 -1
  45. package/dist/chunks/{chunk-KXMFGDO4.js → chunk-76XUBFXI.js} +1 -1
  46. package/dist/chunks/{chunk-VBANKZWM.js → chunk-7CLATJZX.js} +1 -1
  47. package/dist/chunks/{chunk-UPDIZCP3.js → chunk-7EI554V5.js} +1 -1
  48. package/dist/chunks/{chunk-IVZNPSHU.js → chunk-7IHVCKUV.js} +1 -1
  49. package/dist/chunks/{chunk-PSOVLGHP.js → chunk-7O3D3XED.js} +1 -1
  50. package/dist/chunks/{chunk-YTSUDTAK.js → chunk-7OOCSVWT.js} +1 -1
  51. package/dist/chunks/{chunk-FXLZM6Q7.js → chunk-7PK2JFEH.js} +1 -1
  52. package/dist/chunks/chunk-7Q5I3L37.js +68 -0
  53. package/dist/chunks/{chunk-24SIHFEW.js → chunk-7QHUMMBA.js} +1 -1
  54. package/dist/chunks/{chunk-5727HGA6.js → chunk-7TREJIPV.js} +1 -1
  55. package/dist/chunks/{chunk-4HR3I3ML.js → chunk-7TRHPXCG.js} +1 -1
  56. package/dist/chunks/{chunk-BLUPZPAS.js → chunk-7Y572CPZ.js} +1 -1
  57. package/dist/chunks/chunk-7ZCM4LWL.js +15 -0
  58. package/dist/chunks/{chunk-H3ZSF2P3.js → chunk-A7XRIU6Z.js} +1 -1
  59. package/dist/chunks/chunk-AASXSNBW.js +17 -0
  60. package/dist/chunks/{chunk-6DBLXAJI.js → chunk-AGFG7WHE.js} +1 -1
  61. package/dist/chunks/{chunk-Z73UJVGD.js → chunk-AU54JBLF.js} +1 -1
  62. package/dist/chunks/{chunk-SQ62IODX.js → chunk-AUCQKYL2.js} +1 -1
  63. package/dist/chunks/{chunk-SCV7XEEO.js → chunk-AX6UCTOC.js} +1 -1
  64. package/dist/chunks/{chunk-QHGPFYWQ.js → chunk-B7LM2BNN.js} +1 -1
  65. package/dist/chunks/{chunk-E3AML3VR.js → chunk-BB27VKHS.js} +1 -1
  66. package/dist/chunks/{chunk-YBAGKQXC.js → chunk-BCD4TRQF.js} +1 -1
  67. package/dist/chunks/{chunk-OQXHBPPS.js → chunk-BCRZI5IM.js} +1 -1
  68. package/dist/chunks/{chunk-KA2KG3SY.js → chunk-BDLZ6WL2.js} +1 -1
  69. package/dist/chunks/chunk-BFS4K2RF.js +7 -0
  70. package/dist/chunks/chunk-BKJ4H6KK.js +8 -0
  71. package/dist/chunks/{chunk-COD3WAUI.js → chunk-BNWEJZAC.js} +1 -1
  72. package/dist/chunks/{chunk-5MDNVAE6.js → chunk-BVFFSUG3.js} +1 -1
  73. package/dist/chunks/{chunk-LDDXXDN5.js → chunk-C2R5IEN6.js} +1 -1
  74. package/dist/chunks/{chunk-F7L5SXJM.js → chunk-CDO5IECP.js} +1 -1
  75. package/dist/chunks/{chunk-YN3HZJXW.js → chunk-CHTFRAXA.js} +1 -1
  76. package/dist/chunks/{chunk-XOETL6DB.js → chunk-CHY2NJU4.js} +1 -1
  77. package/dist/chunks/{chunk-MYVALJ4D.js → chunk-CNGI6Z2G.js} +1 -1
  78. package/dist/chunks/{chunk-4SWS7RKX.js → chunk-CRPZYLIL.js} +1 -1
  79. package/dist/chunks/{chunk-PVASGBEF.js → chunk-CSU46B7Q.js} +1 -1
  80. package/dist/chunks/{chunk-DORCX7UB.js → chunk-CUO3CYU3.js} +1 -1
  81. package/dist/chunks/{chunk-4SAVH3H7.js → chunk-DCFCPAFQ.js} +1 -1
  82. package/dist/chunks/{chunk-2DH6LTUI.js → chunk-DRDY2UZX.js} +1 -1
  83. package/dist/chunks/{chunk-D2JNI6UB.js → chunk-DWA7B7TB.js} +1 -1
  84. package/dist/chunks/chunk-DXFFWNK4.js +8 -0
  85. package/dist/chunks/chunk-E6VQXHBD.js +11 -0
  86. package/dist/chunks/chunk-E7ICSU45.js +7 -0
  87. package/dist/chunks/{chunk-F4KY2TOK.js → chunk-EAQLOKZX.js} +1 -1
  88. package/dist/chunks/{chunk-ZGM4K3B5.js → chunk-ECQW2R5M.js} +1 -1
  89. package/dist/chunks/{chunk-VJNTVPUV.js → chunk-EDXNAXEZ.js} +1 -1
  90. package/dist/chunks/{chunk-B4KA3ZH2.js → chunk-EFGZK6OY.js} +1 -1
  91. package/dist/chunks/{chunk-MWFHS4HV.js → chunk-EGXRQ73P.js} +1 -1
  92. package/dist/chunks/chunk-EK7U42I4.js +9 -0
  93. package/dist/chunks/{chunk-ID663OJ7.js → chunk-EL65DTVZ.js} +1 -1
  94. package/dist/chunks/{chunk-KNNIA3PS.js → chunk-EPCRR72R.js} +1 -1
  95. package/dist/chunks/{chunk-3G3FQYMW.js → chunk-ERMHTPO4.js} +1 -1
  96. package/dist/chunks/chunk-EV2VKG2V.js +8 -0
  97. package/dist/chunks/{chunk-E5A7E7X6.js → chunk-EZ3HXFLB.js} +1 -1
  98. package/dist/chunks/{chunk-NMY2YZ6M.js → chunk-F5FBLRH3.js} +1 -1
  99. package/dist/chunks/{chunk-VWKA6RKB.js → chunk-FHNHVEOX.js} +1 -1
  100. package/dist/chunks/{chunk-D3M2JG5C.js → chunk-FIICEEXO.js} +1 -1
  101. package/dist/chunks/{chunk-ZBOTJT5S.js → chunk-FMLRVSWK.js} +1 -1
  102. package/dist/chunks/chunk-FO7OSSLI.js +13 -0
  103. package/dist/chunks/{chunk-XC25DYA7.js → chunk-FSM7YM4W.js} +2 -2
  104. package/dist/chunks/chunk-FSMZPHAA.js +33 -0
  105. package/dist/chunks/chunk-FUH5PBGR.js +7 -0
  106. package/dist/chunks/{chunk-QPNTR3PA.js → chunk-FVMRKUWL.js} +1 -1
  107. package/dist/chunks/chunk-GB77JTTX.js +8 -0
  108. package/dist/chunks/{chunk-BIABM3FB.js → chunk-GILTW5RJ.js} +1 -1
  109. package/dist/chunks/{chunk-AW5KOUD7.js → chunk-GNQ7KLCN.js} +1 -1
  110. package/dist/chunks/{chunk-KLBSCTLL.js → chunk-GO64LSUW.js} +1 -1
  111. package/dist/chunks/{chunk-4NTBYNFR.js → chunk-GOXGA37R.js} +1 -1
  112. package/dist/chunks/{chunk-DGLE44KA.js → chunk-GPVXJI6X.js} +1 -1
  113. package/dist/chunks/{chunk-YTSGFU5T.js → chunk-GUFRGEM5.js} +1 -1
  114. package/dist/chunks/{chunk-WHEA5VLX.js → chunk-H43XHICL.js} +1 -1
  115. package/dist/chunks/{chunk-U43WXZBP.js → chunk-HAAKXJ4V.js} +1 -1
  116. package/dist/chunks/chunk-HAM7ZPEC.js +7 -0
  117. package/dist/chunks/{chunk-ZHGKJCQ2.js → chunk-HDKEES7E.js} +5 -5
  118. package/dist/chunks/{chunk-BTI5TG6Q.js → chunk-HGXM4UBQ.js} +1 -1
  119. package/dist/chunks/chunk-HIEFNLLO.js +7 -0
  120. package/dist/chunks/{chunk-2KXLL3DX.js → chunk-HSQPQ5RV.js} +1 -1
  121. package/dist/chunks/{chunk-DDZEKNQR.js → chunk-HT3CQEAF.js} +1 -1
  122. package/dist/chunks/{chunk-7JU5RJ3H.js → chunk-HT5EXCYX.js} +1 -1
  123. package/dist/chunks/{chunk-Z3YQZSU4.js → chunk-HXIOR7P6.js} +1 -1
  124. package/dist/chunks/{chunk-6NC2JFUQ.js → chunk-I254SHTL.js} +1 -1
  125. package/dist/chunks/{chunk-OPORM35X.js → chunk-IFMPBA4K.js} +1 -1
  126. package/dist/chunks/{chunk-EHAS6SQB.js → chunk-IKOVY76G.js} +1 -1
  127. package/dist/chunks/{chunk-BUBVZ6SQ.js → chunk-ILNTOWHG.js} +1 -1
  128. package/dist/chunks/chunk-ILUU3SGP.js +13 -0
  129. package/dist/chunks/{chunk-MCRKBVZA.js → chunk-IMLHRJ4K.js} +1 -1
  130. package/dist/chunks/{chunk-DTCQWGHE.js → chunk-IMZD7QEB.js} +2 -2
  131. package/dist/chunks/chunk-IVJEYHF5.js +8 -0
  132. package/dist/chunks/{chunk-Q6YPC3GK.js → chunk-IZOKMWU5.js} +1 -1
  133. package/dist/chunks/{chunk-BPUANOGW.js → chunk-IZV6K7RR.js} +1 -1
  134. package/dist/chunks/chunk-J5MGMWRV.js +9 -0
  135. package/dist/chunks/{chunk-BOJDM3O7.js → chunk-JCDPMWKO.js} +1 -1
  136. package/dist/chunks/{chunk-Y3V4JYK6.js → chunk-JGEJY7AC.js} +1 -1
  137. package/dist/chunks/chunk-JJTAADC5.js +7 -0
  138. package/dist/chunks/{chunk-OZKP3WKT.js → chunk-JK3NTR7T.js} +1 -1
  139. package/dist/chunks/{chunk-76NL3ZRJ.js → chunk-JM7KUCBM.js} +1 -1
  140. package/dist/chunks/chunk-JPJ6HGAN.js +7 -0
  141. package/dist/chunks/{chunk-O3YZLVC6.js → chunk-JRUL67UC.js} +3 -3
  142. package/dist/chunks/{chunk-J5SINMVO.js → chunk-K4J43D5J.js} +1 -1
  143. package/dist/chunks/{chunk-LUX4PBJL.js → chunk-K5GE24PG.js} +1 -1
  144. package/dist/chunks/{chunk-25565AGS.js → chunk-K7YK4PZP.js} +1 -1
  145. package/dist/chunks/{chunk-CTBSRTJW.js → chunk-KDCLHZYL.js} +1 -1
  146. package/dist/chunks/{chunk-GXWBL6YV.js → chunk-KDIICSD5.js} +1 -1
  147. package/dist/chunks/{chunk-FBYA6LLM.js → chunk-KHJWQ4WP.js} +1 -1
  148. package/dist/chunks/{chunk-2FUGD6J7.js → chunk-KNKGJD5J.js} +1 -1
  149. package/dist/chunks/{chunk-BRQUZ5NC.js → chunk-L4CSJDG7.js} +1 -1
  150. package/dist/chunks/{chunk-ISWW3DKF.js → chunk-L6MWUMWZ.js} +1 -1
  151. package/dist/chunks/{chunk-A6CMQOL7.js → chunk-LBJ7EOZM.js} +1 -1
  152. package/dist/chunks/{chunk-22ZRVWYP.js → chunk-LHK6B4ER.js} +2 -2
  153. package/dist/chunks/{chunk-ZBZQEDZY.js → chunk-LKFQMY5V.js} +1 -1
  154. package/dist/chunks/{chunk-KKYNEEM7.js → chunk-LKXPJLOP.js} +1 -1
  155. package/dist/chunks/{chunk-Q7D7RGXM.js → chunk-LLHXL3SV.js} +1 -1
  156. package/dist/chunks/{chunk-BS32OUOC.js → chunk-LPYHYTYI.js} +1 -1
  157. package/dist/chunks/{chunk-6WBEU34Y.js → chunk-LVPY2RTU.js} +1 -1
  158. package/dist/chunks/{chunk-A2RZZQEP.js → chunk-LY3EY2VG.js} +1 -1
  159. package/dist/chunks/chunk-M2XLLWK7.js +7 -0
  160. package/dist/chunks/chunk-M3LYYAQ6.js +7 -0
  161. package/dist/chunks/{chunk-7WDSOKOY.js → chunk-MAAJGMXM.js} +1 -1
  162. package/dist/chunks/{chunk-DWZBL4NK.js → chunk-MAIZY5BV.js} +1 -1
  163. package/dist/chunks/{chunk-5U2YLD56.js → chunk-MEF5BUJ5.js} +1 -1
  164. package/dist/chunks/{chunk-YHPPP3SF.js → chunk-MF43WTDT.js} +1 -1
  165. package/dist/chunks/{chunk-YFOBGEOW.js → chunk-MJKDKZ2J.js} +1 -1
  166. package/dist/chunks/{chunk-6Z5REGCM.js → chunk-MMMX3KE2.js} +1 -1
  167. package/dist/chunks/{chunk-ISSNEDG5.js → chunk-MN2F4NPH.js} +1 -1
  168. package/dist/chunks/{chunk-QFE3RPMA.js → chunk-MTPHHAPR.js} +1 -1
  169. package/dist/chunks/{slugify-NMMUASYK.js → chunk-N3COHC7T.js} +1 -1
  170. package/dist/chunks/{chunk-5WYJSLCF.js → chunk-N4FZIVIS.js} +1 -1
  171. package/dist/chunks/{chunk-27FVSW45.js → chunk-N7IBUNFY.js} +1 -1
  172. package/dist/chunks/{chunk-BZENIQ7N.js → chunk-NBPLUP7C.js} +1 -1
  173. package/dist/chunks/chunk-NE5RTEMC.js +7 -0
  174. package/dist/chunks/{chunk-DXFP22OK.js → chunk-NFBFXM6X.js} +1 -1
  175. package/dist/chunks/chunk-NXUDP37D.js +7 -0
  176. package/dist/chunks/{chunk-FB37TFVF.js → chunk-O256QMQM.js} +1 -1
  177. package/dist/chunks/{chunk-D6O5O3CW.js → chunk-OICSITNU.js} +1 -1
  178. package/dist/chunks/{chunk-PFD7LETF.js → chunk-OM6NML7C.js} +1 -1
  179. package/dist/chunks/chunk-OTIERMC7.js +7 -0
  180. package/dist/chunks/chunk-OVVHONX7.js +8 -0
  181. package/dist/chunks/{chunk-T44RB754.js → chunk-OXQKWOLS.js} +1 -1
  182. package/dist/chunks/chunk-P7GA2C6N.js +7 -0
  183. package/dist/chunks/{chunk-XE4SLG5H.js → chunk-PG5BHJVH.js} +1 -1
  184. package/dist/chunks/{chunk-AW33SRYY.js → chunk-PH2MLBQO.js} +1 -1
  185. package/dist/chunks/{chunk-DNONVY2L.js → chunk-PIGJVJNM.js} +2 -2
  186. package/dist/chunks/chunk-PP7BNCIG.js +7 -0
  187. package/dist/chunks/{chunk-BKFRN6C2.js → chunk-PR4NNS3O.js} +1 -1
  188. package/dist/chunks/chunk-PSMKLDLV.js +18 -0
  189. package/dist/chunks/chunk-PW67ZNDU.js +8 -0
  190. package/dist/chunks/{chunk-O3GQG2ML.js → chunk-Q3R4HAAA.js} +2 -2
  191. package/dist/chunks/chunk-Q4W3R6U2.js +12 -0
  192. package/dist/chunks/{chunk-A4LOQ3UK.js → chunk-QAVUE3TR.js} +1 -1
  193. package/dist/chunks/{chunk-U5SZQUYO.js → chunk-QCYCLWNG.js} +1 -1
  194. package/dist/chunks/{chunk-MGKNSTU4.js → chunk-QMI7GTT2.js} +1 -1
  195. package/dist/chunks/{chunk-S3L2OHPO.js → chunk-QNMWYJQW.js} +1 -1
  196. package/dist/chunks/{chunk-MMMJO2M3.js → chunk-QOIG2FJP.js} +1 -1
  197. package/dist/chunks/{chunk-BYBELFCP.js → chunk-QPNYOR6O.js} +1 -1
  198. package/dist/chunks/{chunk-6KNWKZR4.js → chunk-QPPFQREO.js} +1 -1
  199. package/dist/chunks/{chunk-EYRBV6RM.js → chunk-QROPMCL2.js} +2 -2
  200. package/dist/chunks/{chunk-MTZYPCZ7.js → chunk-QRPBDCDH.js} +1 -1
  201. package/dist/chunks/{chunk-R43H4T4L.js → chunk-QYAXCGZA.js} +1 -1
  202. package/dist/chunks/{chunk-7OZ7OKPS.js → chunk-R3ZPLQDI.js} +1 -1
  203. package/dist/chunks/{chunk-6TEYSBCT.js → chunk-R5KBPWWS.js} +1 -1
  204. package/dist/chunks/{chunk-X6JQI64G.js → chunk-RACUGILV.js} +1 -1
  205. package/dist/chunks/{chunk-GD7AV7BO.js → chunk-RFD7CEL6.js} +1 -1
  206. package/dist/chunks/{chunk-RYSO5U3E.js → chunk-RIXTYUYN.js} +1 -1
  207. package/dist/chunks/{chunk-XHBZITV4.js → chunk-RJB5Y7M4.js} +1 -1
  208. package/dist/chunks/{chunk-7HQZRU25.js → chunk-RRX2AMWY.js} +1 -1
  209. package/dist/chunks/chunk-S4ARHJGW.js +9 -0
  210. package/dist/chunks/chunk-S7FMMAST.js +7 -0
  211. package/dist/chunks/chunk-SIWT2MBT.js +8 -0
  212. package/dist/chunks/{chunk-AZVSMIPP.js → chunk-STDRVWDW.js} +1 -1
  213. package/dist/chunks/{chunk-M2Q2DUHO.js → chunk-SUD5V67L.js} +1 -1
  214. package/dist/chunks/{chunk-7EJQLVWX.js → chunk-SUT2PTL3.js} +1 -1
  215. package/dist/chunks/{chunk-Q4R34AVE.js → chunk-SWABNAKZ.js} +1 -1
  216. package/dist/chunks/chunk-SX2JJDHM.js +17 -0
  217. package/dist/chunks/{chunk-JDDPCL3K.js → chunk-T2IZUTGY.js} +1 -1
  218. package/dist/chunks/{chunk-3RFQ2NXZ.js → chunk-T4257EDB.js} +1 -1
  219. package/dist/chunks/chunk-TASNZYJU.js +14 -0
  220. package/dist/chunks/chunk-TIU3WJH7.js +8 -0
  221. package/dist/chunks/{chunk-KIDGOY4F.js → chunk-TL4AEZXF.js} +1 -1
  222. package/dist/chunks/chunk-TTM4VQ4T.js +7 -0
  223. package/dist/chunks/chunk-TUPVVZ4I.js +7 -0
  224. package/dist/chunks/{chunk-MDXG7T7M.js → chunk-U3IPJYB6.js} +1 -1
  225. package/dist/chunks/{chunk-AMZ7AUYX.js → chunk-UFE4RBZV.js} +1 -1
  226. package/dist/chunks/chunk-UGJRAFRA.js +8 -0
  227. package/dist/chunks/{chunk-3AFEVHHY.js → chunk-UGVOMXYR.js} +1 -1
  228. package/dist/chunks/{chunk-NB2WLB3J.js → chunk-UJ7YUIEJ.js} +1 -1
  229. package/dist/chunks/chunk-UK3VTHT5.js +7 -0
  230. package/dist/chunks/{chunk-S6TAO4MD.js → chunk-V2J5U5KQ.js} +1 -1
  231. package/dist/chunks/{chunk-J3U2QD2L.js → chunk-V7VHLSYL.js} +1 -1
  232. package/dist/chunks/chunk-VB6SQWSB.js +9 -0
  233. package/dist/chunks/{chunk-DOOBZO4W.js → chunk-VJM3WCEC.js} +1 -1
  234. package/dist/chunks/{chunk-BYYNR34Q.js → chunk-VNS4Z72T.js} +1 -1
  235. package/dist/chunks/{chunk-CTMTO2W4.js → chunk-VQAIH2X5.js} +1 -1
  236. package/dist/chunks/{chunk-ATSAMHUZ.js → chunk-VTAH7VMY.js} +1 -1
  237. package/dist/chunks/chunk-W2YAOE3Z.js +7 -0
  238. package/dist/chunks/{chunk-3SF3ILIT.js → chunk-WA4CPW3H.js} +1 -1
  239. package/dist/chunks/chunk-WKEDN5SX.js +9 -0
  240. package/dist/chunks/{chunk-JALVF3C2.js → chunk-WMIZ6Y4E.js} +1 -1
  241. package/dist/chunks/{chunk-Z436ZYLV.js → chunk-WQBNOQUT.js} +1 -1
  242. package/dist/chunks/{chunk-YOKTRWQX.js → chunk-WRTBYD4I.js} +1 -1
  243. package/dist/chunks/{chunk-7RABG6HV.js → chunk-WS6UOPMS.js} +1 -1
  244. package/dist/chunks/{chunk-TLKBGAOL.js → chunk-WWEUGL6W.js} +1 -1
  245. package/dist/chunks/chunk-X2UJGCIC.js +9 -0
  246. package/dist/chunks/{chunk-JUAHDOL6.js → chunk-X5YKQ2RJ.js} +1 -1
  247. package/dist/chunks/{chunk-D5JQZXL7.js → chunk-XHWA436J.js} +1 -1
  248. package/dist/chunks/chunk-XHXWUAJE.js +32 -0
  249. package/dist/chunks/{chunk-U4Z2MMOF.js → chunk-XKVKG7CW.js} +1 -1
  250. package/dist/chunks/{chunk-HYAIA5YC.js → chunk-XL6PE4AA.js} +2 -2
  251. package/dist/chunks/{chunk-E3WP42P2.js → chunk-XPEWDJV6.js} +1 -1
  252. package/dist/chunks/{chunk-TGIIE2L3.js → chunk-XPWLEGWA.js} +1 -1
  253. package/dist/chunks/{chunk-7SLMNM55.js → chunk-XY2GGCHC.js} +1 -1
  254. package/dist/chunks/{chunk-G24EKATW.js → chunk-XZYVBYUY.js} +1 -1
  255. package/dist/chunks/chunk-Y2KAVMM4.js +10 -0
  256. package/dist/chunks/{chunk-46ISU3XI.js → chunk-Y3ETQZSK.js} +2 -2
  257. package/dist/chunks/{chunk-GRRVPFSB.js → chunk-Y45NZT7C.js} +1 -1
  258. package/dist/chunks/{chunk-5RMIM4S2.js → chunk-Y7SZI3JV.js} +1 -1
  259. package/dist/chunks/{chunk-ZRFDZO7Y.js → chunk-YATYCZQJ.js} +1 -1
  260. package/dist/chunks/chunk-YBWLW6SW.js +7 -0
  261. package/dist/chunks/{chunk-B7IUFV5P.js → chunk-YDCILYRC.js} +1 -1
  262. package/dist/chunks/{chunk-67GZ5REA.js → chunk-YHZXIBS7.js} +1 -1
  263. package/dist/chunks/{chunk-H24KFNPB.js → chunk-YIKXLWSR.js} +1 -1
  264. package/dist/chunks/{chunk-5CVEW3HD.js → chunk-YLQCB6XY.js} +1 -1
  265. package/dist/chunks/{chunk-WAOS5OCB.js → chunk-YU33PPKX.js} +1 -1
  266. package/dist/chunks/{chunk-V3YNYCRV.js → chunk-YVWIDLY4.js} +6 -6
  267. package/dist/chunks/{chunk-CEA5NDJC.js → chunk-Z2NPMUPM.js} +1 -1
  268. package/dist/chunks/{chunk-N3ZNAMGR.js → chunk-Z62G57GC.js} +1 -1
  269. package/dist/chunks/{chunk-D6NVKMRP.js → chunk-ZG7A4P5U.js} +1 -1
  270. package/dist/chunks/{chunk-NZ2TFADV.js → chunk-ZOJI7HYA.js} +1 -1
  271. package/dist/chunks/{chunk-TSIKSHYG.js → chunk-ZSJU5MJP.js} +1 -1
  272. package/dist/chunks/{chunk-47E5IB3C.js → chunk-ZWPASRC2.js} +1 -1
  273. package/dist/chunks/{clear-GL4SZ2XR.js → clear-4MDTHLLE.js} +1 -1
  274. package/dist/chunks/{cli-embedded-NR5F35LW.js → cli-embedded-OYBJM5SA.js} +2 -2
  275. package/dist/chunks/cli-truncate-CylqKOGj-WE5OLB6Q.js +7 -0
  276. package/dist/chunks/commands-Bx-lrmie-W7FCFL4P.js +10 -0
  277. package/dist/chunks/compile-vercel-config-A2DMFB2R.js +7 -0
  278. package/dist/chunks/{config-KSQQQMQQ.js → config-4R62ATWJ.js} +1 -1
  279. package/dist/chunks/{config-U4GLPYDY.js → config-A7DCP25J.js} +1 -1
  280. package/dist/chunks/config-HiWLfXRQ-D7JA4E3D.js +43 -0
  281. package/dist/chunks/connect-U3yG4EtI-XYHDJQT7.js +7 -0
  282. package/dist/chunks/connect-git-provider-MPYSAOTH.js +7 -0
  283. package/dist/chunks/cp-aFe-HVrK-UAGAR2BC.js +12 -0
  284. package/dist/chunks/create-ilHWvzSk-7KWZXBE2.js +7 -0
  285. package/dist/chunks/create-project-OA7KBPVU.js +7 -0
  286. package/dist/chunks/{delete-O2VWRQC3.js → delete-DN53BRH7.js} +1 -1
  287. package/dist/chunks/{delete-D2WLQHVB.js → delete-G4MAUBXZ.js} +1 -1
  288. package/dist/chunks/{describe-N36SISDN.js → describe-Q5D5GYVG.js} +1 -1
  289. package/dist/chunks/detect-projects-DHS2E3N4.js +7 -0
  290. package/dist/chunks/detect-services-VBKVN4A2.js +7 -0
  291. package/dist/chunks/{disable-EHRVY24G.js → disable-CG3R2VAL.js} +1 -1
  292. package/dist/chunks/{discard-QW5TMTXX.js → discard-REGFZXFU.js} +1 -1
  293. package/dist/chunks/dist-4F3LAB5Z.js +7 -0
  294. package/dist/chunks/{dist-RXYNZPEA.js → dist-S7GEJ656.js} +1 -1
  295. package/dist/chunks/{dist-33WTJLVQ.js → dist-T2AURD3P.js} +1 -1
  296. package/dist/chunks/domain-DGvr_U55-PNXSOVDO.js +8 -0
  297. package/dist/chunks/drives-Bi-Mnt2z-Z4T2YY4P.js +14 -0
  298. package/dist/chunks/{edit-IZR537PS.js → edit-7AUE6GXE.js} +1 -1
  299. package/dist/chunks/{edit-WM6KJPSI.js → edit-HHLQDVOP.js} +1 -1
  300. package/dist/chunks/{enable-5Z72O3NI.js → enable-BV3N6GEL.js} +1 -1
  301. package/dist/chunks/{engine-C8wCzkw--PYVABGU4.js → engine-C8wCzkw--72P7UD6T.js} +1 -1
  302. package/dist/chunks/{esm-IYH32MTQ.js → esm-B3P7PUFJ.js} +1 -1
  303. package/dist/chunks/{esm-5GQXHN7C.js → esm-CMSQLK7G.js} +1 -1
  304. package/dist/chunks/{esm-LEQXRLFV.js → esm-KWMRMP74.js} +1 -1
  305. package/dist/chunks/{esm-NHCCFW7Z.js → esm-LRBNA4QO.js} +1 -1
  306. package/dist/chunks/{esm-FJCIOBBV.js → esm-NVIK2MSG.js} +1 -1
  307. package/dist/chunks/{esm-T655CG6O.js → esm-RAS56M3I.js} +1 -1
  308. package/dist/chunks/{esm-QQ3MUOW4.js → esm-WU2ZS2IW.js} +1 -1
  309. package/dist/chunks/exec-Bwv4MDyN-7YUAVBB2.js +7 -0
  310. package/dist/chunks/{exec-PCSP64LR.js → exec-NYLXYXB5.js} +3 -3
  311. package/dist/chunks/{export-IWVMWM2H.js → export-WUPMMHSX.js} +1 -1
  312. package/dist/chunks/extend-D9tq9Cot-QT72AXGH.js +8 -0
  313. package/dist/chunks/{fetch-proxy-MOKBS56A.js → fetch-proxy-ZIHXTNFP.js} +1 -1
  314. package/dist/chunks/fork-DQ6qfKqB-XXTHHUMZ.js +9 -0
  315. package/dist/chunks/future-DJOUGRV4.js +7 -0
  316. package/dist/chunks/generate-cert-for-deploy-PZHDFX3W.js +7 -0
  317. package/dist/chunks/groups-B8JVEeKk-K57VTXSS.js +10 -0
  318. package/dist/chunks/image-DX2IAUKJ.js +7 -0
  319. package/dist/chunks/import-builders-IUEC2WN2.js +7 -0
  320. package/dist/chunks/{inspect-QT3QEFBW.js → inspect-BS5UPI6W.js} +1 -1
  321. package/dist/chunks/{inspect-6J5DGZZ4.js → inspect-GJXLYJC7.js} +1 -1
  322. package/dist/chunks/{inspect-6Y672OQ3.js → inspect-IHVP2M4H.js} +1 -1
  323. package/dist/chunks/{inspect-47FM3OWG.js → inspect-PBSKPN4W.js} +1 -1
  324. package/dist/chunks/{inspect-SW2I7D6E.js → inspect-Y7VXJEI2.js} +1 -1
  325. package/dist/chunks/{inspect-ALC2J4BF.js → inspect-YGVXE4HR.js} +1 -1
  326. package/dist/chunks/{list-TGDHJKDT.js → list-27R4USBV.js} +1 -1
  327. package/dist/chunks/{list-BIFH4KO5.js → list-2ZCNO6DY.js} +1 -1
  328. package/dist/chunks/{list-CXXDI5UV.js → list-TUST62E6.js} +1 -1
  329. package/dist/chunks/{list-2CMCXXP4.js → list-ZSQVIQXC.js} +1 -1
  330. package/dist/chunks/list-iqQFvOHx-PNAUIUQL.js +7 -0
  331. package/dist/chunks/log-update-DsqoChS1-DG7F5XJ4.js +11 -0
  332. package/dist/chunks/{login-IUQDG334.js → login-CUEQHDT5.js} +1 -1
  333. package/dist/chunks/login-DGxA9ez--ZRIJ24TS.js +13 -0
  334. package/dist/chunks/login-YCOZROC2.js +7 -0
  335. package/dist/chunks/logout-OEbPJLu2-7NPM6ALK.js +8 -0
  336. package/dist/chunks/logs-W4GZLDHE.js +7 -0
  337. package/dist/chunks/ls-27K5BB7Z.js +11 -0
  338. package/dist/chunks/{ls-C75Z5FBX.js → ls-EEJQIKNI.js} +1 -1
  339. package/dist/chunks/ls-PAL6FQB6.js +8 -0
  340. package/dist/chunks/{ls-GC5MX2HZ.js → ls-TDYTE4HM.js} +1 -1
  341. package/dist/chunks/{ls-7D73WVOF.js → ls-UMSUUQCG.js} +1 -1
  342. package/dist/chunks/{ls-ERDQLUT2.js → ls-W7C5I555.js} +1 -1
  343. package/dist/chunks/{ls-4DNFF35I.js → ls-XYEJ5MR6.js} +1 -1
  344. package/dist/chunks/migrate-experimental-services-556MHJWK.js +7 -0
  345. package/dist/chunks/mutate-IELSY6ED.js +9 -0
  346. package/dist/chunks/{native-self-update-Q3EN6NZK.js → native-self-update-T75AUBHJ.js} +1 -1
  347. package/dist/chunks/{notifications-2HU4L7WA.js → notifications-GZH7CFZY.js} +1 -1
  348. package/dist/chunks/{open-MA7QGJKO.js → open-EVYPUPNZ.js} +1 -1
  349. package/dist/chunks/{openapi-POBVCXS3.js → openapi-S6F32ZQD.js} +1 -1
  350. package/dist/chunks/{permissions-AU5M5A6G.js → permissions-EHF5MNZP.js} +1 -1
  351. package/dist/chunks/{plugin-offer-E53UQXXX.js → plugin-offer-RZADKNYF.js} +1 -1
  352. package/dist/chunks/prompt-missing-credentials-OSAV5B7N.js +7 -0
  353. package/dist/chunks/{publish-G7NQESCE.js → publish-ZB2Q2YSB.js} +1 -1
  354. package/dist/chunks/pull-WUFIVXEG.js +7 -0
  355. package/dist/chunks/purchase-domain-if-available-YVVGT7MZ.js +7 -0
  356. package/dist/chunks/{push-BG7UEIKY.js → push-YWKZ6SOO.js} +1 -1
  357. package/dist/chunks/query-G62G25HV.js +7 -0
  358. package/dist/chunks/{raw-query-QHFSKN55.js → raw-query-WTKAOYCP.js} +1 -1
  359. package/dist/chunks/read-BTA5slYO-IJLWMNSS.js +8 -0
  360. package/dist/chunks/{reauthenticate-U2LOFDFP.js → reauthenticate-WQZ5HISG.js} +1 -1
  361. package/dist/chunks/remove-7PSNAEDY.js +9 -0
  362. package/dist/chunks/remove-CCa99nz9-LCSNBDLT.js +7 -0
  363. package/dist/chunks/{reorder-E5UYNMML.js → reorder-OLCKSATY.js} +1 -1
  364. package/dist/chunks/{reply-DSDFBUAX.js → reply-OVHQNEBO.js} +1 -1
  365. package/dist/chunks/{repo-info-to-url-XQSULSEO.js → repo-info-to-url-S2YOQIRM.js} +1 -1
  366. package/dist/chunks/{repo-root-DZ6WFHMP.js → repo-root-STNOAHCH.js} +1 -1
  367. package/dist/chunks/{resolve-VK5QTUII.js → resolve-TUHO4FHT.js} +1 -1
  368. package/dist/chunks/{resolve-agent-team-D7RFR6WL.js → resolve-agent-team-NQCRA6ER.js} +1 -1
  369. package/dist/chunks/{resolve-deployment-framework-preset-BLMQLCIN.js → resolve-deployment-framework-preset-SCQCWANF.js} +1 -1
  370. package/dist/chunks/{restore-IVNZOVU3.js → restore-5RLBSVYQ.js} +1 -1
  371. package/dist/chunks/{rm-PAI3WZXJ.js → rm-5RGN33Y5.js} +1 -1
  372. package/dist/chunks/rm-D7CWGBTV.js +8 -0
  373. package/dist/chunks/{rm-L2KCHMLS.js → rm-FYU3GBLC.js} +1 -1
  374. package/dist/chunks/rm-HA752TW6.js +8 -0
  375. package/dist/chunks/{rm-LWEITUDD.js → rm-P6AGSBXP.js} +1 -1
  376. package/dist/chunks/routes-7VLRHXT4.js +7 -0
  377. package/dist/chunks/rule-inspect-Y2MX7LQN.js +8 -0
  378. package/dist/chunks/run-D8obqfKw-D2EGHTU2.js +7 -0
  379. package/dist/chunks/{schema-ZOPJJLJC.js → schema-AJAHECZG.js} +1 -1
  380. package/dist/chunks/{schema-ZIK2W4AX.js → schema-UVTYLX6L.js} +2 -2
  381. package/dist/chunks/select-org-JBKKKZSN.js +7 -0
  382. package/dist/chunks/{serving-C1mhZQqH-73TMEGEB.js → serving-C1mhZQqH-XEQUVQZK.js} +1 -1
  383. package/dist/chunks/sessions-cvWvPgzc-FBOQQPU5.js +7 -0
  384. package/dist/chunks/{set-MC2CLSA2.js → set-774P7GEL.js} +1 -1
  385. package/dist/chunks/{set-B5MPNYXG.js → set-OWNTI5SM.js} +1 -1
  386. package/dist/chunks/setup-and-link-3LD4LQGE.js +7 -0
  387. package/dist/chunks/sh-7olsIyJh-NFO2QYTK.js +7 -0
  388. package/dist/chunks/{skills-X5MN3OH2.js → skills-W45E2EWS.js} +1 -1
  389. package/dist/chunks/slugify-OEOEYGDL.js +7 -0
  390. package/dist/chunks/snapshot-D9MAspub-UAVA2YSK.js +9 -0
  391. package/dist/chunks/snapshots-DQjvm6St-DBG4H2HS.js +9 -0
  392. package/dist/chunks/stamp-THWCZ5IQ.js +7 -0
  393. package/dist/chunks/{statuspage-K5SC7KAQ.js → statuspage-NCYXH7DR.js} +1 -1
  394. package/dist/chunks/stop-SQX-uC-Q-CRDQOA5M.js +10 -0
  395. package/dist/chunks/table-3DCL552W.js +7 -0
  396. package/dist/chunks/{tags-WRVKKRN7.js → tags-DEIOW5MM.js} +1 -1
  397. package/dist/chunks/telemetry-KLbte3YE-OAFHJTWE.js +13 -0
  398. package/dist/chunks/token-DGNBXqnR-37H4S563.js +7 -0
  399. package/dist/chunks/token-EYEJQ7AP.js +7 -0
  400. package/dist/chunks/token-LNLX4V5J.js +7 -0
  401. package/dist/chunks/token-MZBD3R2S.js +7 -0
  402. package/dist/chunks/token-util-4P4GUSTT.js +7 -0
  403. package/dist/chunks/token-util-DAhLJ1X4-NJBLJROT.js +7 -0
  404. package/dist/chunks/token-util-XC5K3DNT.js +7 -0
  405. package/dist/chunks/token-util-XO4H5VLL.js +7 -0
  406. package/dist/chunks/{types-PC3JIYPX.js → types-SYUZH46V.js} +1 -1
  407. package/dist/chunks/update-VG2LHBRV.js +8 -0
  408. package/dist/chunks/{update-route-version-KWK5S4UW.js → update-route-version-MKFTZPKQ.js} +1 -1
  409. package/dist/chunks/usage-NF6S3DAZ.js +17 -0
  410. package/dist/chunks/users-CGEsQ4G8-POYTVZJV.js +9 -0
  411. package/dist/chunks/{utils-IQZEE4DT.js → utils-XXR7KIRB.js} +1 -1
  412. package/dist/chunks/validate-config-MJQI5EMD.js +7 -0
  413. package/dist/chunks/{vercel-cli-3UQLDU2S.js → vercel-cli-RW4WHHOS.js} +1 -1
  414. package/dist/chunks/{vlt-builder-graph-XL2XRO4V.js → vlt-builder-graph-EU5EX7KY.js} +1 -1
  415. package/dist/chunks/{vlt-builder-importer-RBUPAB6J.js → vlt-builder-importer-2YSRGPFC.js} +1 -1
  416. package/dist/chunks/wrap-ansi-CaN_P_HT-MAPHF26X.js +7 -0
  417. package/dist/chunks/write-DixEhGqz-YYDLLSJE.js +10 -0
  418. package/dist/chunks/{zod-Y3ZBY67C.js → zod-H7KW2D5Z.js} +1 -1
  419. package/dist/commands/build/index.js +1 -1
  420. package/dist/commands/deploy/index.js +11 -11
  421. package/dist/commands/dev/index.js +5 -9
  422. package/dist/commands/env/index.js +1 -1
  423. package/dist/commands/link/index.js +1 -1
  424. package/dist/commands/list/index.js +1 -1
  425. package/dist/commands/project/index.js +102 -80
  426. package/dist/commands/tunnel/index.js +1 -1
  427. package/dist/commands-account.js +101 -67
  428. package/dist/commands-ai.js +15 -15
  429. package/dist/commands-blob.js +3 -3
  430. package/dist/commands-core.js +9 -9
  431. package/dist/commands-deployments.js +1 -1
  432. package/dist/commands-flags.js +7 -7
  433. package/dist/commands-integrations.js +11 -11
  434. package/dist/commands-observability.js +2 -2
  435. package/dist/commands-routing.js +9 -9
  436. package/dist/help.js +1 -1
  437. package/dist/index.js +10 -8
  438. package/dist/internal-build-worker.js +1 -1
  439. package/dist/internal-build.js +2 -2
  440. package/dist/package.json +9 -9
  441. package/dist/root-help-commands.mjs +1 -1
  442. package/dist/version.mjs +1 -1
  443. package/package.json +16 -16
  444. package/dist/chunks/add-RH3RQPGP.js +0 -8
  445. package/dist/chunks/chunk-37P7O3AQ.js +0 -9
  446. package/dist/chunks/chunk-3ARTWVQV.js +0 -11
  447. package/dist/chunks/chunk-4F73GVJZ.js +0 -7
  448. package/dist/chunks/chunk-6FEMU5YF.js +0 -7
  449. package/dist/chunks/chunk-6UJIJLQC.js +0 -13
  450. package/dist/chunks/chunk-CDJ25IKC.js +0 -7
  451. package/dist/chunks/chunk-EMTZZXMH.js +0 -13
  452. package/dist/chunks/chunk-HR4ID3MU.js +0 -7
  453. package/dist/chunks/chunk-INIZJZ3O.js +0 -7
  454. package/dist/chunks/chunk-JCHZRW4N.js +0 -7
  455. package/dist/chunks/chunk-MDRI27KN.js +0 -9
  456. package/dist/chunks/chunk-OAM5NJCU.js +0 -9
  457. package/dist/chunks/chunk-PX3V7X3Q.js +0 -12
  458. package/dist/chunks/chunk-RHFNVIFD.js +0 -7
  459. package/dist/chunks/chunk-T4DOV5S4.js +0 -7
  460. package/dist/chunks/chunk-XKPB27SC.js +0 -8
  461. package/dist/chunks/chunk-Z3XKNZDP.js +0 -9
  462. package/dist/chunks/compile-vercel-config-HMKEDWC4.js +0 -7
  463. package/dist/chunks/connect-git-provider-WGKVFXW2.js +0 -7
  464. package/dist/chunks/create-project-BTOHPKZB.js +0 -7
  465. package/dist/chunks/detect-projects-I7NEHWSM.js +0 -7
  466. package/dist/chunks/detect-services-4ONC2DH3.js +0 -7
  467. package/dist/chunks/future-3AUPMPY7.js +0 -7
  468. package/dist/chunks/generate-cert-for-deploy-OZWVIWOO.js +0 -7
  469. package/dist/chunks/image-EFBQXTAP.js +0 -7
  470. package/dist/chunks/import-builders-2G4KVI4T.js +0 -7
  471. package/dist/chunks/login-WYDX5KZN.js +0 -7
  472. package/dist/chunks/logs-E3RZLAT2.js +0 -7
  473. package/dist/chunks/ls-IQUZ6GWG.js +0 -11
  474. package/dist/chunks/ls-YTKJRKD3.js +0 -8
  475. package/dist/chunks/migrate-experimental-services-GPGYPN66.js +0 -7
  476. package/dist/chunks/mutate-YJNE2733.js +0 -9
  477. package/dist/chunks/prompt-missing-credentials-7F7MUAWK.js +0 -7
  478. package/dist/chunks/pull-4LISUHDN.js +0 -7
  479. package/dist/chunks/purchase-domain-if-available-QH2OHRLZ.js +0 -7
  480. package/dist/chunks/query-QCIU5IB4.js +0 -7
  481. package/dist/chunks/remove-IB7C6LII.js +0 -9
  482. package/dist/chunks/rm-GYS4DS2Z.js +0 -8
  483. package/dist/chunks/rm-PDJE63VV.js +0 -8
  484. package/dist/chunks/routes-SBMN6SDF.js +0 -7
  485. package/dist/chunks/rule-inspect-LQISNCBT.js +0 -8
  486. package/dist/chunks/select-org-EKDOS2CQ.js +0 -7
  487. package/dist/chunks/setup-and-link-FHHZAU65.js +0 -7
  488. package/dist/chunks/stamp-TKONNIJ5.js +0 -7
  489. package/dist/chunks/table-SCLK33K7.js +0 -7
  490. package/dist/chunks/token-MYYNOUIT.js +0 -7
  491. package/dist/chunks/token-util-OJHS52JP.js +0 -7
  492. package/dist/chunks/update-QDIZFM4T.js +0 -8
  493. package/dist/chunks/usage-JUP36KHN.js +0 -15
  494. package/dist/chunks/validate-config-K42CVRCZ.js +0 -7
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{warnDeprecatedInput}from"./chunk-KA2KG3SY.js";function applyDeprecatedGitBranchFlag(client,flags,oldName,typedName=oldName){let value=flags[oldName];if(value!==void 0){if(flags["--git-branch"]!==void 0)return`Can't use ${typedName} with --git-branch. Use --git-branch.`;warnDeprecatedInput(client,typedName,"--git-branch"),flags["--git-branch"]=value,delete flags[oldName]}}export{applyDeprecatedGitBranchFlag};
7
+ import{warnDeprecatedInput}from"./chunk-BDLZ6WL2.js";function applyDeprecatedGitBranchFlag(client,flags,oldName,typedName=oldName){let value=flags[oldName];if(value!==void 0){if(flags["--git-branch"]!==void 0)return`Can't use ${typedName} with --git-branch. Use --git-branch.`;warnDeprecatedInput(client,typedName,"--git-branch"),flags["--git-branch"]=value,delete flags[oldName]}}export{applyDeprecatedGitBranchFlag};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{elapsed}from"./chunk-Q7D7RGXM.js";var stamp_default=(start=Date.now())=>()=>elapsed(Date.now()-start);export{stamp_default};
7
+ import{elapsed}from"./chunk-LLHXL3SV.js";var stamp_default=(start=Date.now())=>()=>elapsed(Date.now()-start);export{stamp_default};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{__commonJS}from"./chunk-NBPLUP7C.js";var require_retry_operation=__commonJS({"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js"(exports,module){function RetryOperation(timeouts,options){typeof options=="boolean"&&(options={forever:options}),this._originalTimeouts=JSON.parse(JSON.stringify(timeouts)),this._timeouts=timeouts,this._options=options||{},this._maxRetryTime=options&&options.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}module.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(err){if(this._timeout&&clearTimeout(this._timeout),!err)return!1;var currentTime=new Date().getTime();if(err&&currentTime-this._operationStart>=this._maxRetryTime)return this._errors.push(err),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(err);var timeout=this._timeouts.shift();if(timeout===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),timeout=this._cachedTimeouts.slice(-1);else return!1;var self=this;return this._timer=setTimeout(function(){self._attempts++,self._operationTimeoutCb&&(self._timeout=setTimeout(function(){self._operationTimeoutCb(self._attempts)},self._operationTimeout),self._options.unref&&self._timeout.unref()),self._fn(self._attempts)},timeout),this._options.unref&&this._timer.unref(),!0};RetryOperation.prototype.attempt=function(fn,timeoutOps){this._fn=fn,timeoutOps&&(timeoutOps.timeout&&(this._operationTimeout=timeoutOps.timeout),timeoutOps.cb&&(this._operationTimeoutCb=timeoutOps.cb));var self=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){self._operationTimeoutCb()},self._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};RetryOperation.prototype.try=function(fn){console.log("Using RetryOperation.try() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=function(fn){console.log("Using RetryOperation.start() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var counts={},mainError=null,mainErrorCount=0,i=0;i<this._errors.length;i++){var error=this._errors[i],message=error.message,count=(counts[message]||0)+1;counts[message]=count,count>=mainErrorCount&&(mainError=error,mainErrorCount=count)}return mainError}}});var require_retry=__commonJS({"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js"(exports){var RetryOperation=require_retry_operation();exports.operation=function(options){var timeouts=exports.timeouts(options);return new RetryOperation(timeouts,{forever:options&&(options.forever||options.retries===1/0),unref:options&&options.unref,maxRetryTime:options&&options.maxRetryTime})};exports.timeouts=function(options){if(options instanceof Array)return[].concat(options);var opts={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var key in options)opts[key]=options[key];if(opts.minTimeout>opts.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var timeouts=[],i=0;i<opts.retries;i++)timeouts.push(this.createTimeout(i,opts));return options&&options.forever&&!timeouts.length&&timeouts.push(this.createTimeout(i,opts)),timeouts.sort(function(a,b){return a-b}),timeouts};exports.createTimeout=function(attempt,opts){var random=opts.randomize?Math.random()+1:1,timeout=Math.round(random*Math.max(opts.minTimeout,1)*Math.pow(opts.factor,attempt));return timeout=Math.min(timeout,opts.maxTimeout),timeout};exports.wrap=function(obj,options,methods){if(options instanceof Array&&(methods=options,options=null),!methods){methods=[];for(var key in obj)typeof obj[key]=="function"&&methods.push(key)}for(var i=0;i<methods.length;i++){var method=methods[i],original=obj[method];obj[method]=function(original2){var op=exports.operation(options),args=Array.prototype.slice.call(arguments,1),callback=args.pop();args.push(function(err){op.retry(err)||(err&&(arguments[0]=op.mainError()),callback.apply(this,arguments))}),op.attempt(function(){original2.apply(obj,args)})}.bind(obj,original),obj[method].options=options}}}});var require_retry2=__commonJS({"../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js"(exports,module){module.exports=require_retry()}});var require_lib=__commonJS({"../../node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/lib/index.js"(exports,module){var retrier=require_retry2();function retry(fn,opts){function run(resolve,reject){var options=opts||{},op;"randomize"in options||(options.randomize=!0),op=retrier.operation(options);function bail(err){reject(err||new Error("Aborted"))}function onError(err,num){if(err.bail){bail(err);return}op.retry(err)?options.onRetry&&options.onRetry(err,num):reject(op.mainError())}function runAttempt(num){var val;try{val=fn(bail,num)}catch(err){onError(err,num);return}Promise.resolve(val).then(resolve).catch(function(err){onError(err,num)})}op.attempt(runAttempt)}return new Promise(run)}module.exports=retry}});export{require_lib};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{BUDGET_SCOPES}from"./chunk-L74PQVPL.js";import{packageName}from"./chunk-EFGZK6OY.js";import{confirmNameOption,formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption,yesOption}from"./chunk-CUO3CYU3.js";var organizationOption={name:"organization",shorthand:null,type:String,argument:"ORGANIZATION",deprecated:!1,description:"The organization budget, by organization slug or ID, from any team. Needs the organization admin or viewer role"},budgetProjectOption={...projectOption,description:"A project's budget, by project name or ID"},productOption={name:"product",shorthand:null,type:String,argument:"PRODUCT",deprecated:!1,description:"A product's budget, by product ID or name (case-insensitive), from the products that can have a budget"},scopeOptions=[organizationOption,budgetProjectOption,productOption],scopeFilterOptions=[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:`Only budgets of these types: ${BUDGET_SCOPES.join(", ")}. Repeat or separate with commas for several`},{...organizationOption,description:"Only the organization budget, by organization slug or ID"},{...budgetProjectOption,description:"Only a project's budget, by name or ID"},{...productOption,description:"Only a product's budget, by product ID or name"}],inspectSubcommand={name:"inspect",aliases:["overview"],description:"Show a Spend Management budget and this cycle's spend against it: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,formatOption,jsonOption],examples:[{name:"Show this cycle's on-demand spend against the team budget",value:`${packageName} billing budgets inspect`},{name:"Show a project budget",value:`${packageName} billing budgets inspect --project my-app`}]},listSubcommand={name:"list",aliases:["ls"],description:"List Spend Management budgets on this team, from every scope unless --organization, --project, or --product narrows them",default:!0,arguments:[],options:[...scopeFilterOptions,formatOption,jsonOption],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"List one project's budget",value:`${packageName} billing budgets list --project my-app`}]},setSubcommand={name:"set",aliases:["update"],description:"Create or update a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,{name:"amount",shorthand:null,type:Number,argument:"USD",deprecated:!1,description:"Budget amount in whole dollars (minimum 1). Creates with 50/75/100% alerts and notifications on; updates keep pause and webhook settings unless those options are also passed"},{name:"pause",shorthand:null,type:Boolean,deprecated:!1,description:"Pause at 100% of the budget amount: all projects for a team budget, the project for a project budget, or the product's usage for a product that can pause. Organization budgets only notify"},{name:"no-pause",shorthand:null,type:Boolean,deprecated:!1,description:"Do not pause when the budget is reached"},{name:"webhook",shorthand:null,type:String,argument:"URL",deprecated:!1,description:"Webhook URL to notify when a threshold is reached"},{name:"no-webhook",shorthand:null,type:Boolean,deprecated:!1,description:"Remove the budget webhook"},formatOption,jsonOption],examples:[{name:"Create a $500 budget with default 50/75/100% alerts",value:`${packageName} billing budgets set --amount 500`},{name:"Change the budget amount",value:`${packageName} billing budgets set --amount 800`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Notify a webhook without changing the amount",value:`${packageName} billing budgets set --webhook https://example.com/hook`},{name:"Remove the webhook",value:`${packageName} billing budgets set --no-webhook`},{name:"Create a $200 budget that pauses one project at 100%",value:`${packageName} billing budgets set --project my-app --amount 200 --pause`},{name:"Create a $10,000 organization budget",value:`${packageName} billing budgets set --organization acme --amount 10000`},{name:"Create a $100 budget on one product",value:`${packageName} billing budgets set --product "Function Duration" --amount 100`}]},removeSubcommand={name:"remove",aliases:["rm","delete","disable"],description:"Remove a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,{...confirmNameOption,description:"Approve the removal by naming what the budget is on: the team, organization, project, or product"},{...yesOption,description:"Deprecated: use --confirm-name. Agents can't approve with --yes"},formatOption,jsonOption],examples:[{name:"Remove a project budget",value:`${packageName} billing budgets remove --project my-app`},{name:"Remove a project budget without a prompt, once a person approves",value:`${packageName} billing budgets remove --project my-app --confirm-name my-app`}],consequence:"destructive"},alertsDescription="List Spend Management alerts: each budget threshold reached, newest first, from every scope unless --organization, --project, or --product narrows them. For observability alerts, see `vercel alerts`.",alertsOptions=[{...sinceOption,description:"Show alerts triggered after this time (ISO 8601 or relative: 1d, 7d, 30d)"},{...untilOption,description:"Show alerts triggered before this time (ISO 8601 or relative)"},...scopeFilterOptions,limitOption,nextCursorOption,formatOption,jsonOption],alertsListSubcommand={name:"list",aliases:["ls"],description:alertsDescription,default:!0,hidden:!0,arguments:[],options:alertsOptions,examples:[]},alertsSubcommand={name:"alerts",aliases:[],description:alertsDescription,arguments:[],subcommands:[alertsListSubcommand],options:alertsOptions,examples:[{name:"List recent Spend Management alerts for this team",value:`${packageName} billing budgets alerts`},{name:"List one project budget's alerts",value:`${packageName} billing budgets alerts --project my-app`},{name:"List alerts from the last 30 days",value:`${packageName} billing budgets alerts --since 30d`},{name:"Output alerts as JSON",value:`${packageName} billing budgets alerts --json`}]},budgetCommand={name:"budgets",aliases:["budget"],summary:"Manage spending beyond included credit",description:"Show and manage Spend Management for on-demand charges after included credit",arguments:[],subcommands:[inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsSubcommand],options:[],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"Show this cycle's on-demand spend against Spend Management",value:`${packageName} billing budgets inspect`},{name:"Set a $500 budget that pauses all projects and production deployments at 100%",value:`${packageName} billing budgets set --amount 500 --pause`},{name:"Set a $200 budget on one project",value:`${packageName} billing budgets set --project my-app --amount 200`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Remove the Spend Management budget",value:`${packageName} billing budgets remove --yes`},{name:"List recent Spend Management alerts",value:`${packageName} billing budgets alerts`}]},DEPRECATED_BUDGET_ACTIONS={overview:"inspect",update:"set",delete:"remove",disable:"remove"};export{inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsListSubcommand,alertsSubcommand,budgetCommand,DEPRECATED_BUDGET_ACTIONS};
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function suggestNextCommands(commands){output_manager_default.print(import_chalk.default.dim(["Next steps:",...commands.flatMap(({command,description})=>[`- ${description}:`,` ${command}`])].join(`
7
+ import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function suggestNextCommands(commands){output_manager_default.print(import_chalk.default.dim(["Next steps:",...commands.flatMap(({command,description})=>[`- ${description}:`,` ${command}`])].join(`
8
8
  `))),output_manager_default.print(`
9
9
  `)}export{suggestNextCommands};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_jaro_winkler=__commonJS({"../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js"(exports,module){(function(root){"use strict";function extend(a,b){for(var property in b)b.hasOwnProperty(property)&&(a[property]=b[property]);return a}function distance2(s1,s2,options){var m=0,defaults={caseSensitive:!0},settings=extend(defaults,options),i,j;if(s1.length===0||s2.length===0)return 0;if(settings.caseSensitive||(s1=s1.toUpperCase(),s2=s2.toUpperCase()),s1===s2)return 1;var range=Math.floor(Math.max(s1.length,s2.length)/2)-1,s1Matches=new Array(s1.length),s2Matches=new Array(s2.length);for(i=0;i<s1.length;i++){var low=i>=range?i-range:0,high=i+range<=s2.length-1?i+range:s2.length-1;for(j=low;j<=high;j++)if(s1Matches[i]!==!0&&s2Matches[j]!==!0&&s1[i]===s2[j]){++m,s1Matches[i]=s2Matches[j]=!0;break}}if(m===0)return 0;var k=0,numTrans=0;for(i=0;i<s1.length;i++)if(s1Matches[i]===!0){for(j=k;j<s2.length;j++)if(s2Matches[j]===!0){k=j+1;break}s1[i]!==s2[j]&&++numTrans}var weight=(m/s1.length+m/s2.length+(m-numTrans/2)/m)/3,l=0,p=.1;if(weight>.7){for(;s1[l]===s2[l]&&l<4;)++l;weight=weight+l*p*(1-weight)}return weight}typeof define=="function"&&define.amd?define([],function(){return distance2}):typeof exports=="object"?module.exports=distance2:root.distance=distance2})(exports)}});var import_jaro_winkler=__toESM(require_jaro_winkler(),1),did_you_mean_default=didYouMean;function didYouMean(input,list,threshold=.5){let found=list.map(item=>[dashAwareDistance(input,item),item]).filter(item=>item[0]>threshold);if(found.length)return found.reduce((accu,curr)=>accu[0]>curr[0]?accu:curr)[1]}function dashAwareDistance(word,dashWord){let fullDistance=(0,import_jaro_winkler.default)(word,dashWord),distances=dashWord.split("-").map(w=>(0,import_jaro_winkler.default)(w,word)),meanDistance=distances.reduce((accu,curr)=>accu+curr)/distances.length;return fullDistance>meanDistance?fullDistance:meanDistance}export{did_you_mean_default};
7
+ import{__commonJS,__toESM}from"./chunk-NBPLUP7C.js";var require_jaro_winkler=__commonJS({"../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js"(exports,module){(function(root){"use strict";function extend(a,b){for(var property in b)b.hasOwnProperty(property)&&(a[property]=b[property]);return a}function distance2(s1,s2,options){var m=0,defaults={caseSensitive:!0},settings=extend(defaults,options),i,j;if(s1.length===0||s2.length===0)return 0;if(settings.caseSensitive||(s1=s1.toUpperCase(),s2=s2.toUpperCase()),s1===s2)return 1;var range=Math.floor(Math.max(s1.length,s2.length)/2)-1,s1Matches=new Array(s1.length),s2Matches=new Array(s2.length);for(i=0;i<s1.length;i++){var low=i>=range?i-range:0,high=i+range<=s2.length-1?i+range:s2.length-1;for(j=low;j<=high;j++)if(s1Matches[i]!==!0&&s2Matches[j]!==!0&&s1[i]===s2[j]){++m,s1Matches[i]=s2Matches[j]=!0;break}}if(m===0)return 0;var k=0,numTrans=0;for(i=0;i<s1.length;i++)if(s1Matches[i]===!0){for(j=k;j<s2.length;j++)if(s2Matches[j]===!0){k=j+1;break}s1[i]!==s2[j]&&++numTrans}var weight=(m/s1.length+m/s2.length+(m-numTrans/2)/m)/3,l=0,p=.1;if(weight>.7){for(;s1[l]===s2[l]&&l<4;)++l;weight=weight+l*p*(1-weight)}return weight}typeof define=="function"&&define.amd?define([],function(){return distance2}):typeof exports=="object"?module.exports=distance2:root.distance=distance2})(exports)}});var import_jaro_winkler=__toESM(require_jaro_winkler(),1),did_you_mean_default=didYouMean;function didYouMean(input,list,threshold=.5){let found=list.map(item=>[dashAwareDistance(input,item),item]).filter(item=>item[0]>threshold);if(found.length)return found.reduce((accu,curr)=>accu[0]>curr[0]?accu:curr)[1]}function dashAwareDistance(word,dashWord){let fullDistance=(0,import_jaro_winkler.default)(word,dashWord),distances=dashWord.split("-").map(w=>(0,import_jaro_winkler.default)(w,word)),meanDistance=distances.reduce((accu,curr)=>accu+curr)/distances.length;return fullDistance>meanDistance?fullDistance:meanDistance}export{did_you_mean_default};
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{getOrganization}from"./chunk-XE4SLG5H.js";import{budgetPauses,formatUsd,formatUsdWhole,listBudgetProducts,percentUsed}from"./chunk-CTBSRTJW.js";import{table}from"./chunk-U5SZQUYO.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{ProjectNotFound}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function webhookLabel(budget){return budget.webhook?budget.webhook.url??"configured (unavailable)":"\u2014"}function scopeCells(budget,names){let{scope,scopeId}=budget;return[scope,scopeId?names?.get(scopeId)??scopeId:"\u2014"]}function printBudgetsTable(budgets,spentFor,names){let spendHeaders=spentFor?["spent","used"]:[],spendAlign=spentFor?["r","r"]:[];return`${table([["type","name","amount",...spendHeaders,"status","pause","webhook"].map(header=>import_chalk.default.gray(header)),...budgets.map(budget=>{let spendCells=[];if(spentFor){let spent=spentFor(budget),used=percentUsed(spent,budget.amount);spendCells.push(spent===null?"\u2014":formatUsd(spent),used===null?"\u2014":`${used}%`)}return[...scopeCells(budget,names),formatUsdWhole(budget.amount),...spendCells,budget.status,budgetPauses(budget)?"yes":"no",webhookLabel(budget)]})],{align:["l","l","r",...spendAlign,"l","l","l"],hsep:4}).replace(/^/gm," ")}
7
+ import{getOrganization}from"./chunk-PG5BHJVH.js";import{budgetPauses,formatUsd,formatUsdWhole,listBudgetProducts,percentUsed}from"./chunk-KDCLHZYL.js";import{table}from"./chunk-QCYCLWNG.js";import{getProjectByNameOrId}from"./chunk-UGVOMXYR.js";import{ProjectNotFound}from"./chunk-MTPHHAPR.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function webhookLabel(budget){return budget.webhook?budget.webhook.url??"configured (unavailable)":"\u2014"}function scopeCells(budget,names){let{scope,scopeId}=budget;return[scope,scopeId?names?.get(scopeId)??scopeId:"\u2014"]}function printBudgetsTable(budgets,spentFor,names){let spendHeaders=spentFor?["spent","used"]:[],spendAlign=spentFor?["r","r"]:[];return`${table([["type","name","amount",...spendHeaders,"status","pause","webhook"].map(header=>import_chalk.default.gray(header)),...budgets.map(budget=>{let spendCells=[];if(spentFor){let spent=spentFor(budget),used=percentUsed(spent,budget.amount);spendCells.push(spent===null?"\u2014":formatUsd(spent),used===null?"\u2014":`${used}%`)}return[...scopeCells(budget,names),formatUsdWhole(budget.amount),...spendCells,budget.status,budgetPauses(budget)?"yes":"no",webhookLabel(budget)]})],{align:["l","l","r",...spendAlign,"l","l","l"],hsep:4}).replace(/^/gm," ")}
8
8
 
9
9
  `}function warnUnavailableWebhooks(budgets){budgets.some(budget=>budget.webhook&&budget.webhook.url===null)&&output_manager_default.warn("A webhook is configured, but its URL could not be loaded. That is not the same as having no webhook.")}function formatAlertTime(ms){return Number.isFinite(ms)?`${new Date(ms).toISOString().slice(0,16).replace("T"," ")} UTC`:"\u2014"}function formatUsdString(value){let dollars=Number(value);return Number.isFinite(dollars)?formatUsd(dollars):value}function alertThresholdLabel(alert){return`${alert.threshold.percent}%`}function alertActionsLabel(alert){let{sendNotifications,triggerWebhook,pauseUsage}=alert.threshold,actions=[sendNotifications&&"notify",triggerWebhook&&"webhook",pauseUsage&&"pause"].filter(Boolean);return actions.length>0?actions.join(", "):"\u2014"}function printBudgetAlertsTable(alerts,names){return`${table([["date","type","name","threshold","spent","budget amount","actions configured"].map(header=>import_chalk.default.gray(header)),...alerts.map(alert=>[formatAlertTime(alert.triggeredAt),...scopeCells(alert,names),alertThresholdLabel(alert),formatUsdString(alert.spent),formatUsdWhole(alert.budgetAmount),alertActionsLabel(alert)])],{align:["l","l","l","r","r","r","l"],hsep:4}).replace(/^/gm," ")}
10
10
 
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{__commonJS}from"./chunk-BZENIQ7N.js";var require_ansi_escapes=__commonJS({"../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports,module){"use strict";var ansiEscapes=module.exports;module.exports.default=ansiEscapes;var ESC="\x1B[",OSC="\x1B]",BEL="\x07",SEP=";",isTerminalApp=process.env.TERM_PROGRAM==="Apple_Terminal";ansiEscapes.cursorTo=(x,y)=>{if(typeof x!="number")throw new TypeError("The `x` argument is required");return typeof y!="number"?ESC+(x+1)+"G":ESC+(y+1)+";"+(x+1)+"H"};ansiEscapes.cursorMove=(x,y)=>{if(typeof x!="number")throw new TypeError("The `x` argument is required");let ret="";return x<0?ret+=ESC+-x+"D":x>0&&(ret+=ESC+x+"C"),y<0?ret+=ESC+-y+"A":y>0&&(ret+=ESC+y+"B"),ret};ansiEscapes.cursorUp=(count=1)=>ESC+count+"A";ansiEscapes.cursorDown=(count=1)=>ESC+count+"B";ansiEscapes.cursorForward=(count=1)=>ESC+count+"C";ansiEscapes.cursorBackward=(count=1)=>ESC+count+"D";ansiEscapes.cursorLeft=ESC+"G";ansiEscapes.cursorSavePosition=isTerminalApp?"\x1B7":ESC+"s";ansiEscapes.cursorRestorePosition=isTerminalApp?"\x1B8":ESC+"u";ansiEscapes.cursorGetPosition=ESC+"6n";ansiEscapes.cursorNextLine=ESC+"E";ansiEscapes.cursorPrevLine=ESC+"F";ansiEscapes.cursorHide=ESC+"?25l";ansiEscapes.cursorShow=ESC+"?25h";ansiEscapes.eraseLines=count=>{let clear="";for(let i=0;i<count;i++)clear+=ansiEscapes.eraseLine+(i<count-1?ansiEscapes.cursorUp():"");return count&&(clear+=ansiEscapes.cursorLeft),clear};ansiEscapes.eraseEndLine=ESC+"K";ansiEscapes.eraseStartLine=ESC+"1K";ansiEscapes.eraseLine=ESC+"2K";ansiEscapes.eraseDown=ESC+"J";ansiEscapes.eraseUp=ESC+"1J";ansiEscapes.eraseScreen=ESC+"2J";ansiEscapes.scrollUp=ESC+"S";ansiEscapes.scrollDown=ESC+"T";ansiEscapes.clearScreen="\x1Bc";ansiEscapes.clearTerminal=process.platform==="win32"?`${ansiEscapes.eraseScreen}${ESC}0f`:`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;ansiEscapes.beep=BEL;ansiEscapes.link=(text,url)=>[OSC,"8",SEP,SEP,url,BEL,text,OSC,"8",SEP,SEP,BEL].join("");ansiEscapes.image=(buffer,options={})=>{let ret=`${OSC}1337;File=inline=1`;return options.width&&(ret+=`;width=${options.width}`),options.height&&(ret+=`;height=${options.height}`),options.preserveAspectRatio===!1&&(ret+=";preserveAspectRatio=0"),ret+":"+buffer.toString("base64")+BEL};ansiEscapes.iTerm={setCwd:(cwd=process.cwd())=>`${OSC}50;CurrentDir=${cwd}${BEL}`,annotation:(message,options={})=>{let ret=`${OSC}1337;`,hasX=typeof options.x<"u",hasY=typeof options.y<"u";if((hasX||hasY)&&!(hasX&&hasY&&typeof options.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return message=message.replace(/\|/g,""),ret+=options.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",options.length>0?ret+=(hasX?[message,options.length,options.x,options.y]:[options.length,message]).join("|"):ret+=message,ret+BEL}}}});export{require_ansi_escapes};
7
+ import{__commonJS}from"./chunk-NBPLUP7C.js";var require_ansi_escapes=__commonJS({"../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports,module){"use strict";var ansiEscapes=module.exports;module.exports.default=ansiEscapes;var ESC="\x1B[",OSC="\x1B]",BEL="\x07",SEP=";",isTerminalApp=process.env.TERM_PROGRAM==="Apple_Terminal";ansiEscapes.cursorTo=(x,y)=>{if(typeof x!="number")throw new TypeError("The `x` argument is required");return typeof y!="number"?ESC+(x+1)+"G":ESC+(y+1)+";"+(x+1)+"H"};ansiEscapes.cursorMove=(x,y)=>{if(typeof x!="number")throw new TypeError("The `x` argument is required");let ret="";return x<0?ret+=ESC+-x+"D":x>0&&(ret+=ESC+x+"C"),y<0?ret+=ESC+-y+"A":y>0&&(ret+=ESC+y+"B"),ret};ansiEscapes.cursorUp=(count=1)=>ESC+count+"A";ansiEscapes.cursorDown=(count=1)=>ESC+count+"B";ansiEscapes.cursorForward=(count=1)=>ESC+count+"C";ansiEscapes.cursorBackward=(count=1)=>ESC+count+"D";ansiEscapes.cursorLeft=ESC+"G";ansiEscapes.cursorSavePosition=isTerminalApp?"\x1B7":ESC+"s";ansiEscapes.cursorRestorePosition=isTerminalApp?"\x1B8":ESC+"u";ansiEscapes.cursorGetPosition=ESC+"6n";ansiEscapes.cursorNextLine=ESC+"E";ansiEscapes.cursorPrevLine=ESC+"F";ansiEscapes.cursorHide=ESC+"?25l";ansiEscapes.cursorShow=ESC+"?25h";ansiEscapes.eraseLines=count=>{let clear="";for(let i=0;i<count;i++)clear+=ansiEscapes.eraseLine+(i<count-1?ansiEscapes.cursorUp():"");return count&&(clear+=ansiEscapes.cursorLeft),clear};ansiEscapes.eraseEndLine=ESC+"K";ansiEscapes.eraseStartLine=ESC+"1K";ansiEscapes.eraseLine=ESC+"2K";ansiEscapes.eraseDown=ESC+"J";ansiEscapes.eraseUp=ESC+"1J";ansiEscapes.eraseScreen=ESC+"2J";ansiEscapes.scrollUp=ESC+"S";ansiEscapes.scrollDown=ESC+"T";ansiEscapes.clearScreen="\x1Bc";ansiEscapes.clearTerminal=process.platform==="win32"?`${ansiEscapes.eraseScreen}${ESC}0f`:`${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;ansiEscapes.beep=BEL;ansiEscapes.link=(text,url)=>[OSC,"8",SEP,SEP,url,BEL,text,OSC,"8",SEP,SEP,BEL].join("");ansiEscapes.image=(buffer,options={})=>{let ret=`${OSC}1337;File=inline=1`;return options.width&&(ret+=`;width=${options.width}`),options.height&&(ret+=`;height=${options.height}`),options.preserveAspectRatio===!1&&(ret+=";preserveAspectRatio=0"),ret+":"+buffer.toString("base64")+BEL};ansiEscapes.iTerm={setCwd:(cwd=process.cwd())=>`${OSC}50;CurrentDir=${cwd}${BEL}`,annotation:(message,options={})=>{let ret=`${OSC}1337;`,hasX=typeof options.x<"u",hasY=typeof options.y<"u";if((hasX||hasY)&&!(hasX&&hasY&&typeof options.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return message=message.replace(/\|/g,""),ret+=options.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",options.length>0?ret+=(hasX?[message,options.length,options.x,options.y]:[options.length,message]).join("|"):ret+=message,ret+BEL}}}});export{require_ansi_escapes};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{warnDeprecatedInput}from"./chunk-KA2KG3SY.js";var VALUE_LIKE=/^(on|off|true|false|yes|no|1|0|enabled?|disabled?)$/i;function negationOf(name){return`--no-${name.slice(2)}`}function readOnOffOption(client,flags,names){let typed=name=>name!==void 0&&flags[name]===!0,onNames=[names.on,names.oldOn].filter(typed),offNames=[names.off,names.oldOff].filter(typed);return onNames.length>0&&offNames.length>0?{error:`Can't use ${onNames[0]} with ${offNames[0]}.`}:(names.oldOn&&onNames.includes(names.oldOn)&&warnDeprecatedInput(client,names.oldOn,names.on),names.oldOff&&offNames.includes(names.oldOff)&&warnDeprecatedInput(client,names.oldOff,names.off),{value:onNames.length>0?!0:offNames.length>0?!1:void 0})}function rewriteLegacyOnOffValues(args,options,client){let legacyOptions=options.filter(option=>option.legacyValues),out=[],legacy=new Map,end=args.indexOf("--");for(let i=0;i<args.length;i++){let token=args[i];if(end!==-1&&i>=end){out.push(token);continue}let option=legacyOptions.find(candidate=>token===`--${candidate.name}`||token.startsWith(`--${candidate.name}=`));if(!option?.legacyValues){out.push(token);continue}let name=`--${option.name}`,negation=negationOf(name),{on,off}=option.legacyValues,invalid={error:`${name} doesn't take a value. Use ${name} or ${negation}.`};if(token===name){let next=args[i+1];if(next===void 0||end!==-1&&i+1>=end)out.push(token);else if(next===on||next===off)out.push(next===on?name:negation),legacy.set(name,next),client&&warnDeprecatedInput(client,`${name} ${next}`,next===on?name:negation),i++;else{if(VALUE_LIKE.test(next))return invalid;out.push(token)}continue}let value=token.slice(name.length+1);if(value==="true"||value==="false")out.push(value==="true"?name:negation);else if(value===on||value===off)out.push(value===on?name:negation),legacy.set(name,value),client&&warnDeprecatedInput(client,token,value===on?name:negation);else return invalid}return{args:out,legacy}}function getFalseValueWarnings(args,options){let booleans=new Set(options.filter(option=>option.type===Boolean&&!option.legacyValues&&!option.rejectsValue&&option.name!=="non-interactive").map(option=>option.name)),warnings=new Set;for(let token of args){if(token==="--")break;let match=/^--([^=]+)=(.*)$/.exec(token);if(!match||!booleans.has(match[1])||!/^false$/i.test(match[2]))continue;let name=`--${match[1]}`;warnings.add(match[1].startsWith("no-")?`${token} turns ${name} on. Leave out ${name} to turn it off.`:`${token} turns ${name} on. Use ${negationOf(name)} to turn it off.`)}return[...warnings]}export{readOnOffOption,rewriteLegacyOnOffValues,getFalseValueWarnings};
7
+ import{warnDeprecatedInput}from"./chunk-BDLZ6WL2.js";var VALUE_LIKE=/^(on|off|true|false|yes|no|1|0|enabled?|disabled?)$/i;function negationOf(name){return`--no-${name.slice(2)}`}function readOnOffOption(client,flags,names){let typed=name=>name!==void 0&&flags[name]===!0,onNames=[names.on,names.oldOn].filter(typed),offNames=[names.off,names.oldOff].filter(typed);return onNames.length>0&&offNames.length>0?{error:`Can't use ${onNames[0]} with ${offNames[0]}.`}:(names.oldOn&&onNames.includes(names.oldOn)&&warnDeprecatedInput(client,names.oldOn,names.on),names.oldOff&&offNames.includes(names.oldOff)&&warnDeprecatedInput(client,names.oldOff,names.off),{value:onNames.length>0?!0:offNames.length>0?!1:void 0})}function rewriteLegacyOnOffValues(args,options,client){let legacyOptions=options.filter(option=>option.legacyValues),out=[],legacy=new Map,end=args.indexOf("--");for(let i=0;i<args.length;i++){let token=args[i];if(end!==-1&&i>=end){out.push(token);continue}let option=legacyOptions.find(candidate=>token===`--${candidate.name}`||token.startsWith(`--${candidate.name}=`));if(!option?.legacyValues){out.push(token);continue}let name=`--${option.name}`,negation=negationOf(name),{on,off}=option.legacyValues,invalid={error:`${name} doesn't take a value. Use ${name} or ${negation}.`};if(token===name){let next=args[i+1];if(next===void 0||end!==-1&&i+1>=end)out.push(token);else if(next===on||next===off)out.push(next===on?name:negation),legacy.set(name,next),client&&warnDeprecatedInput(client,`${name} ${next}`,next===on?name:negation),i++;else{if(VALUE_LIKE.test(next))return invalid;out.push(token)}continue}let value=token.slice(name.length+1);if(value==="true"||value==="false")out.push(value==="true"?name:negation);else if(value===on||value===off)out.push(value===on?name:negation),legacy.set(name,value),client&&warnDeprecatedInput(client,token,value===on?name:negation);else return invalid}return{args:out,legacy}}function getFalseValueWarnings(args,options){let booleans=new Set(options.filter(option=>option.type===Boolean&&!option.legacyValues&&!option.rejectsValue&&option.name!=="non-interactive").map(option=>option.name)),warnings=new Set;for(let token of args){if(token==="--")break;let match=/^--([^=]+)=(.*)$/.exec(token);if(!match||!booleans.has(match[1])||!/^false$/i.test(match[2]))continue;let name=`--${match[1]}`;warnings.add(match[1].startsWith("no-")?`${token} turns ${name} on. Leave out ${name} to turn it off.`:`${token} turns ${name} on. Use ${negationOf(name)} to turn it off.`)}return[...warnings]}export{readOnOffOption,rewriteLegacyOnOffValues,getFalseValueWarnings};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{mapCertError}from"./chunk-TLKBGAOL.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,isAPIError}from"./chunk-QFE3RPMA.js";function toHost(url){return url.replace(/^(?:.*?\/\/)?([^/]+).*/,"$1")}async function getDeployment(client,contextName,hostOrId){hostOrId.includes(".")&&(hostOrId=toHost(hostOrId));try{return await client.fetch(`/v13/deployments/${encodeURIComponent(hostOrId)}`)}catch(err){if(isAPIError(err)){if(err.status===404)throw new DeploymentNotFound({id:hostOrId,context:contextName});if(err.status===403)throw new DeploymentPermissionDenied(hostOrId,contextName);if(err.status===400&&err.message.includes("`id`"))throw new InvalidDeploymentId(hostOrId);let certError=mapCertError(err);if(certError)throw certError}throw err}}export{toHost,getDeployment};
7
+ import{mapCertError}from"./chunk-WWEUGL6W.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,isAPIError}from"./chunk-MTPHHAPR.js";function toHost(url){return url.replace(/^(?:.*?\/\/)?([^/]+).*/,"$1")}async function getDeployment(client,contextName,hostOrId){hostOrId.includes(".")&&(hostOrId=toHost(hostOrId));try{return await client.fetch(`/v13/deployments/${encodeURIComponent(hostOrId)}`)}catch(err){if(isAPIError(err)){if(err.status===404)throw new DeploymentNotFound({id:hostOrId,context:contextName});if(err.status===403)throw new DeploymentPermissionDenied(hostOrId,contextName);if(err.status===400&&err.message.includes("`id`"))throw new InvalidDeploymentId(hostOrId);let certError=mapCertError(err);if(certError)throw certError}throw err}}export{toHost,getDeployment};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at "+i);tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '+j);for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at "+j);pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at "+i);if(!pattern)throw new TypeError("Missing pattern at "+i);tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,defaultPattern="[^"+escapeString(options.delimiter||"/#?")+"]+?",result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected "+nextType+" at "+index+", expected "+type)},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||defaultPattern,modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?defaultPattern:pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:"+token.pattern+")$",reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but got an array');if(value.length===0){if(optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'+token.name+'" to be '+typeOfMessage)}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;var groups=path.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:"",suffix:"",modifier:"",pattern:""});return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:"+parts.join("|")+")",flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,endsWith="["+escapeString(options.endsWith||"")+"]|$",delimiter="["+escapeString(options.delimiter||"/#?")+"]",route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:"+prefix+"((?:"+token.pattern+")(?:"+suffix+prefix+"(?:"+token.pattern+"))*)"+suffix+")"+mod}else route+="(?:"+prefix+"("+token.pattern+")"+suffix+")"+token.modifier;else route+="("+token.pattern+")"+token.modifier;else route+="(?:"+prefix+suffix+")"+token.modifier}}if(end)strict||(route+=delimiter+"?"),route+=options.endsWith?"(?="+endsWith+")":"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiter.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:"+delimiter+"(?="+endsWith+"))?"),isEndDelimited||(route+="(?="+delimiter+"|"+endsWith+")")}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_dist2=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pathToRegexp=exports.tokensToRegexp=exports.regexpToFunction=exports.match=exports.tokensToFunction=exports.compile=exports.parse=void 0;function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at ".concat(i));tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(j));for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(j));pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at ".concat(i));if(!pattern)throw new TypeError("Missing pattern at ".concat(i));tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,_b=options.delimiter,delimiter=_b===void 0?"/#?":_b,result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected ".concat(nextType," at ").concat(index,", expected ").concat(type))},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2},isSafe=function(value2){for(var _i=0,delimiter_1=delimiter;_i<delimiter_1.length;_i++){var char2=delimiter_1[_i];if(value2.indexOf(char2)>-1)return!0}return!1},safePattern=function(prefix2){var prev=result[result.length-1],prevText=prefix2||(prev&&typeof prev=="string"?prev:"");if(prev&&!prevText)throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name,'"'));return!prevText||isSafe(prevText)?"[^".concat(escapeString(delimiter),"]+?"):"(?:(?!".concat(escapeString(prevText),")[^").concat(escapeString(delimiter),"])+?")};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||safePattern(prefix),modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?safePattern(prefix):pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:".concat(token.pattern,")$"),reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'.concat(token.name,'" to not repeat, but got an array'));if(value.length===0){if(optional)continue;throw new TypeError('Expected "'.concat(token.name,'" to not be empty'))}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'.concat(token.name,'" to be ').concat(typeOfMessage))}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;for(var groupsRegex=/\((?:\?<(.*?)>)?(?!\?)/g,index=0,execResult=groupsRegex.exec(path.source);execResult;)keys.push({name:execResult[1]||index++,prefix:"",suffix:"",modifier:"",pattern:""}),execResult=groupsRegex.exec(path.source);return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:".concat(parts.join("|"),")"),flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,_e=options.delimiter,delimiter=_e===void 0?"/#?":_e,_f=options.endsWith,endsWith=_f===void 0?"":_f,endsWithRe="[".concat(escapeString(endsWith),"]|$"),delimiterRe="[".concat(escapeString(delimiter),"]"),route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:".concat(prefix,"((?:").concat(token.pattern,")(?:").concat(suffix).concat(prefix,"(?:").concat(token.pattern,"))*)").concat(suffix,")").concat(mod)}else route+="(?:".concat(prefix,"(").concat(token.pattern,")").concat(suffix,")").concat(token.modifier);else{if(token.modifier==="+"||token.modifier==="*")throw new TypeError('Can not repeat "'.concat(token.name,'" without a prefix and suffix'));route+="(".concat(token.pattern,")").concat(token.modifier)}else route+="(?:".concat(prefix).concat(suffix,")").concat(token.modifier)}}if(end)strict||(route+="".concat(delimiterRe,"?")),route+=options.endsWith?"(?=".concat(endsWithRe,")"):"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiterRe.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:".concat(delimiterRe,"(?=").concat(endsWithRe,"))?")),isEndDelimited||(route+="(?=".concat(delimiterRe,"|").concat(endsWithRe,")"))}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_superstatic=__commonJS({"../../packages/routing-utils/dist/superstatic.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),superstatic_exports={};__export(superstatic_exports,{collectHasSegments:()=>collectHasSegments,compilePathToRegexpTemplate:()=>compilePathToRegexpTemplate2,convertCleanUrls:()=>convertCleanUrls,convertHeaders:()=>convertHeaders,convertRedirects:()=>convertRedirects,convertRewrites:()=>convertRewrites2,convertTrailingSlash:()=>convertTrailingSlash,getCleanUrls:()=>getCleanUrls2,pathToRegexp:()=>pathToRegexp2,sourceToRegex:()=>sourceToRegex2});module.exports=__toCommonJS(superstatic_exports);var import_url=__require("url"),import_path_to_regexp=require_dist(),import_path_to_regexp_updated=require_dist2();function cloneKeys(keys){if(!(typeof keys>"u"))return keys.slice(0)}function compareKeys(left,right){let leftSerialized=typeof left>"u"?"undefined":left.toString(),rightSerialized=typeof right>"u"?"undefined":right.toString();return leftSerialized===rightSerialized}function pathToRegexp2(callerId,path,keys,options){let newKeys=cloneKeys(keys),currentRegExp=(0,import_path_to_regexp.pathToRegexp)(path,keys,options);try{let currentKeys=keys,newRegExp=(0,import_path_to_regexp_updated.pathToRegexp)(path,newKeys,options),isDiffRegExp=currentRegExp.toString()!==newRegExp.toString();if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffRegExp){let message=JSON.stringify({path,currentRegExp:currentRegExp.toString(),newRegExp:newRegExp.toString()});console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`)}let isDiffKeys=!compareKeys(keys,newKeys);if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffKeys){let message=JSON.stringify({isDiffKeys,currentKeys,newKeys});console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`)}}catch(err){let message=JSON.stringify({path,error:err.message});console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${message}`)}return currentRegExp}var UN_NAMED_SEGMENT="__UN_NAMED_SEGMENT__";function getCleanUrls2(filePaths){return filePaths.map(toRoute).filter(f=>f.endsWith(".html")).map(f=>({html:f,clean:f.slice(0,-5)}))}function convertCleanUrls(cleanUrls,trailingSlash,status=308){let routes=[];if(cleanUrls){let loc=trailingSlash?"/$1/":"/$1";routes.push({src:"^/(?:(.+)/)?index(?:\\.html)?/?$",headers:{Location:loc},status}),routes.push({src:"^/(.*)\\.html/?$",headers:{Location:loc},status})}return routes}function convertRedirects(redirects,defaultStatus=308){return redirects.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let loc=replaceSegments(segments,hasSegments,r.destination,!0),status;typeof r.permanent=="boolean"?status=r.permanent?308:307:r.statusCode?status=r.statusCode:status=defaultStatus;let route={src,headers:{Location:loc},status};return typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),route}catch{throw new Error(`Failed to parse redirect: ${JSON.stringify(r)}`)}})}function convertRewrites2(rewrites,internalParamNames){return rewrites.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let interpolate=value=>replaceSegments(segments,hasSegments,value,!1,internalParamNames),route;if(typeof r.destination=="string")route={src,dest:interpolate(r.destination),check:!0};else{let destination={...r.destination,type:"service"};typeof destination.path=="string"&&(destination.path=interpolate(destination.path)),route={src,destination}}return r.transforms&&(route.transforms=r.transforms.map(transform=>transform.type!=="request.path"?{...transform}:{...transform,args:compilePathToRegexpTemplateFromSegments(transform.args,segments,hasSegments,transform.env)})),typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),r.statusCode&&(route.status=r.statusCode),route}catch{throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`)}})}function convertHeaders(headers){return headers.map(h=>{let obj={},{src,segments}=sourceToRegex2(h.source),hasSegments=collectHasSegments(h.has);normalizeHasKeys(h.has),normalizeHasKeys(h.missing);let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT),indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasSegments.forEach(name=>{indexes[name]="$"+name}),h.headers.forEach(({key,value})=>{(namedSegments.length>0||hasSegments.length>0)&&(key.includes(":")&&(key=safelyCompile(key,indexes)),value.includes(":")&&(value=safelyCompile(value,indexes))),obj[key]=value});let route={src,headers:obj,continue:!0};return h.has&&(route.has=h.has),h.missing&&(route.missing=h.missing),route})}function convertTrailingSlash(enable,status=308){let routes=[];return enable?(routes.push({src:"^/\\.well-known(?:/.*)?$"}),routes.push({src:"^/((?:[^/]+/)*[^/\\.]+)$",headers:{Location:"/$1/"},status}),routes.push({src:"^/((?:[^/]+/)*[^/]+\\.\\w+)/$",headers:{Location:"/$1"},status})):routes.push({src:"^/(.*)\\/$",headers:{Location:"/$1"},status}),routes}function sourceToRegex2(source){let keys=[],r=pathToRegexp2("632",source,keys,{strict:!0,sensitive:!0,delimiter:"/"}),segments=keys.map(k=>k.name).map(name=>typeof name!="string"?UN_NAMED_SEGMENT:name);return{src:r.source,segments}}var namedGroupsRegex=/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g,normalizeHasKeys=(hasItems=[])=>{for(let hasItem of hasItems)"key"in hasItem&&hasItem.type==="header"&&(hasItem.key=hasItem.key.toLowerCase());return hasItems};function getStringValueForRegex(value){return typeof value=="string"?value:value&&typeof value=="object"&&value!==null&&"re"in value&&typeof value.re=="string"?value.re:null}function collectHasSegments(has){let hasSegments=new Set;for(let hasItem of has||[]){!hasItem.value&&"key"in hasItem&&hasSegments.add(hasItem.key);let stringValue=getStringValueForRegex(hasItem.value);if(stringValue){for(let match of stringValue.matchAll(namedGroupsRegex))match[1]&&hasSegments.add(match[1]);hasItem.type==="host"&&hasSegments.add("host")}}return[...hasSegments]}var escapeSegment=(str,segmentName)=>str.replace(new RegExp(`:${segmentName}`,"g"),`__ESC_COLON_${segmentName}`),unescapeSegments=str=>str.replace(/__ESC_COLON_/gi,":"),pathTemplateSegmentNameRegex=/^([a-zA-Z_][a-zA-Z0-9_]*)/;function isEscaped(value,index){let backslashCount=0;for(let i=index-1;i>=0&&value[i]==="\\";i--)backslashCount++;return backslashCount%2===1}function collectPathTemplateSegments(template){let segments=[];for(let i=0;i<template.length;i++){if(template[i]!==":"||isEscaped(template,i))continue;let match=template.slice(i+1).match(pathTemplateSegmentNameRegex);match&&(segments.push(match[1]),i+=match[1].length)}return segments}function collectNamedDollarReferences(template){let references=[];for(let i=0;i<template.length;i++){if(template[i]!=="$"||isEscaped(template,i))continue;let remainder=template.slice(i+1),bracedMatch=remainder.match(/^\{([a-zA-Z_][a-zA-Z0-9_]*)\}/),unbracedMatch=remainder.match(pathTemplateSegmentNameRegex),name=bracedMatch?.[1]||unbracedMatch?.[1];name&&references.push(name)}return references}function compilePathToRegexpTemplateFromSegments(template,segments,hasItemSegments,env=[]){let indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasItemSegments.forEach(name=>{indexes[name]=`$${name}`});for(let name of collectPathTemplateSegments(template))if(!(name in indexes))throw new Error(`Path template references parameter ":${name}" that is not present in the source or has conditions.`);let routeParameters=new Set([...segments.filter(name=>name!==UN_NAMED_SEGMENT),...hasItemSegments]);for(let name of collectNamedDollarReferences(template))if(routeParameters.has(name)&&!env.includes(name))throw new Error(`Path template references route parameter "${name}" as \`$${name}\`. Use \`:${name}\` path-to-regexp syntax in high-level rewrites, or list "${name}" in the transform env allowlist if it is an environment variable.`);return safelyCompile(template,indexes,!0)}function compilePathToRegexpTemplate2(source,template,has,env){let{segments}=sourceToRegex2(source);return compilePathToRegexpTemplateFromSegments(template,segments,collectHasSegments(has),env)}function replaceSegments(segments,hasItemSegments,destination,isRedirect,internalParamNames){let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT);if(!(destination.includes(":")&&namedSegments.length>0||hasItemSegments.length>0||!isRedirect))return destination;let escapedDestination=destination,indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index),escapedDestination=escapeSegment(escapedDestination,name)}),hasItemSegments.forEach(name=>{indexes[name]="$"+name,escapedDestination=escapeSegment(escapedDestination,name)});let parsedDestination=(0,import_url.parse)(escapedDestination,!0);delete parsedDestination.href,delete parsedDestination.path,delete parsedDestination.search,delete parsedDestination.host;let{pathname,hash,query,hostname,...rest}=parsedDestination;pathname=unescapeSegments(pathname||""),hash=unescapeSegments(hash||""),hostname=unescapeSegments(hostname||"");let destParams=new Set,pathnameKeys=[],hashKeys=[],hostnameKeys=[];try{pathToRegexp2("528",pathname,pathnameKeys),pathToRegexp2("834",hash||"",hashKeys),pathToRegexp2("712",hostname||"",hostnameKeys)}catch{}destParams=new Set([...pathnameKeys,...hashKeys,...hostnameKeys].map(key=>key.name).filter(val=>typeof val=="string")),pathname=safelyCompile(pathname,indexes,!0),hash=hash?safelyCompile(hash,indexes,!0):null,hostname=hostname?safelyCompile(hostname,indexes,!0):null;for(let[key,strOrArray]of Object.entries(query))Array.isArray(strOrArray)?query[key]=strOrArray.map(str=>safelyCompile(unescapeSegments(str),indexes,!0)):query[key]=safelyCompile(unescapeSegments(strOrArray),indexes,!0);let paramKeys=Object.keys(indexes);if(!isRedirect&&!paramKeys.some(param=>!(internalParamNames&&internalParamNames.includes(param))&&destParams.has(param)))for(let param of paramKeys)!(param in query)&&param!==UN_NAMED_SEGMENT&&(query[param]=indexes[param]);return destination=(0,import_url.format)({...rest,hostname,pathname,query,hash}),destination.replace(/%24/g,"$")}function safelyCompile(value,indexes,attemptDirectCompile){if(!value)return value;if(attemptDirectCompile)try{return(0,import_path_to_regexp.compile)(value,{validate:!1})(indexes)}catch{}for(let key of Object.keys(indexes))value.includes(`:${key}`)&&(value=value.replace(new RegExp(`:${key}\\*`,"g"),`:${key}--ESCAPED_PARAM_ASTERISK`).replace(new RegExp(`:${key}\\?`,"g"),`:${key}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${key}\\+`,"g"),`:${key}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${key}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${key}`));return value=value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISK/g,"*"),(0,import_path_to_regexp.compile)(`/${value}`,{validate:!1})(indexes).slice(1)}function toSegmentDest(index){return"$"+(index+1).toString()}function toRoute(filePath){return filePath.startsWith("/")?filePath:"/"+filePath}}});var require_append=__commonJS({"../../packages/routing-utils/dist/append.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),append_exports={};__export(append_exports,{appendRoutesToPhase:()=>appendRoutesToPhase2});module.exports=__toCommonJS(append_exports);var import_index=require_dist3();function appendRoutesToPhase2({routes:prevRoutes,newRoutes,phase}){let routes=prevRoutes?[...prevRoutes]:[];if(newRoutes===null||newRoutes.length===0)return routes;let isInPhase=!1,insertIndex=-1;if(routes.forEach((r,i)=>{(0,import_index.isHandler)(r)&&(r.handle===phase?isInPhase=!0:isInPhase&&(insertIndex=i,isInPhase=!1))}),isInPhase)routes.push(...newRoutes);else if(phase===null){let lastPhase=routes.findIndex(r=>(0,import_index.isHandler)(r)&&r.handle);lastPhase===-1?routes.push(...newRoutes):routes.splice(lastPhase,0,...newRoutes)}else insertIndex>-1?routes.splice(insertIndex,0,...newRoutes):(routes.push({handle:phase}),routes.push(...newRoutes));return routes}}});var require_merge=__commonJS({"../../packages/routing-utils/dist/merge.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),merge_exports={};__export(merge_exports,{mergeRoutes:()=>mergeRoutes2});module.exports=__toCommonJS(merge_exports);var import_index=require_dist3();function getBuilderRoutesMapping(builds){let builderRoutes={};for(let{entrypoint,routes,use}of builds)routes&&(builderRoutes[entrypoint]||(builderRoutes[entrypoint]={}),builderRoutes[entrypoint][use]=routes);return builderRoutes}function addToHandleMap(path,routesMapping,handleMap){let br=routesMapping[path];Object.keys(br).sort().forEach(use=>{let prevHandle=null;br[use].forEach(route=>{if((0,import_index.isHandler)(route))prevHandle=route.handle;else{let routes=handleMap.get(prevHandle);routes?routes.push(route):handleMap.set(prevHandle,[route])}})})}function getCheckAndContinue(routes){let checks=[],continues=[],others=[];for(let route of routes){if((0,import_index.isHandler)(route))throw new Error(`Unexpected route found in getCheckAndContinue(): ${JSON.stringify(route)}`);route.check&&!route.override?checks.push(route):route.continue&&!route.override?continues.push(route):others.push(route)}return{checks,continues,others}}function mergeRoutes2({userRoutes,builds}){let userHandleMap=new Map,userPrevHandle=null;(userRoutes||[]).forEach(route=>{if((0,import_index.isHandler)(route))userPrevHandle=route.handle;else{let routes=userHandleMap.get(userPrevHandle);routes?routes.push(route):userHandleMap.set(userPrevHandle,[route])}});let projectHandleMap=new Map,projectMiddlewareRoutes=getBuilderRoutesMapping(builds.filter(b=>b.projectMiddleware));Object.keys(projectMiddlewareRoutes).sort().forEach(path=>addToHandleMap(path,projectMiddlewareRoutes,projectHandleMap));let builderHandleMap=new Map,builderRoutes=getBuilderRoutesMapping(builds.filter(b=>!b.projectMiddleware));Object.keys(builderRoutes).sort().forEach(path=>addToHandleMap(path,builderRoutes,builderHandleMap));let outputRoutes=[],uniqueHandleValues=new Set([null,...userHandleMap.keys(),...projectHandleMap.keys(),...builderHandleMap.keys()]);for(let handle of uniqueHandleValues){let userRoutes2=userHandleMap.get(handle)||[],projectRoutes=projectHandleMap.get(handle)||[],builderRoutes2=builderHandleMap.get(handle)||[],builderSorted=getCheckAndContinue(builderRoutes2);handle!==null&&(userRoutes2.length>0||projectRoutes.length>0||builderRoutes2.length>0)&&outputRoutes.push({handle}),outputRoutes.push(...builderSorted.continues),outputRoutes.push(...userRoutes2),outputRoutes.push(...projectRoutes),outputRoutes.push(...builderSorted.checks),outputRoutes.push(...builderSorted.others)}return outputRoutes}}});var require_service_route_ownership=__commonJS({"../../packages/routing-utils/dist/service-route-ownership.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),service_route_ownership_exports={};__export(service_route_ownership_exports,{getOwnershipGuard:()=>getOwnershipGuard2,normalizeRoutePrefix:()=>normalizeRoutePrefix2,scopeRouteSourceToOwnership:()=>scopeRouteSourceToOwnership2});module.exports=__toCommonJS(service_route_ownership_exports);function normalizeRoutePrefix2(routePrefix){let normalized=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;return normalized!=="/"&&normalized.endsWith("/")&&(normalized=normalized.slice(0,-1)),normalized||"/"}function escapeForRegex(value){return value.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function toPrefixMatcher(routePrefix){return`${escapeForRegex(routePrefix)}(?:/|$)`}function isDescendantPrefix(candidate,prefix){return candidate!==prefix&&candidate.startsWith(`${prefix}/`)}function getOwnershipGuard2(ownerPrefix,allRoutePrefixes){let owner=normalizeRoutePrefix2(ownerPrefix),nonRootPrefixes=Array.from(new Set(allRoutePrefixes.map(normalizeRoutePrefix2))).filter(prefix=>prefix!=="/").sort((a,b)=>b.length-a.length);if(owner==="/")return nonRootPrefixes.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");let descendants=nonRootPrefixes.filter(prefix=>isDescendantPrefix(prefix,owner)),positive=`(?=${toPrefixMatcher(owner)})`,negative=descendants.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");return`${positive}${negative}`}function scopeRouteSourceToOwnership2(source,ownershipGuard){if(!ownershipGuard)return source;let inner=source.startsWith("^")?source.slice(1):source;return`^${ownershipGuard}(?:${inner})`}}});var require_schemas=__commonJS({"../../packages/routing-utils/dist/schemas.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schemas_exports={};__export(schemas_exports,{cleanUrlsSchema:()=>cleanUrlsSchema,hasSchema:()=>hasSchema,headersSchema:()=>headersSchema,redirectsSchema:()=>redirectsSchema,rewritesSchema:()=>rewritesSchema,routesSchema:()=>routesSchema,trailingSlashSchema:()=>trailingSlashSchema,transformsSchema:()=>transformsSchema});module.exports=__toCommonJS(schemas_exports);var mitigateSchema={description:"Mitigation action to take on a route",type:"object",additionalProperties:!1,required:["action"],properties:{action:{description:"The mitigation action to take",type:"string",enum:["challenge","deny"]}}},serviceNameSchema={description:"A service name identifier.",type:"string",minLength:1,maxLength:64,pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"},serviceDestinationSchema={description:"A service-targeted destination that delegates routing into a named service from `services`. Identified by the presence of `service`.",type:"object",additionalProperties:!1,required:["service"],properties:{type:{description:"Optional explicit format marker. The destination shape is identified by the `service` property, so `type` is no longer required. When present it must be `service`.",type:"string",enum:["service"]},service:serviceNameSchema,path:{description:"Routing-only path used to select a route inside the target service. It does not mutate the URL observed by user code.",type:"string",maxLength:4096}}},matchableValueSchema={description:"A value to match against. Can be a string (regex) or a condition operation object",anyOf:[{description:"A regular expression used to match thev value. Named groups can be used in the destination.",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},re:{description:"Regex",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]},hasSchema={description:"An array of requirements that are needed to match",type:"array",maxItems:16,items:{anyOf:[{type:"object",additionalProperties:!1,required:["type","value"],properties:{type:{description:"The type of request element to check",type:"string",enum:["host"]},value:matchableValueSchema}},{type:"object",additionalProperties:!1,required:["type","key"],properties:{type:{description:"The type of request element to check",type:"string",enum:["header","cookie","query"]},key:{description:"The name of the element contained in the particular type",type:"string",maxLength:4096},value:matchableValueSchema}}]}},transformsSchema={description:"A list of transform rules to adjust a request path, request query parameters, or request/response headers",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op"],properties:{type:{description:"The scope of the transform to apply",type:"string",enum:["request.headers","request.query","response.headers","request.path"]},op:{description:"The operation to perform on the target",type:"string",enum:["append","set","delete"]},target:{description:"The target of the transform",type:"object",required:["key"],properties:{key:{description:"A value to match against. Can be a string or a condition operation object (without regex support)",anyOf:[{description:"A valid header name (letters, numbers, hyphens, underscores)",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]}}},args:{description:"The arguments to the operation",anyOf:[{type:"string",maxLength:4096},{type:"array",minItems:1,items:{type:"string",maxLength:4096}}]},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},fallback:{description:"Keep an earlier runtime-visible request path when one is already set",type:"boolean"}},allOf:[{if:{properties:{op:{enum:["append","set"]}}},then:{required:["args"]}},{if:{allOf:[{properties:{type:{enum:["request.headers","response.headers"]}}},{properties:{op:{enum:["set","append"]}}}]},then:{properties:{target:{properties:{key:{if:{type:"string"},then:{pattern:"^[a-zA-Z0-9_-]+$"}}}},args:{anyOf:[{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"},{type:"array",items:{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"}}]}}}},{if:{required:["type"],properties:{type:{enum:["request.headers","request.query","response.headers"]}}},then:{required:["target"]}},{if:{required:["type"],properties:{type:{enum:["request.path"]}}},then:{required:["args"],not:{required:["target"]},properties:{op:{enum:["set"]},args:{description:"The runtime-visible request path. Must be an origin-form path without query or fragment.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"}}}},{if:{required:["fallback"]},then:{properties:{type:{enum:["request.path"]}}}}]}},rewriteTransformsSchema={description:"A list of request path transforms using path-to-regexp parameters.",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op","args"],properties:{type:{description:"The request path to expose to the target runtime",type:"string",enum:["request.path"]},op:{description:"Replace the runtime-visible request path",type:"string",enum:["set"]},args:{description:"An origin-form request path. Route parameters use path-to-regexp syntax such as `/:path*`.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},fallback:{description:"Keep an earlier runtime-visible request path when one is already set",type:"boolean"}}}},routesSchema={type:"array",description:"A list of routes objects used to rewrite paths to point towards other internal or external paths",example:[{dest:"https://docs.example.com",src:"/docs"}],items:{anyOf:[{type:"object",anyOf:[{required:["src"]},{required:["source"]}],additionalProperties:!1,properties:{src:{type:"string",maxLength:4096},source:{type:"string",maxLength:4096},dest:{type:"string",maxLength:4096},destination:{anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},headers:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:32768}}},methods:{type:"array",maxItems:10,items:{type:"string",maxLength:32}},caseSensitive:{type:"boolean"},important:{deprecated:!0,type:"boolean"},user:{type:"boolean"},continue:{type:"boolean"},override:{deprecated:!0,type:"boolean"},check:{type:"boolean"},isInternal:{type:"boolean"},status:{type:"integer",minimum:100,maximum:999},statusCode:{type:"integer",minimum:100,maximum:999},locale:{type:"object",additionalProperties:!1,minProperties:1,properties:{redirect:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:4096}}},value:{type:"string",maxLength:4096},path:{type:"string",maxLength:4096},cookie:{type:"string",maxLength:4096},default:{type:"string",maxLength:4096}}},middleware:{type:"number"},middlewarePath:{type:"string"},middlewareRawSrc:{type:"array",items:{type:"string"}},has:hasSchema,missing:hasSchema,mitigate:mitigateSchema,transforms:transformsSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination or headers",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}},{type:"object",deprecated:!0,required:["handle"],additionalProperties:!1,properties:{handle:{type:"string",maxLength:32,enum:["error","filesystem","hit","miss","resource","rewrite"]}}}]}},rewritesSchema={type:"array",maxItems:2048,description:"A list of rewrite definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring).",type:"string",maxLength:4096},destination:{description:"An absolute pathname to an existing resource, an external URL, or a service-targeted destination object.",anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},transforms:rewriteTransformsSchema,has:hasSchema,missing:hasSchema,statusCode:{description:"An optional integer to override the status code of the response.",type:"integer",minimum:100,maximum:999},env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}}},redirectsSchema={title:"Redirects",type:"array",maxItems:2048,description:"A list of redirect definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring) or a full URL including domain.",type:"string",maxLength:4096},destination:{description:"A location destination defined as an absolute pathname or external URL.",type:"string",maxLength:4096},permanent:{description:"A boolean to toggle between permanent and temporary redirect. When `true`, the status code is `308`. When `false` the status code is `307`.",type:"boolean"},statusCode:{description:"An optional integer to define the status code of the redirect.",private:!0,type:"integer",minimum:100,maximum:999},has:hasSchema,missing:hasSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}}}}},headersSchema={type:"array",maxItems:2048,description:"A list of header definitions.",items:{type:"object",additionalProperties:!1,required:["source","headers"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring)",type:"string",maxLength:4096},headers:{description:"An array of key/value pairs representing each response header.",type:"array",maxItems:1024,items:{type:"object",additionalProperties:!1,required:["key","value"],properties:{key:{type:"string",maxLength:4096},value:{type:"string",maxLength:32768}}}},has:hasSchema,missing:hasSchema}}},cleanUrlsSchema={description:"When set to `true`, all HTML files and Serverless Functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.",type:"boolean"},trailingSlashSchema={description:"When `false`, visiting a path that ends with a forward slash will respond with a `308` status code and redirect to the path without the trailing slash.",type:"boolean"}}});var require_types=__commonJS({"../../packages/routing-utils/dist/types.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};module.exports=__toCommonJS(types_exports)}});var require_dist3=__commonJS({"../../packages/routing-utils/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{appendRoutesToPhase:()=>import_append.appendRoutesToPhase,compilePathToRegexpTemplate:()=>import_superstatic2.compilePathToRegexpTemplate,convertRewrites:()=>import_superstatic2.convertRewrites,getCleanUrls:()=>import_superstatic2.getCleanUrls,getOwnershipGuard:()=>import_service_route_ownership.getOwnershipGuard,getTransformedRoutes:()=>getTransformedRoutes,isHandler:()=>isHandler,isValidHandleValue:()=>isValidHandleValue,mergeRoutes:()=>import_merge.mergeRoutes,normalizeRoutePrefix:()=>import_service_route_ownership.normalizeRoutePrefix,normalizeRoutes:()=>normalizeRoutes,pathToRegexp:()=>import_superstatic2.pathToRegexp,scopeRouteSourceToOwnership:()=>import_service_route_ownership.scopeRouteSourceToOwnership,sourceToRegex:()=>import_superstatic2.sourceToRegex});module.exports=__toCommonJS(src_exports);var import_url=__require("url"),import_superstatic=require_superstatic(),import_append=require_append(),import_merge=require_merge(),import_service_route_ownership=require_service_route_ownership();__reExport(src_exports,require_schemas(),module.exports);var import_superstatic2=require_superstatic();__reExport(src_exports,require_types(),module.exports);var VALID_HANDLE_VALUES=["filesystem","hit","miss","rewrite","error","resource"],validHandleValues=new Set(VALID_HANDLE_VALUES);function isHandler(route){return typeof route.handle<"u"}function isValidHandleValue(handle){return validHandleValues.has(handle)}function convertRouteAliases(route,index){if(route.source!==void 0){if(route.src!==void 0)throw new Error(`Route at index ${index} cannot define both \`src\` and \`source\`. Please use only one.`);route.src=route.source,delete route.source}if(route.destination!==void 0){if(route.dest!==void 0)throw new Error(`Route at index ${index} cannot define both \`dest\` and \`destination\`. Please use only one.`);typeof route.destination=="string"?(route.dest=route.destination,delete route.destination):typeof route.destination.service=="string"&&(route.destination={...route.destination,type:"service"})}if(route.statusCode!==void 0){if(route.status!==void 0)throw new Error(`Route at index ${index} cannot define both \`status\` and \`statusCode\`. Please use only one.`);route.status=route.statusCode,delete route.statusCode}}function normalizeRoutes(inputRoutes){if(!inputRoutes||inputRoutes.length===0)return{routes:inputRoutes,error:null};let routes=[],handling=[],errors=[];inputRoutes.forEach((r,i)=>{let route={...r};if(routes.push(route),!isHandler(route))try{convertRouteAliases(route,i)}catch(err){errors.push(err.message)}let keys=Object.keys(route);if(isHandler(route)){let{handle}=route;if(keys.length!==1){let unknownProp=keys.find(prop=>prop!=="handle");errors.push(`Route at index ${i} has unknown property \`${unknownProp}\`.`)}else isValidHandleValue(handle)?handling.includes(handle)?errors.push(`Route at index ${i} is a duplicate. Please use one \`handle: ${handle}\` at most.`):handling.push(handle):errors.push(`Route at index ${i} has unknown handle value \`handle: ${handle}\`.`)}else if(route.src){route.src.startsWith("^")||(route.src=`^${route.src}`),route.src.endsWith("$")||(route.src=`${route.src}$`),route.src=route.src.replace(/\\\//g,"/");let regError=checkRegexSyntax("Route",i,route.src);regError&&errors.push(regError),route.destination&&typeof route.destination=="object"&&route.continue&&errors.push(`Route at index ${i} cannot define \`continue: true\` with a service \`destination\`. The service handoff is terminal.`);let handleValue=handling[handling.length-1];handleValue==="hit"?(route.dest&&errors.push(`Route at index ${i} cannot define \`dest\`/\`destination\` after \`handle: hit\`.`),route.status&&errors.push(`Route at index ${i} cannot define \`status\`/\`statusCode\` after \`handle: hit\`.`),route.continue||errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: hit\`.`)):handleValue==="miss"&&(route.dest&&!route.check?errors.push(`Route at index ${i} must define \`check: true\` after \`handle: miss\`.`):!route.dest&&!route.continue&&errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: miss\`.`))}else errors.push(`Route at index ${i} must define either \`src\` or \`source\` property.`)});let error=errors.length>0?createError("invalid_route",errors,"https://vercel.link/routes-json","Learn More"):null;return{routes,error}}function checkRegexSyntax(type,index,src){try{new RegExp(src)}catch{return`${type} at index ${index} has invalid \`${type==="Route"?"src`/`source":"source"}\` regular expression "${src}".`}return null}function checkPatternSyntax(type,index,{source,destination,has,transforms}){let sourceSegments=new Set,destinationSegments=new Set;try{sourceSegments=new Set((0,import_superstatic.sourceToRegex)(source).segments)}catch{return{message:`${type} at index ${index} has invalid \`source\` pattern "${source}".`,link:"https://vercel.link/invalid-route-source-pattern"}}let destinationString=typeof destination=="string"?destination:typeof destination?.path=="string"?destination.path:void 0;if(destinationString!==void 0){try{let{hostname,pathname,query}=(0,import_url.parse)(destinationString,!0);(0,import_superstatic.sourceToRegex)(hostname||"").segments.forEach(name=>destinationSegments.add(name)),(0,import_superstatic.sourceToRegex)(pathname||"").segments.forEach(name=>destinationSegments.add(name));for(let strOrArray of Object.values(query)){let value=Array.isArray(strOrArray)?strOrArray[0]:strOrArray;(0,import_superstatic.sourceToRegex)(value||"").segments.forEach(name=>destinationSegments.add(name))}}catch{}let hasSegments=(0,import_superstatic.collectHasSegments)(has);for(let segment of destinationSegments)if(!sourceSegments.has(segment)&&!hasSegments.includes(segment))return{message:`${type} at index ${index} has segment ":${segment}" in \`destination\` property but not in \`source\` or \`has\` property.`,link:"https://vercel.link/invalid-route-destination-segment"}}for(let transform of transforms||[])if(transform.type==="request.path")try{(0,import_superstatic.compilePathToRegexpTemplate)(source,transform.args,has,transform.env)}catch(error){return{message:`${type} at index ${index} has an invalid \`request.path\` transform: ${error instanceof Error?error.message:String(error)}`,link:"https://vercel.link/invalid-route-destination-segment"}}return null}function checkRedirect(r,index){return typeof r.permanent<"u"&&typeof r.statusCode<"u"?`Redirect at index ${index} cannot define both \`permanent\` and \`statusCode\` properties.`:null}function createError(code,allErrors,link,action){let errors=Array.isArray(allErrors)?allErrors:[allErrors],message=errors[0];return{name:"RouteApiError",code,message,link,action,errors}}function notEmpty(value){return value!=null}function getTransformedRoutes(vercelConfig){let{cleanUrls,rewrites,redirects,headers,trailingSlash}=vercelConfig,{routes:userRoutes=null}=vercelConfig,routes=null;if(typeof cleanUrls<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertCleanUrls)(cleanUrls,trailingSlash));if(normalized.error)return normalized.error.code="invalid_clean_urls",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof trailingSlash<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertTrailingSlash)(trailingSlash));if(normalized.error)return normalized.error.code="invalid_trailing_slash",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(userRoutes){let normalized=normalizeRoutes(userRoutes);if(normalized.error)return{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof redirects<"u"){let code="invalid_redirect",regexErrorMessage=redirects.map((r,i)=>checkRegexSyntax("Redirect",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError("invalid_redirect",regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=redirects.map((r,i)=>checkPatternSyntax("Redirect",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let redirectErrorMessage=redirects.map(checkRedirect).find(notEmpty);if(redirectErrorMessage)return{routes,error:createError(code,redirectErrorMessage,"https://vercel.link/redirects-json","Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRedirects)(redirects));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof headers<"u"){let code="invalid_header",regexErrorMessage=headers.map((r,i)=>checkRegexSyntax("Header",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=headers.map((r,i)=>checkPatternSyntax("Header",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertHeaders)(headers));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof rewrites<"u"){let code="invalid_rewrite",regexErrorMessage=rewrites.map((r,i)=>checkRegexSyntax("Rewrite",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=rewrites.map((r,i)=>checkPatternSyntax("Rewrite",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRewrites)(rewrites));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push({handle:"filesystem"}),routes.push(...normalized.routes||[])}return{routes,error:null}}}});export{require_dist3 as require_dist};
7
+ import{__commonJS,__require}from"./chunk-NBPLUP7C.js";var require_dist=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at "+i);tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '+j);for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at "+j);pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at "+i);if(!pattern)throw new TypeError("Missing pattern at "+i);tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,defaultPattern="[^"+escapeString(options.delimiter||"/#?")+"]+?",result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected "+nextType+" at "+index+", expected "+type)},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||defaultPattern,modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?defaultPattern:pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:"+token.pattern+")$",reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'+token.name+'" to not repeat, but got an array');if(value.length===0){if(optional)continue;throw new TypeError('Expected "'+token.name+'" to not be empty')}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'+token.name+'" to match "'+token.pattern+'", but got "'+segment+'"');path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'+token.name+'" to be '+typeOfMessage)}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;var groups=path.source.match(/\((?!\?)/g);if(groups)for(var i=0;i<groups.length;i++)keys.push({name:i,prefix:"",suffix:"",modifier:"",pattern:""});return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:"+parts.join("|")+")",flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,endsWith="["+escapeString(options.endsWith||"")+"]|$",delimiter="["+escapeString(options.delimiter||"/#?")+"]",route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:"+prefix+"((?:"+token.pattern+")(?:"+suffix+prefix+"(?:"+token.pattern+"))*)"+suffix+")"+mod}else route+="(?:"+prefix+"("+token.pattern+")"+suffix+")"+token.modifier;else route+="("+token.pattern+")"+token.modifier;else route+="(?:"+prefix+suffix+")"+token.modifier}}if(end)strict||(route+=delimiter+"?"),route+=options.endsWith?"(?="+endsWith+")":"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiter.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:"+delimiter+"(?="+endsWith+"))?"),isEndDelimited||(route+="(?="+delimiter+"|"+endsWith+")")}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_dist2=__commonJS({"../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.pathToRegexp=exports.tokensToRegexp=exports.regexpToFunction=exports.match=exports.tokensToFunction=exports.compile=exports.parse=void 0;function lexer(str){for(var tokens=[],i=0;i<str.length;){var char=str[i];if(char==="*"||char==="+"||char==="?"){tokens.push({type:"MODIFIER",index:i,value:str[i++]});continue}if(char==="\\"){tokens.push({type:"ESCAPED_CHAR",index:i++,value:str[i++]});continue}if(char==="{"){tokens.push({type:"OPEN",index:i,value:str[i++]});continue}if(char==="}"){tokens.push({type:"CLOSE",index:i,value:str[i++]});continue}if(char===":"){for(var name="",j=i+1;j<str.length;){var code=str.charCodeAt(j);if(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||code===95){name+=str[j++];continue}break}if(!name)throw new TypeError("Missing parameter name at ".concat(i));tokens.push({type:"NAME",index:i,value:name}),i=j;continue}if(char==="("){var count=1,pattern="",j=i+1;if(str[j]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(j));for(;j<str.length;){if(str[j]==="\\"){pattern+=str[j++]+str[j++];continue}if(str[j]===")"){if(count--,count===0){j++;break}}else if(str[j]==="("&&(count++,str[j+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(j));pattern+=str[j++]}if(count)throw new TypeError("Unbalanced pattern at ".concat(i));if(!pattern)throw new TypeError("Missing pattern at ".concat(i));tokens.push({type:"PATTERN",index:i,value:pattern}),i=j;continue}tokens.push({type:"CHAR",index:i,value:str[i++]})}return tokens.push({type:"END",index:i,value:""}),tokens}function parse(str,options){options===void 0&&(options={});for(var tokens=lexer(str),_a=options.prefixes,prefixes=_a===void 0?"./":_a,_b=options.delimiter,delimiter=_b===void 0?"/#?":_b,result=[],key=0,i=0,path="",tryConsume=function(type){if(i<tokens.length&&tokens[i].type===type)return tokens[i++].value},mustConsume=function(type){var value2=tryConsume(type);if(value2!==void 0)return value2;var _a2=tokens[i],nextType=_a2.type,index=_a2.index;throw new TypeError("Unexpected ".concat(nextType," at ").concat(index,", expected ").concat(type))},consumeText=function(){for(var result2="",value2;value2=tryConsume("CHAR")||tryConsume("ESCAPED_CHAR");)result2+=value2;return result2},isSafe=function(value2){for(var _i=0,delimiter_1=delimiter;_i<delimiter_1.length;_i++){var char2=delimiter_1[_i];if(value2.indexOf(char2)>-1)return!0}return!1},safePattern=function(prefix2){var prev=result[result.length-1],prevText=prefix2||(prev&&typeof prev=="string"?prev:"");if(prev&&!prevText)throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name,'"'));return!prevText||isSafe(prevText)?"[^".concat(escapeString(delimiter),"]+?"):"(?:(?!".concat(escapeString(prevText),")[^").concat(escapeString(delimiter),"])+?")};i<tokens.length;){var char=tryConsume("CHAR"),name=tryConsume("NAME"),pattern=tryConsume("PATTERN");if(name||pattern){var prefix=char||"";prefixes.indexOf(prefix)===-1&&(path+=prefix,prefix=""),path&&(result.push(path),path=""),result.push({name:name||key++,prefix,suffix:"",pattern:pattern||safePattern(prefix),modifier:tryConsume("MODIFIER")||""});continue}var value=char||tryConsume("ESCAPED_CHAR");if(value){path+=value;continue}path&&(result.push(path),path="");var open=tryConsume("OPEN");if(open){var prefix=consumeText(),name_1=tryConsume("NAME")||"",pattern_1=tryConsume("PATTERN")||"",suffix=consumeText();mustConsume("CLOSE"),result.push({name:name_1||(pattern_1?key++:""),pattern:name_1&&!pattern_1?safePattern(prefix):pattern_1,prefix,suffix,modifier:tryConsume("MODIFIER")||""});continue}mustConsume("END")}return result}exports.parse=parse;function compile(str,options){return tokensToFunction(parse(str,options),options)}exports.compile=compile;function tokensToFunction(tokens,options){options===void 0&&(options={});var reFlags=flags(options),_a=options.encode,encode=_a===void 0?function(x){return x}:_a,_b=options.validate,validate=_b===void 0?!0:_b,matches=tokens.map(function(token){if(typeof token=="object")return new RegExp("^(?:".concat(token.pattern,")$"),reFlags)});return function(data){for(var path="",i=0;i<tokens.length;i++){var token=tokens[i];if(typeof token=="string"){path+=token;continue}var value=data?data[token.name]:void 0,optional=token.modifier==="?"||token.modifier==="*",repeat=token.modifier==="*"||token.modifier==="+";if(Array.isArray(value)){if(!repeat)throw new TypeError('Expected "'.concat(token.name,'" to not repeat, but got an array'));if(value.length===0){if(optional)continue;throw new TypeError('Expected "'.concat(token.name,'" to not be empty'))}for(var j=0;j<value.length;j++){var segment=encode(value[j],token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected all "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix}continue}if(typeof value=="string"||typeof value=="number"){var segment=encode(String(value),token);if(validate&&!matches[i].test(segment))throw new TypeError('Expected "'.concat(token.name,'" to match "').concat(token.pattern,'", but got "').concat(segment,'"'));path+=token.prefix+segment+token.suffix;continue}if(!optional){var typeOfMessage=repeat?"an array":"a string";throw new TypeError('Expected "'.concat(token.name,'" to be ').concat(typeOfMessage))}}return path}}exports.tokensToFunction=tokensToFunction;function match(str,options){var keys=[],re=pathToRegexp2(str,keys,options);return regexpToFunction(re,keys,options)}exports.match=match;function regexpToFunction(re,keys,options){options===void 0&&(options={});var _a=options.decode,decode=_a===void 0?function(x){return x}:_a;return function(pathname){var m=re.exec(pathname);if(!m)return!1;for(var path=m[0],index=m.index,params=Object.create(null),_loop_1=function(i2){if(m[i2]===void 0)return"continue";var key=keys[i2-1];key.modifier==="*"||key.modifier==="+"?params[key.name]=m[i2].split(key.prefix+key.suffix).map(function(value){return decode(value,key)}):params[key.name]=decode(m[i2],key)},i=1;i<m.length;i++)_loop_1(i);return{path,index,params}}}exports.regexpToFunction=regexpToFunction;function escapeString(str){return str.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function flags(options){return options&&options.sensitive?"":"i"}function regexpToRegexp(path,keys){if(!keys)return path;for(var groupsRegex=/\((?:\?<(.*?)>)?(?!\?)/g,index=0,execResult=groupsRegex.exec(path.source);execResult;)keys.push({name:execResult[1]||index++,prefix:"",suffix:"",modifier:"",pattern:""}),execResult=groupsRegex.exec(path.source);return path}function arrayToRegexp(paths,keys,options){var parts=paths.map(function(path){return pathToRegexp2(path,keys,options).source});return new RegExp("(?:".concat(parts.join("|"),")"),flags(options))}function stringToRegexp(path,keys,options){return tokensToRegexp(parse(path,options),keys,options)}function tokensToRegexp(tokens,keys,options){options===void 0&&(options={});for(var _a=options.strict,strict=_a===void 0?!1:_a,_b=options.start,start=_b===void 0?!0:_b,_c=options.end,end=_c===void 0?!0:_c,_d=options.encode,encode=_d===void 0?function(x){return x}:_d,_e=options.delimiter,delimiter=_e===void 0?"/#?":_e,_f=options.endsWith,endsWith=_f===void 0?"":_f,endsWithRe="[".concat(escapeString(endsWith),"]|$"),delimiterRe="[".concat(escapeString(delimiter),"]"),route=start?"^":"",_i=0,tokens_1=tokens;_i<tokens_1.length;_i++){var token=tokens_1[_i];if(typeof token=="string")route+=escapeString(encode(token));else{var prefix=escapeString(encode(token.prefix)),suffix=escapeString(encode(token.suffix));if(token.pattern)if(keys&&keys.push(token),prefix||suffix)if(token.modifier==="+"||token.modifier==="*"){var mod=token.modifier==="*"?"?":"";route+="(?:".concat(prefix,"((?:").concat(token.pattern,")(?:").concat(suffix).concat(prefix,"(?:").concat(token.pattern,"))*)").concat(suffix,")").concat(mod)}else route+="(?:".concat(prefix,"(").concat(token.pattern,")").concat(suffix,")").concat(token.modifier);else{if(token.modifier==="+"||token.modifier==="*")throw new TypeError('Can not repeat "'.concat(token.name,'" without a prefix and suffix'));route+="(".concat(token.pattern,")").concat(token.modifier)}else route+="(?:".concat(prefix).concat(suffix,")").concat(token.modifier)}}if(end)strict||(route+="".concat(delimiterRe,"?")),route+=options.endsWith?"(?=".concat(endsWithRe,")"):"$";else{var endToken=tokens[tokens.length-1],isEndDelimited=typeof endToken=="string"?delimiterRe.indexOf(endToken[endToken.length-1])>-1:endToken===void 0;strict||(route+="(?:".concat(delimiterRe,"(?=").concat(endsWithRe,"))?")),isEndDelimited||(route+="(?=".concat(delimiterRe,"|").concat(endsWithRe,")"))}return new RegExp(route,flags(options))}exports.tokensToRegexp=tokensToRegexp;function pathToRegexp2(path,keys,options){return path instanceof RegExp?regexpToRegexp(path,keys):Array.isArray(path)?arrayToRegexp(path,keys,options):stringToRegexp(path,keys,options)}exports.pathToRegexp=pathToRegexp2}});var require_superstatic=__commonJS({"../../packages/routing-utils/dist/superstatic.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),superstatic_exports={};__export(superstatic_exports,{collectHasSegments:()=>collectHasSegments,compilePathToRegexpTemplate:()=>compilePathToRegexpTemplate2,convertCleanUrls:()=>convertCleanUrls,convertHeaders:()=>convertHeaders,convertRedirects:()=>convertRedirects,convertRewrites:()=>convertRewrites2,convertTrailingSlash:()=>convertTrailingSlash,getCleanUrls:()=>getCleanUrls2,pathToRegexp:()=>pathToRegexp2,sourceToRegex:()=>sourceToRegex2});module.exports=__toCommonJS(superstatic_exports);var import_url=__require("url"),import_path_to_regexp=require_dist(),import_path_to_regexp_updated=require_dist2();function cloneKeys(keys){if(!(typeof keys>"u"))return keys.slice(0)}function compareKeys(left,right){let leftSerialized=typeof left>"u"?"undefined":left.toString(),rightSerialized=typeof right>"u"?"undefined":right.toString();return leftSerialized===rightSerialized}function pathToRegexp2(callerId,path,keys,options){let newKeys=cloneKeys(keys),currentRegExp=(0,import_path_to_regexp.pathToRegexp)(path,keys,options);try{let currentKeys=keys,newRegExp=(0,import_path_to_regexp_updated.pathToRegexp)(path,newKeys,options),isDiffRegExp=currentRegExp.toString()!==newRegExp.toString();if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffRegExp){let message=JSON.stringify({path,currentRegExp:currentRegExp.toString(),newRegExp:newRegExp.toString()});console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`)}let isDiffKeys=!compareKeys(keys,newKeys);if(process.env.FORCE_PATH_TO_REGEXP_LOG||isDiffKeys){let message=JSON.stringify({isDiffKeys,currentKeys,newKeys});console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`)}}catch(err){let message=JSON.stringify({path,error:err.message});console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${message}`)}return currentRegExp}var UN_NAMED_SEGMENT="__UN_NAMED_SEGMENT__";function getCleanUrls2(filePaths){return filePaths.map(toRoute).filter(f=>f.endsWith(".html")).map(f=>({html:f,clean:f.slice(0,-5)}))}function convertCleanUrls(cleanUrls,trailingSlash,status=308){let routes=[];if(cleanUrls){let loc=trailingSlash?"/$1/":"/$1";routes.push({src:"^/(?:(.+)/)?index(?:\\.html)?/?$",headers:{Location:loc},status}),routes.push({src:"^/(.*)\\.html/?$",headers:{Location:loc},status})}return routes}function convertRedirects(redirects,defaultStatus=308){return redirects.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let loc=replaceSegments(segments,hasSegments,r.destination,!0),status;typeof r.permanent=="boolean"?status=r.permanent?308:307:r.statusCode?status=r.statusCode:status=defaultStatus;let route={src,headers:{Location:loc},status};return typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),route}catch{throw new Error(`Failed to parse redirect: ${JSON.stringify(r)}`)}})}function convertRewrites2(rewrites,internalParamNames){return rewrites.map(r=>{let{src,segments}=sourceToRegex2(r.source),hasSegments=collectHasSegments(r.has);normalizeHasKeys(r.has),normalizeHasKeys(r.missing);try{let interpolate=value=>replaceSegments(segments,hasSegments,value,!1,internalParamNames),route;if(typeof r.destination=="string")route={src,dest:interpolate(r.destination),check:!0};else{let destination={...r.destination,type:"service"};typeof destination.path=="string"&&(destination.path=interpolate(destination.path)),route={src,destination}}return r.transforms&&(route.transforms=r.transforms.map(transform=>transform.type!=="request.path"?{...transform}:{...transform,args:compilePathToRegexpTemplateFromSegments(transform.args,segments,hasSegments,transform.env)})),typeof r.env<"u"&&(route.env=r.env),r.has&&(route.has=r.has),r.missing&&(route.missing=r.missing),r.statusCode&&(route.status=r.statusCode),route}catch{throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`)}})}function convertHeaders(headers){return headers.map(h=>{let obj={},{src,segments}=sourceToRegex2(h.source),hasSegments=collectHasSegments(h.has);normalizeHasKeys(h.has),normalizeHasKeys(h.missing);let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT),indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasSegments.forEach(name=>{indexes[name]="$"+name}),h.headers.forEach(({key,value})=>{(namedSegments.length>0||hasSegments.length>0)&&(key.includes(":")&&(key=safelyCompile(key,indexes)),value.includes(":")&&(value=safelyCompile(value,indexes))),obj[key]=value});let route={src,headers:obj,continue:!0};return h.has&&(route.has=h.has),h.missing&&(route.missing=h.missing),route})}function convertTrailingSlash(enable,status=308){let routes=[];return enable?(routes.push({src:"^/\\.well-known(?:/.*)?$"}),routes.push({src:"^/((?:[^/]+/)*[^/\\.]+)$",headers:{Location:"/$1/"},status}),routes.push({src:"^/((?:[^/]+/)*[^/]+\\.\\w+)/$",headers:{Location:"/$1"},status})):routes.push({src:"^/(.*)\\/$",headers:{Location:"/$1"},status}),routes}function sourceToRegex2(source){let keys=[],r=pathToRegexp2("632",source,keys,{strict:!0,sensitive:!0,delimiter:"/"}),segments=keys.map(k=>k.name).map(name=>typeof name!="string"?UN_NAMED_SEGMENT:name);return{src:r.source,segments}}var namedGroupsRegex=/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g,normalizeHasKeys=(hasItems=[])=>{for(let hasItem of hasItems)"key"in hasItem&&hasItem.type==="header"&&(hasItem.key=hasItem.key.toLowerCase());return hasItems};function getStringValueForRegex(value){return typeof value=="string"?value:value&&typeof value=="object"&&value!==null&&"re"in value&&typeof value.re=="string"?value.re:null}function collectHasSegments(has){let hasSegments=new Set;for(let hasItem of has||[]){!hasItem.value&&"key"in hasItem&&hasSegments.add(hasItem.key);let stringValue=getStringValueForRegex(hasItem.value);if(stringValue){for(let match of stringValue.matchAll(namedGroupsRegex))match[1]&&hasSegments.add(match[1]);hasItem.type==="host"&&hasSegments.add("host")}}return[...hasSegments]}var escapeSegment=(str,segmentName)=>str.replace(new RegExp(`:${segmentName}`,"g"),`__ESC_COLON_${segmentName}`),unescapeSegments=str=>str.replace(/__ESC_COLON_/gi,":"),pathTemplateSegmentNameRegex=/^([a-zA-Z_][a-zA-Z0-9_]*)/;function isEscaped(value,index){let backslashCount=0;for(let i=index-1;i>=0&&value[i]==="\\";i--)backslashCount++;return backslashCount%2===1}function collectPathTemplateSegments(template){let segments=[];for(let i=0;i<template.length;i++){if(template[i]!==":"||isEscaped(template,i))continue;let match=template.slice(i+1).match(pathTemplateSegmentNameRegex);match&&(segments.push(match[1]),i+=match[1].length)}return segments}function collectNamedDollarReferences(template){let references=[];for(let i=0;i<template.length;i++){if(template[i]!=="$"||isEscaped(template,i))continue;let remainder=template.slice(i+1),bracedMatch=remainder.match(/^\{([a-zA-Z_][a-zA-Z0-9_]*)\}/),unbracedMatch=remainder.match(pathTemplateSegmentNameRegex),name=bracedMatch?.[1]||unbracedMatch?.[1];name&&references.push(name)}return references}function compilePathToRegexpTemplateFromSegments(template,segments,hasItemSegments,env=[]){let indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index)}),hasItemSegments.forEach(name=>{indexes[name]=`$${name}`});for(let name of collectPathTemplateSegments(template))if(!(name in indexes))throw new Error(`Path template references parameter ":${name}" that is not present in the source or has conditions.`);let routeParameters=new Set([...segments.filter(name=>name!==UN_NAMED_SEGMENT),...hasItemSegments]);for(let name of collectNamedDollarReferences(template))if(routeParameters.has(name)&&!env.includes(name))throw new Error(`Path template references route parameter "${name}" as \`$${name}\`. Use \`:${name}\` path-to-regexp syntax in high-level rewrites, or list "${name}" in the transform env allowlist if it is an environment variable.`);return safelyCompile(template,indexes,!0)}function compilePathToRegexpTemplate2(source,template,has,env){let{segments}=sourceToRegex2(source);return compilePathToRegexpTemplateFromSegments(template,segments,collectHasSegments(has),env)}function replaceSegments(segments,hasItemSegments,destination,isRedirect,internalParamNames){let namedSegments=segments.filter(name=>name!==UN_NAMED_SEGMENT);if(!(destination.includes(":")&&namedSegments.length>0||hasItemSegments.length>0||!isRedirect))return destination;let escapedDestination=destination,indexes={};segments.forEach((name,index)=>{indexes[name]=toSegmentDest(index),escapedDestination=escapeSegment(escapedDestination,name)}),hasItemSegments.forEach(name=>{indexes[name]="$"+name,escapedDestination=escapeSegment(escapedDestination,name)});let parsedDestination=(0,import_url.parse)(escapedDestination,!0);delete parsedDestination.href,delete parsedDestination.path,delete parsedDestination.search,delete parsedDestination.host;let{pathname,hash,query,hostname,...rest}=parsedDestination;pathname=unescapeSegments(pathname||""),hash=unescapeSegments(hash||""),hostname=unescapeSegments(hostname||"");let destParams=new Set,pathnameKeys=[],hashKeys=[],hostnameKeys=[];try{pathToRegexp2("528",pathname,pathnameKeys),pathToRegexp2("834",hash||"",hashKeys),pathToRegexp2("712",hostname||"",hostnameKeys)}catch{}destParams=new Set([...pathnameKeys,...hashKeys,...hostnameKeys].map(key=>key.name).filter(val=>typeof val=="string")),pathname=safelyCompile(pathname,indexes,!0),hash=hash?safelyCompile(hash,indexes,!0):null,hostname=hostname?safelyCompile(hostname,indexes,!0):null;for(let[key,strOrArray]of Object.entries(query))Array.isArray(strOrArray)?query[key]=strOrArray.map(str=>safelyCompile(unescapeSegments(str),indexes,!0)):query[key]=safelyCompile(unescapeSegments(strOrArray),indexes,!0);let paramKeys=Object.keys(indexes);if(!isRedirect&&!paramKeys.some(param=>!(internalParamNames&&internalParamNames.includes(param))&&destParams.has(param)))for(let param of paramKeys)!(param in query)&&param!==UN_NAMED_SEGMENT&&(query[param]=indexes[param]);return destination=(0,import_url.format)({...rest,hostname,pathname,query,hash}),destination.replace(/%24/g,"$")}function safelyCompile(value,indexes,attemptDirectCompile){if(!value)return value;if(attemptDirectCompile)try{return(0,import_path_to_regexp.compile)(value,{validate:!1})(indexes)}catch{}for(let key of Object.keys(indexes))value.includes(`:${key}`)&&(value=value.replace(new RegExp(`:${key}\\*`,"g"),`:${key}--ESCAPED_PARAM_ASTERISK`).replace(new RegExp(`:${key}\\?`,"g"),`:${key}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${key}\\+`,"g"),`:${key}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${key}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${key}`));return value=value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISK/g,"*"),(0,import_path_to_regexp.compile)(`/${value}`,{validate:!1})(indexes).slice(1)}function toSegmentDest(index){return"$"+(index+1).toString()}function toRoute(filePath){return filePath.startsWith("/")?filePath:"/"+filePath}}});var require_append=__commonJS({"../../packages/routing-utils/dist/append.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),append_exports={};__export(append_exports,{appendRoutesToPhase:()=>appendRoutesToPhase2});module.exports=__toCommonJS(append_exports);var import_index=require_dist3();function appendRoutesToPhase2({routes:prevRoutes,newRoutes,phase}){let routes=prevRoutes?[...prevRoutes]:[];if(newRoutes===null||newRoutes.length===0)return routes;let isInPhase=!1,insertIndex=-1;if(routes.forEach((r,i)=>{(0,import_index.isHandler)(r)&&(r.handle===phase?isInPhase=!0:isInPhase&&(insertIndex=i,isInPhase=!1))}),isInPhase)routes.push(...newRoutes);else if(phase===null){let lastPhase=routes.findIndex(r=>(0,import_index.isHandler)(r)&&r.handle);lastPhase===-1?routes.push(...newRoutes):routes.splice(lastPhase,0,...newRoutes)}else insertIndex>-1?routes.splice(insertIndex,0,...newRoutes):(routes.push({handle:phase}),routes.push(...newRoutes));return routes}}});var require_merge=__commonJS({"../../packages/routing-utils/dist/merge.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),merge_exports={};__export(merge_exports,{mergeRoutes:()=>mergeRoutes2});module.exports=__toCommonJS(merge_exports);var import_index=require_dist3();function getBuilderRoutesMapping(builds){let builderRoutes={};for(let{entrypoint,routes,use}of builds)routes&&(builderRoutes[entrypoint]||(builderRoutes[entrypoint]={}),builderRoutes[entrypoint][use]=routes);return builderRoutes}function addToHandleMap(path,routesMapping,handleMap){let br=routesMapping[path];Object.keys(br).sort().forEach(use=>{let prevHandle=null;br[use].forEach(route=>{if((0,import_index.isHandler)(route))prevHandle=route.handle;else{let routes=handleMap.get(prevHandle);routes?routes.push(route):handleMap.set(prevHandle,[route])}})})}function getCheckAndContinue(routes){let checks=[],continues=[],others=[];for(let route of routes){if((0,import_index.isHandler)(route))throw new Error(`Unexpected route found in getCheckAndContinue(): ${JSON.stringify(route)}`);route.check&&!route.override?checks.push(route):route.continue&&!route.override?continues.push(route):others.push(route)}return{checks,continues,others}}function mergeRoutes2({userRoutes,builds}){let userHandleMap=new Map,userPrevHandle=null;(userRoutes||[]).forEach(route=>{if((0,import_index.isHandler)(route))userPrevHandle=route.handle;else{let routes=userHandleMap.get(userPrevHandle);routes?routes.push(route):userHandleMap.set(userPrevHandle,[route])}});let projectHandleMap=new Map,projectMiddlewareRoutes=getBuilderRoutesMapping(builds.filter(b=>b.projectMiddleware));Object.keys(projectMiddlewareRoutes).sort().forEach(path=>addToHandleMap(path,projectMiddlewareRoutes,projectHandleMap));let builderHandleMap=new Map,builderRoutes=getBuilderRoutesMapping(builds.filter(b=>!b.projectMiddleware));Object.keys(builderRoutes).sort().forEach(path=>addToHandleMap(path,builderRoutes,builderHandleMap));let outputRoutes=[],uniqueHandleValues=new Set([null,...userHandleMap.keys(),...projectHandleMap.keys(),...builderHandleMap.keys()]);for(let handle of uniqueHandleValues){let userRoutes2=userHandleMap.get(handle)||[],projectRoutes=projectHandleMap.get(handle)||[],builderRoutes2=builderHandleMap.get(handle)||[],builderSorted=getCheckAndContinue(builderRoutes2);handle!==null&&(userRoutes2.length>0||projectRoutes.length>0||builderRoutes2.length>0)&&outputRoutes.push({handle}),outputRoutes.push(...builderSorted.continues),outputRoutes.push(...userRoutes2),outputRoutes.push(...projectRoutes),outputRoutes.push(...builderSorted.checks),outputRoutes.push(...builderSorted.others)}return outputRoutes}}});var require_service_route_ownership=__commonJS({"../../packages/routing-utils/dist/service-route-ownership.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),service_route_ownership_exports={};__export(service_route_ownership_exports,{getOwnershipGuard:()=>getOwnershipGuard2,normalizeRoutePrefix:()=>normalizeRoutePrefix2,scopeRouteSourceToOwnership:()=>scopeRouteSourceToOwnership2});module.exports=__toCommonJS(service_route_ownership_exports);function normalizeRoutePrefix2(routePrefix){let normalized=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;return normalized!=="/"&&normalized.endsWith("/")&&(normalized=normalized.slice(0,-1)),normalized||"/"}function escapeForRegex(value){return value.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}function toPrefixMatcher(routePrefix){return`${escapeForRegex(routePrefix)}(?:/|$)`}function isDescendantPrefix(candidate,prefix){return candidate!==prefix&&candidate.startsWith(`${prefix}/`)}function getOwnershipGuard2(ownerPrefix,allRoutePrefixes){let owner=normalizeRoutePrefix2(ownerPrefix),nonRootPrefixes=Array.from(new Set(allRoutePrefixes.map(normalizeRoutePrefix2))).filter(prefix=>prefix!=="/").sort((a,b)=>b.length-a.length);if(owner==="/")return nonRootPrefixes.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");let descendants=nonRootPrefixes.filter(prefix=>isDescendantPrefix(prefix,owner)),positive=`(?=${toPrefixMatcher(owner)})`,negative=descendants.map(prefix=>`(?!${toPrefixMatcher(prefix)})`).join("");return`${positive}${negative}`}function scopeRouteSourceToOwnership2(source,ownershipGuard){if(!ownershipGuard)return source;let inner=source.startsWith("^")?source.slice(1):source;return`^${ownershipGuard}(?:${inner})`}}});var require_schemas=__commonJS({"../../packages/routing-utils/dist/schemas.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schemas_exports={};__export(schemas_exports,{cleanUrlsSchema:()=>cleanUrlsSchema,hasSchema:()=>hasSchema,headersSchema:()=>headersSchema,redirectsSchema:()=>redirectsSchema,rewritesSchema:()=>rewritesSchema,routesSchema:()=>routesSchema,trailingSlashSchema:()=>trailingSlashSchema,transformsSchema:()=>transformsSchema});module.exports=__toCommonJS(schemas_exports);var mitigateSchema={description:"Mitigation action to take on a route",type:"object",additionalProperties:!1,required:["action"],properties:{action:{description:"The mitigation action to take",type:"string",enum:["challenge","deny"]}}},serviceNameSchema={description:"A service name identifier.",type:"string",minLength:1,maxLength:64,pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"},serviceDestinationSchema={description:"A service-targeted destination that delegates routing into a named service from `services`. Identified by the presence of `service`.",type:"object",additionalProperties:!1,required:["service"],properties:{type:{description:"Optional explicit format marker. The destination shape is identified by the `service` property, so `type` is no longer required. When present it must be `service`.",type:"string",enum:["service"]},service:serviceNameSchema,path:{description:"Routing-only path used to select a route inside the target service. It does not mutate the URL observed by user code.",type:"string",maxLength:4096}}},matchableValueSchema={description:"A value to match against. Can be a string (regex) or a condition operation object",anyOf:[{description:"A regular expression used to match thev value. Named groups can be used in the destination.",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},re:{description:"Regex",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]},hasSchema={description:"An array of requirements that are needed to match",type:"array",maxItems:16,items:{anyOf:[{type:"object",additionalProperties:!1,required:["type","value"],properties:{type:{description:"The type of request element to check",type:"string",enum:["host"]},value:matchableValueSchema}},{type:"object",additionalProperties:!1,required:["type","key"],properties:{type:{description:"The type of request element to check",type:"string",enum:["header","cookie","query"]},key:{description:"The name of the element contained in the particular type",type:"string",maxLength:4096},value:matchableValueSchema}}]}},transformsSchema={description:"A list of transform rules to adjust a request path, request query parameters, or request/response headers",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op"],properties:{type:{description:"The scope of the transform to apply",type:"string",enum:["request.headers","request.query","response.headers","request.path"]},op:{description:"The operation to perform on the target",type:"string",enum:["append","set","delete"]},target:{description:"The target of the transform",type:"object",required:["key"],properties:{key:{description:"A value to match against. Can be a string or a condition operation object (without regex support)",anyOf:[{description:"A valid header name (letters, numbers, hyphens, underscores)",type:"string",maxLength:4096},{description:"A condition operation object",type:"object",additionalProperties:!1,minProperties:1,properties:{eq:{description:"Equal to",anyOf:[{type:"string",maxLength:4096},{type:"number"}]},neq:{description:"Not equal",type:"string",maxLength:4096},inc:{description:"In array",type:"array",items:{type:"string",maxLength:4096}},ninc:{description:"Not in array",type:"array",items:{type:"string",maxLength:4096}},pre:{description:"Starts with",type:"string",maxLength:4096},suf:{description:"Ends with",type:"string",maxLength:4096},gt:{description:"Greater than",type:"number"},gte:{description:"Greater than or equal to",type:"number"},lt:{description:"Less than",type:"number"},lte:{description:"Less than or equal to",type:"number"}}}]}}},args:{description:"The arguments to the operation",anyOf:[{type:"string",maxLength:4096},{type:"array",minItems:1,items:{type:"string",maxLength:4096}}]},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},fallback:{description:"Keep an earlier runtime-visible request path when one is already set",type:"boolean"}},allOf:[{if:{properties:{op:{enum:["append","set"]}}},then:{required:["args"]}},{if:{allOf:[{properties:{type:{enum:["request.headers","response.headers"]}}},{properties:{op:{enum:["set","append"]}}}]},then:{properties:{target:{properties:{key:{if:{type:"string"},then:{pattern:"^[a-zA-Z0-9_-]+$"}}}},args:{anyOf:[{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"},{type:"array",items:{type:"string",pattern:"^[a-zA-Z0-9_ :;.,\"'?!(){}\\[\\]@<>=+*#$&`|~\\^%/-]+$"}}]}}}},{if:{required:["type"],properties:{type:{enum:["request.headers","request.query","response.headers"]}}},then:{required:["target"]}},{if:{required:["type"],properties:{type:{enum:["request.path"]}}},then:{required:["args"],not:{required:["target"]},properties:{op:{enum:["set"]},args:{description:"The runtime-visible request path. Must be an origin-form path without query or fragment.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"}}}},{if:{required:["fallback"]},then:{properties:{type:{enum:["request.path"]}}}}]}},rewriteTransformsSchema={description:"A list of request path transforms using path-to-regexp parameters.",type:"array",minItems:1,items:{type:"object",additionalProperties:!1,required:["type","op","args"],properties:{type:{description:"The request path to expose to the target runtime",type:"string",enum:["request.path"]},op:{description:"Replace the runtime-visible request path",type:"string",enum:["set"]},args:{description:"An origin-form request path. Route parameters use path-to-regexp syntax such as `/:path*`.",type:"string",maxLength:2048,pattern:"^/(?!/)(?!.*[?#\\s\\x00-\\x1F\\x7F]).*$"},env:{description:"An array of environment variable names that should be replaced at runtime in the args value",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},fallback:{description:"Keep an earlier runtime-visible request path when one is already set",type:"boolean"}}}},routesSchema={type:"array",description:"A list of routes objects used to rewrite paths to point towards other internal or external paths",example:[{dest:"https://docs.example.com",src:"/docs"}],items:{anyOf:[{type:"object",anyOf:[{required:["src"]},{required:["source"]}],additionalProperties:!1,properties:{src:{type:"string",maxLength:4096},source:{type:"string",maxLength:4096},dest:{type:"string",maxLength:4096},destination:{anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},headers:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:32768}}},methods:{type:"array",maxItems:10,items:{type:"string",maxLength:32}},caseSensitive:{type:"boolean"},important:{deprecated:!0,type:"boolean"},user:{type:"boolean"},continue:{type:"boolean"},override:{deprecated:!0,type:"boolean"},check:{type:"boolean"},isInternal:{type:"boolean"},status:{type:"integer",minimum:100,maximum:999},statusCode:{type:"integer",minimum:100,maximum:999},locale:{type:"object",additionalProperties:!1,minProperties:1,properties:{redirect:{type:"object",additionalProperties:!1,minProperties:1,maxProperties:100,patternProperties:{"^.{1,256}$":{type:"string",maxLength:4096}}},value:{type:"string",maxLength:4096},path:{type:"string",maxLength:4096},cookie:{type:"string",maxLength:4096},default:{type:"string",maxLength:4096}}},middleware:{type:"number"},middlewarePath:{type:"string"},middlewareRawSrc:{type:"array",items:{type:"string"}},has:hasSchema,missing:hasSchema,mitigate:mitigateSchema,transforms:transformsSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination or headers",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}},{type:"object",deprecated:!0,required:["handle"],additionalProperties:!1,properties:{handle:{type:"string",maxLength:32,enum:["error","filesystem","hit","miss","resource","rewrite"]}}}]}},rewritesSchema={type:"array",maxItems:2048,description:"A list of rewrite definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring).",type:"string",maxLength:4096},destination:{description:"An absolute pathname to an existing resource, an external URL, or a service-targeted destination object.",anyOf:[{type:"string",maxLength:4096},serviceDestinationSchema]},transforms:rewriteTransformsSchema,has:hasSchema,missing:hasSchema,statusCode:{description:"An optional integer to override the status code of the response.",type:"integer",minimum:100,maximum:999},env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}},respectOriginCacheControl:{description:"When set to true (default), external rewrites will respect the Cache-Control header from the origin. When false, caching is disabled for this rewrite.",type:"boolean"}}}},redirectsSchema={title:"Redirects",type:"array",maxItems:2048,description:"A list of redirect definitions.",items:{type:"object",additionalProperties:!1,required:["source","destination"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring) or a full URL including domain.",type:"string",maxLength:4096},destination:{description:"A location destination defined as an absolute pathname or external URL.",type:"string",maxLength:4096},permanent:{description:"A boolean to toggle between permanent and temporary redirect. When `true`, the status code is `308`. When `false` the status code is `307`.",type:"boolean"},statusCode:{description:"An optional integer to define the status code of the redirect.",private:!0,type:"integer",minimum:100,maximum:999},has:hasSchema,missing:hasSchema,env:{description:"An array of environment variable names that should be replaced at runtime in the destination",type:"array",minItems:1,maxItems:64,items:{type:"string",maxLength:256}}}}},headersSchema={type:"array",maxItems:2048,description:"A list of header definitions.",items:{type:"object",additionalProperties:!1,required:["source","headers"],properties:{source:{description:"A pattern that matches each incoming pathname (excluding querystring)",type:"string",maxLength:4096},headers:{description:"An array of key/value pairs representing each response header.",type:"array",maxItems:1024,items:{type:"object",additionalProperties:!1,required:["key","value"],properties:{key:{type:"string",maxLength:4096},value:{type:"string",maxLength:32768}}}},has:hasSchema,missing:hasSchema}}},cleanUrlsSchema={description:"When set to `true`, all HTML files and Serverless Functions will have their extension removed. When visiting a path that ends with the extension, a 308 response will redirect the client to the extensionless path.",type:"boolean"},trailingSlashSchema={description:"When `false`, visiting a path that ends with a forward slash will respond with a `308` status code and redirect to the path without the trailing slash.",type:"boolean"}}});var require_types=__commonJS({"../../packages/routing-utils/dist/types.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),types_exports={};module.exports=__toCommonJS(types_exports)}});var require_dist3=__commonJS({"../../packages/routing-utils/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{appendRoutesToPhase:()=>import_append.appendRoutesToPhase,compilePathToRegexpTemplate:()=>import_superstatic2.compilePathToRegexpTemplate,convertRewrites:()=>import_superstatic2.convertRewrites,getCleanUrls:()=>import_superstatic2.getCleanUrls,getOwnershipGuard:()=>import_service_route_ownership.getOwnershipGuard,getTransformedRoutes:()=>getTransformedRoutes,isHandler:()=>isHandler,isValidHandleValue:()=>isValidHandleValue,mergeRoutes:()=>import_merge.mergeRoutes,normalizeRoutePrefix:()=>import_service_route_ownership.normalizeRoutePrefix,normalizeRoutes:()=>normalizeRoutes,pathToRegexp:()=>import_superstatic2.pathToRegexp,scopeRouteSourceToOwnership:()=>import_service_route_ownership.scopeRouteSourceToOwnership,sourceToRegex:()=>import_superstatic2.sourceToRegex});module.exports=__toCommonJS(src_exports);var import_url=__require("url"),import_superstatic=require_superstatic(),import_append=require_append(),import_merge=require_merge(),import_service_route_ownership=require_service_route_ownership();__reExport(src_exports,require_schemas(),module.exports);var import_superstatic2=require_superstatic();__reExport(src_exports,require_types(),module.exports);var VALID_HANDLE_VALUES=["filesystem","hit","miss","rewrite","error","resource"],validHandleValues=new Set(VALID_HANDLE_VALUES);function isHandler(route){return typeof route.handle<"u"}function isValidHandleValue(handle){return validHandleValues.has(handle)}function convertRouteAliases(route,index){if(route.source!==void 0){if(route.src!==void 0)throw new Error(`Route at index ${index} cannot define both \`src\` and \`source\`. Please use only one.`);route.src=route.source,delete route.source}if(route.destination!==void 0){if(route.dest!==void 0)throw new Error(`Route at index ${index} cannot define both \`dest\` and \`destination\`. Please use only one.`);typeof route.destination=="string"?(route.dest=route.destination,delete route.destination):typeof route.destination.service=="string"&&(route.destination={...route.destination,type:"service"})}if(route.statusCode!==void 0){if(route.status!==void 0)throw new Error(`Route at index ${index} cannot define both \`status\` and \`statusCode\`. Please use only one.`);route.status=route.statusCode,delete route.statusCode}}function normalizeRoutes(inputRoutes){if(!inputRoutes||inputRoutes.length===0)return{routes:inputRoutes,error:null};let routes=[],handling=[],errors=[];inputRoutes.forEach((r,i)=>{let route={...r};if(routes.push(route),!isHandler(route))try{convertRouteAliases(route,i)}catch(err){errors.push(err.message)}let keys=Object.keys(route);if(isHandler(route)){let{handle}=route;if(keys.length!==1){let unknownProp=keys.find(prop=>prop!=="handle");errors.push(`Route at index ${i} has unknown property \`${unknownProp}\`.`)}else isValidHandleValue(handle)?handling.includes(handle)?errors.push(`Route at index ${i} is a duplicate. Please use one \`handle: ${handle}\` at most.`):handling.push(handle):errors.push(`Route at index ${i} has unknown handle value \`handle: ${handle}\`.`)}else if(route.src){route.src.startsWith("^")||(route.src=`^${route.src}`),route.src.endsWith("$")||(route.src=`${route.src}$`),route.src=route.src.replace(/\\\//g,"/");let regError=checkRegexSyntax("Route",i,route.src);regError&&errors.push(regError),route.destination&&typeof route.destination=="object"&&route.continue&&errors.push(`Route at index ${i} cannot define \`continue: true\` with a service \`destination\`. The service handoff is terminal.`);let handleValue=handling[handling.length-1];handleValue==="hit"?(route.dest&&errors.push(`Route at index ${i} cannot define \`dest\`/\`destination\` after \`handle: hit\`.`),route.status&&errors.push(`Route at index ${i} cannot define \`status\`/\`statusCode\` after \`handle: hit\`.`),route.continue||errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: hit\`.`)):handleValue==="miss"&&(route.dest&&!route.check?errors.push(`Route at index ${i} must define \`check: true\` after \`handle: miss\`.`):!route.dest&&!route.continue&&errors.push(`Route at index ${i} must define \`continue: true\` after \`handle: miss\`.`))}else errors.push(`Route at index ${i} must define either \`src\` or \`source\` property.`)});let error=errors.length>0?createError("invalid_route",errors,"https://vercel.link/routes-json","Learn More"):null;return{routes,error}}function checkRegexSyntax(type,index,src){try{new RegExp(src)}catch{return`${type} at index ${index} has invalid \`${type==="Route"?"src`/`source":"source"}\` regular expression "${src}".`}return null}function checkPatternSyntax(type,index,{source,destination,has,transforms}){let sourceSegments=new Set,destinationSegments=new Set;try{sourceSegments=new Set((0,import_superstatic.sourceToRegex)(source).segments)}catch{return{message:`${type} at index ${index} has invalid \`source\` pattern "${source}".`,link:"https://vercel.link/invalid-route-source-pattern"}}let destinationString=typeof destination=="string"?destination:typeof destination?.path=="string"?destination.path:void 0;if(destinationString!==void 0){try{let{hostname,pathname,query}=(0,import_url.parse)(destinationString,!0);(0,import_superstatic.sourceToRegex)(hostname||"").segments.forEach(name=>destinationSegments.add(name)),(0,import_superstatic.sourceToRegex)(pathname||"").segments.forEach(name=>destinationSegments.add(name));for(let strOrArray of Object.values(query)){let value=Array.isArray(strOrArray)?strOrArray[0]:strOrArray;(0,import_superstatic.sourceToRegex)(value||"").segments.forEach(name=>destinationSegments.add(name))}}catch{}let hasSegments=(0,import_superstatic.collectHasSegments)(has);for(let segment of destinationSegments)if(!sourceSegments.has(segment)&&!hasSegments.includes(segment))return{message:`${type} at index ${index} has segment ":${segment}" in \`destination\` property but not in \`source\` or \`has\` property.`,link:"https://vercel.link/invalid-route-destination-segment"}}for(let transform of transforms||[])if(transform.type==="request.path")try{(0,import_superstatic.compilePathToRegexpTemplate)(source,transform.args,has,transform.env)}catch(error){return{message:`${type} at index ${index} has an invalid \`request.path\` transform: ${error instanceof Error?error.message:String(error)}`,link:"https://vercel.link/invalid-route-destination-segment"}}return null}function checkRedirect(r,index){return typeof r.permanent<"u"&&typeof r.statusCode<"u"?`Redirect at index ${index} cannot define both \`permanent\` and \`statusCode\` properties.`:null}function createError(code,allErrors,link,action){let errors=Array.isArray(allErrors)?allErrors:[allErrors],message=errors[0];return{name:"RouteApiError",code,message,link,action,errors}}function notEmpty(value){return value!=null}function getTransformedRoutes(vercelConfig){let{cleanUrls,rewrites,redirects,headers,trailingSlash}=vercelConfig,{routes:userRoutes=null}=vercelConfig,routes=null;if(typeof cleanUrls<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertCleanUrls)(cleanUrls,trailingSlash));if(normalized.error)return normalized.error.code="invalid_clean_urls",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof trailingSlash<"u"){let normalized=normalizeRoutes((0,import_superstatic.convertTrailingSlash)(trailingSlash));if(normalized.error)return normalized.error.code="invalid_trailing_slash",{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(userRoutes){let normalized=normalizeRoutes(userRoutes);if(normalized.error)return{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof redirects<"u"){let code="invalid_redirect",regexErrorMessage=redirects.map((r,i)=>checkRegexSyntax("Redirect",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError("invalid_redirect",regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=redirects.map((r,i)=>checkPatternSyntax("Redirect",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let redirectErrorMessage=redirects.map(checkRedirect).find(notEmpty);if(redirectErrorMessage)return{routes,error:createError(code,redirectErrorMessage,"https://vercel.link/redirects-json","Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRedirects)(redirects));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof headers<"u"){let code="invalid_header",regexErrorMessage=headers.map((r,i)=>checkRegexSyntax("Header",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=headers.map((r,i)=>checkPatternSyntax("Header",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertHeaders)(headers));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push(...normalized.routes||[])}if(typeof rewrites<"u"){let code="invalid_rewrite",regexErrorMessage=rewrites.map((r,i)=>checkRegexSyntax("Rewrite",i,r.source)).find(notEmpty);if(regexErrorMessage)return{routes,error:createError(code,regexErrorMessage,"https://vercel.link/invalid-route-source-pattern","Learn More")};let patternError=rewrites.map((r,i)=>checkPatternSyntax("Rewrite",i,r)).find(notEmpty);if(patternError)return{routes,error:createError(code,patternError.message,patternError.link,"Learn More")};let normalized=normalizeRoutes((0,import_superstatic.convertRewrites)(rewrites));if(normalized.error)return normalized.error.code=code,{routes,error:normalized.error};routes=routes||[],routes.push({handle:"filesystem"}),routes.push(...normalized.routes||[])}return{routes,error:null}}}});export{require_dist3 as require_dist};