hyperframes 0.9.51 → 0.9.53

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 (289) hide show
  1. package/dist/{add-SERNROOY.js → add-TZFSLV5M.js} +21 -16
  2. package/dist/{agentPromptGenerator-GVWX5P55.js → agentPromptGenerator-OPQZUVYC.js} +12 -17
  3. package/dist/{animatedGifPrep-53UU67BG.js → animatedGifPrep-DEK4XZYT.js} +15 -16
  4. package/dist/api.js +46 -46
  5. package/dist/{asset-MCBHJZCT.js → asset-3BIBG7LB.js} +2 -2
  6. package/dist/{assetCataloger-4DS44LB2.js → assetCataloger-R4NWWO4P.js} +13 -13
  7. package/dist/{audio-RCVQDNXZ.js → audio-N3DHNT3F.js} +38 -31
  8. package/dist/{auth-MS46YSQ5.js → auth-CBF2DVRT.js} +5 -5
  9. package/dist/{autoUpdate-KECZLRZD.js → autoUpdate-UJB4MI4Z.js} +5 -3
  10. package/dist/{avatars-VYEPMXIO.js → avatars-JVATTQYO.js} +21 -19
  11. package/dist/{backgroundChecks-HAX5LQ2L.js → backgroundChecks-R7SFELIM.js} +6 -4
  12. package/dist/backgroundChecksWorker.js +6 -5
  13. package/dist/{batchRender-VKM4E7PI.js → batchRender-D4VO4OCF.js} +26 -7
  14. package/dist/{beats-WZSPVMQ4.js → beats-UCYZ7MKK.js} +14 -14
  15. package/dist/{benchmark-O5GWBFWE.js → benchmark-3NMJO5DK.js} +31 -14
  16. package/dist/{billing-D6ZZNKPW.js → billing-76JTGOHN.js} +18 -17
  17. package/dist/{browser-YHAPXFOK.js → browser-5XXA4O25.js} +11 -11
  18. package/dist/{bundleWithLocalizedFonts-Z5IHK62J.js → bundleWithLocalizedFonts-S7DIF43W.js} +1 -1
  19. package/dist/{capture-VAY75ASS.js → capture-EV4G3SCY.js} +33 -34
  20. package/dist/{capture-5WTC5QWV.js → capture-JHMVFAUS.js} +4 -4
  21. package/dist/{captureCompositionFrame-6DCRCIKA.js → captureCompositionFrame-3M3BFHZH.js} +19 -19
  22. package/dist/{catalog-CH4H6C5E.js → catalog-WVZJ6XYV.js} +21 -16
  23. package/dist/{catch-up-KT6MHQBO.js → catch-up-FQ5KCZIH.js} +11 -11
  24. package/dist/{check-6L7IEY5U.js → check-VTUVZWCF.js} +52 -49
  25. package/dist/{checkAudio-EAM7FCLJ.js → checkAudio-FYRBXK22.js} +19 -19
  26. package/dist/{checkBrowser-IIMZI2LZ.js → checkBrowser-EJQEWSIH.js} +46 -43
  27. package/dist/{chunk-KQRSEH4X.js → chunk-2ODGEXNH.js} +4 -4
  28. package/dist/{chunk-TE3CITOB.js → chunk-2ST2FAVH.js} +2 -2
  29. package/dist/{chunk-PNJ4M4QZ.js → chunk-2YSQU74C.js} +9 -9
  30. package/dist/{chunk-XEMS4TXW.js → chunk-346RTE74.js} +1 -1
  31. package/dist/{chunk-Z46RV43W.js → chunk-35PKJPEI.js} +2 -2
  32. package/dist/{chunk-MQGRMXFN.js → chunk-365OGBQ2.js} +3 -3
  33. package/dist/chunk-3FHPYC6X.js +5069 -0
  34. package/dist/{chunk-6PXVXIC7.js → chunk-3FL7MKQH.js} +163 -60
  35. package/dist/{chunk-77KEU6NG.js → chunk-3HQ4C4HI.js} +2 -2
  36. package/dist/{chunk-K27EQ4Z4.js → chunk-43ILJV43.js} +11 -11
  37. package/dist/{chunk-FDBK2NOH.js → chunk-44OCDK5C.js} +4 -4
  38. package/dist/{chunk-RQX5C7JD.js → chunk-47IXIEBQ.js} +1 -1
  39. package/dist/{chunk-FCNMU7LC.js → chunk-4FOHO7GC.js} +1 -1
  40. package/dist/{chunk-V7M6HV23.js → chunk-4KRID4YV.js} +1 -1
  41. package/dist/{chunk-MR7VKWYT.js → chunk-4KS3GL5I.js} +1 -1
  42. package/dist/{chunk-4Q2HYZZK.js → chunk-4TJGOQER.js} +58 -3
  43. package/dist/{chunk-I4XV2UMQ.js → chunk-562X3KBJ.js} +2 -2
  44. package/dist/chunk-5A75E4OT.js +72 -0
  45. package/dist/{chunk-BPNCNZG5.js → chunk-5CRHNVJW.js} +3 -3
  46. package/dist/{chunk-22EEGJLH.js → chunk-5JOYZGHQ.js} +82 -54
  47. package/dist/{chunk-EMX4P4WP.js → chunk-5SMHNPMW.js} +2 -2
  48. package/dist/{chunk-HGDOOG4T.js → chunk-6CO6L3YP.js} +1 -1
  49. package/dist/{chunk-MP4TEYUJ.js → chunk-6EMFSRTW.js} +4 -1
  50. package/dist/{chunk-H4LCNEA2.js → chunk-6F4ZVQUX.js} +195 -128
  51. package/dist/{chunk-YRXIEP35.js → chunk-6RPLXBZJ.js} +89 -10
  52. package/dist/{chunk-7RLMDAUO.js → chunk-6T4PB35F.js} +2 -1
  53. package/dist/{chunk-VOJ3ICMF.js → chunk-7ELQHSEE.js} +1 -1
  54. package/dist/{chunk-TQMTMD72.js → chunk-7FU5JCAK.js} +1 -1
  55. package/dist/{chunk-5XSIAXIP.js → chunk-B3WRUPRS.js} +2 -2
  56. package/dist/{chunk-N5IAKDUQ.js → chunk-BCJJ64JG.js} +1 -1
  57. package/dist/{chunk-P3K7LZCY.js → chunk-BH5P5QZN.js} +4 -4
  58. package/dist/{chunk-MZD5KJDU.js → chunk-BQRJZDSM.js} +15 -15
  59. package/dist/{chunk-BQCW5T3M.js → chunk-BS36NRXV.js} +1 -1
  60. package/dist/{chunk-ACFNPUL7.js → chunk-CBV4W4R3.js} +2 -2
  61. package/dist/{chunk-UX2KMUKC.js → chunk-CTHG3WLB.js} +9 -9
  62. package/dist/{chunk-7ADDESOW.js → chunk-CYBOQOKO.js} +1 -1
  63. package/dist/{chunk-DPVXBVLL.js → chunk-DZWAYZG2.js} +6254 -6096
  64. package/dist/{chunk-COHL5422.js → chunk-E3LZAM64.js} +5 -5
  65. package/dist/{chunk-B2ZZYISD.js → chunk-ECGNWHFE.js} +29 -6
  66. package/dist/{chunk-WQ2N2AG7.js → chunk-ES273AD6.js} +3 -3
  67. package/dist/{chunk-R64WJS45.js → chunk-FH6KC5EF.js} +6 -6
  68. package/dist/{chunk-CLRM7ZI5.js → chunk-FLPVKGBS.js} +2 -2
  69. package/dist/{chunk-4ZNB3EXI.js → chunk-FM5JRUWL.js} +6 -6
  70. package/dist/{chunk-D3DY7Q6S.js → chunk-FQMP2KFS.js} +2 -2
  71. package/dist/{chunk-LJFGZKVL.js → chunk-FRM4EM52.js} +15 -15
  72. package/dist/chunk-FSBV6Z7E.js +351 -0
  73. package/dist/{chunk-U7ZCBWNM.js → chunk-FU2R6OVR.js} +3 -3
  74. package/dist/{chunk-USYPUTGC.js → chunk-FZNH7SCB.js} +1 -1
  75. package/dist/{chunk-IUIFNZTJ.js → chunk-G5FNJQER.js} +31 -27
  76. package/dist/{chunk-UZGN5MTD.js → chunk-G7GTO4YP.js} +4 -4
  77. package/dist/{chunk-WN4W76IQ.js → chunk-GDWPLGHY.js} +1 -1
  78. package/dist/{chunk-XILU2D2B.js → chunk-GVUG5VDL.js} +1 -1
  79. package/dist/{chunk-MRJQQDZR.js → chunk-GZG2Z2O2.js} +2 -2
  80. package/dist/{chunk-2BRVSU2O.js → chunk-H5K3FS4W.js} +4 -4
  81. package/dist/{chunk-MOTJT42J.js → chunk-HJ2YUPBF.js} +13 -1
  82. package/dist/{chunk-47MEWWCO.js → chunk-HY25JZQ2.js} +2 -2
  83. package/dist/{chunk-DONVZZLV.js → chunk-HYO4DIYT.js} +1 -1
  84. package/dist/{chunk-DMF4ML3Y.js → chunk-HZ2CD6RL.js} +1 -1
  85. package/dist/{chunk-2L2A2HRW.js → chunk-I7NTTMET.js} +326 -114
  86. package/dist/{chunk-PALZMYFH.js → chunk-I7SJBRVT.js} +3 -3
  87. package/dist/{chunk-YQSW3GXC.js → chunk-IB5DXMAH.js} +4 -4
  88. package/dist/{chunk-MI54IK7G.js → chunk-IEESWUIQ.js} +11 -2
  89. package/dist/{chunk-6MKM2RVL.js → chunk-IH2C53YV.js} +460 -1
  90. package/dist/{chunk-R5OSZK62.js → chunk-IH56MGAB.js} +10 -10
  91. package/dist/{chunk-6MYO2IHD.js → chunk-IHXMN5YH.js} +7 -0
  92. package/dist/{chunk-YHJOTCTV.js → chunk-IJYIIHGK.js} +10 -5
  93. package/dist/{chunk-UX2SUCRS.js → chunk-ISVRNYE5.js} +1 -1
  94. package/dist/{chunk-HZLN3V3P.js → chunk-IXUIJ7OL.js} +3 -3
  95. package/dist/chunk-JCFOSR7Z.js +181 -0
  96. package/dist/{chunk-6WHTS73J.js → chunk-JNM4WG7C.js} +1 -1
  97. package/dist/{chunk-WSZJS4QC.js → chunk-KDDRDNEE.js} +60 -9
  98. package/dist/{chunk-UAU4SIOQ.js → chunk-KEZ7QIJN.js} +6 -6
  99. package/dist/{chunk-SFJWTPOF.js → chunk-KKO4PRB5.js} +1 -1
  100. package/dist/{chunk-M3BJEZ7E.js → chunk-KPFJGQ6M.js} +45 -12
  101. package/dist/{chunk-CTRYPHSE.js → chunk-LKWN2F7O.js} +2 -2
  102. package/dist/{chunk-TJXXLWQ4.js → chunk-N2YHCAFL.js} +50 -15
  103. package/dist/{chunk-Z2EKCD7H.js → chunk-NCPSUM5A.js} +1 -1
  104. package/dist/{chunk-WIZBFUBI.js → chunk-NVGB7L2M.js} +2 -2
  105. package/dist/{chunk-GTCPI2UK.js → chunk-OLVZAALP.js} +2 -2
  106. package/dist/{chunk-UHTWJOJ6.js → chunk-OSKSTJNQ.js} +22 -3
  107. package/dist/{chunk-QUUZ2BGC.js → chunk-OUPWEFUM.js} +1 -1
  108. package/dist/{chunk-4QFWV5GQ.js → chunk-P2ZMVHTF.js} +2 -1
  109. package/dist/{chunk-T6VQGCN3.js → chunk-PPLFDG7N.js} +9 -5
  110. package/dist/{chunk-UBHBB3TB.js → chunk-PUT3NPVE.js} +43 -51
  111. package/dist/{chunk-IMNIW22F.js → chunk-PYOCEDTU.js} +2 -2
  112. package/dist/{chunk-SBQLLGXW.js → chunk-Q5P7YJXO.js} +2 -2
  113. package/dist/{chunk-XPAQK6E4.js → chunk-QBDT7Z5D.js} +38 -22
  114. package/dist/{chunk-3LIMD4YP.js → chunk-QBN2W4T3.js} +6 -8
  115. package/dist/{chunk-LOKPWAFW.js → chunk-QXYR7LOO.js} +7 -7
  116. package/dist/{chunk-BSHZIPFP.js → chunk-RH6UD7XI.js} +11 -11
  117. package/dist/{chunk-IZQDQ5AN.js → chunk-RUQ2VOD3.js} +3 -2
  118. package/dist/{chunk-FXQ5577T.js → chunk-SH6PAYUD.js} +5 -5
  119. package/dist/{chunk-WQ3WMTSS.js → chunk-SRPPNXGX.js} +3 -3
  120. package/dist/{chunk-QKCU2J2V.js → chunk-SXZMJ7QJ.js} +4 -4
  121. package/dist/{chunk-SMUNLDEY.js → chunk-T3QK3VKM.js} +1 -1
  122. package/dist/{chunk-DC7AOIHN.js → chunk-T5S7U5C6.js} +1 -1
  123. package/dist/{chunk-76HCZQ2W.js → chunk-TQKX3TA3.js} +1 -1
  124. package/dist/{chunk-ZXIWAD2G.js → chunk-TTP6JGIL.js} +2 -2
  125. package/dist/{chunk-AGTOSMG6.js → chunk-TWI33YJP.js} +1 -1
  126. package/dist/{chunk-BQWFOVLO.js → chunk-UAOL5PRX.js} +1 -1
  127. package/dist/{chunk-K4SWGMPO.js → chunk-VCHJV7ZT.js} +10 -9
  128. package/dist/{chunk-M425BL2U.js → chunk-VCKUDUPN.js} +1 -1
  129. package/dist/{chunk-3VPBUDK6.js → chunk-W6WVHIU7.js} +6 -3
  130. package/dist/{chunk-EEVDBYVF.js → chunk-WPG76RJZ.js} +1 -1
  131. package/dist/{chunk-KQFGINDM.js → chunk-XBPLO6CY.js} +384 -94
  132. package/dist/{chunk-ECJX6EJN.js → chunk-XJTFSMZK.js} +2 -2
  133. package/dist/{chunk-DP7LWIKE.js → chunk-XM7LOJBP.js} +1 -1
  134. package/dist/{chunk-ILQAOOR4.js → chunk-XZZF6YBS.js} +1 -1
  135. package/dist/{chunk-CTFMKRFI.js → chunk-Y6CLFCYX.js} +3 -3
  136. package/dist/{chunk-TQW3G23G.js → chunk-YF34MK67.js} +19 -16
  137. package/dist/{chunk-UX4HQHMS.js → chunk-YT3LRZA3.js} +12 -10
  138. package/dist/{chunk-MOR3H5FK.js → chunk-ZFCK46UR.js} +1 -1
  139. package/dist/{chunk-7DJVLFIL.js → chunk-ZI3MSFSN.js} +2 -2
  140. package/dist/{chunk-EVHZDKB2.js → chunk-ZK6BC3JM.js} +4 -4
  141. package/dist/{chunk-TDQUQAW5.js → chunk-ZPPEZJVD.js} +97 -39
  142. package/dist/{chunk-I6SCA2ME.js → chunk-ZT7RB42S.js} +43 -21
  143. package/dist/{chunk-EYXMXWME.js → chunk-ZV3RIHRN.js} +7 -7
  144. package/dist/{clean-E6CXNNF5.js → clean-KEVJGNES.js} +29 -28
  145. package/dist/cli.js +67 -66
  146. package/dist/{cloud-5C5SCK4H.js → cloud-EBJZO6ZY.js} +5 -4
  147. package/dist/{cloud-2M4WWTSQ.js → cloud-OR62JJDE.js} +4 -4
  148. package/dist/{cloudrun-EULFHQQL.js → cloudrun-HPYJTM5N.js} +9 -9
  149. package/dist/{compare-MHFCJIWI.js → compare-353XZU2M.js} +43 -41
  150. package/dist/{compiler-DUG4GFRI.js → compiler-KPDUYBA5.js} +8 -8
  151. package/dist/{component-KRPXKVZH.js → component-5DZDY74T.js} +3 -3
  152. package/dist/{compositions-MXESIGTW.js → compositions-VBICZHMF.js} +27 -20
  153. package/dist/{curve-BE2B7NIC.js → curve-KDRSQWHP.js} +18 -17
  154. package/dist/{cuts-7GJF6CE2.js → cuts-ABAQKTF4.js} +19 -18
  155. package/dist/{delete-6NUSXGFC.js → delete-BXURHIL4.js} +10 -7
  156. package/dist/{deploy-D3NO4UPN.js → deploy-4TBYCBNI.js} +7 -7
  157. package/dist/{describeProject-6Y7GXXYM.js → describeProject-K62TKQLI.js} +14 -14
  158. package/dist/{destroy-6ESKQA5T.js → destroy-FAJUHCW4.js} +6 -6
  159. package/dist/{deterministicFonts-QY4KNTOU.js → deterministicFonts-XZIQ4PNP.js} +3 -3
  160. package/dist/{diff-NB4SANJX.js → diff-4O7ZCBM5.js} +43 -41
  161. package/dist/{dist-MXWEGMRB.js → dist-AAGJ6SXG.js} +5 -5
  162. package/dist/{dist-MNFB4YKV.js → dist-D67752QW.js} +18 -18
  163. package/dist/{dist-2YJCNIWI.js → dist-F4T6FB7P.js} +6 -6
  164. package/dist/{doctor-JAZHU2BT.js → doctor-IEUIWBC5.js} +23 -18
  165. package/dist/{dotEnv-33RDHX7P.js → dotEnv-RZ52L7X3.js} +5 -4
  166. package/dist/{energy-X5E2NPBL.js → energy-BJQTVGBO.js} +19 -18
  167. package/dist/{events-JWW4ASN3.js → events-4UBI5WNS.js} +10 -10
  168. package/dist/{events-5QYPAD2S.js → events-D3NBN44E.js} +4 -4
  169. package/dist/{events-XA2QQBP7.js → events-M37XFHGJ.js} +21 -20
  170. package/dist/{execute-N7L5W7DV.js → execute-JCLM27KS.js} +36 -36
  171. package/dist/{extract-YQAMVIVK.js → extract-AYWY5PIN.js} +19 -18
  172. package/dist/{face-M7VZIIEP.js → face-TEHC6WYN.js} +20 -19
  173. package/dist/{feedback-DX6N4RT3.js → feedback-JZDCB5N4.js} +42 -30
  174. package/dist/{ffmpeg-U2UP72FB.js → ffmpeg-JMPVMPDT.js} +15 -15
  175. package/dist/{figma-BMMVU5ML.js → figma-6MYT2VRV.js} +3 -3
  176. package/dist/fontLocalizeCli.js +20 -21
  177. package/dist/{frames-XB4N4WW2.js → frames-NLFBDILH.js} +20 -19
  178. package/dist/{generate-M5ACNHVM.js → generate-YLPRVWHZ.js} +32 -30
  179. package/dist/{get-65JSCBTR.js → get-APCR6ZJE.js} +10 -7
  180. package/dist/{gpuPolicy-XC2BONM7.js → gpuPolicy-YXBUP4AF.js} +12 -12
  181. package/dist/{grade-compare-LPDDN5LL.js → grade-compare-VLWGCI4O.js} +43 -41
  182. package/dist/{gsapParser-L7TM3RGH.js → gsapParser-TSPNHW7F.js} +1 -1
  183. package/dist/hangReport.js +2 -1
  184. package/dist/{heifImagePrep-QMFBHJQG.js → heifImagePrep-UC2AV5LU.js} +16 -17
  185. package/dist/{help-VLKAJCUD.js → help-YSBTU7WC.js} +1 -1
  186. package/dist/{history-XPGU76VB.js → history-EPIGMZUN.js} +15 -14
  187. package/dist/hyperframe.manifest.json +1 -1
  188. package/dist/hyperframe.runtime.iife.js +67 -67
  189. package/dist/hyperframes-player.global.js +3 -3
  190. package/dist/{info-DGY5NFZJ.js → info-6SF6E2T3.js} +26 -20
  191. package/dist/{init-OYK5QV3A.js → init-BXS47X5W.js} +40 -38
  192. package/dist/{ink-UJ6T72I6.js → ink-BWKWSIKA.js} +19 -18
  193. package/dist/{inspect-GNE5FQDJ.js → inspect-NUE2R2OF.js} +44 -41
  194. package/dist/{installer-FI6HT2FW.js → installer-T57TKMM6.js} +7 -7
  195. package/dist/{keyframes-MFGXRBMS.js → keyframes-WCRUYIOQ.js} +19 -15
  196. package/dist/{lambda-OOESQH7O.js → lambda-L2YNMAL5.js} +18 -18
  197. package/dist/{layout-67GYUHRL.js → layout-FXTXMDAL.js} +44 -41
  198. package/dist/{lint-GW3AGJO3.js → lint-IKRYTERJ.js} +23 -17
  199. package/dist/{lintProject-G4MXY4YA.js → lintProject-2NDIJLD2.js} +6 -6
  200. package/dist/{list-FMAPGP4I.js → list-BX5SCZEC.js} +10 -7
  201. package/dist/{localPage-76LUQEMF.js → localPage-HY3VMEYU.js} +12 -12
  202. package/dist/{login-YOMRKZTT.js → login-5IDR2M6C.js} +6 -5
  203. package/dist/{logout-QGNBUJKS.js → logout-MTWA4BBI.js} +2 -1
  204. package/dist/{look-CTRMUUY6.js → look-7R4YJNX7.js} +19 -18
  205. package/dist/{manager-TMKN4DX5.js → manager-DBMIO5YG.js} +2 -2
  206. package/dist/{manager-ZNADMKUJ.js → manager-PHCAZFHT.js} +13 -13
  207. package/dist/{measure-RPPQJGKH.js → measure-7CJ4RKSY.js} +11 -11
  208. package/dist/{media-treatment-UZ4L4MDB.js → media-treatment-HEW3RMDV.js} +22 -21
  209. package/dist/{media-use-B7OLG3J3.js → media-use-S5IJPK5G.js} +11 -18
  210. package/dist/{models-ZXXLZBLQ.js → models-4UJY22Z3.js} +16 -16
  211. package/dist/{motionShot-DBW6UXTD.js → motionShot-FLZQ75TM.js} +23 -23
  212. package/dist/{normalize-audio-L4AE5ASS.js → normalize-audio-AN3KKSSK.js} +16 -16
  213. package/dist/{open-YBZJF2HO.js → open-AHPOLDBY.js} +26 -20
  214. package/dist/{parakeetRunner-ZLFQAJ45.js → parakeetRunner-4URDK3H4.js} +17 -17
  215. package/dist/{pipeline-3L4HX4CH.js → pipeline-O5UWLQDZ.js} +15 -15
  216. package/dist/{plan-R4I5XT6L.js → plan-SUV7WBBJ.js} +25 -25
  217. package/dist/{play-J54FH42B.js → play-LHMMHUUN.js} +37 -33
  218. package/dist/{preflight-SMPZLLLL.js → preflight-FLSEP55G.js} +14 -14
  219. package/dist/{present-AXOSYIJE.js → present-VEDXFFPZ.js} +31 -28
  220. package/dist/{preview-6VDMGAQI.js → preview-FXNPXOJL.js} +41 -33
  221. package/dist/privateProjectFile-NN7MTTEQ.js +50 -0
  222. package/dist/{probe-CXIQVZAM.js → probe-P6LUMX34.js} +19 -18
  223. package/dist/{producer-EQOO6NE2.js → producer-SWV2GP4I.js} +1 -1
  224. package/dist/{projectConfig-VPL64JBD.js → projectConfig-EPOIXMHL.js} +9 -9
  225. package/dist/{publicNetwork-GFQID4Q6.js → publicNetwork-GW7SVP7N.js} +3 -1
  226. package/dist/{publication-ST3VFFWM.js → publication-SIGMWEK3.js} +5 -5
  227. package/dist/{publish-DCOFEASH.js → publish-EVCYPK6H.js} +45 -32
  228. package/dist/{refresh-6ONVQ3WV.js → refresh-PIFEWEAL.js} +2 -1
  229. package/dist/{remove-background-OHGBEI7B.js → remove-background-AFXDE5YR.js} +16 -16
  230. package/dist/{render-MG5MX45D.js → render-BCKSDBLK.js} +8 -8
  231. package/dist/{render-ONBJRZRU.js → render-DFUMSKVQ.js} +65 -55
  232. package/dist/{render-CMY2ELLE.js → render-MENZ6KS5.js} +82 -50
  233. package/dist/{render-batch-C3XGAQGX.js → render-batch-DPT67NDL.js} +8 -8
  234. package/dist/renderSetupWorker.js +8 -8
  235. package/dist/{resolver-AGMKICJW.js → resolver-EE3255VM.js} +7 -7
  236. package/dist/{reverse-UIQAE3DC.js → reverse-TA73U7V6.js} +1 -1
  237. package/dist/{run-NQBD5RDR.js → run-Y2ISHW5P.js} +5 -4
  238. package/dist/{screenshotCapture-PUK46H3O.js → screenshotCapture-CEEBQ3FU.js} +14 -14
  239. package/dist/{service-HULLICEP.js → service-6P6QVFNF.js} +19 -18
  240. package/dist/{share-VKY5LLZ7.js → share-Q25X6AIX.js} +24 -23
  241. package/dist/{sherpa-WDVEYQHZ.js → sherpa-PPSJ23WI.js} +16 -16
  242. package/dist/sherpaWorker.js +2 -2
  243. package/dist/skills/hyperframes-cli/references/cloud.md +1 -1
  244. package/dist/skills/media-use/audio/references/tts.md +3 -2
  245. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +95 -15
  246. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +192 -2
  247. package/dist/skills/media-use/references/heygen.md +1 -1
  248. package/dist/{skills-6K2EZEJK.js → skills-PVJJ3R2V.js} +14 -13
  249. package/dist/{skillsUpdateCheck-UXRH4JIW.js → skillsUpdateCheck-L4TGSUN6.js} +6 -4
  250. package/dist/{snapshot-UDJB33E5.js → snapshot-AIAJRR5C.js} +93 -54
  251. package/dist/{src-6GRYTLZ5.js → src-O5P56HIK.js} +22 -14
  252. package/dist/{src-66ZYEQPG.js → src-UEH4H4UY.js} +21 -20
  253. package/dist/{start-VJPLZ7YN.js → start-HY5WGCDN.js} +30 -28
  254. package/dist/{staticProjectServer-5QU3ICQV.js → staticProjectServer-WNKXSUBZ.js} +28 -27
  255. package/dist/{status-SZ4QKSVN.js → status-AFDHSUGG.js} +21 -20
  256. package/dist/studio/assets/{hyperframes-player-i4dtJlrd.js → hyperframes-player-z7r-N5fm.js} +2 -2
  257. package/dist/studio/assets/{index-Be_pDhIw.js → index-2QPHxCxy.js} +1 -1
  258. package/dist/studio/assets/{index-CU24FmKd.css → index-CRiuMxyq.css} +1 -1
  259. package/dist/studio/assets/{index-Dvlt50yp.js → index-Dpo7Q_9-.js} +160 -160
  260. package/dist/studio/assets/index-Dv67Vrl6.js +74 -0
  261. package/dist/studio/assets/{pausedVideoDecoder-C_20YkSR.js → pausedVideoDecoder-BarDYEAf.js} +1 -1
  262. package/dist/studio/index.html +2 -2
  263. package/dist/{studio-api-OJEU24EG.js → studio-api-P72FA5XB.js} +18 -18
  264. package/dist/{studioServer-VRYGQOGN.js → studioServer-RICH4NMX.js} +81 -70
  265. package/dist/{sync-NSGF4MPJ.js → sync-J66DIXED.js} +19 -18
  266. package/dist/system-I5KGZTUG.js +1 -1
  267. package/dist/{telemetry-Q45SZSZC.js → telemetry-KOOKPGMR.js} +10 -10
  268. package/dist/{templates-X7UD7HRJ.js → templates-6DRGOTNH.js} +19 -18
  269. package/dist/{timeline-JVN34ETY.js → timeline-UZX7366C.js} +29 -28
  270. package/dist/{tokens-GWFTTI5U.js → tokens-AU3BUE6U.js} +2 -2
  271. package/dist/{transcribe-PJRBKRPT.js → transcribe-CW5HK2OA.js} +33 -32
  272. package/dist/{transcribe-7MADUIYX.js → transcribe-OUTSVFRZ.js} +15 -15
  273. package/dist/{tts-3VHEX4RB.js → tts-X3MAUZ7E.js} +1 -1
  274. package/dist/{update-D3V2PW3U.js → update-KRYJ6ACJ.js} +15 -14
  275. package/dist/{updateCheck-5G4ZILYA.js → updateCheck-WQVGQLCG.js} +5 -3
  276. package/dist/{upgrade-4BNSDRCV.js → upgrade-S54RPT3R.js} +6 -4
  277. package/dist/{urlDownloader-RLZ7H7NM.js → urlDownloader-MASRYSQX.js} +11 -11
  278. package/dist/{validate-JW6LLGWB.js → validate-4QVUHCYG.js} +36 -35
  279. package/dist/{video-WOBS7YW2.js → video-AEGOEGSP.js} +13 -13
  280. package/dist/{voices-E6WE2Q2U.js → voices-T4U7EU5X.js} +29 -27
  281. package/dist/warmCheck.js +52 -50
  282. package/dist/warmCheckClient.js +2 -1
  283. package/package.json +1 -1
  284. package/dist/chunk-DQZRNGDS.js +0 -5069
  285. package/dist/chunk-IGLEPPTN.js +0 -24
  286. package/dist/chunk-L2U4ISSS.js +0 -93
  287. package/dist/studio/assets/index-BX3KHhGX.js +0 -71
  288. package/dist/{chunk-445BBSZS.js → chunk-UMRNTF3C.js} +3 -3
  289. package/dist/{synthesize-HOLHQCR2.js → synthesize-UKCQR7WW.js} +1 -1
@@ -11,12 +11,12 @@ import {
11
11
  iterateFontFamilyDeclarations,
12
12
  normalizeSystemFontPrimaryFamilies,
13
13
  resolveFontFamilyDeclarationFamilies
14
- } from "./chunk-YRXIEP35.js";
14
+ } from "./chunk-6RPLXBZJ.js";
15
15
  import {
16
16
  Semaphore,
17
17
  prepareHeifImageInputs,
18
18
  withMediaProbeSlot
19
- } from "./chunk-WIZBFUBI.js";
19
+ } from "./chunk-NVGB7L2M.js";
20
20
  import {
21
21
  EncoderInterruptedError,
22
22
  encoderFailureError,
@@ -30,7 +30,7 @@ import {
30
30
  refusesOutsideLink,
31
31
  resolveRenderPaths,
32
32
  toExternalAssetKey
33
- } from "./chunk-EVHZDKB2.js";
33
+ } from "./chunk-ZK6BC3JM.js";
34
34
  import {
35
35
  createStudioPositionSeekReapplyScript,
36
36
  openRangeEnd,
@@ -145,6 +145,7 @@ import {
145
145
  isProresProfile,
146
146
  isSelfOrAncestorHidden,
147
147
  isTransientBrowserError,
148
+ isUrlNotPermittedError,
148
149
  isVideoFrameFormat,
149
150
  isVideoHiddenBeforeStreamStart,
150
151
  isVideoPastTimelineEnd,
@@ -164,6 +165,7 @@ import {
164
165
  parseVideoElements,
165
166
  playlistLeavesItsFolder,
166
167
  prepareCaptureSessionForReuse,
168
+ privateCacheRoot,
167
169
  probeBeginFrameLiveness,
168
170
  probeMediaProfile,
169
171
  processCompositionAudio,
@@ -184,6 +186,7 @@ import {
184
186
  resolveFrameFormat,
185
187
  resolveHeadlessShellPath,
186
188
  resolvePlayableVideoDuration,
189
+ resolveRestrictPageNetwork,
187
190
  resolveVideoExtractionWindow,
188
191
  runFfmpeg,
189
192
  runVideoExtractionWithRetry,
@@ -198,11 +201,12 @@ import {
198
201
  verifyDiskDrawElementSamples,
199
202
  videoAudioId,
200
203
  videoStartOnMediaTimeline,
201
- writeCapturedFrame
202
- } from "./chunk-KQFGINDM.js";
204
+ writeCapturedFrame,
205
+ writeUrlDownloadTelemetry
206
+ } from "./chunk-XBPLO6CY.js";
203
207
  import {
204
208
  settleOnBrowserSafePort
205
- } from "./chunk-UHTWJOJ6.js";
209
+ } from "./chunk-OSKSTJNQ.js";
206
210
  import {
207
211
  assignBundledRuntimeCompositionIds,
208
212
  boundMediaSrc,
@@ -215,7 +219,7 @@ import {
215
219
  parsesAsScript,
216
220
  prepareFlattenedInnerRoot,
217
221
  stripSdrPngColourTags
218
- } from "./chunk-UBHBB3TB.js";
222
+ } from "./chunk-PUT3NPVE.js";
219
223
  import {
220
224
  cannotHardLink,
221
225
  collectScratchLeftovers,
@@ -245,7 +249,7 @@ import {
245
249
  redactTelemetryString,
246
250
  resolveAuthoredTimingWindow,
247
251
  toFps
248
- } from "./chunk-U7ZCBWNM.js";
252
+ } from "./chunk-FU2R6OVR.js";
249
253
  import {
250
254
  CAPTURE_CANVAS_SELECTOR,
251
255
  COMPOSITION_SOURCE_URL,
@@ -281,7 +285,7 @@ import {
281
285
  sourceTimeAt,
282
286
  styleElementsFor,
283
287
  timeAtSourceTime
284
- } from "./chunk-DQZRNGDS.js";
288
+ } from "./chunk-3FHPYC6X.js";
285
289
  import {
286
290
  isPrivateFileUnder,
287
291
  isSafePath,
@@ -293,7 +297,7 @@ import {
293
297
  import {
294
298
  lintHyperframeHtml,
295
299
  resolveReferencedStart
296
- } from "./chunk-H4LCNEA2.js";
300
+ } from "./chunk-6F4ZVQUX.js";
297
301
  import {
298
302
  isUnresolvedAssetPlaceholder,
299
303
  namesAnotherNetworkRoot,
@@ -301,7 +305,7 @@ import {
301
305
  readTextFile,
302
306
  resolveCompositionSrc,
303
307
  resolveProjectRelativeSrc
304
- } from "./chunk-MP4TEYUJ.js";
308
+ } from "./chunk-6EMFSRTW.js";
305
309
  import {
306
310
  LOW_MEMORY_TOTAL_MB_THRESHOLD,
307
311
  getCgroupMemoryLimitMb,
@@ -310,22 +314,32 @@ import {
310
314
  usableCpuCount
311
315
  } from "./chunk-U3LWQGCD.js";
312
316
  import {
313
- CSS_URL_RE,
314
317
  MEDIA_START_BASIS_ATTR,
315
318
  checkSubCompositionUsability,
316
319
  compositionOriginSeconds,
320
+ cssRuleMatches,
321
+ cssUrlMatches,
317
322
  cutToHostSlots,
318
323
  decodedUrlPath,
324
+ fontFaceBlockMatches,
325
+ hasBackgroundImageDeclaration,
319
326
  hostInPointSeconds,
327
+ importRuleMatches,
320
328
  isNonRelativeUrl,
329
+ localFontFaceUrlMatches,
321
330
  readMediaStartBasis,
322
331
  readPlaybackRate,
332
+ remoteBackgroundUrlMatches,
333
+ remoteFontFaceUrlMatches,
334
+ replaceMatches,
323
335
  resolveAbsoluteMediaStartSeconds,
324
336
  rewriteAssetPath,
325
337
  rewriteAssetPaths,
326
338
  rewriteCssAssetUrls,
327
- rewriteInlineStyleAssetUrls
328
- } from "./chunk-6MKM2RVL.js";
339
+ rewriteInlineStyleAssetUrls,
340
+ styleBlockMatches,
341
+ stylesheetLinkMatches
342
+ } from "./chunk-IH2C53YV.js";
329
343
  import {
330
344
  CANVAS_DIMENSIONS,
331
345
  HTML_BODY_CSS_HEIGHT_FIRST_RE,
@@ -336,7 +350,7 @@ import {
336
350
  isAspectAgnosticResolutionAlias,
337
351
  normalizeResolutionFlag,
338
352
  suggestMatchingPreset
339
- } from "./chunk-M425BL2U.js";
353
+ } from "./chunk-VCKUDUPN.js";
340
354
  import {
341
355
  parseHTML
342
356
  } from "./chunk-GWTIFRF5.js";
@@ -521,6 +535,7 @@ var MIME_TYPES = {
521
535
  ".css": "text/css; charset=utf-8",
522
536
  ".js": "application/javascript; charset=utf-8",
523
537
  ".mjs": "application/javascript; charset=utf-8",
538
+ ".cjs": "application/javascript; charset=utf-8",
524
539
  ".json": "application/json; charset=utf-8",
525
540
  ".cube": "text/plain; charset=utf-8",
526
541
  ".png": "image/png",
@@ -1064,6 +1079,10 @@ function createFileServer(options) {
1064
1079
  const bodyScripts = options.bodyScripts ?? [buildRenderModeScript(options.fps), HF_BRIDGE_SCRIPT];
1065
1080
  const app = new Hono();
1066
1081
  const warnLeftOut = (line) => console.warn(`[FileServer] ${line}`);
1082
+ app.use(async function loadEachFileOnlyAsItsNamedType(c, next) {
1083
+ await next();
1084
+ c.res.headers.set("X-Content-Type-Options", "nosniff");
1085
+ });
1067
1086
  app.get("/*", async (c) => {
1068
1087
  let requestPath = c.req.path;
1069
1088
  if (requestPath === "/") requestPath = "/index.html";
@@ -1311,6 +1330,9 @@ import {
1311
1330
  writeFileSync
1312
1331
  } from "fs";
1313
1332
  import { basename, dirname as dirname2, isAbsolute, join as join2, relative, resolve as resolve3 } from "path";
1333
+ function audioWorkDir(workDir) {
1334
+ return join2(workDir, "audio-work");
1335
+ }
1314
1336
  var BROWSER_MEDIA_EPSILON = 1e-4;
1315
1337
  function resolveBrowserMediaEnd(start, end, duration) {
1316
1338
  return Number.isFinite(duration) && duration > 0 ? start + duration : end;
@@ -6906,10 +6928,16 @@ function normalizeCompositionSrcs(html, projectDir) {
6906
6928
  return `${name}${quote}${relative2(projectDir, file).split(sep2).join("/")}${quote}`;
6907
6929
  });
6908
6930
  }
6909
- function resolveCompositionFile(projectDir, src, assetRoot) {
6931
+ var COMPOSITION_FILE = /\.html?$/i;
6932
+ var NOT_A_COMPOSITION_FILE = "it is not an .html file, so it is refused";
6933
+ function resolveCompositionPath(projectDir, src, assetRoot) {
6910
6934
  const file = resolveCompositionSrc(projectDir, src);
6911
6935
  return file === null || escapesAssetRoot(file, assetRoot) ? null : file;
6912
6936
  }
6937
+ function resolveCompositionFile(projectDir, src, assetRoot) {
6938
+ const file = resolveCompositionPath(projectDir, src, assetRoot);
6939
+ return file !== null && COMPOSITION_FILE.test(file) ? file : null;
6940
+ }
6913
6941
  var isPrivateCompositionFile = (projectDir, filePath) => isPrivateFileUnder(projectDir, filePath, isVcsOrSecretPath);
6914
6942
  function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @__PURE__ */ new Set()) {
6915
6943
  const { document: document2 } = parseHTML(html);
@@ -6919,7 +6947,7 @@ function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @
6919
6947
  const srcPath = el.getAttribute("data-composition-src");
6920
6948
  if (!srcPath) continue;
6921
6949
  if (isUnresolvedAssetPlaceholder(srcPath)) continue;
6922
- const filePath = resolveCompositionFile(projectDir, srcPath, assetRoot);
6950
+ const filePath = resolveCompositionPath(projectDir, srcPath, assetRoot);
6923
6951
  if (filePath === null) {
6924
6952
  problems.push({ srcPath, detail: "it is outside the project folder" });
6925
6953
  continue;
@@ -6932,6 +6960,10 @@ function assertSubCompositionsUsable(html, projectDir, assetRoot, visited = /* @
6932
6960
  problems.push({ srcPath, detail: "it is git metadata or an env file" });
6933
6961
  continue;
6934
6962
  }
6963
+ if (!COMPOSITION_FILE.test(filePath)) {
6964
+ problems.push({ srcPath, detail: NOT_A_COMPOSITION_FILE });
6965
+ continue;
6966
+ }
6935
6967
  if (visited.has(filePath)) continue;
6936
6968
  const read = readProjectFile(filePath);
6937
6969
  if (read.kind === "missing") {
@@ -7027,7 +7059,6 @@ var THREE_D_CONTEXT_PATTERN = /transform-style\s*:\s*preserve-3d|backface-visibi
7027
7059
  function detectThreeDTransformUsage(html) {
7028
7060
  return THREE_D_CONTEXT_PATTERN.test(html);
7029
7061
  }
7030
- var BACKGROUND_IMAGE_DECL_PATTERN = /(?:^|;|\{)\s*background(?:-image)?\s*:[^;}]*(?:\bgradient\s*\(|url\s*\()/i;
7031
7062
  function detectAncestorBackgroundImage(html) {
7032
7063
  const { document: document2 } = parseHTML(html);
7033
7064
  const root = document2.querySelector("[data-composition-id]");
@@ -7039,13 +7070,13 @@ function detectAncestorBackgroundImage(html) {
7039
7070
  }
7040
7071
  for (const el of ancestors) {
7041
7072
  const style = el.getAttribute("style");
7042
- if (style && BACKGROUND_IMAGE_DECL_PATTERN.test(`{${style}}`)) return true;
7073
+ if (style && hasBackgroundImageDeclaration(`{${style}}`)) return true;
7043
7074
  }
7044
7075
  for (const styleEl of document2.querySelectorAll("style")) {
7045
7076
  const css = styleEl.textContent ?? "";
7046
- for (const rule of css.matchAll(/([^{}]+)\{([^}]*)\}/g)) {
7047
- const [, selectorList = "", declarations = ""] = rule;
7048
- if (!BACKGROUND_IMAGE_DECL_PATTERN.test(`{${declarations}}`)) continue;
7077
+ for (const { parts: rule } of cssRuleMatches(css)) {
7078
+ const [, selectorList, declarations] = rule;
7079
+ if (!hasBackgroundImageDeclaration(`{${declarations}}`)) continue;
7049
7080
  for (const selector of selectorList.split(",")) {
7050
7081
  const sel = selector.trim();
7051
7082
  if (!sel || sel.startsWith("@")) continue;
@@ -7366,7 +7397,6 @@ function coalesceHeadStylesAndBodyScripts(html) {
7366
7397
  el.textContent = dedupedStyles[i] ?? "";
7367
7398
  });
7368
7399
  const styleEls = head ? Array.from(head.querySelectorAll("style")) : [];
7369
- const importRe = /@import\s+url\([^)]*\)\s*;|@import\s+["'][^"']+["']\s*;/gi;
7370
7400
  for (const run of styleEls.length > 1 ? headStyleRuns(styleEls) : []) {
7371
7401
  const imports = [];
7372
7402
  const cssParts = [];
@@ -7374,7 +7404,7 @@ function coalesceHeadStylesAndBodyScripts(html) {
7374
7404
  for (const el of run) {
7375
7405
  const raw = (el.textContent || "").trim();
7376
7406
  if (!raw) continue;
7377
- const nonImportCss = raw.replace(importRe, (match) => {
7407
+ const nonImportCss = replaceMatches(raw, importRuleMatches(raw), (match) => {
7378
7408
  const cleaned = match.trim();
7379
7409
  if (!seenImports.has(cleaned)) {
7380
7410
  seenImports.add(cleaned);
@@ -7684,7 +7714,7 @@ function collectExternalAssets(html, projectDir, log = defaultLogger, file = "in
7684
7714
  for (const styleEl of document2.querySelectorAll("style")) {
7685
7715
  const css = styleEl.textContent || "";
7686
7716
  if (!css.includes("url(")) continue;
7687
- const rewritten = css.replace(CSS_URL_RE, (full, quote, rawUrl) => {
7717
+ const rewritten = replaceMatches(css, cssUrlMatches(css), (full, quote, rawUrl) => {
7688
7718
  const result = processPath((rawUrl || "").trim());
7689
7719
  if (!result) return full;
7690
7720
  return `url(${quote || ""}${result}${quote || ""})`;
@@ -7694,7 +7724,7 @@ function collectExternalAssets(html, projectDir, log = defaultLogger, file = "in
7694
7724
  for (const el of document2.querySelectorAll("[style]")) {
7695
7725
  const style = el.getAttribute("style") || "";
7696
7726
  if (!style.includes("url(")) continue;
7697
- const rewritten = style.replace(CSS_URL_RE, (full, quote, rawUrl) => {
7727
+ const rewritten = replaceMatches(style, cssUrlMatches(style), (full, quote, rawUrl) => {
7698
7728
  const result = processPath((rawUrl || "").trim());
7699
7729
  if (!result) return full;
7700
7730
  return `url(${quote || ""}${result}${quote || ""})`;
@@ -7797,13 +7827,10 @@ async function localizeRemoteImageSources(html, downloadDir) {
7797
7827
  "Localized remote image source(s)"
7798
7828
  );
7799
7829
  }
7800
- var REMOTE_BG_URL_RE = /background(?:-image)?\s*:\s*[^;}"']*?url\(\s*["']?(https?:\/\/[^"')]+)["']?\s*\)/gi;
7801
7830
  async function localizeRemoteBackgroundImages(html, downloadDir) {
7802
7831
  const urlSet = /* @__PURE__ */ new Set();
7803
- const re = new RegExp(REMOTE_BG_URL_RE.source, REMOTE_BG_URL_RE.flags);
7804
- let m;
7805
- while ((m = re.exec(html)) !== null) {
7806
- if (m[1] && !isGoogleFontsUrl(m[1])) urlSet.add(m[1]);
7832
+ for (const { parts } of remoteBackgroundUrlMatches(html)) {
7833
+ if (parts[1] && !isGoogleFontsUrl(parts[1])) urlSet.add(parts[1]);
7807
7834
  }
7808
7835
  return downloadAndRewriteUrls(
7809
7836
  urlSet,
@@ -7816,7 +7843,6 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
7816
7843
  (h, url, rel) => h.replaceAll(`url(${url})`, `url(${rel})`)
7817
7844
  );
7818
7845
  }
7819
- var REMOTE_FONTFACE_URL_RE = /url\(["']?(https?:\/\/[^"')]+)["']?\)/gi;
7820
7846
  function isGoogleFontsUrl(href) {
7821
7847
  try {
7822
7848
  const host = new URL(href).hostname.toLowerCase();
@@ -7844,31 +7870,33 @@ async function fetchExternalStylesheetCss(href) {
7844
7870
  }
7845
7871
  function extractFontFaceBlocks(css) {
7846
7872
  const blocks = [];
7873
+ const closes = matchingBraces(css);
7847
7874
  const atRule = /@font-face\s*/gi;
7848
- let m;
7849
- while ((m = atRule.exec(css)) !== null) {
7850
- const openIdx = css.indexOf("{", m.index + m[0].length);
7851
- if (openIdx === -1) break;
7852
- let depth = 1;
7853
- let i = openIdx + 1;
7854
- for (; i < css.length && depth > 0; i++) {
7855
- if (css[i] === "{") depth++;
7856
- else if (css[i] === "}") depth--;
7857
- }
7858
- if (depth === 0) {
7859
- blocks.push(css.slice(m.index, i));
7860
- atRule.lastIndex = i;
7861
- }
7875
+ let open2 = -1;
7876
+ for (let m = atRule.exec(css); m; m = atRule.exec(css)) {
7877
+ if (open2 < atRule.lastIndex) open2 = css.indexOf("{", atRule.lastIndex);
7878
+ if (open2 === -1) break;
7879
+ const close = closes.get(open2);
7880
+ if (close === void 0) continue;
7881
+ blocks.push(css.slice(m.index, close + 1));
7882
+ atRule.lastIndex = close + 1;
7862
7883
  }
7863
7884
  return blocks;
7864
7885
  }
7886
+ function matchingBraces(css) {
7887
+ const closes = /* @__PURE__ */ new Map();
7888
+ const unclosed = [];
7889
+ for (let i = 0; i < css.length; i++) {
7890
+ if (css[i] === "{") unclosed.push(i);
7891
+ else if (css[i] === "}" && unclosed.length > 0) closes.set(unclosed.pop(), i);
7892
+ }
7893
+ return closes;
7894
+ }
7865
7895
  async function inlineExternalFontStylesheets(html) {
7866
- const linkRe = /<link\b[^>]*\brel=["']stylesheet["'][^>]*>/gi;
7867
7896
  const hrefRe = /\bhref=["']([^"']+)["']/i;
7868
7897
  const linkMatches = [];
7869
- let linkMatch;
7870
- while ((linkMatch = linkRe.exec(html)) !== null) {
7871
- const tag = linkMatch[0];
7898
+ for (const { parts } of stylesheetLinkMatches(html)) {
7899
+ const tag = parts[0];
7872
7900
  const hrefMatch = hrefRe.exec(tag);
7873
7901
  if (!hrefMatch?.[1]) continue;
7874
7902
  const href = hrefMatch[1];
@@ -7909,14 +7937,16 @@ ${fontFaceBlocks.join("\n")}
7909
7937
  }
7910
7938
  function projectStylesheetFontFamilies(html, projectDir) {
7911
7939
  const families = [];
7912
- for (const [tag] of html.matchAll(/<link\b[^>]*\brel=["']stylesheet["'][^>]*>/gi)) {
7940
+ for (const {
7941
+ parts: [tag]
7942
+ } of stylesheetLinkMatches(html)) {
7913
7943
  const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1];
7914
7944
  if (!href || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(href)) continue;
7915
7945
  const sheet = resolve5(projectDir, decodedUrlPath(href).replace(/^(?:\.?\/)+/, ""));
7916
7946
  if (!isPathInside(sheet, projectDir) || !existsSync10(sheet)) continue;
7917
7947
  for (const face of extractFontFaceBlocks(readFileSync6(sheet, "utf8"))) {
7918
7948
  const family = /font-family\s*:\s*([^;}]+)/i.exec(face)?.[1]?.trim().replace(/^['"]|['"]$/g, "");
7919
- const shipsFile = [...face.matchAll(LOCAL_FONTFACE_URL_RE)].some(([, url = ""]) => {
7949
+ const shipsFile = [...localFontFaceUrlMatches(face)].some(({ parts: [, url = ""] }) => {
7920
7950
  const path = decodedUrlPath(url);
7921
7951
  const file = path.startsWith("/") ? resolve5(projectDir, `.${path}`) : resolve5(dirname6(sheet), path);
7922
7952
  return isPathInside(file, projectDir) && existsSync10(file);
@@ -7927,11 +7957,9 @@ function projectStylesheetFontFamilies(html, projectDir) {
7927
7957
  return families;
7928
7958
  }
7929
7959
  function collectFontFaceUrls(html) {
7930
- const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
7931
7960
  const urlSet = /* @__PURE__ */ new Set();
7932
- let styleMatch;
7933
- while ((styleMatch = styleBlockRe.exec(html)) !== null) {
7934
- const cssText = styleMatch[1] ?? "";
7961
+ for (const { parts } of styleBlockMatches(html)) {
7962
+ const cssText = parts[1];
7935
7963
  let i = 0;
7936
7964
  while (i < cssText.length) {
7937
7965
  const atIdx = cssText.indexOf("@font-face", i);
@@ -7946,10 +7974,8 @@ function collectFontFaceUrls(html) {
7946
7974
  j++;
7947
7975
  }
7948
7976
  const block = cssText.slice(braceStart + 1, j - 1);
7949
- const urlRe = new RegExp(REMOTE_FONTFACE_URL_RE.source, REMOTE_FONTFACE_URL_RE.flags);
7950
- let urlMatch;
7951
- while ((urlMatch = urlRe.exec(block)) !== null) {
7952
- if (urlMatch[1]) urlSet.add(urlMatch[1]);
7977
+ for (const { parts: parts2 } of remoteFontFaceUrlMatches(block)) {
7978
+ if (parts2[1]) urlSet.add(parts2[1]);
7953
7979
  }
7954
7980
  i = j;
7955
7981
  }
@@ -7969,7 +7995,6 @@ function localizeFontFaceUrls(html, downloadDir) {
7969
7995
  (h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
7970
7996
  );
7971
7997
  }
7972
- var LOCAL_FONTFACE_URL_RE = /url\(["']?(?!data:|file:|https?:\/\/)([^"')]+)["']?\)/gi;
7973
7998
  function urlOccurrenceRe(localPath) {
7974
7999
  const escaped = localPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7975
8000
  return new RegExp(`url\\((["']?)${escaped}\\1\\)`, "g");
@@ -7989,24 +8014,16 @@ async function readLocalFont(absPath) {
7989
8014
  return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
7990
8015
  }
7991
8016
  async function embedLocalFontFaces(html, projectDir, assetRoot, log = defaultLogger) {
7992
- const { fontToDataUri: toDataUri } = await import("./deterministicFonts-QY4KNTOU.js");
7993
- const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
7994
- const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
8017
+ const { fontToDataUri: toDataUri } = await import("./deterministicFonts-XZIQ4PNP.js");
7995
8018
  let result = html;
7996
8019
  const embeddedPaths = /* @__PURE__ */ new Set();
7997
8020
  const dataUriByAbsolutePath = /* @__PURE__ */ new Map();
7998
8021
  const fileBackedAbsolutePaths = /* @__PURE__ */ new Set();
7999
- let styleMatch;
8000
- while ((styleMatch = styleBlockRe.exec(html)) !== null) {
8001
- const cssText = styleMatch[1] ?? "";
8002
- const ffRe = new RegExp(fontFaceRe.source, fontFaceRe.flags);
8003
- let ffMatch;
8004
- while ((ffMatch = ffRe.exec(cssText)) !== null) {
8005
- const block = ffMatch[1] ?? "";
8006
- const urlRe = new RegExp(LOCAL_FONTFACE_URL_RE.source, LOCAL_FONTFACE_URL_RE.flags);
8007
- let urlMatch;
8008
- while ((urlMatch = urlRe.exec(block)) !== null) {
8009
- const localPath = urlMatch[1];
8022
+ for (const { parts: style } of styleBlockMatches(html)) {
8023
+ for (const { parts: face } of fontFaceBlockMatches(style[1])) {
8024
+ const block = face[1];
8025
+ for (const { parts } of localFontFaceUrlMatches(block)) {
8026
+ const localPath = parts[1];
8010
8027
  if (!localPath || embeddedPaths.has(localPath)) continue;
8011
8028
  const absPath = localPath.startsWith("/") ? localPath : resolve5(projectDir, localPath);
8012
8029
  if (!isPathInside(absPath, projectDir) || escapesAssetRoot(absPath, assetRoot)) continue;
@@ -8125,6 +8142,9 @@ async function compileForRender(projectDir, htmlPath, downloadDir, options = {})
8125
8142
  if (isPathInside(htmlPath, projectDir) && escapesAssetRoot(htmlPath, assetRoot)) {
8126
8143
  throw new Error(`Entry file ${htmlPath} leads outside the project folder`);
8127
8144
  }
8145
+ if (!COMPOSITION_FILE.test(htmlPath)) {
8146
+ throw new Error(`Entry file ${htmlPath} is not an .html file, so it is refused`);
8147
+ }
8128
8148
  const entryHtml = rebaseDirectEntryAssetPaths(readTextFile(htmlPath), projectDir, htmlPath);
8129
8149
  const rawHtml = bindVariableMediaSources(
8130
8150
  normalizeCompositionSrcs(rewriteUnresolvableGsapToCdn(entryHtml, projectDir), projectDir),
@@ -8680,6 +8700,14 @@ async function recompileWithResolutions(compiled, resolutions, projectDir, downl
8680
8700
  }
8681
8701
 
8682
8702
  // ../producer/src/services/render/stages/compileStage.ts
8703
+ function animatedGifCacheDir(extractCacheDir) {
8704
+ try {
8705
+ const root = extractCacheDir && privateCacheRoot(extractCacheDir);
8706
+ return root ? join17(root, "animated-gif") : void 0;
8707
+ } catch {
8708
+ return void 0;
8709
+ }
8710
+ }
8683
8711
  function adaptAspectAgnosticResolution(requested, aspectAgnostic, width, height, log) {
8684
8712
  if (!requested || !aspectAgnostic) return requested;
8685
8713
  const flipped = suggestMatchingPreset(width, height, requested);
@@ -8759,7 +8787,7 @@ async function runCompileStage(input) {
8759
8787
  variables: input.variables,
8760
8788
  urlByAbsentLocalPath: input.urlByAbsentLocalPath,
8761
8789
  pageMotionBlur: input.pageMotionBlur,
8762
- animatedGifCacheDir: cfg.extractCacheDir ? join17(cfg.extractCacheDir, "animated-gif") : void 0,
8790
+ animatedGifCacheDir: animatedGifCacheDir(cfg.extractCacheDir),
8763
8791
  ffmpegProcessTimeout: cfg.ffmpegProcessTimeout,
8764
8792
  allowOutsideProjectAssets: job.config.allowOutsideProjectAssets
8765
8793
  });
@@ -9827,6 +9855,7 @@ async function runExtractVideosStage(input) {
9827
9855
  deferRangeExtraction,
9828
9856
  shownBoxes,
9829
9857
  urlByAbsentLocalPath,
9858
+ audioDownloadDir,
9830
9859
  skipFrameExtractionIds = []
9831
9860
  } = input;
9832
9861
  const stage2Start = Date.now();
@@ -9899,7 +9928,15 @@ async function runExtractVideosStage(input) {
9899
9928
  imageColorSpaces.push(...probed);
9900
9929
  }
9901
9930
  if (skipFrameExtractionIds.length > 0) {
9902
- await appendVideoAudioFromProbe({ projectDir, compiledDir, composition, urlByAbsentLocalPath });
9931
+ await appendVideoAudioFromProbe({
9932
+ projectDir,
9933
+ compiledDir,
9934
+ composition,
9935
+ urlByAbsentLocalPath,
9936
+ downloadDir: audioDownloadDir,
9937
+ signal: abortSignal,
9938
+ log
9939
+ });
9903
9940
  videoReadinessSkipIds = [...skipFrameExtractionIds];
9904
9941
  } else if (composition.videos.length > 0) {
9905
9942
  const totalVideos = composition.videos.length;
@@ -10006,17 +10043,37 @@ function isPublicHttpsUrl(url) {
10006
10043
  return false;
10007
10044
  }
10008
10045
  }
10046
+ function localProbeSource(src, input) {
10047
+ const path = resolveProjectRelativeSrc(src, input.projectDir, input.compiledDir);
10048
+ const readFrom = input.urlByAbsentLocalPath?.get(path) ?? path;
10049
+ return isHttpUrl(readFrom) || existsSync12(readFrom) ? readFrom : null;
10050
+ }
10051
+ async function remoteProbeSource(video, input) {
10052
+ if (!isPublicHttpsUrl(video.src)) return null;
10053
+ if (!resolveRestrictPageNetwork()) return video.src;
10054
+ if (!video.hasAudio || video.hidden) return null;
10055
+ const downloadDir = input.downloadDir ?? join19(input.compiledDir, REMOTE_MEDIA_SUBDIR);
10056
+ try {
10057
+ return await downloadToTemp(video.src, downloadDir, void 0, input.signal, void 0, {
10058
+ onTelemetry: writeUrlDownloadTelemetry
10059
+ });
10060
+ } catch (error) {
10061
+ if (!isUrlNotPermittedError(error)) throw error;
10062
+ input.log?.warn("Video sound skipped: its URL is outside the download address rules", {
10063
+ videoId: video.id
10064
+ });
10065
+ return null;
10066
+ }
10067
+ }
10009
10068
  async function appendVideoAudioFromProbe(input) {
10010
- const { projectDir, compiledDir, composition, urlByAbsentLocalPath } = input;
10069
+ const { composition } = input;
10011
10070
  const videos = composition.videos.filter(
10012
10071
  (video) => !isVideoPastTimelineEnd(video, composition.duration)
10013
10072
  );
10014
10073
  const probed = await Promise.all(
10015
10074
  videos.map(async (video) => {
10016
- if (isHttpUrl(video.src) && !isPublicHttpsUrl(video.src)) return null;
10017
- const path = isHttpUrl(video.src) ? video.src : resolveProjectRelativeSrc(video.src, projectDir, compiledDir);
10018
- const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
10019
- if (!isHttpUrl(readFrom) && !existsSync12(readFrom)) return null;
10075
+ const readFrom = isHttpUrl(video.src) ? await remoteProbeSource(video, input) : localProbeSource(video.src, input);
10076
+ if (readFrom === null) return null;
10020
10077
  const metadata = await extractMediaMetadata(readFrom);
10021
10078
  const window2 = await resolveFinalFrameExtractionWindow(
10022
10079
  readFrom,
@@ -10755,7 +10812,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
10755
10812
  audioResult = await processCompositionAudio(
10756
10813
  audios,
10757
10814
  projectDir,
10758
- join22(workDir, "audio-work"),
10815
+ audioWorkDir(workDir),
10759
10816
  audioOutputPath,
10760
10817
  duration,
10761
10818
  abortSignal,
@@ -13599,6 +13656,19 @@ function resolveCaptureForceScreenshotForPageSideCompositing(args) {
13599
13656
  function shouldDiscardProbeSessionForPageSideCompositing(args) {
13600
13657
  return args.hasProbeSession && args.usePageSideCompositing;
13601
13658
  }
13659
+ var PAGE_SIDE_COMPOSITOR_CANVAS_ID = "__hf-page-side-compositor";
13660
+ async function pageInstallsShaderCompositor(open2, session = { initializeSession, closeCaptureSession }) {
13661
+ const probe = await open2();
13662
+ try {
13663
+ await session.initializeSession(probe);
13664
+ return await probe.page.evaluate(
13665
+ (id) => document.getElementById(id) !== null,
13666
+ PAGE_SIDE_COMPOSITOR_CANVAS_ID
13667
+ );
13668
+ } finally {
13669
+ await session.closeCaptureSession(probe);
13670
+ }
13671
+ }
13602
13672
  function deVerifyFallbackTelemetry(err) {
13603
13673
  const details = getDrawElementVerificationDetails(err);
13604
13674
  return {
@@ -14029,6 +14099,7 @@ async function executeRenderPipeline(input) {
14029
14099
  log,
14030
14100
  composition,
14031
14101
  skipFrameExtractionIds: videoLayer ? [videoLayer.videoId] : [],
14102
+ audioDownloadDir: audioWorkDir(workDir),
14032
14103
  abortSignal: executionSignal,
14033
14104
  assertNotAborted,
14034
14105
  // Local staging can use links; distributed plan() alone requires real copies.
@@ -14734,7 +14805,7 @@ async function executeRenderPipeline(input) {
14734
14805
  };
14735
14806
  const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
14736
14807
  const videoOnlyPath = join29(workDir, `video-only${videoExt}`);
14737
- const usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
14808
+ let usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
14738
14809
  if (usePageSideCompositingForTransitions) {
14739
14810
  activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
14740
14811
  if (shouldDiscardProbeSessionForPageSideCompositing({
@@ -14748,6 +14819,26 @@ async function executeRenderPipeline(input) {
14748
14819
  "[Render] Recreating capture session so page-side compositing pre-head script is loaded."
14749
14820
  );
14750
14821
  }
14822
+ try {
14823
+ usePageSideCompositingForTransitions = await pageInstallsShaderCompositor(
14824
+ () => createCaptureSession(activeFileServer.url, framesDir, buildPrepCaptureOptions(), null, {
14825
+ ...cfg,
14826
+ forceScreenshot: true
14827
+ })
14828
+ );
14829
+ } catch (error) {
14830
+ assertNotAborted();
14831
+ log.warn("[Render] Shader compositor check failed; keeping page-side compositing.", {
14832
+ error: error instanceof Error ? error.message : String(error)
14833
+ });
14834
+ }
14835
+ if (!usePageSideCompositingForTransitions) {
14836
+ log.warn(
14837
+ "[Render] The page's shader-transitions build cannot composite in this browser; shader transitions blend on the Node-side layered path."
14838
+ );
14839
+ }
14840
+ }
14841
+ if (usePageSideCompositingForTransitions) {
14751
14842
  captureForceScreenshot = resolveCaptureForceScreenshotForPageSideCompositing({
14752
14843
  forceScreenshot: captureForceScreenshot,
14753
14844
  usePageSideCompositing: true
@@ -18017,7 +18108,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
18017
18108
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
18018
18109
  if (probeResult.probeSession) {
18019
18110
  try {
18020
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-6GRYTLZ5.js");
18111
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-O5P56HIK.js");
18021
18112
  await closeCaptureSession2(probeResult.probeSession);
18022
18113
  } catch (err) {
18023
18114
  log.warn("[plan] probe session close failed", {
@@ -20619,6 +20710,7 @@ import {
20619
20710
  import { resolve as resolve10, dirname as dirname17, join as join46 } from "path";
20620
20711
  import { tmpdir as tmpdir5 } from "os";
20621
20712
  import { parseArgs } from "util";
20713
+ import { isIP } from "net";
20622
20714
  import crypto from "crypto";
20623
20715
  import { Hono as Hono2 } from "hono";
20624
20716
  import { streamSSE } from "hono/streaming";
@@ -20677,7 +20769,11 @@ function readEntryHtml(filePath) {
20677
20769
  closeSync6(fd);
20678
20770
  }
20679
20771
  }
20680
- function readProjectEntryFile(projectDir, preferredEntryFile) {
20772
+ function leavesProject(absProjectDir, absoluteEntryPath, isAllowedEntry) {
20773
+ const entryRelativePath = relative8(absProjectDir, absoluteEntryPath);
20774
+ return entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep5}`) || isAbsolute4(entryRelativePath) || isAllowedEntry !== void 0 && !isAllowedEntry(absoluteEntryPath);
20775
+ }
20776
+ function readProjectEntryFile(projectDir, preferredEntryFile, isAllowedEntry) {
20681
20777
  const absProjectDir = resolve9(projectDir);
20682
20778
  if (!existsSync29(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
20683
20779
  return { error: `Project directory not found: ${absProjectDir}` };
@@ -20687,8 +20783,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
20687
20783
  );
20688
20784
  for (const entryFile of entryCandidates) {
20689
20785
  const absoluteEntryPath = resolve9(absProjectDir, entryFile);
20690
- const entryRelativePath = relative8(absProjectDir, absoluteEntryPath);
20691
- if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep5}`) || isAbsolute4(entryRelativePath)) {
20786
+ if (leavesProject(absProjectDir, absoluteEntryPath, isAllowedEntry)) {
20692
20787
  return { error: `Entry file must stay inside project directory: ${entryFile}` };
20693
20788
  }
20694
20789
  const html = readEntryHtml(absoluteEntryPath);
@@ -20704,10 +20799,10 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
20704
20799
  error: `No HTML entry file found in project directory: ${join44(absProjectDir, preferredEntryFile || "index.html")}`
20705
20800
  };
20706
20801
  }
20707
- function prepareHyperframeLintBody(body) {
20802
+ function prepareHyperframeLintBody(body, isAllowedEntry) {
20708
20803
  const requestedEntryFile = typeof body.entryFile === "string" && body.entryFile.trim().length > 0 ? body.entryFile.trim() : void 0;
20709
20804
  if (typeof body.projectDir === "string" && body.projectDir.trim().length > 0) {
20710
- const prepared = readProjectEntryFile(body.projectDir, requestedEntryFile);
20805
+ const prepared = readProjectEntryFile(body.projectDir, requestedEntryFile, isAllowedEntry);
20711
20806
  if ("error" in prepared) {
20712
20807
  return prepared;
20713
20808
  }
@@ -20977,16 +21072,22 @@ function buildRenderJobConfig(input, outputPath, log) {
20977
21072
  });
20978
21073
  return renderConfigFromRequest(request, { logger: log });
20979
21074
  }
20980
- function resolvePreparedRenderOutput(prepared, rendersDir, log) {
21075
+ function resolvePreparedRenderOutput(prepared, rendersDir, log, confineOutput) {
20981
21076
  const { input, cleanupProjectDir } = prepared;
20982
21077
  const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
21078
+ if (confineOutput) {
21079
+ mkdirSync19(rendersDir, { recursive: true });
21080
+ if (!isSafePath(rendersDir, absoluteOutputPath)) {
21081
+ throw new Error("outputPath must be inside the renders directory");
21082
+ }
21083
+ }
20983
21084
  const outputDir = dirname17(absoluteOutputPath);
20984
21085
  if (!existsSync31(outputDir)) mkdirSync19(outputDir, { recursive: true });
20985
21086
  return { input, cleanupProjectDir, absoluteOutputPath };
20986
21087
  }
20987
- function prepareRenderJob(prepared, rendersDir, log) {
21088
+ function prepareRenderJob(prepared, rendersDir, log, confineOutput) {
20988
21089
  try {
20989
- const output = resolvePreparedRenderOutput(prepared, rendersDir, log);
21090
+ const output = resolvePreparedRenderOutput(prepared, rendersDir, log, confineOutput);
20990
21091
  const job = createRenderJob(buildRenderJobConfig(output.input, output.absoluteOutputPath, log));
20991
21092
  return { ...output, job };
20992
21093
  } catch (error) {
@@ -21037,16 +21138,32 @@ function validateOutputResolutionOverride(body) {
21037
21138
  return void 0;
21038
21139
  }
21039
21140
  var MAX_PREVIEW_HTML_BYTES = 20 * 1024 * 1024;
21040
- function prepareProjectDirectory(projectDir, options) {
21141
+ function resolveRenderRequestPolicy(options) {
21142
+ return {
21143
+ projectsDir: resolve10(
21144
+ options.projectsDir ?? (process.env.PRODUCER_PROJECTS_DIR || process.cwd())
21145
+ ),
21146
+ allowDebug: options.allowDebug ?? process.env.PRODUCER_ALLOW_DEBUG === "1"
21147
+ };
21148
+ }
21149
+ function isAllowedProjectPath(projectsDir, path) {
21150
+ return isSafePath(projectsDir, path) && !isSafePath(resolveRenderDebugDir(), path);
21151
+ }
21152
+ function isAllowedEntryPath(policy, projectDir, path) {
21153
+ return isSafePath(projectDir, path) && isAllowedProjectPath(policy.projectsDir, path);
21154
+ }
21155
+ function prepareProjectDirectory(projectDir, options, policy) {
21041
21156
  const candidate = nonEmptyString(projectDir);
21042
21157
  if (!candidate) return null;
21043
- const absProjectDir = resolve10(candidate);
21044
- if (!existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
21045
- return { error: `Project directory not found: ${absProjectDir}` };
21158
+ const absProjectDir = policy ? resolve10(policy.projectsDir, candidate) : resolve10(candidate);
21159
+ const shown = policy ? candidate : absProjectDir;
21160
+ if (policy && !isAllowedProjectPath(policy.projectsDir, absProjectDir) || !existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
21161
+ return { error: `Project directory not found: ${shown}` };
21046
21162
  }
21047
21163
  const entry = options.entryFile || "index.html";
21048
- if (!existsSync31(resolve10(absProjectDir, entry))) {
21049
- return { error: `Entry file "${entry}" not found in project directory: ${absProjectDir}` };
21164
+ const entryPath = resolve10(absProjectDir, entry);
21165
+ if (policy && !isAllowedEntryPath(policy, absProjectDir, entryPath) || !existsSync31(entryPath)) {
21166
+ return { error: `Entry file "${entry}" not found in project directory: ${shown}` };
21050
21167
  }
21051
21168
  return { prepared: { input: { projectDir: absProjectDir, ...options } } };
21052
21169
  }
@@ -21075,15 +21192,18 @@ function materializeInlineProject(html, options) {
21075
21192
  }
21076
21193
  };
21077
21194
  }
21078
- async function prepareRenderBody(body) {
21195
+ async function prepareRenderBody(body, policy) {
21079
21196
  const overrideError = validateRenderOverrides(body);
21080
21197
  if (overrideError) return { error: overrideError };
21198
+ if (policy && body.debug === true && !policy.allowDebug) {
21199
+ return { error: "debug is disabled on this server (set allowDebug or PRODUCER_ALLOW_DEBUG=1)" };
21200
+ }
21081
21201
  const pageMotionBlur = body.pageMotionBlur;
21082
21202
  if (pageMotionBlur !== void 0 && pageMotionBlur !== "off") {
21083
21203
  return { error: "pageMotionBlur must be off when supplied" };
21084
21204
  }
21085
21205
  const options = { ...parseRenderOptions(body), pageMotionBlur };
21086
- const project = prepareProjectDirectory(body.projectDir, options);
21206
+ const project = prepareProjectDirectory(body.projectDir, options, policy);
21087
21207
  if (project) return project;
21088
21208
  const source = await resolveInlineRenderHtml(body);
21089
21209
  return "error" in source ? source : materializeInlineProject(source.html, options);
@@ -21136,6 +21256,9 @@ function cleanupTempDir(dir, log) {
21136
21256
  });
21137
21257
  }
21138
21258
  }
21259
+ function publicPerfSummary(job) {
21260
+ return job.perfSummary ? { ...job.perfSummary, renderId: void 0 } : null;
21261
+ }
21139
21262
  function outputFileSize(path) {
21140
21263
  return existsSync31(path) ? statSync11(path).size : 0;
21141
21264
  }
@@ -21148,7 +21271,7 @@ function createBlockingProgressReporter(log, requestId) {
21148
21271
  log.info(`render progress ${pct}%`, { requestId, stage: job.currentStage, message });
21149
21272
  };
21150
21273
  }
21151
- async function prepareSseRenderRequest(c, stream, requestId) {
21274
+ async function prepareSseRenderRequest(c, stream, requestId, policy) {
21152
21275
  let body;
21153
21276
  try {
21154
21277
  body = await c.req.json();
@@ -21163,7 +21286,7 @@ async function prepareSseRenderRequest(c, stream, requestId) {
21163
21286
  });
21164
21287
  return null;
21165
21288
  }
21166
- const prepared = await prepareRenderBody(body);
21289
+ const prepared = await prepareRenderBody(body, policy);
21167
21290
  if (!("error" in prepared)) return prepared.prepared;
21168
21291
  await stream.writeSSE({
21169
21292
  data: JSON.stringify({
@@ -21235,6 +21358,7 @@ function createRenderHandlers(options = {}) {
21235
21358
  const getRequestId = options.getRequestId ?? ((c) => c.req.header("x-request-id") || crypto.randomUUID());
21236
21359
  const outputUrlPrefix = options.outputUrlPrefix ?? "/outputs";
21237
21360
  const rendersDir = options.rendersDir ?? process.env.PRODUCER_RENDERS_DIR ?? "/tmp";
21361
+ const policy = options.confineRequests ? resolveRenderRequestPolicy(options) : void 0;
21238
21362
  const artifactTtlMs = options.artifactTtlMs ?? Number(process.env.PRODUCER_OUTPUT_ARTIFACT_TTL_MS || 15 * 60 * 1e3);
21239
21363
  const store = createArtifactStore(artifactTtlMs);
21240
21364
  const maxConcurrentRenders = options.maxConcurrentRenders ?? Number(process.env.PRODUCER_MAX_CONCURRENT_RENDERS || 2);
@@ -21253,7 +21377,18 @@ function createRenderHandlers(options = {}) {
21253
21377
  } catch {
21254
21378
  return c.json({ success: false, requestId, error: "Invalid JSON body" }, 400);
21255
21379
  }
21256
- const preparedResult = prepareHyperframeLintBody(body);
21380
+ const lintProjectDir = nonEmptyString(body.projectDir);
21381
+ let isAllowedEntry;
21382
+ if (policy && lintProjectDir) {
21383
+ const absProjectDir = resolve10(policy.projectsDir, lintProjectDir);
21384
+ if (!isAllowedProjectPath(policy.projectsDir, absProjectDir)) {
21385
+ const error = `Project directory not found: ${lintProjectDir}`;
21386
+ return c.json({ success: false, requestId, error }, 400);
21387
+ }
21388
+ body = { ...body, projectDir: absProjectDir };
21389
+ isAllowedEntry = (path) => isAllowedEntryPath(policy, absProjectDir, path);
21390
+ }
21391
+ const preparedResult = prepareHyperframeLintBody(body, isAllowedEntry);
21257
21392
  if ("error" in preparedResult) {
21258
21393
  return c.json({ success: false, requestId, error: preparedResult.error }, 400);
21259
21394
  }
@@ -21282,11 +21417,11 @@ function createRenderHandlers(options = {}) {
21282
21417
  } catch {
21283
21418
  return c.json({ success: false, requestId, error: "Invalid JSON body" }, 400);
21284
21419
  }
21285
- const preparedResult = await prepareRenderBody(body);
21420
+ const preparedResult = await prepareRenderBody(body, policy);
21286
21421
  if ("error" in preparedResult) {
21287
21422
  return c.json({ success: false, requestId, error: preparedResult.error }, 400);
21288
21423
  }
21289
- const preparedJob = prepareRenderJob(preparedResult.prepared, rendersDir, log);
21424
+ const preparedJob = prepareRenderJob(preparedResult.prepared, rendersDir, log, !!policy);
21290
21425
  if ("error" in preparedJob) {
21291
21426
  return c.json({ success: false, requestId, error: preparedJob.error }, 400);
21292
21427
  }
@@ -21327,7 +21462,7 @@ function createRenderHandlers(options = {}) {
21327
21462
  videoDurationSeconds: job.duration ?? null,
21328
21463
  outcome: job.outcome ?? "completed",
21329
21464
  warnings: job.warnings,
21330
- perf: job.perfSummary ?? null,
21465
+ perf: policy ? publicPerfSummary(job) : job.perfSummary ?? null,
21331
21466
  ...strictVariablesResult(job)
21332
21467
  });
21333
21468
  } catch (error) {
@@ -21364,9 +21499,9 @@ function createRenderHandlers(options = {}) {
21364
21499
  return streamSSE(c, async (stream) => {
21365
21500
  const requestId = getRequestId(c);
21366
21501
  const t0 = Date.now();
21367
- const prepared = await prepareSseRenderRequest(c, stream, requestId);
21502
+ const prepared = await prepareSseRenderRequest(c, stream, requestId, policy);
21368
21503
  if (!prepared) return;
21369
- const preparedJob = prepareRenderJob(prepared, rendersDir, log);
21504
+ const preparedJob = prepareRenderJob(prepared, rendersDir, log, !!policy);
21370
21505
  if ("error" in preparedJob) {
21371
21506
  await stream.writeSSE({
21372
21507
  data: JSON.stringify({
@@ -21423,7 +21558,7 @@ function createRenderHandlers(options = {}) {
21423
21558
  videoDurationSeconds: job.duration ?? null,
21424
21559
  outcome: job.outcome ?? "completed",
21425
21560
  warnings: job.warnings,
21426
- perf: job.perfSummary ?? null,
21561
+ perf: policy ? publicPerfSummary(job) : job.perfSummary ?? null,
21427
21562
  producerVersion: readProducerVersion(),
21428
21563
  ...strictVariablesResult(job)
21429
21564
  })
@@ -21481,9 +21616,79 @@ function isCrossOriginBrowserRequest(c) {
21481
21616
  return true;
21482
21617
  }
21483
21618
  }
21619
+ function hostnameOf(host) {
21620
+ try {
21621
+ return new URL(`http://${host}`).hostname.toLowerCase();
21622
+ } catch {
21623
+ return null;
21624
+ }
21625
+ }
21626
+ function isAllowedBrowserHostname(hostname2, allowed) {
21627
+ if (!hostname2) return false;
21628
+ if (hostname2 === "localhost" || hostname2.endsWith(".localhost")) return true;
21629
+ if (isIP(hostname2.replace(/^\[|\]$/g, "")) !== 0) return true;
21630
+ return allowed.has(hostname2);
21631
+ }
21632
+ function allowedHostnames(options) {
21633
+ const fromEnv = (process.env.PRODUCER_ALLOWED_HOSTS ?? "").split(",");
21634
+ const names = /* @__PURE__ */ new Set();
21635
+ for (const entry of [...options.allowedHosts ?? [], ...fromEnv]) {
21636
+ const hostname2 = entry.trim() ? hostnameOf(entry.trim()) : null;
21637
+ if (hostname2) names.add(hostname2);
21638
+ }
21639
+ return names;
21640
+ }
21641
+ function resolveAuthToken(options) {
21642
+ return options.authToken?.trim() || process.env.PRODUCER_AUTH_TOKEN?.trim() || "";
21643
+ }
21644
+ function hasBearerToken(c, token) {
21645
+ const digest = (value) => crypto.createHash("sha256").update(value).digest();
21646
+ return crypto.timingSafeEqual(
21647
+ digest(c.req.header("authorization") ?? ""),
21648
+ digest(`Bearer ${token}`)
21649
+ );
21650
+ }
21651
+ function isLoopbackHostname(hostname2) {
21652
+ const host = hostname2.replace(/^\[|\]$/g, "").toLowerCase();
21653
+ return host === "localhost" || host === "::1" || isIP(host) === 4 && host.startsWith("127.");
21654
+ }
21655
+ function isDisallowedBrowserHost(c, allowed) {
21656
+ const origin = c.req.header("origin");
21657
+ if (!origin && !c.req.header("sec-fetch-site")) return false;
21658
+ if (!isAllowedBrowserHostname(hostnameOf(c.req.header("host") ?? ""), allowed)) return true;
21659
+ if (!origin) return false;
21660
+ try {
21661
+ return !isAllowedBrowserHostname(new URL(origin).hostname.toLowerCase(), allowed);
21662
+ } catch {
21663
+ return true;
21664
+ }
21665
+ }
21484
21666
  function createProducerApp(options = {}) {
21485
21667
  const app = new Hono2();
21486
- const handlers = createRenderHandlers(options);
21668
+ const handlers = createRenderHandlers({
21669
+ ...options,
21670
+ confineRequests: options.confineRequests ?? true
21671
+ });
21672
+ const allowed = allowedHostnames(options);
21673
+ const authToken = resolveAuthToken(options);
21674
+ app.use("*", async (c, next) => {
21675
+ if (authToken && c.req.path !== "/health" && !hasBearerToken(c, authToken)) {
21676
+ return c.json({ success: false, error: "Unauthorized" }, 401);
21677
+ }
21678
+ await next();
21679
+ });
21680
+ app.use("*", async (c, next) => {
21681
+ if (isDisallowedBrowserHost(c, allowed)) {
21682
+ return c.json(
21683
+ {
21684
+ success: false,
21685
+ error: "Host not allowed. Add it to allowedHosts or PRODUCER_ALLOWED_HOSTS."
21686
+ },
21687
+ 403
21688
+ );
21689
+ }
21690
+ await next();
21691
+ });
21487
21692
  app.post("*", async (c, next) => {
21488
21693
  if (isCrossOriginBrowserRequest(c)) {
21489
21694
  return c.json({ success: false, error: "Cross-origin requests are not allowed" }, 403);
@@ -21500,10 +21705,17 @@ function createProducerApp(options = {}) {
21500
21705
  }
21501
21706
  function startServer(options = {}) {
21502
21707
  const port = options.port ?? parseInt(process.env.PRODUCER_PORT ?? "9847", 10);
21708
+ const hostname2 = options.hostname || process.env.PRODUCER_HOST || "127.0.0.1";
21503
21709
  const log = options.logger ?? defaultLogger;
21710
+ if (!isLoopbackHostname(hostname2) && !resolveAuthToken(options)) {
21711
+ throw new Error(
21712
+ `Refusing to listen on ${hostname2} without an auth token. Set authToken or PRODUCER_AUTH_TOKEN, or listen on a loopback address.`
21713
+ );
21714
+ }
21504
21715
  const app = createProducerApp(options);
21505
- const server = serve2({ fetch: app.fetch, port }, () => {
21506
- log.info(`Listening on http://localhost:${port}`);
21716
+ const server = serve2({ fetch: app.fetch, port, hostname: hostname2 }, (info) => {
21717
+ const address = info.family === "IPv6" ? `[${info.address}]` : info.address;
21718
+ log.info(`Listening on http://${address}:${info.port}`);
21507
21719
  });
21508
21720
  server.setTimeout(0);
21509
21721
  server.requestTimeout = 0;
@@ -21514,7 +21726,7 @@ function startServer(options = {}) {
21514
21726
  });
21515
21727
  async function shutdown(signal) {
21516
21728
  log.info(`Received ${signal}, shutting down`);
21517
- const { drainBrowserPool } = await import("./src-6GRYTLZ5.js");
21729
+ const { drainBrowserPool } = await import("./src-O5P56HIK.js");
21518
21730
  await drainBrowserPool().catch(() => {
21519
21731
  });
21520
21732
  const handle = await Promise.race([