hyperframes 0.9.26 → 0.9.27

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 (296) hide show
  1. package/dist/{add-WBZDU6CI.js → add-K5J5XWLL.js} +22 -23
  2. package/dist/{agentPromptGenerator-HOH4K2AF.js → agentPromptGenerator-PGIEEJLJ.js} +10 -10
  3. package/dist/{animatedGifPrep-HEQTZMPU.js → animatedGifPrep-MLZOHCTS.js} +9 -9
  4. package/dist/api.js +46 -46
  5. package/dist/{appHistory-FVDSCS64.js → appHistory-DLDRURHW.js} +2 -3
  6. package/dist/{asset-N2BCPNT3.js → asset-OS5AB3SQ.js} +6 -6
  7. package/dist/{assetCataloger-25DZ4ODD.js → assetCataloger-DMVL5X2P.js} +11 -11
  8. package/dist/{audio-3KDOOANX.js → audio-23FMLVOJ.js} +30 -30
  9. package/dist/{auth-JPNSO223.js → auth-2DIXO5OO.js} +7 -7
  10. package/dist/{autoUpdate-SVH5VA46.js → autoUpdate-NP2CBKFP.js} +5 -5
  11. package/dist/{avatars-UC6PUVKF.js → avatars-LULUZMLI.js} +19 -19
  12. package/dist/{backgroundChecks-R7JQPFEL.js → backgroundChecks-3MXY6FNF.js} +6 -6
  13. package/dist/backgroundChecksWorker.js +6 -6
  14. package/dist/{batchRender-QB3UD3S3.js → batchRender-AL6DO5IA.js} +9 -9
  15. package/dist/{beats-4LQCQYU4.js → beats-U4Q76QWK.js} +16 -16
  16. package/dist/{benchmark-NNGNQLPH.js → benchmark-QANZ2IRX.js} +17 -17
  17. package/dist/{billing-EKSG2MIB.js → billing-PX54B6T7.js} +23 -24
  18. package/dist/{browser-3CMPDGDK.js → browser-P36XPIWA.js} +15 -15
  19. package/dist/{bundleWithLocalizedFonts-F6WSRFC6.js → bundleWithLocalizedFonts-QY6JAKLF.js} +4 -4
  20. package/dist/{capture-RRIOSJI7.js → capture-S5DURUCT.js} +6 -6
  21. package/dist/{capture-PIRDJMFL.js → capture-ZZWXDUH2.js} +20 -21
  22. package/dist/{captureCompositionFrame-PHZ6UESC.js → captureCompositionFrame-VTN6VB5N.js} +19 -19
  23. package/dist/{captureFile-VIVGKFY4.js → captureFile-O7JMINHC.js} +3 -1
  24. package/dist/{catalog-6U6DBW2A.js → catalog-TTBH4Y6Z.js} +23 -24
  25. package/dist/{catch-up-CXGXBI5D.js → catch-up-M3CF57PU.js} +16 -17
  26. package/dist/{check-4YZZDHXU.js → check-K7ZBDKBZ.js} +54 -54
  27. package/dist/{checkAudio-WOI7A4XF.js → checkAudio-HZ3Z5BTZ.js} +16 -16
  28. package/dist/{checkBrowser-ITUJDOQK.js → checkBrowser-TO5M2QL2.js} +46 -47
  29. package/dist/{chunk-VI5AG2YK.js → chunk-2SX2EOPM.js} +8 -8
  30. package/dist/{chunk-YTF6LBWN.js → chunk-2WKG7HXZ.js} +2 -2
  31. package/dist/{chunk-63SZ5FQL.js → chunk-3JFV42QB.js} +4 -4
  32. package/dist/{chunk-6YPQSVVR.js → chunk-3LIMD4YP.js} +1 -1
  33. package/dist/{chunk-H6676SHA.js → chunk-4N3UVDIJ.js} +1 -1
  34. package/dist/{chunk-CXUT4XVT.js → chunk-54FVSPRH.js} +1 -1
  35. package/dist/{chunk-ZERXFV4P.js → chunk-5AULMCSV.js} +3 -3
  36. package/dist/{chunk-O2YBW4AN.js → chunk-5FWOWZAB.js} +8 -8
  37. package/dist/{chunk-6YYNEN54.js → chunk-5PL4LZYF.js} +269 -272
  38. package/dist/{chunk-Z4GE5BXC.js → chunk-5SDUQLZ3.js} +4 -3
  39. package/dist/{chunk-DJVONYVS.js → chunk-5TD7HBR3.js} +2 -2
  40. package/dist/{chunk-52VJYQB4.js → chunk-5WI3VKQW.js} +3 -3
  41. package/dist/{chunk-XNEAYK2D.js → chunk-5ZEBQO7Y.js} +6 -6
  42. package/dist/chunk-63HHKYU2.js +413 -0
  43. package/dist/{chunk-TPMBPH73.js → chunk-6FHIR4KD.js} +2 -2
  44. package/dist/{chunk-ZUGSYS6H.js → chunk-6IMVGVA4.js} +1 -1
  45. package/dist/{chunk-46KZHKVZ.js → chunk-6LCIO2YY.js} +2 -2
  46. package/dist/{chunk-OHQRQE7F.js → chunk-6MKM2RVL.js} +8 -1
  47. package/dist/{chunk-UPPOSWBD.js → chunk-6NVZYXDT.js} +8 -8
  48. package/dist/{chunk-LISUH6KH.js → chunk-6OQPKRPJ.js} +1 -1
  49. package/dist/{chunk-FQSX2Y2N.js → chunk-6PHVIKCJ.js} +10 -6
  50. package/dist/{chunk-WW7Z2W73.js → chunk-72GTIFAI.js} +20 -1
  51. package/dist/{chunk-NZTYGWRK.js → chunk-7DGBOZ4N.js} +1 -1
  52. package/dist/{chunk-FLRTT7XS.js → chunk-7JK2YE2G.js} +4 -4
  53. package/dist/{chunk-RKIRQ73U.js → chunk-7VHSPFBH.js} +2 -2
  54. package/dist/{chunk-B2RMMRJB.js → chunk-B4TLQLGI.js} +1 -1
  55. package/dist/{chunk-PKNU4DEG.js → chunk-BF6RWOUF.js} +5 -7
  56. package/dist/{chunk-AZO2YY3U.js → chunk-BIQJKM2O.js} +2 -2
  57. package/dist/{chunk-BO3R523I.js → chunk-BJYCLZBQ.js} +1 -1
  58. package/dist/{chunk-P7DCQJ6N.js → chunk-BMDABBHG.js} +1 -1
  59. package/dist/{chunk-7H5SDDTD.js → chunk-BZFVS36G.js} +1 -1
  60. package/dist/{chunk-W4DMQZL5.js → chunk-BZULWFMJ.js} +11 -2
  61. package/dist/{chunk-54Q3H2UQ.js → chunk-CDNVZEGQ.js} +9 -2
  62. package/dist/{chunk-CIB4TEE4.js → chunk-CGUAZCPL.js} +12 -12
  63. package/dist/{chunk-ANV4RVES.js → chunk-CZ43ZZFS.js} +1 -1
  64. package/dist/{chunk-HW4BZHWD.js → chunk-D5QT3ORV.js} +1 -1
  65. package/dist/{chunk-CV3U4IKB.js → chunk-DC5ZRTHD.js} +2 -2
  66. package/dist/{chunk-PZ23EDA5.js → chunk-DJVSNDF3.js} +26 -4
  67. package/dist/{chunk-6FDVPIOO.js → chunk-DONVZZLV.js} +1 -1
  68. package/dist/chunk-F24B2PLD.js +5049 -0
  69. package/dist/{chunk-T2WJO4XM.js → chunk-F2GWIWHN.js} +4 -3
  70. package/dist/{chunk-6AKETDJH.js → chunk-F4ROYQPH.js} +7 -4
  71. package/dist/{chunk-CMQZP52Y.js → chunk-F5QBIIFT.js} +6 -1
  72. package/dist/{chunk-M3JU24AI.js → chunk-FGFVUKPP.js} +1 -1
  73. package/dist/{chunk-SDNHWXXF.js → chunk-FKSUSFRT.js} +15 -15
  74. package/dist/{chunk-I2I3ARUF.js → chunk-FNSWA4FK.js} +1 -1
  75. package/dist/{chunk-LAGZGKKN.js → chunk-FOZBANEN.js} +3 -2
  76. package/dist/{chunk-5YPMCCCA.js → chunk-FRBQ3FIM.js} +1 -1
  77. package/dist/{chunk-I7P3G2EK.js → chunk-GGDJLN5I.js} +1 -21
  78. package/dist/{chunk-BGCZSSZN.js → chunk-GQTNVE7U.js} +4 -4
  79. package/dist/{chunk-3PSPF7V7.js → chunk-HGHBQDM5.js} +7 -7
  80. package/dist/{chunk-A4ZTSQLW.js → chunk-IEXRKKHC.js} +119 -4
  81. package/dist/{chunk-XRLVFSPS.js → chunk-IIS57Z3R.js} +3 -3
  82. package/dist/{chunk-Y7N65M2H.js → chunk-INVBU7DY.js} +7 -3
  83. package/dist/{chunk-43G3Z3HJ.js → chunk-IOPIOX5K.js} +66 -16
  84. package/dist/{chunk-4FNJ2QNP.js → chunk-IQKMIYLG.js} +6 -2
  85. package/dist/{chunk-52C62IQX.js → chunk-IX3K55NA.js} +6 -6
  86. package/dist/{chunk-XH34R2CM.js → chunk-IYYZMZD2.js} +2 -2
  87. package/dist/{chunk-Y5IO3G5V.js → chunk-J237HI2F.js} +38 -26
  88. package/dist/{chunk-IOPE4LJ2.js → chunk-J3X2RZON.js} +1 -1
  89. package/dist/chunk-JJ47LVJ7.js +58 -0
  90. package/dist/{chunk-CP7UNNLN.js → chunk-JLUOG6S2.js} +9 -6
  91. package/dist/{chunk-M7VAMZQW.js → chunk-JNHJX2BZ.js} +4 -2
  92. package/dist/{chunk-SYYF5SUA.js → chunk-K6UG4VWT.js} +3 -3
  93. package/dist/{chunk-IV3JATWQ.js → chunk-KUBXGMHI.js} +31 -29
  94. package/dist/{chunk-ADJCNH7M.js → chunk-L2GOO2UY.js} +1 -1
  95. package/dist/{chunk-6ELGYAFD.js → chunk-LI2TX7SN.js} +23 -5
  96. package/dist/{chunk-LSAZKSQW.js → chunk-LLLNVEUF.js} +1 -1
  97. package/dist/{chunk-BPFUMJPR.js → chunk-LMCFILEY.js} +4 -4
  98. package/dist/{chunk-G7VEYUZ2.js → chunk-LW33P24U.js} +210 -51
  99. package/dist/{chunk-BWRANVIS.js → chunk-M3UU4QRH.js} +4 -4
  100. package/dist/{chunk-KBHBSWEE.js → chunk-M457GQGR.js} +1 -1
  101. package/dist/{chunk-VK4PVFTZ.js → chunk-MVJ7AX6W.js} +2 -2
  102. package/dist/{chunk-Q6HWIM5T.js → chunk-NFUXYBOR.js} +1 -1
  103. package/dist/{chunk-KVVFSUMG.js → chunk-NHJ5YUBZ.js} +5 -9
  104. package/dist/{chunk-U6JW263W.js → chunk-NMOWXTCB.js} +2 -2
  105. package/dist/{chunk-ETD6Z4CT.js → chunk-NURN5W6M.js} +5 -5
  106. package/dist/{chunk-NBR3RFOK.js → chunk-OSDNRYQJ.js} +1 -1
  107. package/dist/{chunk-RANSC2AP.js → chunk-OT2KF34N.js} +12 -12
  108. package/dist/{chunk-6DEXJHPV.js → chunk-PBDBD4BY.js} +2 -2
  109. package/dist/{chunk-FYZFURBN.js → chunk-PQYICV7O.js} +1 -1
  110. package/dist/{chunk-5FFQ7YED.js → chunk-Q73OZV2V.js} +16 -16
  111. package/dist/{chunk-S73RS3QS.js → chunk-QBNHYXV3.js} +4 -4
  112. package/dist/{chunk-M56EN5Z5.js → chunk-QISOTHEQ.js} +8 -8
  113. package/dist/{chunk-E3V2WHNZ.js → chunk-QTBRVJ6N.js} +3 -3
  114. package/dist/{chunk-RXRL5CFO.js → chunk-QYPS3UYP.js} +3 -3
  115. package/dist/{chunk-SMR2QBOB.js → chunk-RSNZEWNW.js} +1 -1
  116. package/dist/{chunk-EOVICFGB.js → chunk-RVXE24LQ.js} +3 -3
  117. package/dist/{chunk-CF2MLHZJ.js → chunk-RYT22J4V.js} +3 -3
  118. package/dist/{chunk-ZNFYQMFN.js → chunk-SCNC7YPB.js} +1 -1
  119. package/dist/{chunk-KGDXQ7KV.js → chunk-SODLRBNC.js} +1 -1
  120. package/dist/{chunk-RCK5GLYA.js → chunk-STQGPDO4.js} +3 -3
  121. package/dist/{chunk-EQBDKYXR.js → chunk-SWOAB4GM.js} +5 -2
  122. package/dist/{chunk-MFDNMTOP.js → chunk-T37WJWV2.js} +1 -1
  123. package/dist/{chunk-TAJ4PPMZ.js → chunk-TCQKCUDA.js} +1 -1
  124. package/dist/{chunk-OSMSO25W.js → chunk-TKFKOWRI.js} +3 -3
  125. package/dist/{chunk-Y5NX2ID5.js → chunk-TM6HH2VV.js} +2 -2
  126. package/dist/{chunk-CT4R6NKU.js → chunk-TMYY4DV4.js} +3 -3
  127. package/dist/{chunk-RG32F3XB.js → chunk-TRXIWZTM.js} +1 -1
  128. package/dist/{chunk-WEWXIQPN.js → chunk-U46YQL7E.js} +1 -1
  129. package/dist/{chunk-4RPJGXWI.js → chunk-U5RXCKWJ.js} +2 -2
  130. package/dist/{chunk-4H65D2CK.js → chunk-UPG4MMIA.js} +51 -11
  131. package/dist/{chunk-7PZLR2JZ.js → chunk-UPR5TMLG.js} +2 -2
  132. package/dist/{chunk-N66SKEU4.js → chunk-UXJAMAZK.js} +2 -2
  133. package/dist/{chunk-52YPYXJT.js → chunk-V4Z37HFN.js} +4 -4
  134. package/dist/{chunk-I3XU2Q6N.js → chunk-V6EVV3XC.js} +5 -5
  135. package/dist/{chunk-W62GJ6S2.js → chunk-V7Q4XKRJ.js} +22 -23
  136. package/dist/{chunk-HOCC4J5C.js → chunk-VU4EPKFI.js} +1 -1
  137. package/dist/{chunk-QAH3I2PN.js → chunk-VXWASGGT.js} +5 -5
  138. package/dist/{chunk-DIUV6JDR.js → chunk-W5QBSRPF.js} +3 -3
  139. package/dist/{chunk-CYTQNTZM.js → chunk-WZTOPKVO.js} +8 -8
  140. package/dist/{chunk-OHN3OJQQ.js → chunk-X7NFWMWW.js} +1 -1
  141. package/dist/chunk-XDKEKXV4.js +29 -0
  142. package/dist/{chunk-FRBQYFUV.js → chunk-XEPGN46Q.js} +1 -1
  143. package/dist/{chunk-QNV4S6LE.js → chunk-XZ2MQF7V.js} +1 -1
  144. package/dist/{chunk-Q4IDT5XZ.js → chunk-Y67RJDEB.js} +1 -1
  145. package/dist/{chunk-WEH3EHVB.js → chunk-YNIADMNZ.js} +4 -4
  146. package/dist/{chunk-RTV6SDAW.js → chunk-YPRU66CC.js} +2 -2
  147. package/dist/{chunk-YNYNZ36R.js → chunk-YSJKA52M.js} +2 -2
  148. package/dist/{chunk-GS4EXK5R.js → chunk-YU5QNJMA.js} +25 -7
  149. package/dist/{chunk-AIJMFLLS.js → chunk-Z5THPTQ2.js} +3 -3
  150. package/dist/{chunk-4KQ53P4K.js → chunk-ZDQNMNFE.js} +6 -6
  151. package/dist/{chunk-MAU4K3YN.js → chunk-ZGIPMCML.js} +1 -1
  152. package/dist/{chunk-33HKMP6U.js → chunk-ZNTYIJ5K.js} +2 -2
  153. package/dist/{chunk-7N5GNBYP.js → chunk-ZUXES5HA.js} +4 -4
  154. package/dist/{clean-CESNOFW4.js → clean-LCQH4HFU.js} +29 -30
  155. package/dist/cli.js +103 -70
  156. package/dist/{cloud-KNNA5NNC.js → cloud-34YHQNNB.js} +7 -7
  157. package/dist/{cloud-D7DFYONW.js → cloud-QJMPTQ3N.js} +8 -9
  158. package/dist/{cloudrun-VHHNITZU.js → cloudrun-T7VVPRDG.js} +12 -12
  159. package/dist/{colors-CRTWLZ5S.js → colors-SS2KTOKM.js} +3 -3
  160. package/dist/{compare-XWGZQA3A.js → compare-5EBDE5ZT.js} +45 -46
  161. package/dist/{compiler-FQXZ5JHO.js → compiler-ZSIKBZBR.js} +5 -5
  162. package/dist/{component-B6LFSLBU.js → component-7TIFLFYC.js} +7 -7
  163. package/dist/{compositions-525OPGMN.js → compositions-TLCEVGBC.js} +19 -19
  164. package/dist/{contactSheet-RWRMLRZI.js → contactSheet-PZXG3REG.js} +4 -2
  165. package/dist/{curve-DJ7O5S2Z.js → curve-YABHYRHK.js} +19 -19
  166. package/dist/{cuts-3FEOKZF4.js → cuts-UFRBSLDQ.js} +20 -20
  167. package/dist/{delete-NYTX5VAV.js → delete-5OABQGPL.js} +14 -15
  168. package/dist/{deploy-FMWJCCAE.js → deploy-2OYZWP74.js} +5 -5
  169. package/dist/{describeProject-73BHU64A.js → describeProject-TX2WQLQ5.js} +14 -14
  170. package/dist/{destroy-6XY4WQWY.js → destroy-YAMTVR2W.js} +3 -3
  171. package/dist/{deterministicFonts-CEHTAMC7.js → deterministicFonts-SKRN3TCP.js} +4 -2
  172. package/dist/{diff-23KDGJCM.js → diff-2CKZ2QR7.js} +43 -44
  173. package/dist/{dist-AOXZZPN7.js → dist-EFXKPJJT.js} +3 -3
  174. package/dist/{dist-GQVNNVG3.js → dist-O45G7NET.js} +15 -16
  175. package/dist/{dist-6FQKCYPL.js → dist-QRXJMFI7.js} +4 -4
  176. package/dist/docs/motion-blur.md +1 -1
  177. package/dist/{docs-WYJSJGSF.js → docs-ZSVK3VZD.js} +3 -3
  178. package/dist/{doctor-XZ5HNJ6Q.js → doctor-Y436MAQR.js} +19 -19
  179. package/dist/{energy-HGHY2XGU.js → energy-UKLKTH7A.js} +18 -18
  180. package/dist/{events-EWQD3H2H.js → events-73W2IO3W.js} +22 -22
  181. package/dist/{events-MLOHGLUP.js → events-MC5XLD2Z.js} +14 -12
  182. package/dist/{events-UFPWOQGG.js → events-NKRFVAY3.js} +7 -7
  183. package/dist/{extract-HMDTHBPW.js → extract-ZG3MHNYX.js} +19 -19
  184. package/dist/{face-63Y52JXT.js → face-CFBT42SW.js} +19 -20
  185. package/dist/{feedback-NX2BHXLA.js → feedback-QGDEE3RB.js} +19 -19
  186. package/dist/{ffmpeg-Z5LJ5LYM.js → ffmpeg-UXHRG3MW.js} +9 -9
  187. package/dist/{figma-KRBH6NCD.js → figma-BD7RROGK.js} +6 -6
  188. package/dist/fontLocalizeCli.js +13 -13
  189. package/dist/{frames-L4GO5IOK.js → frames-ZF756HF3.js} +30 -23
  190. package/dist/{generate-FYK2JEF7.js → generate-LEUO4VVQ.js} +33 -34
  191. package/dist/{get-6DBWZJIS.js → get-4BL6VXKX.js} +14 -15
  192. package/dist/{gpuPolicy-IZK7ETZ6.js → gpuPolicy-K2JHXORZ.js} +9 -9
  193. package/dist/{grade-compare-DMFIEWKO.js → grade-compare-4UBZJQ7F.js} +44 -45
  194. package/dist/{gsapParserAcorn-5YD4N6HQ.js → gsapParserAcorn-SKGP4R4N.js} +1 -1
  195. package/dist/{heifImagePrep-WT26IRKU.js → heifImagePrep-O2WGVMAP.js} +10 -10
  196. package/dist/{help-7GR3533A.js → help-M55BSV4I.js} +4 -4
  197. package/dist/{history-OMOIUDSV.js → history-UIQBTMXZ.js} +18 -19
  198. package/dist/hyperframe.manifest.json +1 -1
  199. package/dist/hyperframe.runtime.iife.js +67 -67
  200. package/dist/hyperframes-player.global.js +1 -1
  201. package/dist/{info-E5AMEBHN.js → info-X4VTZ7PT.js} +21 -21
  202. package/dist/{init-DRZP3T3W.js → init-3Y5XMH6I.js} +42 -40
  203. package/dist/{ink-63PXDACB.js → ink-QKIGMWUR.js} +18 -18
  204. package/dist/{inspect-XKB4JFEJ.js → inspect-BUKYJF6N.js} +44 -45
  205. package/dist/{installer-D7OH77IN.js → installer-VPGNKCEU.js} +8 -8
  206. package/dist/{keyframes-D4YUT6E3.js → keyframes-6HO56WZG.js} +20 -17
  207. package/dist/{lambda-S5GFZOKF.js → lambda-XDVNHACQ.js} +23 -23
  208. package/dist/{layout-4N6AIQJB.js → layout-WELYAXO3.js} +44 -45
  209. package/dist/{lint-7I6I4UHH.js → lint-6R3E6Q5V.js} +18 -18
  210. package/dist/{lintProject-KXOX5QXB.js → lintProject-5CBL7VFV.js} +3 -3
  211. package/dist/{list-5PWGI2AA.js → list-SIL4TALK.js} +15 -16
  212. package/dist/{localPage-OGQ4OTTG.js → localPage-6VW25RGJ.js} +10 -10
  213. package/dist/{login-AT3RGU2L.js → login-3AFKZLIK.js} +10 -10
  214. package/dist/{logout-EKDVIU6Y.js → logout-FJ444652.js} +5 -5
  215. package/dist/{look-GDIIZRBH.js → look-RYLQYXNN.js} +20 -20
  216. package/dist/{manager-MKDNQ5KZ.js → manager-IAXYSRG5.js} +3 -3
  217. package/dist/{manager-3VDQLCQM.js → manager-T4ZHIMMY.js} +11 -10
  218. package/dist/{measure-KWM2A5QD.js → measure-XUK4GNAC.js} +16 -13
  219. package/dist/{media-treatment-4QBXQ3D7.js → media-treatment-SR5TX7CH.js} +23 -23
  220. package/dist/{media-use-LMCTTAMZ.js → media-use-3LOSIEZM.js} +7 -7
  221. package/dist/{models-C2DQQIH3.js → models-5SPPZN2E.js} +18 -18
  222. package/dist/{motionShot-NUX22LWA.js → motionShot-IFAFFPZF.js} +23 -23
  223. package/dist/{normalize-MBNGRVQA.js → normalize-PGMS24I2.js} +3 -1
  224. package/dist/{normalize-audio-K6LDICR5.js → normalize-audio-LQDUTXFM.js} +17 -17
  225. package/dist/{open-VPKHBPWT.js → open-XX2L2YSZ.js} +25 -26
  226. package/dist/{parakeetRunner-E4534WW7.js → parakeetRunner-R5WK6AJN.js} +18 -16
  227. package/dist/{pipeline-JUVHGTAC.js → pipeline-NMCWG5AA.js} +12 -12
  228. package/dist/{play-KBMGOUFL.js → play-Q2AYSHPW.js} +35 -36
  229. package/dist/{policies-EV7XPSQC.js → policies-5G7G26ZX.js} +3 -3
  230. package/dist/{preflight-2R2MAQIC.js → preflight-WG2O5KUQ.js} +13 -13
  231. package/dist/{present-MS6QCPUK.js → present-AOU7HG3N.js} +28 -29
  232. package/dist/{preview-BDQMRB6I.js → preview-PMGF6AQB.js} +33 -34
  233. package/dist/{probe-2OXPOPVD.js → probe-SESDMQ4Q.js} +18 -18
  234. package/dist/{producer-PECYJ4WO.js → producer-TGF2N7GF.js} +1 -1
  235. package/dist/{progress-FWJJMPIQ.js → progress-OOEHTBBU.js} +3 -3
  236. package/dist/{projectConfig-CZYM3VZF.js → projectConfig-UHYPGWD5.js} +12 -13
  237. package/dist/{prompts-27EPTM64.js → prompts-RYVLXI7Q.js} +3 -3
  238. package/dist/{publication-JIWSYWXN.js → publication-5KOANEHK.js} +6 -6
  239. package/dist/{publish-ZKNUSOPR.js → publish-C3ARXH6D.js} +24 -25
  240. package/dist/{refresh-ZHLUUENK.js → refresh-YY4K2RWR.js} +5 -5
  241. package/dist/{remove-background-VQ7SFKC5.js → remove-background-ZHAYTN7D.js} +17 -17
  242. package/dist/{render-753ERHTH.js → render-TSV3XTQV.js} +11 -11
  243. package/dist/{render-JIQF7TIY.js → render-UNWC5ZIO.js} +43 -44
  244. package/dist/{render-4UHIUXYW.js → render-XYWARHW5.js} +73 -297
  245. package/dist/{render-batch-7ZOJOEPJ.js → render-batch-ISMXAG7F.js} +11 -11
  246. package/dist/renderSetupWorker.js +6 -6
  247. package/dist/{resolver-QQOL74GH.js → resolver-ZWNLOG6O.js} +9 -9
  248. package/dist/{reverse-CC3GYBFW.js → reverse-Q76RJRN5.js} +1 -1
  249. package/dist/{run-IQLZHH6D.js → run-UPKPPRV7.js} +7 -6
  250. package/dist/{screenshotCapture-2IJOZZTG.js → screenshotCapture-N6BXDAMK.js} +11 -11
  251. package/dist/{sherpa-GISX4B24.js → sherpa-5YE5FIOR.js} +17 -15
  252. package/dist/{sites-O7A7G3ZQ.js → sites-NWEJJNAZ.js} +3 -3
  253. package/dist/skills/hyperframes/SKILL.md +4 -1
  254. package/dist/skills/hyperframes/references/motion.md +1 -1
  255. package/dist/skills/hyperframes/references/skill-lifecycle.md +2 -2
  256. package/dist/{skills-VIC2VZZQ.js → skills-U4NHFYH4.js} +17 -16
  257. package/dist/{skillsUpdateCheck-SM7RAGJI.js → skillsUpdateCheck-XJA6VEZZ.js} +6 -6
  258. package/dist/{snapshot-2ABRVH76.js → snapshot-V4BSRUXI.js} +60 -59
  259. package/dist/{src-7HHPSUSN.js → src-FNXCLKWN.js} +8 -8
  260. package/dist/{src-OZI5O5QD.js → src-JVYKW7RE.js} +12 -12
  261. package/dist/{start-OJ2I4XZP.js → start-TSIACBUA.js} +46 -34
  262. package/dist/{staticProjectServer-4YDXULWX.js → staticProjectServer-NTSNYFWQ.js} +26 -27
  263. package/dist/{status-DJEV6OOU.js → status-53Z4YLQ7.js} +32 -27
  264. package/dist/studio/assets/{codec-BxQIoYb1.js → codec-YP1ZxmPt.js} +1 -1
  265. package/dist/studio/assets/{hyperframes-player-CPnasNX6.js → hyperframes-player-Cy3KqtCh.js} +1 -1
  266. package/dist/studio/assets/{index-QCoqIBrS.js → index-BNTUBT5h.js} +78 -78
  267. package/dist/studio/assets/{index-BDQdyS01.js → index-C4B6p8IF.js} +1 -1
  268. package/dist/studio/assets/{pausedVideoDecoder-CUTtHVKV.js → pausedVideoDecoder-52lsHc7p.js} +1 -1
  269. package/dist/studio/index.html +1 -1
  270. package/dist/{studio-api-Z3ZDQMO7.js → studio-api-2I44WB4P.js} +15 -16
  271. package/dist/{studioServer-AYXFWMY2.js → studioServer-HSYYGQU3.js} +94 -78
  272. package/dist/{sync-ASO6S77T.js → sync-B2HPDX37.js} +20 -20
  273. package/dist/{synthesize-GX74JPPZ.js → synthesize-MDW4ZWTN.js} +2 -3
  274. package/dist/{system-FDPS57FU.js → system-W2ZTDOLV.js} +2 -2
  275. package/dist/{telemetry-BMPRZBBX.js → telemetry-5CLJMTHU.js} +4 -4
  276. package/dist/{telemetry-AFCV2QLQ.js → telemetry-L4KX6ADA.js} +12 -12
  277. package/dist/templates/_shared/AGENTS.md +2 -2
  278. package/dist/templates/_shared/CLAUDE.md +2 -2
  279. package/dist/{templates-CII6AG7E.js → templates-MKR4FTPR.js} +50 -35
  280. package/dist/{timeline-DQ5DZUFL.js → timeline-VDFI4ABH.js} +32 -33
  281. package/dist/{tokens-JS2IMFGF.js → tokens-XYVGSKDY.js} +6 -6
  282. package/dist/{transcribe-LH7S5HSM.js → transcribe-3QGLLMEQ.js} +15 -12
  283. package/dist/{transcribe-WWKYZLEO.js → transcribe-A7QZYVNX.js} +39 -39
  284. package/dist/{tts-QW53FBKW.js → tts-HOZ6X3MD.js} +6 -6
  285. package/dist/{update-EE7PVVJY.js → update-AWSCA73T.js} +18 -17
  286. package/dist/{updateCheck-KY2HRZZA.js → updateCheck-ATDIIE24.js} +5 -5
  287. package/dist/{upgrade-H266K5KB.js → upgrade-RJNDUCWP.js} +8 -8
  288. package/dist/{urlDownloader-TRUJTJTT.js → urlDownloader-RE6IIDWK.js} +8 -8
  289. package/dist/{validate-6RDVENOL.js → validate-YWO6GA5Q.js} +35 -36
  290. package/dist/{video-B6HLIKGZ.js → video-RKEUBWJI.js} +14 -14
  291. package/dist/{voices-RQXHSMIG.js → voices-GESP52KZ.js} +31 -32
  292. package/dist/warmCheck.js +54 -54
  293. package/package.json +1 -1
  294. package/dist/chunk-ITTVMZ32.js +0 -5035
  295. package/dist/chunk-SXYRNJBG.js +0 -173
  296. package/dist/chunk-YWRUQ7XZ.js +0 -107
@@ -11,17 +11,17 @@ import {
11
11
  iterateFontFamilyDeclarations,
12
12
  normalizeSystemFontPrimaryFamilies,
13
13
  resolveFontFamilyDeclarationFamilies
14
- } from "./chunk-CP7UNNLN.js";
14
+ } from "./chunk-JLUOG6S2.js";
15
15
  import {
16
16
  Semaphore,
17
17
  prepareHeifImageInputs,
18
18
  withMediaProbeSlot
19
- } from "./chunk-ZERXFV4P.js";
19
+ } from "./chunk-5AULMCSV.js";
20
20
  import {
21
21
  EncoderInterruptedError,
22
22
  encoderFailureError,
23
23
  prepareAnimatedGifInputs
24
- } from "./chunk-XRLVFSPS.js";
24
+ } from "./chunk-IIS57Z3R.js";
25
25
  import {
26
26
  openRangeEnd,
27
27
  parseEncoderOptions
@@ -186,7 +186,7 @@ import {
186
186
  videoAudioId,
187
187
  videoStartOnMediaTimeline,
188
188
  writeCapturedFrame
189
- } from "./chunk-W62GJ6S2.js";
189
+ } from "./chunk-V7Q4XKRJ.js";
190
190
  import {
191
191
  assignBundledRuntimeCompositionIds,
192
192
  emitMountedModuleScripts,
@@ -198,12 +198,13 @@ import {
198
198
  parsesAsScript,
199
199
  prepareFlattenedInnerRoot,
200
200
  stripSdrPngColourTags
201
- } from "./chunk-KVVFSUMG.js";
201
+ } from "./chunk-NHJ5YUBZ.js";
202
202
  import {
203
203
  collectScratchLeftovers,
204
+ createStagingDir,
204
205
  removeScratch,
205
206
  renameWithRetry
206
- } from "./chunk-YWRUQ7XZ.js";
207
+ } from "./chunk-IEXRKKHC.js";
207
208
  import {
208
209
  TRANSITIONS,
209
210
  convertTransfer,
@@ -226,7 +227,7 @@ import {
226
227
  redactTelemetryString,
227
228
  resolveAuthoredTimingWindow,
228
229
  toFps
229
- } from "./chunk-CF2MLHZJ.js";
230
+ } from "./chunk-RYT22J4V.js";
230
231
  import {
231
232
  COMPOSITION_SOURCE_URL,
232
233
  HF_COLOR_GRADING_ATTR,
@@ -261,14 +262,14 @@ import {
261
262
  sourceTimeAt,
262
263
  styleElementsFor,
263
264
  timeAtSourceTime
264
- } from "./chunk-ITTVMZ32.js";
265
+ } from "./chunk-F24B2PLD.js";
265
266
  import {
266
267
  chromeMajorCeiling
267
268
  } from "./chunk-WE42NVH7.js";
268
269
  import {
269
270
  lintHyperframeHtml,
270
271
  resolveReferencedStart
271
- } from "./chunk-PZ23EDA5.js";
272
+ } from "./chunk-DJVSNDF3.js";
272
273
  import {
273
274
  isUnresolvedAssetPlaceholder,
274
275
  readProjectFile,
@@ -296,7 +297,7 @@ import {
296
297
  rewriteAssetPaths,
297
298
  rewriteCssAssetUrls,
298
299
  rewriteInlineStyleAssetUrls
299
- } from "./chunk-OHQRQE7F.js";
300
+ } from "./chunk-6MKM2RVL.js";
300
301
  import {
301
302
  CANVAS_DIMENSIONS,
302
303
  HTML_BODY_CSS_HEIGHT_FIRST_RE,
@@ -307,7 +308,7 @@ import {
307
308
  isAspectAgnosticResolutionAlias,
308
309
  normalizeResolutionFlag,
309
310
  suggestMatchingPreset
310
- } from "./chunk-43G3Z3HJ.js";
311
+ } from "./chunk-IOPIOX5K.js";
311
312
  import {
312
313
  parseHTML
313
314
  } from "./chunk-GWTIFRF5.js";
@@ -324,7 +325,7 @@ import {
324
325
  appendFileSync
325
326
  } from "fs";
326
327
  import { tmpdir as tmpdir2 } from "os";
327
- import { join as join29, dirname as dirname11, resolve as resolve6 } from "path";
328
+ import { join as join28, dirname as dirname11, resolve as resolve6 } from "path";
328
329
  import { totalmem as totalmem2 } from "os";
329
330
  import { randomUUID } from "crypto";
330
331
  import { fileURLToPath as fileURLToPath4 } from "url";
@@ -1775,13 +1776,12 @@ var RenderExecutionContext = class {
1775
1776
 
1776
1777
  // ../producer/src/services/render/artifactTransaction.ts
1777
1778
  import { closeSync as closeSync2, existsSync as existsSync6, fstatSync as fstatSync2, openSync as openSync2, readSync, readdirSync as readdirSync2, rmSync as rmSync3 } from "fs";
1778
- import { basename as basename3, dirname as dirname4, extname as extname2, join as join5, resolve as resolve4 } from "path";
1779
+ import { basename as basename4, dirname as dirname4, extname as extname2, join as join5, resolve as resolve4 } from "path";
1779
1780
 
1780
1781
  // ../producer/src/services/render/renderDirOwner.ts
1781
1782
  import {
1782
1783
  existsSync as existsSync5,
1783
1784
  lstatSync,
1784
- mkdtempSync,
1785
1785
  readFileSync as readFileSync2,
1786
1786
  readdirSync,
1787
1787
  readlinkSync,
@@ -1789,7 +1789,7 @@ import {
1789
1789
  writeFileSync as writeFileSync2
1790
1790
  } from "fs";
1791
1791
  import { hostname, uptime } from "os";
1792
- import { dirname as dirname3, join as join4 } from "path";
1792
+ import { basename as basename3, dirname as dirname3, join as join4 } from "path";
1793
1793
  var OWNER_FILE = "owner.json";
1794
1794
  var TRANSACTION_BACKUP = "backup";
1795
1795
  var RENDER_JOB_DIR = /^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/;
@@ -1809,7 +1809,7 @@ function pidScope() {
1809
1809
  };
1810
1810
  }
1811
1811
  function createOwnedRenderDir(prefix) {
1812
- const dir = mkdtempSync(prefix);
1812
+ const dir = createStagingDir(dirname3(prefix), basename3(prefix));
1813
1813
  const owner = { pid: process.pid, ...pidScope() };
1814
1814
  writeFileSync2(join4(dir, OWNER_FILE), JSON.stringify(owner));
1815
1815
  return dir;
@@ -1919,7 +1919,7 @@ function buildArtifactExpectation(input) {
1919
1919
  function createSiblingTransactionDirectory(destination) {
1920
1920
  const parent = dirname4(destination);
1921
1921
  const extension = extname2(destination);
1922
- const stem = extension ? basename3(destination, extension) : basename3(destination);
1922
+ const stem = extension ? basename4(destination, extension) : basename4(destination);
1923
1923
  return createOwnedRenderDir(join5(parent, `.${stem}.hf-transaction-`));
1924
1924
  }
1925
1925
  function assertReadableNonEmptyFile(path) {
@@ -1995,7 +1995,7 @@ var ArtifactTransaction = class {
1995
1995
  this.logger = logger;
1996
1996
  this.destinationPath = resolve4(destinationPath);
1997
1997
  this.transactionDirectory = createSiblingTransactionDirectory(this.destinationPath);
1998
- this.stagingPath = join5(this.transactionDirectory, basename3(this.destinationPath));
1998
+ this.stagingPath = join5(this.transactionDirectory, basename4(this.destinationPath));
1999
1999
  this.backupPath = join5(this.transactionDirectory, TRANSACTION_BACKUP);
2000
2000
  this.durationProbe = durationProbe;
2001
2001
  }
@@ -2051,7 +2051,7 @@ var ArtifactTransaction = class {
2051
2051
  }
2052
2052
  if (expected.expectedFrames === void 0) return;
2053
2053
  const frameCount = files.filter(
2054
- (file) => dirname4(file) === this.stagingPath && /^frame_\d+\.png$/.test(basename3(file))
2054
+ (file) => dirname4(file) === this.stagingPath && /^frame_\d+\.png$/.test(basename4(file))
2055
2055
  ).length;
2056
2056
  if (frameCount === 0) {
2057
2057
  throw new Error(
@@ -2290,7 +2290,7 @@ function replanAfterFailure(plan2, failure) {
2290
2290
 
2291
2291
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
2292
2292
  import { existsSync as existsSync7, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
2293
- import { join as join10 } from "path";
2293
+ import { join as join9 } from "path";
2294
2294
 
2295
2295
  // ../producer/src/services/render/perfSummary.ts
2296
2296
  import { arch, cpus, platform, totalmem } from "os";
@@ -3143,8 +3143,7 @@ async function compositeHdrFrame(ctx, canvas, time, fullStacking, elementFilter,
3143
3143
  }
3144
3144
 
3145
3145
  // ../producer/src/services/render/stages/captureHdrResources.ts
3146
- import { mkdirSync as mkdirSync2, mkdtempSync as mkdtempSync2, readFileSync as readFileSync3, rmSync as rmSync5, statSync as statSync2, statfsSync } from "fs";
3147
- import { join as join8 } from "path";
3146
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync3, rmSync as rmSync5, statSync as statSync2, statfsSync } from "fs";
3148
3147
 
3149
3148
  // ../producer/src/services/hdrFrameWindows.ts
3150
3149
  import { closeSync as closeSync3, constants as constants2, openSync as openSync3, rmSync as rmSync4 } from "fs";
@@ -3486,7 +3485,7 @@ async function extractHdrVideoFrames(args) {
3486
3485
  if (!video || !planned) continue;
3487
3486
  const { window: window2, metadata } = planned;
3488
3487
  mkdirSync2(framesDir, { recursive: true });
3489
- const frameDir = mkdtempSync2(join8(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`));
3488
+ const frameDir = createStagingDir(framesDir, `hdr_${tempDirSafePrefix(videoId)}-`);
3490
3489
  createdFrameDirs.add(frameDir);
3491
3490
  const dims = prep.hdrExtractionDims.get(videoId) ?? { width, height };
3492
3491
  const frameSize = dims.width * dims.height * 6;
@@ -3941,7 +3940,7 @@ function isTargetLossError(error) {
3941
3940
  // ../producer/src/services/render/stages/captureStreamingStage.ts
3942
3941
  import { mkdtemp, writeFile } from "fs/promises";
3943
3942
  import { tmpdir } from "os";
3944
- import { join as join9 } from "path";
3943
+ import { join as join8 } from "path";
3945
3944
 
3946
3945
  // ../producer/src/services/render/stallClock.ts
3947
3946
  var SUSPEND_GAP_MS = 15e3;
@@ -4144,11 +4143,11 @@ async function verifyDrawElementSample(session, idx, buf, ctx) {
4144
4143
  return;
4145
4144
  }
4146
4145
  if (db < verifyMinDb) {
4147
- const dumpDir = await mkdtemp(join9(tmpdir(), "hf-de-verify-fail-")).catch(() => null);
4146
+ const dumpDir = await mkdtemp(join8(tmpdir(), "hf-de-verify-fail-")).catch(() => null);
4148
4147
  if (dumpDir) {
4149
4148
  await Promise.all([
4150
- writeFile(join9(dumpDir, `frame-${idx}-de.jpg`), buf),
4151
- writeFile(join9(dumpDir, `frame-${idx}-truth.jpg`), truth)
4149
+ writeFile(join8(dumpDir, `frame-${idx}-de.jpg`), buf),
4150
+ writeFile(join8(dumpDir, `frame-${idx}-truth.jpg`), truth)
4152
4151
  ]).catch(() => {
4153
4152
  });
4154
4153
  }
@@ -4719,7 +4718,7 @@ async function runCaptureStreamingStage(input) {
4719
4718
 
4720
4719
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
4721
4720
  function segmentOutputPath(segmentDir, index) {
4722
- return join10(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
4721
+ return join9(segmentDir, `segment_${String(index).padStart(5, "0")}.mp4`);
4723
4722
  }
4724
4723
  function segmentEncoderOptions(base, segment) {
4725
4724
  return {
@@ -5047,7 +5046,7 @@ async function runCaptureSegmentedStage(input) {
5047
5046
  const { log, dedupPerfs, assertNotAborted } = input;
5048
5047
  const deps = { ...DEFAULT_DEPS, ...input.deps };
5049
5048
  const segments = planSegments(input.totalFrames, input.segmentFrames);
5050
- const segmentDir = input.segmentDir ?? join10(input.workDir, "segments");
5049
+ const segmentDir = input.segmentDir ?? join9(input.workDir, "segments");
5051
5050
  mkdirSync3(segmentDir, { recursive: true });
5052
5051
  const skip = input.completedSegments ?? /* @__PURE__ */ new Set();
5053
5052
  const pending = segments.filter((s) => !skip.has(s.index));
@@ -5194,7 +5193,7 @@ function startRenderEtaGuard(options) {
5194
5193
  }
5195
5194
 
5196
5195
  // ../producer/src/services/render/captureCost.ts
5197
- import { join as join11 } from "path";
5196
+ import { join as join10 } from "path";
5198
5197
  var CAPTURE_CALIBRATION_TARGET_MS = 600;
5199
5198
  var MAX_MEASURED_CAPTURE_COST_MULTIPLIER = 8;
5200
5199
  var CAPTURE_CALIBRATION_PROTOCOL_TIMEOUT_MS = 3e4;
@@ -5431,7 +5430,7 @@ async function runCaptureCalibration(input) {
5431
5430
  });
5432
5431
  let calibration;
5433
5432
  try {
5434
- calibration = await runOneCalibration(join11(workDir, "capture-calibration"), calibrationCfg);
5433
+ calibration = await runOneCalibration(join10(workDir, "capture-calibration"), calibrationCfg);
5435
5434
  } catch (error) {
5436
5435
  const shouldFallback = !forceScreenshot && shouldFallbackToScreenshotAfterCalibrationError(error);
5437
5436
  if (!shouldFallback) {
@@ -5465,7 +5464,7 @@ async function runCaptureCalibration(input) {
5465
5464
  const screenshotCfg = createCaptureCalibrationConfig({ ...cfg, forceScreenshot: true });
5466
5465
  try {
5467
5466
  calibration = await runOneCalibration(
5468
- join11(workDir, "capture-calibration-screenshot"),
5467
+ join10(workDir, "capture-calibration-screenshot"),
5469
5468
  screenshotCfg
5470
5469
  );
5471
5470
  } catch (fallbackError) {
@@ -5530,7 +5529,7 @@ function checkPageNeverReady(input) {
5530
5529
 
5531
5530
  // ../producer/src/services/render/deferredVideoFrames.ts
5532
5531
  import { mkdirSync as mkdirSync4, rmSync as rmSync7 } from "fs";
5533
- import { dirname as dirname5, join as join12 } from "path";
5532
+ import { dirname as dirname5, join as join11 } from "path";
5534
5533
  function contiguousRuns(sortedIndexes) {
5535
5534
  const runs2 = [];
5536
5535
  for (const index of sortedIndexes) {
@@ -5569,7 +5568,7 @@ async function extractDeferredFrames(input) {
5569
5568
  const shown = shownDeferredFrameIndexes(input, input.frames, input.fps);
5570
5569
  return Promise.all(
5571
5570
  deferred.map(async (video) => {
5572
- const outputDir = join12(input.outputRoot, video.videoId);
5571
+ const outputDir = join11(input.outputRoot, video.videoId);
5573
5572
  const indexes = [...shown.get(video.videoId) ?? []].sort((a, b) => a - b);
5574
5573
  if (indexes.length === 0) {
5575
5574
  return { ...video, outputDir, framePaths: /* @__PURE__ */ new Map(), ownedByLookup: false };
@@ -5638,9 +5637,9 @@ async function extractAllDeferredFrames(extracted, input) {
5638
5637
 
5639
5638
  // ../producer/src/services/render/segmentVideoFrames.ts
5640
5639
  import { mkdirSync as mkdirSync5, rmSync as rmSync8 } from "fs";
5641
- import { join as join13 } from "path";
5640
+ import { join as join12 } from "path";
5642
5641
  function segmentFramesDir(rootDir, index) {
5643
- return join13(rootDir, "segment-frames", `segment_${String(index).padStart(5, "0")}`);
5642
+ return join12(rootDir, "segment-frames", `segment_${String(index).padStart(5, "0")}`);
5644
5643
  }
5645
5644
  function createSegmentVideoFrames(input) {
5646
5645
  const extractFrames = input.extractFrames ?? extractDeferredFrames;
@@ -5670,7 +5669,7 @@ function createSegmentVideoFrames(input) {
5670
5669
  let onDemandCalls = 0;
5671
5670
  const onDemandHook = () => Object.assign(
5672
5671
  async (page, time, heldVideoTime) => {
5673
- const dir = join13(
5672
+ const dir = join12(
5674
5673
  input.rootDir,
5675
5674
  "segment-frames",
5676
5675
  `on-demand_${String(onDemandCalls++).padStart(5, "0")}`
@@ -5687,7 +5686,7 @@ function createSegmentVideoFrames(input) {
5687
5686
  );
5688
5687
  return {
5689
5688
  async forFrames(frames, name) {
5690
- const dir = join13(input.rootDir, "segment-frames", name);
5689
+ const dir = join12(input.rootDir, "segment-frames", name);
5691
5690
  const release = () => rmSync8(dir, { recursive: true, force: true });
5692
5691
  try {
5693
5692
  release();
@@ -5740,7 +5739,7 @@ function createSegmentVideoFrames(input) {
5740
5739
 
5741
5740
  // ../producer/src/services/render/videoFrameWindow.ts
5742
5741
  import { readdirSync as readdirSync3, statSync as statSync4 } from "fs";
5743
- import { join as join14 } from "path";
5742
+ import { join as join13 } from "path";
5744
5743
  function shouldWindowVideoFrames(args) {
5745
5744
  return args.segmented && args.env.HF_VIDEO_FRAME_WINDOW?.trim().toLowerCase() === "true";
5746
5745
  }
@@ -5753,7 +5752,7 @@ function directoryBytes(path) {
5753
5752
  return 0;
5754
5753
  }
5755
5754
  for (const entry of entries) {
5756
- const child2 = join14(path, entry.name);
5755
+ const child2 = join13(path, entry.name);
5757
5756
  try {
5758
5757
  bytes += entry.isDirectory() ? directoryBytes(child2) : statSync4(child2).size;
5759
5758
  } catch {
@@ -5771,7 +5770,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
5771
5770
  ...worker,
5772
5771
  async prepare(segment) {
5773
5772
  await worker.prepare(segment);
5774
- const held = directoryBytes(join14(rootDir, "segment-frames"));
5773
+ const held = directoryBytes(join13(rootDir, "segment-frames"));
5775
5774
  if (held > peak) {
5776
5775
  peak = held;
5777
5776
  onPeak(peak);
@@ -5785,7 +5784,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
5785
5784
  // ../producer/src/services/render/segmentManifest.ts
5786
5785
  import { createHash as createHash2 } from "crypto";
5787
5786
  import { existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
5788
- import { join as join15 } from "path";
5787
+ import { join as join14 } from "path";
5789
5788
  var MANIFEST_FILENAME = "segments.json";
5790
5789
  function computeSegmentPlanHash(input) {
5791
5790
  const ordered = [
@@ -5812,7 +5811,7 @@ function computeSegmentPlanHash(input) {
5812
5811
  return createHash2("sha256").update(ordered.join(" ")).digest("hex").slice(0, 16);
5813
5812
  }
5814
5813
  function segmentDirFor(projectRendersDir, planHash) {
5815
- return join15(projectRendersDir, ".hf-segments", planHash);
5814
+ return join14(projectRendersDir, ".hf-segments", planHash);
5816
5815
  }
5817
5816
  function hasNumber(value, key) {
5818
5817
  return key in value && typeof Reflect.get(value, key) === "number";
@@ -5830,7 +5829,7 @@ function isManifest(value) {
5830
5829
  return Reflect.get(value, "version") === 1 && hasString(value, "planHash") && hasNumber(value, "totalFrames") && hasNumber(value, "segmentFrames") && Array.isArray(completed) && completed.every(isEntry);
5831
5830
  }
5832
5831
  function readSegmentManifest(segmentDir) {
5833
- const path = join15(segmentDir, MANIFEST_FILENAME);
5832
+ const path = join14(segmentDir, MANIFEST_FILENAME);
5834
5833
  if (!existsSync8(path)) return null;
5835
5834
  try {
5836
5835
  const parsed = JSON.parse(readFileSync4(path, "utf-8"));
@@ -5841,9 +5840,9 @@ function readSegmentManifest(segmentDir) {
5841
5840
  }
5842
5841
  function writeSegmentManifest(segmentDir, manifest) {
5843
5842
  mkdirSync6(segmentDir, { recursive: true });
5844
- const tmp = join15(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
5843
+ const tmp = join14(segmentDir, `${MANIFEST_FILENAME}.${process.pid}.tmp`);
5845
5844
  writeFileSync3(tmp, JSON.stringify(manifest, null, 2), "utf-8");
5846
- renameWithRetry(tmp, join15(segmentDir, MANIFEST_FILENAME));
5845
+ renameWithRetry(tmp, join14(segmentDir, MANIFEST_FILENAME));
5847
5846
  }
5848
5847
  async function probeSegmentFrameCount(path, probe) {
5849
5848
  try {
@@ -6419,12 +6418,12 @@ function countAuthoredTimedClips(html) {
6419
6418
 
6420
6419
  // ../producer/src/services/render/stages/compileStage.ts
6421
6420
  import { existsSync as existsSync11, writeFileSync as writeFileSync4 } from "fs";
6422
- import { join as join17 } from "path";
6421
+ import { join as join16 } from "path";
6423
6422
 
6424
6423
  // ../producer/src/services/htmlCompiler.ts
6425
6424
  import { createHash as createHash4 } from "crypto";
6426
6425
  import { createReadStream as createReadStream2, existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync5 } from "fs";
6427
- import { join as join16, dirname as dirname6, resolve as resolve5, basename as basename4, relative as relative2, sep as sep2 } from "path";
6426
+ import { join as join15, dirname as dirname6, resolve as resolve5, basename as basename5, relative as relative2, sep as sep2 } from "path";
6428
6427
 
6429
6428
  // ../producer/src/services/renderMediaCollector.ts
6430
6429
  function resolveHostEnd(host, hostStart) {
@@ -6892,7 +6891,7 @@ function detectShaderTransitionUsage(html) {
6892
6891
  async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, downloadDir, tagName, elementIdentity, log, urlByAbsentLocalPath, probes) {
6893
6892
  let filePath = src;
6894
6893
  if (isHttpUrl(src)) {
6895
- const remoteDir = join16(downloadDir, REMOTE_MEDIA_SUBDIR);
6894
+ const remoteDir = join15(downloadDir, REMOTE_MEDIA_SUBDIR);
6896
6895
  if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
6897
6896
  try {
6898
6897
  filePath = await downloadToTemp(src, remoteDir, void 0, void 0, void 0, {
@@ -6903,7 +6902,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
6903
6902
  }
6904
6903
  } else {
6905
6904
  filePath = decodedUrlPath(src);
6906
- if (!filePath.startsWith("/")) filePath = join16(baseDir, filePath);
6905
+ if (!filePath.startsWith("/")) filePath = join15(baseDir, filePath);
6907
6906
  filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
6908
6907
  }
6909
6908
  if (!isHttpUrl(filePath) && !existsSync10(filePath)) {
@@ -7519,7 +7518,7 @@ async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLab
7519
7518
  const remoteMediaAssets = /* @__PURE__ */ new Map();
7520
7519
  const urlToRelPath = /* @__PURE__ */ new Map();
7521
7520
  for (const [url, absPath] of urlToLocal) {
7522
- const relPath = `${REMOTE_MEDIA_SUBDIR}/${basename4(absPath)}`;
7521
+ const relPath = `${REMOTE_MEDIA_SUBDIR}/${basename5(absPath)}`;
7523
7522
  remoteMediaAssets.set(relPath, absPath);
7524
7523
  urlToRelPath.set(url, relPath);
7525
7524
  }
@@ -7543,7 +7542,7 @@ async function localizeRemoteMediaSources(html, downloadDir) {
7543
7542
  return downloadAndRewriteUrls(
7544
7543
  urlSet,
7545
7544
  html,
7546
- join16(downloadDir, REMOTE_MEDIA_SUBDIR),
7545
+ join15(downloadDir, REMOTE_MEDIA_SUBDIR),
7547
7546
  "Remote media download failed",
7548
7547
  "Localized remote media source(s)"
7549
7548
  );
@@ -7558,7 +7557,7 @@ async function localizeRemoteImageSources(html, downloadDir) {
7558
7557
  return downloadAndRewriteUrls(
7559
7558
  urlSet,
7560
7559
  html,
7561
- join16(downloadDir, REMOTE_MEDIA_SUBDIR),
7560
+ join15(downloadDir, REMOTE_MEDIA_SUBDIR),
7562
7561
  "Remote image download failed",
7563
7562
  "Localized remote image source(s)"
7564
7563
  );
@@ -7574,7 +7573,7 @@ async function localizeRemoteBackgroundImages(html, downloadDir) {
7574
7573
  return downloadAndRewriteUrls(
7575
7574
  urlSet,
7576
7575
  html,
7577
- join16(downloadDir, REMOTE_MEDIA_SUBDIR),
7576
+ join15(downloadDir, REMOTE_MEDIA_SUBDIR),
7578
7577
  "Remote background-image download failed",
7579
7578
  "Localized remote background-image(s)",
7580
7579
  // Quoted url('..')/url("..") are rewritten by downloadAndRewriteUrls' default
@@ -7729,7 +7728,7 @@ function localizeFontFaceUrls(html, downloadDir) {
7729
7728
  return downloadAndRewriteUrls(
7730
7729
  collectFontFaceUrls(html),
7731
7730
  html,
7732
- join16(downloadDir, REMOTE_MEDIA_SUBDIR),
7731
+ join15(downloadDir, REMOTE_MEDIA_SUBDIR),
7733
7732
  "Remote font download failed",
7734
7733
  "Localized remote font face(s)",
7735
7734
  (h, url, relPath) => h.replaceAll(`url(${url})`, `url("${relPath}")`)
@@ -7755,7 +7754,7 @@ async function readLocalFont(absPath) {
7755
7754
  return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
7756
7755
  }
7757
7756
  async function embedLocalFontFaces(html, projectDir) {
7758
- const { fontToDataUri: toDataUri } = await import("./deterministicFonts-CEHTAMC7.js");
7757
+ const { fontToDataUri: toDataUri } = await import("./deterministicFonts-SKRN3TCP.js");
7759
7758
  const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
7760
7759
  const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
7761
7760
  let result = html;
@@ -8406,10 +8405,10 @@ function adaptAspectAgnosticResolution(requested, aspectAgnostic, width, height,
8406
8405
  }
8407
8406
  function resolveEntryHtmlPath(input) {
8408
8407
  const { projectDir, workDir, entryFile, log } = input;
8409
- const htmlPath = join17(projectDir, entryFile);
8408
+ const htmlPath = join16(projectDir, entryFile);
8410
8409
  const rawEntry = readTextFile(htmlPath);
8411
8410
  if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
8412
- const projectIndexPath = join17(projectDir, "index.html");
8411
+ const projectIndexPath = join16(projectDir, "index.html");
8413
8412
  if (!existsSync11(projectIndexPath)) {
8414
8413
  throw new Error(
8415
8414
  `Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
@@ -8425,7 +8424,7 @@ function resolveEntryHtmlPath(input) {
8425
8424
  `Entry file "${entryFile}" is not mounted from index.html via data-composition-src, so it cannot be rendered independently.`
8426
8425
  );
8427
8426
  }
8428
- const wrapperPath = join17(workDir, "standalone-entry.html");
8427
+ const wrapperPath = join16(workDir, "standalone-entry.html");
8429
8428
  writeFileSync4(wrapperPath, standaloneHtml, "utf-8");
8430
8429
  log.info("Extracted standalone entry from index.html host context", { entryFile });
8431
8430
  return wrapperPath;
@@ -8446,7 +8445,7 @@ async function runCompileStage(input) {
8446
8445
  } = input;
8447
8446
  const htmlPath = resolveEntryHtmlPath({ projectDir, workDir, entryFile, log });
8448
8447
  const compileStart = Date.now();
8449
- const compiled = await compileForRender(projectDir, htmlPath, join17(workDir, "downloads"), {
8448
+ const compiled = await compileForRender(projectDir, htmlPath, join16(workDir, "downloads"), {
8450
8449
  log,
8451
8450
  failClosedFontFetch: failClosedFontFetch === true,
8452
8451
  allowSystemFontCapture,
@@ -8454,7 +8453,7 @@ async function runCompileStage(input) {
8454
8453
  variables: input.variables,
8455
8454
  urlByAbsentLocalPath: input.urlByAbsentLocalPath,
8456
8455
  pageMotionBlur: input.pageMotionBlur,
8457
- animatedGifCacheDir: cfg.extractCacheDir ? join17(cfg.extractCacheDir, "animated-gif") : void 0,
8456
+ animatedGifCacheDir: cfg.extractCacheDir ? join16(cfg.extractCacheDir, "animated-gif") : void 0,
8458
8457
  ffmpegProcessTimeout: cfg.ffmpegProcessTimeout
8459
8458
  });
8460
8459
  assertNotAborted();
@@ -8511,7 +8510,7 @@ async function runCompileStage(input) {
8511
8510
  };
8512
8511
  await preflightCompositionAssetMediaTypes({
8513
8512
  projectDir,
8514
- compiledDir: join17(workDir, "compiled"),
8513
+ compiledDir: join16(workDir, "compiled"),
8515
8514
  composition,
8516
8515
  signal: abortSignal
8517
8516
  });
@@ -8557,7 +8556,7 @@ async function runCompileStage(input) {
8557
8556
 
8558
8557
  // ../producer/src/services/render/stages/probeStage.ts
8559
8558
  import { createHash as createHash5 } from "crypto";
8560
- import { basename as basename5, join as join18 } from "path";
8559
+ import { basename as basename6, join as join17 } from "path";
8561
8560
 
8562
8561
  // ../producer/src/services/render/stages/probeFailures.ts
8563
8562
  var NETWORK_FAILURE_PATTERN = /404|ERR_NAME_NOT_RESOLVED|ERR_CONNECTION_REFUSED|net::ERR_/i;
@@ -8683,7 +8682,7 @@ function probeRequiresBrowser(args) {
8683
8682
  function reportedLengthSource(source) {
8684
8683
  if (!source) return null;
8685
8684
  if (source.from !== "media") return { from: source.from };
8686
- const name = basename5(source.src.split(/[?#]/, 1)[0] ?? "");
8685
+ const name = basename6(source.src.split(/[?#]/, 1)[0] ?? "");
8687
8686
  const srcHash = createHash5("sha256").update(name).digest("hex").slice(0, 12);
8688
8687
  return { from: "media", tag: source.tag, trimmed: source.trimmed, srcHash };
8689
8688
  }
@@ -8742,7 +8741,7 @@ async function runProbeStage(input) {
8742
8741
  });
8743
8742
  fileServer = await createFileServer({
8744
8743
  projectDir,
8745
- compiledDir: join18(workDir, "compiled"),
8744
+ compiledDir: join17(workDir, "compiled"),
8746
8745
  port: 0,
8747
8746
  preHeadScripts: [VIRTUAL_TIME_SHIM],
8748
8747
  fps: job.config.fps
@@ -8772,7 +8771,7 @@ async function runProbeStage(input) {
8772
8771
  log.info("Creating capture session...", { attempt, maxAttempts: PROBE_MAX_ATTEMPTS });
8773
8772
  probeSession = await createCaptureSession(
8774
8773
  fileServer.url,
8775
- join18(workDir, "probe"),
8774
+ join17(workDir, "probe"),
8776
8775
  captureOpts,
8777
8776
  null,
8778
8777
  probeCfg
@@ -8857,7 +8856,7 @@ async function runProbeStage(input) {
8857
8856
  });
8858
8857
  probeSession = await createCaptureSession(
8859
8858
  fileServer.url,
8860
- join18(workDir, "probe-screenshot"),
8859
+ join17(workDir, "probe-screenshot"),
8861
8860
  captureOpts,
8862
8861
  null,
8863
8862
  { ...probeCfg, forceScreenshot: true }
@@ -8895,7 +8894,7 @@ async function runProbeStage(input) {
8895
8894
  compiled,
8896
8895
  resolutions,
8897
8896
  projectDir,
8898
- join18(workDir, "downloads")
8897
+ join17(workDir, "downloads")
8899
8898
  );
8900
8899
  assertNotAborted();
8901
8900
  composition.videos = compiled.videos;
@@ -9086,7 +9085,7 @@ async function runProbeStage(input) {
9086
9085
  }
9087
9086
  await preflightCompositionAssetMediaTypes({
9088
9087
  projectDir,
9089
- compiledDir: join18(workDir, "compiled"),
9088
+ compiledDir: join17(workDir, "compiled"),
9090
9089
  composition,
9091
9090
  signal: abortSignal
9092
9091
  });
@@ -9244,7 +9243,7 @@ function validateDistributedDuration(input) {
9244
9243
 
9245
9244
  // ../producer/src/services/render/stages/extractVideosStage.ts
9246
9245
  import { existsSync as existsSync12 } from "fs";
9247
- import { join as join19 } from "path";
9246
+ import { join as join18 } from "path";
9248
9247
 
9249
9248
  // ../producer/src/services/render/extractionFailureMetadata.ts
9250
9249
  function stringOrEmpty(value) {
@@ -9572,14 +9571,14 @@ async function runExtractVideosStage(input) {
9572
9571
  // because short boundary counts can differ by one frame.
9573
9572
  {
9574
9573
  fps: job.config.fps,
9575
- outputDir: join19(compiledDir, "__hyperframes_video_frames"),
9574
+ outputDir: join18(compiledDir, "__hyperframes_video_frames"),
9576
9575
  format: job.config.videoFrameFormat ?? "auto",
9577
9576
  toneMapHdrToSdr: rendersSdrOnly(job.config, composition),
9578
9577
  timelineEnd: composition.duration,
9579
9578
  maxTransientRetries: extractionPolicy.maxTransientRetries,
9580
9579
  collectProbeFailures: extractionPolicy.failureMode === "enforce",
9581
9580
  deferRangeExtraction,
9582
- contentKeyedDirs: [join19(compiledDir, REMOTE_MEDIA_SUBDIR)],
9581
+ contentKeyedDirs: [join18(compiledDir, REMOTE_MEDIA_SUBDIR)],
9583
9582
  urlByAbsentLocalPath,
9584
9583
  onProgress: ({ planned = 0, done = 0 }) => {
9585
9584
  framesPlanned += planned;
@@ -9756,16 +9755,15 @@ async function planVideoLayerPassthrough(input) {
9756
9755
 
9757
9756
  // ../producer/src/services/render/stages/audioStage.ts
9758
9757
  import { existsSync as existsSync15 } from "fs";
9759
- import { join as join22 } from "path";
9758
+ import { join as join21 } from "path";
9760
9759
 
9761
9760
  // ../producer/src/services/render/audioDeliveryLimit.ts
9762
9761
  import { existsSync as existsSync14 } from "fs";
9763
- import { dirname as dirname8, join as join21 } from "path";
9762
+ import { dirname as dirname8, join as join20 } from "path";
9764
9763
 
9765
9764
  // ../producer/src/services/render/audioPadTrim.ts
9766
9765
  import { spawn } from "child_process";
9767
- import { mkdtempSync as mkdtempSync3 } from "fs";
9768
- import { dirname as dirname7, join as join20 } from "path";
9766
+ import { dirname as dirname7, join as join19 } from "path";
9769
9767
 
9770
9768
  // ../producer/src/services/render/audioTruePeak.ts
9771
9769
  var toDbfs = (token) => token.toLowerCase() === "-inf" ? Number.NEGATIVE_INFINITY : Number(token);
@@ -10025,7 +10023,7 @@ async function constrainAacTruePeak(input) {
10025
10023
  }
10026
10024
  async function cutSource(input, scratchDir, attenuationDb) {
10027
10025
  if (!input.sourcePath || !input.rewriteSource) return true;
10028
- const cutPath = join20(scratchDir, "source.wav");
10026
+ const cutPath = join19(scratchDir, "source.wav");
10029
10027
  try {
10030
10028
  const result = await input.rewriteSource(input.sourcePath, cutPath, gainFilter(attenuationDb));
10031
10029
  if (!result.success) throw new Error(result.error);
@@ -10039,8 +10037,8 @@ async function cutSource(input, scratchDir, attenuationDb) {
10039
10037
  async function enforceAacTruePeak(input) {
10040
10038
  let scratchDir;
10041
10039
  try {
10042
- scratchDir = mkdtempSync3(join20(dirname7(input.audioPath), ".true-peak-"));
10043
- const correctedPath = join20(scratchDir, "audio.m4a");
10040
+ scratchDir = createStagingDir(dirname7(input.audioPath), ".true-peak-");
10041
+ const correctedPath = join19(scratchDir, "audio.m4a");
10044
10042
  const measurements = [];
10045
10043
  let attenuationDb = 0;
10046
10044
  let sourcePeakDbfs;
@@ -10250,7 +10248,7 @@ async function limitDeliveryPeaks(input, deps = {
10250
10248
  const peak = await deps.measure(audioPath, { timeoutMs, signal });
10251
10249
  if (peak <= AAC_DELIVERY_TRUE_PEAK_DBFS) return { success: true };
10252
10250
  const alternating = ["a", "b"].map(
10253
- (k) => join21(dirname8(sourcePath), `audio-source-limited-${k}.wav`)
10251
+ (k) => join20(dirname8(sourcePath), `audio-source-limited-${k}.wav`)
10254
10252
  );
10255
10253
  let encodedFrom;
10256
10254
  let ceiling = AAC_DELIVERY_TRUE_PEAK_DBFS;
@@ -10322,7 +10320,7 @@ function runAudioStage(input) {
10322
10320
  }
10323
10321
  async function runAudioStageScoped(input) {
10324
10322
  const stageStart = Date.now();
10325
- const pcmSourcePath = join22(input.workDir, "audio-source.wav");
10323
+ const pcmSourcePath = join21(input.workDir, "audio-source.wav");
10326
10324
  const duration = input.totalFrames * input.fps.den / input.fps.num;
10327
10325
  let deliverySourcePath;
10328
10326
  try {
@@ -10387,7 +10385,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
10387
10385
  assertNotAborted,
10388
10386
  log
10389
10387
  } = input;
10390
- const audioOutputPath = join22(workDir, MIXED_AUDIO_FILENAME);
10388
+ const audioOutputPath = join21(workDir, MIXED_AUDIO_FILENAME);
10391
10389
  let hasAudio = false;
10392
10390
  let audioError;
10393
10391
  let audioFailures;
@@ -10398,7 +10396,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
10398
10396
  audioResult = await processCompositionAudio(
10399
10397
  audios,
10400
10398
  projectDir,
10401
- join22(workDir, "audio-work"),
10399
+ join21(workDir, "audio-work"),
10402
10400
  audioOutputPath,
10403
10401
  duration,
10404
10402
  abortSignal,
@@ -10467,7 +10465,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
10467
10465
 
10468
10466
  // ../producer/src/services/render/stages/captureStage.ts
10469
10467
  import { existsSync as existsSync16, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
10470
- import { join as join23 } from "path";
10468
+ import { join as join22 } from "path";
10471
10469
  function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
10472
10470
  return workerCount > 1;
10473
10471
  }
@@ -10526,13 +10524,13 @@ function measureCaptureFrameBytes(workDir, framesDir) {
10526
10524
  if (!existsSync16(workDir)) return total;
10527
10525
  for (const attempt of readdirSync4(workDir)) {
10528
10526
  if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
10529
- total += sampleDirectoryBytes(join23(workDir, attempt));
10527
+ total += sampleDirectoryBytes(join22(workDir, attempt));
10530
10528
  continue;
10531
10529
  }
10532
10530
  if (!/^capture-attempt-\d+$/.test(attempt)) continue;
10533
- const attemptDir = join23(workDir, attempt);
10531
+ const attemptDir = join22(workDir, attempt);
10534
10532
  for (const name of readdirSync4(attemptDir)) {
10535
- if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join23(attemptDir, name));
10533
+ if (/^worker-\d+$/.test(name)) total += sampleDirectoryBytes(join22(attemptDir, name));
10536
10534
  }
10537
10535
  }
10538
10536
  return total;
@@ -10831,7 +10829,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
10831
10829
 
10832
10830
  // ../producer/src/services/render/stages/captureHdrStage.ts
10833
10831
  import { existsSync as existsSync18, mkdirSync as mkdirSync8 } from "fs";
10834
- import { join as join27 } from "path";
10832
+ import { join as join26 } from "path";
10835
10833
 
10836
10834
  // ../producer/src/services/hdrImageTransferCache.ts
10837
10835
  var DEFAULT_MAX_BYTES = 200 * 1024 * 1024;
@@ -10893,7 +10891,7 @@ function createHdrImageTransferCache(options = {}) {
10893
10891
  }
10894
10892
 
10895
10893
  // ../producer/src/services/render/stages/captureHdrSequentialLoop.ts
10896
- import { join as join24 } from "path";
10894
+ import { join as join23 } from "path";
10897
10895
  async function runSequentialLayeredFrameLoop(input) {
10898
10896
  const {
10899
10897
  job,
@@ -11014,7 +11012,7 @@ async function runSequentialLayeredFrameLoop(input) {
11014
11012
  );
11015
11013
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
11016
11014
  writeFileExclusiveSync(
11017
- join24(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
11015
+ join23(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
11018
11016
  normalCanvas
11019
11017
  );
11020
11018
  }
@@ -11046,12 +11044,12 @@ async function runSequentialLayeredFrameLoop(input) {
11046
11044
  }
11047
11045
 
11048
11046
  // ../producer/src/services/render/stages/captureHdrHybridLoop.ts
11049
- import { join as join26 } from "path";
11047
+ import { join as join25 } from "path";
11050
11048
 
11051
11049
  // ../producer/src/services/shaderTransitionWorkerPool.ts
11052
11050
  import { Worker } from "worker_threads";
11053
11051
  import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
11054
- import { dirname as dirname9, join as join25 } from "path";
11052
+ import { dirname as dirname9, join as join24 } from "path";
11055
11053
  import { createRequire } from "module";
11056
11054
  import { existsSync as existsSync17 } from "fs";
11057
11055
  import { cpus as cpus2 } from "os";
@@ -11065,9 +11063,9 @@ function resolveWorkerEntry(explicit) {
11065
11063
  return { path: override, isTs };
11066
11064
  }
11067
11065
  const moduleDir = dirname9(fileURLToPath3(import.meta.url));
11068
- const jsPath = join25(moduleDir, "shaderTransitionWorker.js");
11066
+ const jsPath = join24(moduleDir, "shaderTransitionWorker.js");
11069
11067
  if (existsSync17(jsPath)) return { path: jsPath, isTs: false };
11070
- const tsPath = join25(moduleDir, "shaderTransitionWorker.ts");
11068
+ const tsPath = join24(moduleDir, "shaderTransitionWorker.ts");
11071
11069
  return { path: tsPath, isTs: true };
11072
11070
  }
11073
11071
  function buildExecArgv(entryIsTs) {
@@ -11435,7 +11433,7 @@ async function runHybridLayeredFrameLoop(input) {
11435
11433
  );
11436
11434
  if (debugDumpEnabled && debugDumpDir && i % 30 === 0) {
11437
11435
  writeFileExclusiveSync(
11438
- join26(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
11436
+ join25(debugDumpDir, `frame_${String(i).padStart(4, "0")}_final_rgb48le.bin`),
11439
11437
  canvas
11440
11438
  );
11441
11439
  }
@@ -11626,7 +11624,7 @@ async function runCaptureHdrStage(input) {
11626
11624
  if (hdrVideoFrameSources.has(v.id)) hdrVideoEndTimes.set(v.id, v.end);
11627
11625
  }
11628
11626
  const debugDumpEnabled = process.env.KEEP_TEMP === "1";
11629
- const debugDumpDir = debugDumpEnabled ? join27(framesDir, "debug-composite") : null;
11627
+ const debugDumpDir = debugDumpEnabled ? join26(framesDir, "debug-composite") : null;
11630
11628
  if (debugDumpDir && !existsSync18(debugDumpDir)) {
11631
11629
  mkdirSync8(debugDumpDir, { recursive: true });
11632
11630
  }
@@ -11793,7 +11791,7 @@ import {
11793
11791
  writeFileSync as writeFileSync5
11794
11792
  } from "fs";
11795
11793
  import { readFile as readFile2 } from "fs/promises";
11796
- import { dirname as dirname10, join as join28 } from "path";
11794
+ import { dirname as dirname10, join as join27 } from "path";
11797
11795
 
11798
11796
  // ../producer/src/services/render/stages/gifEncodeArgs.ts
11799
11797
  function fpsToFfmpegArg2(fps) {
@@ -11989,7 +11987,7 @@ function encodeWhileCapturing(input, totalFrames) {
11989
11987
  await new Promise((resolve11) => wake = resolve11);
11990
11988
  }
11991
11989
  if (signal.aborted) return;
11992
- const mergedPath = join28(input.framesDir, formatCaptureFrameName(next, "jpg"));
11990
+ const mergedPath = join27(input.framesDir, formatCaptureFrameName(next, "jpg"));
11993
11991
  const frame = await readLandedFrame(landed.get(next), mergedPath);
11994
11992
  landed.delete(next);
11995
11993
  if (!await stream.writeFrame(frame)) {
@@ -12072,11 +12070,11 @@ async function runEncodeStage(input) {
12072
12070
  );
12073
12071
  }
12074
12072
  captured.forEach((name, i) => {
12075
- const dst = join28(outputPath, formatExportFrameName(i, "png"));
12076
- copyFileSync2(join28(framesDir, name), dst);
12073
+ const dst = join27(outputPath, formatExportFrameName(i, "png"));
12074
+ copyFileSync2(join27(framesDir, name), dst);
12077
12075
  });
12078
12076
  if (hasAudio && audioOutputPath && existsSync19(audioOutputPath)) {
12079
- copyFileSync2(audioOutputPath, join28(outputPath, MIXED_AUDIO_FILENAME));
12077
+ copyFileSync2(audioOutputPath, join27(outputPath, MIXED_AUDIO_FILENAME));
12080
12078
  log.info(
12081
12079
  `[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
12082
12080
  );
@@ -12096,7 +12094,7 @@ async function runEncodeStage(input) {
12096
12094
  const encodeResult2 = await encodeGifFromDir(framesDir, framePattern2, outputPath, {
12097
12095
  fps: job.config.fps,
12098
12096
  loop,
12099
- palettePath: join28(dirname10(videoOnlyPath), "gif-palette.png"),
12097
+ palettePath: join27(dirname10(videoOnlyPath), "gif-palette.png"),
12100
12098
  preserveAlpha: needsAlpha,
12101
12099
  signal: abortSignal,
12102
12100
  timeout: engineCfg.ffmpegEncodeTimeout
@@ -12306,7 +12304,7 @@ function sampleDirectoryBytes(dir) {
12306
12304
  continue;
12307
12305
  }
12308
12306
  for (const name of entries) {
12309
- const full = join29(current, name);
12307
+ const full = join28(current, name);
12310
12308
  try {
12311
12309
  const st = statSync7(full);
12312
12310
  if (st.isDirectory()) {
@@ -12462,7 +12460,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
12462
12460
  const ranges = [];
12463
12461
  let rangeStart = null;
12464
12462
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
12465
- const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12463
+ const framePath = join28(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12466
12464
  const missing = !existsSync20(framePath) || statSync7(framePath).size <= 8;
12467
12465
  if (missing && rangeStart === null) {
12468
12466
  rangeStart = frameIndex;
@@ -12479,7 +12477,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
12479
12477
  function buildMissingFrameRetryBatches(ranges, maxWorkers, workDir, attempt, rangeStart = 0, stride = 1) {
12480
12478
  const workersPerBatch = Math.max(1, Math.floor(maxWorkers));
12481
12479
  const batches = [];
12482
- const outputDirFor = (batchIndex, workerId) => join29(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`);
12480
+ const outputDirFor = (batchIndex, workerId) => join28(workDir, `retry-${attempt}-batch-${batchIndex}-worker-${workerId}`);
12483
12481
  if (stride > 1) {
12484
12482
  const spans = /* @__PURE__ */ new Map();
12485
12483
  for (const range of ranges) {
@@ -12539,8 +12537,8 @@ function getNextRetryWorkerCount(currentWorkers) {
12539
12537
  return Math.max(1, Math.floor(currentWorkers / 2));
12540
12538
  }
12541
12539
  function resolveRenderWorkDirPrefix(outputPath, jobId, platform2 = process.platform, systemTempDir = tmpdir2()) {
12542
- if (platform2 === "win32" || platform2 === "darwin") return join29(systemTempDir, "hf-render-");
12543
- return join29(dirname11(outputPath), `work-${jobId}-`);
12540
+ if (platform2 === "win32" || platform2 === "darwin") return join28(systemTempDir, "hf-render-");
12541
+ return join28(dirname11(outputPath), `work-${jobId}-`);
12544
12542
  }
12545
12543
  var MAX_TRANSIENT_CAPTURE_RETRIES = 1;
12546
12544
  function isTransientCaptureRetryEligible(failureKind, missing, retriesUsed) {
@@ -12587,7 +12585,7 @@ The composition is too large for the available memory. To reduce memory pressure
12587
12585
  function countCapturedFrames(totalFrames, framesDir, frameExt) {
12588
12586
  let captured = 0;
12589
12587
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
12590
- const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12588
+ const framePath = join28(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12591
12589
  if (existsSync20(framePath)) captured++;
12592
12590
  }
12593
12591
  return captured;
@@ -12613,7 +12611,7 @@ async function executeDiskCaptureWithAdaptiveRetry(options) {
12613
12611
  reason: attempt === 0 ? "initial" : pendingTransientRetry ? "transient-retry" : "retry"
12614
12612
  });
12615
12613
  pendingTransientRetry = false;
12616
- const attemptWorkDir = join29(options.workDir, `capture-attempt-${attempt}`);
12614
+ const attemptWorkDir = join28(options.workDir, `capture-attempt-${attempt}`);
12617
12615
  const batches = missingRanges ? buildMissingFrameRetryBatches(
12618
12616
  missingRanges,
12619
12617
  currentWorkers,
@@ -13246,7 +13244,7 @@ function deVerifyFallbackTelemetry(err) {
13246
13244
  }
13247
13245
  function resolveRenderDebugDir() {
13248
13246
  const producerRoot = process.env.PRODUCER_RENDERS_DIR ? resolve6(process.env.PRODUCER_RENDERS_DIR, "..") : resolve6(dirname11(fileURLToPath4(import.meta.url)), "../..");
13249
- return join29(producerRoot, ".debug");
13247
+ return join28(producerRoot, ".debug");
13250
13248
  }
13251
13249
  async function executeRenderJob(job, projectDir, outputPath, progressSink, abortSignal, assertRenderActive) {
13252
13250
  validateHlsRenderConfig(job.config);
@@ -13254,10 +13252,10 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
13254
13252
  const debugDir = resolveRenderDebugDir();
13255
13253
  const outputDir = dirname11(outputPath);
13256
13254
  if (!existsSync20(outputDir)) mkdirSync10(outputDir, { recursive: true });
13257
- const workDir = job.config.debug ? join29(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
13255
+ const workDir = job.config.debug ? join28(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
13258
13256
  const pipelineStart = Date.now();
13259
13257
  const baseLog = job.config.logger ?? defaultLogger;
13260
- const logPath = job.config.debug ? join29(workDir, "render.log") : null;
13258
+ const logPath = job.config.debug ? join28(workDir, "render.log") : null;
13261
13259
  const execution = new RenderExecutionContext({
13262
13260
  request: { renderJobId: job.id, projectDir, outputPath },
13263
13261
  logger: logPath ? createRenderFileLogger(logPath, baseLog) : baseLog,
@@ -13319,7 +13317,7 @@ async function executeRenderPipeline(input) {
13319
13317
  imageDecodeFailures: 0
13320
13318
  };
13321
13319
  let hdrPerf;
13322
- const perfOutputPath = join29(workDir, "perf-summary.json");
13320
+ const perfOutputPath = join28(workDir, "perf-summary.json");
13323
13321
  const cfg = { ...job.config.producerConfig ?? resolveConfig() };
13324
13322
  const observability = new RenderObservabilityRecorder({
13325
13323
  pipelineStartMs: pipelineStart,
@@ -13424,7 +13422,7 @@ async function executeRenderPipeline(input) {
13424
13422
  requestedWorkers: job.config.workers ?? "auto"
13425
13423
  });
13426
13424
  const entryFile = job.config.entryFile || "index.html";
13427
- const htmlPath = join29(projectDir, entryFile);
13425
+ const htmlPath = join28(projectDir, entryFile);
13428
13426
  if (!existsSync20(htmlPath)) {
13429
13427
  throw new Error(`Entry file not found: ${htmlPath}`);
13430
13428
  }
@@ -13601,7 +13599,7 @@ async function executeRenderPipeline(input) {
13601
13599
  canvas: { width, height },
13602
13600
  page: probeSession.page,
13603
13601
  projectDir,
13604
- compiledDir: join29(workDir, "compiled")
13602
+ compiledDir: join28(workDir, "compiled")
13605
13603
  });
13606
13604
  if (videoLayerPlan.videoId === void 0) {
13607
13605
  log.info(`[Render] Video layer passthrough off: ${videoLayerPlan.reason}`);
@@ -13619,7 +13617,7 @@ async function executeRenderPipeline(input) {
13619
13617
  updateJobStatus(job, "preprocessing", "Extracting video frames", 10, onProgress, {
13620
13618
  code: "extract_video"
13621
13619
  });
13622
- const compiledDir = join29(workDir, "compiled");
13620
+ const compiledDir = join28(workDir, "compiled");
13623
13621
  const segmentsCapture = (layeredOrEffectRoute) => shouldSegmentCapture({
13624
13622
  env: process.env,
13625
13623
  durationSeconds: probeResult.duration,
@@ -13750,7 +13748,7 @@ async function executeRenderPipeline(input) {
13750
13748
  try {
13751
13749
  fileServer = await createFileServer({
13752
13750
  projectDir,
13753
- compiledDir: join29(workDir, "compiled"),
13751
+ compiledDir: join28(workDir, "compiled"),
13754
13752
  port: 0,
13755
13753
  preHeadScripts: [VIRTUAL_TIME_SHIM],
13756
13754
  fps: job.config.fps
@@ -13768,7 +13766,7 @@ async function executeRenderPipeline(input) {
13768
13766
  if (!activeFileServer) {
13769
13767
  throw new Error("File server failed to initialize before frame capture");
13770
13768
  }
13771
- const framesDir = join29(workDir, "captured-frames");
13769
+ const framesDir = join28(workDir, "captured-frames");
13772
13770
  if (!existsSync20(framesDir)) mkdirSync10(framesDir, { recursive: true });
13773
13771
  updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
13774
13772
  code: "start_browsers"
@@ -14332,7 +14330,7 @@ async function executeRenderPipeline(input) {
14332
14330
  hls: ".mp4"
14333
14331
  };
14334
14332
  const videoExt = FORMAT_EXT[outputFormat] ?? ".mp4";
14335
- const videoOnlyPath = join29(workDir, `video-only${videoExt}`);
14333
+ const videoOnlyPath = join28(workDir, `video-only${videoExt}`);
14336
14334
  const usePageSideCompositingForTransitions = (cfg.enablePageSideCompositing || isGif) && compiled.hasShaderTransitions && !hasHdrContent && outputSupportsPageSideShaderCompositing(outputFormat);
14337
14335
  if (usePageSideCompositingForTransitions) {
14338
14336
  activeFileServer.addPreHeadScript(HF_PAGE_SIDE_COMPOSITING_STUB);
@@ -14618,7 +14616,7 @@ async function executeRenderPipeline(input) {
14618
14616
  pageMotionBlur: job.config.pageMotionBlur,
14619
14617
  captureQuality: captureOptions.quality
14620
14618
  });
14621
- const segmentDir = segmentDirFor(join29(projectDir, "renders"), segmentPlanHash);
14619
+ const segmentDir = segmentDirFor(join28(projectDir, "renders"), segmentPlanHash);
14622
14620
  let completedSegments = /* @__PURE__ */ new Set();
14623
14621
  if (job.config.resumeSegments === true) {
14624
14622
  const existing = readSegmentManifest(segmentDir);
@@ -15241,7 +15239,7 @@ async function executeRenderPipeline(input) {
15241
15239
  }
15242
15240
  if (job.config.debug) {
15243
15241
  if (!isPngSequence && !isHls && existsSync20(stagedOutputPath)) {
15244
- const debugOutput = join29(workDir, `output${videoExt}`);
15242
+ const debugOutput = join28(workDir, `output${videoExt}`);
15245
15243
  copyFileSync3(stagedOutputPath, debugOutput);
15246
15244
  }
15247
15245
  }
@@ -15351,14 +15349,14 @@ async function executeRenderPipeline(input) {
15351
15349
  }
15352
15350
 
15353
15351
  // ../producer/src/services/distributed/renderSpan.ts
15354
- import { mkdirSync as mkdirSync18, mkdtempSync as mkdtempSync7, readFileSync as readFileSync12, rmSync as rmSync16 } from "fs";
15355
- import { join as join43 } from "path";
15352
+ import { mkdirSync as mkdirSync18, mkdtempSync, readFileSync as readFileSync12, rmSync as rmSync16 } from "fs";
15353
+ import { join as join42 } from "path";
15356
15354
  import { tmpdir as tmpdir4 } from "os";
15357
15355
 
15358
15356
  // ../producer/src/services/distributed/mp4Stitch.ts
15359
- import { createReadStream as createReadStream3, createWriteStream, mkdirSync as mkdirSync11, mkdtempSync as mkdtempSync4, rmSync as rmSync11 } from "fs";
15357
+ import { createReadStream as createReadStream3, createWriteStream, mkdirSync as mkdirSync11, rmSync as rmSync11 } from "fs";
15360
15358
  import { open } from "fs/promises";
15361
- import { dirname as dirname12, join as join30 } from "path";
15359
+ import { basename as basename7, dirname as dirname12, join as join29 } from "path";
15362
15360
  import { finished, pipeline } from "stream/promises";
15363
15361
  function boxAt(src, off, at, limit) {
15364
15362
  let size = src.readUInt32BE(off);
@@ -15723,14 +15721,14 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
15723
15721
  const layouts = await Promise.all(sourcePaths.map((path) => readMp4Layout(fileRange(path))));
15724
15722
  const header = audioPath ? buildStitchedHeader(layouts.slice(1), layouts[0]) : buildStitchedHeader(layouts);
15725
15723
  mkdirSync11(dirname12(outputPath), { recursive: true });
15726
- const workDir = mkdtempSync4(`${outputPath}.stitch-`);
15727
- const out = createWriteStream(join30(workDir, "out.mp4"));
15724
+ const workDir = createStagingDir(dirname12(outputPath), `${basename7(outputPath)}.stitch-`);
15725
+ const out = createWriteStream(join29(workDir, "out.mp4"));
15728
15726
  try {
15729
15727
  out.write(header);
15730
15728
  for (const [i, path] of sourcePaths.entries()) await copyPayload(path, layouts[i], i, out);
15731
15729
  out.end();
15732
15730
  await finished(out);
15733
- renameWithRetry(join30(workDir, "out.mp4"), outputPath);
15731
+ renameWithRetry(join29(workDir, "out.mp4"), outputPath);
15734
15732
  } finally {
15735
15733
  out.destroy();
15736
15734
  rmSync11(workDir, { recursive: true, force: true });
@@ -15747,18 +15745,18 @@ import {
15747
15745
  rmSync as rmSync12,
15748
15746
  writeFileSync as writeFileSync9
15749
15747
  } from "fs";
15750
- import { extname as extname6, isAbsolute as isAbsolute2, join as join38, relative as relative5, sep as sep3 } from "path";
15748
+ import { extname as extname6, isAbsolute as isAbsolute2, join as join37, relative as relative5, sep as sep3 } from "path";
15751
15749
 
15752
15750
  // ../producer/src/services/distributed/planFrameCost.ts
15753
- import { join as join33 } from "path";
15751
+ import { join as join32 } from "path";
15754
15752
 
15755
15753
  // ../producer/src/services/distributed/chunkFrames.ts
15756
15754
  import { existsSync as existsSync22, readdirSync as readdirSync7 } from "fs";
15757
- import { extname as extname4, join as join32 } from "path";
15755
+ import { extname as extname4, join as join31 } from "path";
15758
15756
 
15759
15757
  // ../producer/src/services/distributed/shared.ts
15760
15758
  import { execFile as execFileCallback } from "child_process";
15761
- import { dirname as dirname13, join as join31 } from "path";
15759
+ import { dirname as dirname13, join as join30 } from "path";
15762
15760
  import { existsSync as existsSync21, readFileSync as readFileSync7 } from "fs";
15763
15761
  import { fileURLToPath as fileURLToPath5 } from "url";
15764
15762
  import { promisify as promisify2 } from "util";
@@ -15770,7 +15768,7 @@ function isPlanAudioArtifactPath(path) {
15770
15768
  }
15771
15769
  function resolvePlanAudioPath(planDir) {
15772
15770
  for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
15773
- const candidate = join31(planDir, name);
15771
+ const candidate = join30(planDir, name);
15774
15772
  if (existsSync21(candidate)) return candidate;
15775
15773
  }
15776
15774
  return null;
@@ -16021,7 +16019,7 @@ function buildSyntheticRenderJob(input) {
16021
16019
  strictness: input.strictness,
16022
16020
  producerConfig: input.producerConfig,
16023
16021
  variables: input.variables,
16024
- pageMotionBlur: "off"
16022
+ pageMotionBlur: input.pageMotionBlur
16025
16023
  };
16026
16024
  return createRenderJob(renderConfig);
16027
16025
  }
@@ -16031,7 +16029,7 @@ function readProducerVersion() {
16031
16029
  const startDir = dirname13(fileURLToPath5(import.meta.url));
16032
16030
  let current = startDir;
16033
16031
  for (let i = 0; i < 10; i++) {
16034
- const candidate = join31(current, "package.json");
16032
+ const candidate = join30(current, "package.json");
16035
16033
  if (existsSync21(candidate)) {
16036
16034
  try {
16037
16035
  const pkg = JSON.parse(readFileSync7(candidate, "utf-8"));
@@ -16086,7 +16084,7 @@ function frameNumberFromFileName(name) {
16086
16084
  function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v1") {
16087
16085
  const result = [];
16088
16086
  for (const v of videos) {
16089
- const outputDir = join32(planDir, "video-frames", v.videoId);
16087
+ const outputDir = join31(planDir, "video-frames", v.videoId);
16090
16088
  if (!existsSync22(outputDir)) {
16091
16089
  throw new Error(
16092
16090
  `[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
@@ -16105,7 +16103,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
16105
16103
  if (!frameName) continue;
16106
16104
  const frameNumber = indexMode === "sparse-v2" ? frameNumberFromFileName(frameName) : null;
16107
16105
  const frameIndex = frameNumber === null ? i : frameNumber - 1;
16108
- framePaths.set(frameIndex, join32(outputDir, frameName));
16106
+ framePaths.set(frameIndex, join31(outputDir, frameName));
16109
16107
  }
16110
16108
  result.push({
16111
16109
  videoId: v.videoId,
@@ -16138,7 +16136,7 @@ function buildChunkCaptureOptions(input) {
16138
16136
  skipReadinessVideoIds: input.skipReadinessVideoIds,
16139
16137
  videoMetadataHints: input.videoMetadataHints,
16140
16138
  ...videoCaptureBeyondViewport !== void 0 ? { captureBeyondViewport: videoCaptureBeyondViewport } : {},
16141
- pageMotionBlur: encoder.pageMotionBlur ?? "distributed-render",
16139
+ pageMotionBlur: encoder.pageMotionBlur,
16142
16140
  // A fixed warmup count keeps `beginFrameTimeTicks` host-independent.
16143
16141
  lockWarmupTicks: true,
16144
16142
  requiresWebGpu: compositionRequiresWebGpu(input.html)
@@ -16185,7 +16183,7 @@ async function extractDeferredVideoFramesForChunk(input) {
16185
16183
  sourceOf: (video) => {
16186
16184
  const range = planned.get(video.videoId).deferredRange;
16187
16185
  const remoteUrl = remoteSources[range.sourcePath];
16188
- const sourcePath = remoteUrl ?? join32(input.planDir, ...range.sourcePath.split("/"));
16186
+ const sourcePath = remoteUrl ?? join31(input.planDir, ...range.sourcePath.split("/"));
16189
16187
  if (remoteUrl === void 0 && !existsSync22(sourcePath)) {
16190
16188
  throw new RenderChunkValidationError(
16191
16189
  MISSING_PLAN_ARTIFACT,
@@ -16216,12 +16214,12 @@ async function measurePlanSecondsPerFrame(input) {
16216
16214
  planVideos,
16217
16215
  frames: sampled,
16218
16216
  fps: fpsRatio,
16219
- outputRoot: join33(workDir, "frame-cost-video-frames"),
16217
+ outputRoot: join32(workDir, "frame-cost-video-frames"),
16220
16218
  cfg: input.cfg
16221
16219
  })
16222
16220
  ];
16223
16221
  const lookup = extracted.length > 0 ? createFrameLookupTable(planVideos.videos, extracted, resolveRenderFpsConfig(fpsRatio).value) : null;
16224
- const compiledDir = join33(planDir, "compiled");
16222
+ const compiledDir = join32(planDir, "compiled");
16225
16223
  const fileServer = await createFileServer({
16226
16224
  projectDir: compiledDir,
16227
16225
  compiledDir,
@@ -16233,7 +16231,7 @@ async function measurePlanSecondsPerFrame(input) {
16233
16231
  try {
16234
16232
  session = await createCaptureSession(
16235
16233
  fileServer.url,
16236
- join33(workDir, "frame-cost"),
16234
+ join32(workDir, "frame-cost"),
16237
16235
  buildChunkCaptureOptions({
16238
16236
  dimensions: { ...input, fpsNum: fps, fpsDen: 1 },
16239
16237
  encoder: input,
@@ -16329,21 +16327,21 @@ function buildWeightedChunkSlices(weights, chunkCount, minFrames, maxFrames) {
16329
16327
  }
16330
16328
 
16331
16329
  // ../producer/src/services/render/planReferenceBackground.ts
16332
- import { join as join34 } from "path";
16330
+ import { join as join33 } from "path";
16333
16331
  async function readPlanReferenceBackground(input) {
16334
16332
  let server;
16335
16333
  let session;
16336
16334
  try {
16337
16335
  server = await createFileServer({
16338
16336
  projectDir: input.projectDir,
16339
- compiledDir: join34(input.workDir, "compiled"),
16337
+ compiledDir: join33(input.workDir, "compiled"),
16340
16338
  port: 0,
16341
16339
  preHeadScripts: [VIRTUAL_TIME_SHIM],
16342
16340
  fps: input.options.fps
16343
16341
  });
16344
16342
  session = await createCaptureSession(
16345
16343
  server.url,
16346
- join34(input.workDir, "reference"),
16344
+ join33(input.workDir, "reference"),
16347
16345
  {
16348
16346
  ...input.options,
16349
16347
  requiresWebGpu: false
@@ -16380,7 +16378,7 @@ async function readPlanReferenceBackground(input) {
16380
16378
 
16381
16379
  // ../producer/src/services/render/stages/freezePlan.ts
16382
16380
  import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync8, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
16383
- import { join as join35, relative as relative3, resolve as resolve7 } from "path";
16381
+ import { join as join34, relative as relative3, resolve as resolve7 } from "path";
16384
16382
 
16385
16383
  // ../producer/src/services/distributed/planProtocol.ts
16386
16384
  var PLAN_SCHEMA_VERSION = 1;
@@ -16594,7 +16592,7 @@ function listPlanFiles(planDir) {
16594
16592
  function walk(dir) {
16595
16593
  const entries = readdirSync8(dir, { withFileTypes: true });
16596
16594
  for (const entry of entries) {
16597
- const full = join35(dir, entry.name);
16595
+ const full = join34(dir, entry.name);
16598
16596
  if (entry.isDirectory()) {
16599
16597
  walk(full);
16600
16598
  } else if (entry.isFile()) {
@@ -16635,15 +16633,15 @@ var PLAN_REMOTE_FILES_RELATIVE_PATH = "meta/remote-files.json";
16635
16633
  function writePlanRemoteFiles(planDir, files) {
16636
16634
  if (files.length === 0) return;
16637
16635
  const sorted = [...files].sort((a, b) => a.path < b.path ? -1 : 1);
16638
- writeFileSync7(join35(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH), JSON.stringify(sorted), "utf-8");
16636
+ writeFileSync7(join34(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH), JSON.stringify(sorted), "utf-8");
16639
16637
  }
16640
16638
  function readPlanRemoteFiles(planDir) {
16641
- const path = join35(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
16639
+ const path = join34(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
16642
16640
  return existsSync23(path) ? JSON.parse(readFileSync8(path, "utf-8")) : [];
16643
16641
  }
16644
16642
  function recomputePlanHashFromPlanDir(planDir, digests) {
16645
- const planJsonPath = join35(planDir, "plan.json");
16646
- const encoderJsonPath = join35(planDir, "meta", "encoder.json");
16643
+ const planJsonPath = join34(planDir, "plan.json");
16644
+ const encoderJsonPath = join34(planDir, "meta", "encoder.json");
16647
16645
  if (!existsSync23(planJsonPath)) {
16648
16646
  throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
16649
16647
  }
@@ -16680,18 +16678,18 @@ async function freezePlan(input) {
16680
16678
  if (!existsSync23(planDir)) {
16681
16679
  throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
16682
16680
  }
16683
- const metaDir = join35(planDir, "meta");
16681
+ const metaDir = join34(planDir, "meta");
16684
16682
  if (!existsSync23(metaDir)) mkdirSync12(metaDir, { recursive: true });
16685
16683
  writeFileSync7(
16686
- join35(metaDir, "composition.json"),
16684
+ join34(metaDir, "composition.json"),
16687
16685
  `${JSON.stringify(composition, null, 2)}
16688
16686
  `,
16689
16687
  "utf-8"
16690
16688
  );
16691
16689
  const encoderForCanonical = stripUndefined(encoder);
16692
16690
  const encoderConfigCanonicalJson = canonicalJsonStringify(encoderForCanonical);
16693
- writeFileSync7(join35(metaDir, "encoder.json"), encoderConfigCanonicalJson, "utf-8");
16694
- writeFileSync7(join35(metaDir, "chunks.json"), `${JSON.stringify(chunks, null, 2)}
16691
+ writeFileSync7(join34(metaDir, "encoder.json"), encoderConfigCanonicalJson, "utf-8");
16692
+ writeFileSync7(join34(metaDir, "chunks.json"), `${JSON.stringify(chunks, null, 2)}
16695
16693
  `, "utf-8");
16696
16694
  const { compositionHtml, assets } = collectPlanAssetShas(planDir, digests);
16697
16695
  const planHash = computePlanHash({
@@ -16716,7 +16714,7 @@ async function freezePlan(input) {
16716
16714
  duration: durationSeconds,
16717
16715
  hasAudio
16718
16716
  };
16719
- const planJsonPath = join35(planDir, "plan.json");
16717
+ const planJsonPath = join34(planDir, "plan.json");
16720
16718
  writeFileSync7(planJsonPath, `${JSON.stringify(planJson, null, 2)}
16721
16719
  `, "utf-8");
16722
16720
  return { planJsonPath, planHash };
@@ -16760,7 +16758,7 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
16760
16758
  // ../producer/src/services/distributed/chunkAudio.ts
16761
16759
  import { closeSync as closeSync5, existsSync as existsSync24, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync9 } from "fs";
16762
16760
  import { writeFileSync as writeFileSync8, writeSync } from "fs";
16763
- import { join as join36 } from "path";
16761
+ import { join as join35 } from "path";
16764
16762
  function audioCutForChunk(grid, chunks, index, fps) {
16765
16763
  const firstPacketAt = (frame) => Math.min(
16766
16764
  grid.packetCount,
@@ -16847,7 +16845,7 @@ async function writeChunkAudioSlices(input) {
16847
16845
  });
16848
16846
  const bytes = readFileSync9(input.audioPath);
16849
16847
  const layout = { sizeBytes: bytes.length, payloadStart, payloadEnd, partStarts: {} };
16850
- mkdirSync13(join36(input.planDir, SLICE_DIR), { recursive: true });
16848
+ mkdirSync13(join35(input.planDir, SLICE_DIR), { recursive: true });
16851
16849
  input.chunks.forEach((_, index) => {
16852
16850
  const cut = audioCutForChunk(grid, input.chunks, index, input.fps);
16853
16851
  if (!cut) return;
@@ -16855,17 +16853,17 @@ async function writeChunkAudioSlices(input) {
16855
16853
  const start = offsets[cut.firstPacket];
16856
16854
  layout.partStarts[index] = start;
16857
16855
  const end = offsets[last] + track.sizes[last];
16858
- writeFileSync8(join36(input.planDir, chunkAudioSlicePath(index)), bytes.subarray(start, end));
16856
+ writeFileSync8(join35(input.planDir, chunkAudioSlicePath(index)), bytes.subarray(start, end));
16859
16857
  });
16860
16858
  const frame = [bytes.subarray(0, payloadStart), bytes.subarray(payloadEnd)];
16861
- writeFileSync8(join36(input.planDir, SLICE_FRAME), Buffer.concat(frame));
16862
- writeFileSync8(join36(input.planDir, SLICE_LAYOUT), JSON.stringify(layout));
16859
+ writeFileSync8(join35(input.planDir, SLICE_FRAME), Buffer.concat(frame));
16860
+ writeFileSync8(join35(input.planDir, SLICE_LAYOUT), JSON.stringify(layout));
16863
16861
  }
16864
16862
  function chunkAudioSource(planDir, chunkIndex, scratchPath) {
16865
- const layoutPath = join36(planDir, SLICE_LAYOUT);
16863
+ const layoutPath = join35(planDir, SLICE_LAYOUT);
16866
16864
  if (!existsSync24(layoutPath)) return resolvePlanAudioPath(planDir);
16867
16865
  const layout = JSON.parse(readFileSync9(layoutPath, "utf-8"));
16868
- const frame = readFileSync9(join36(planDir, SLICE_FRAME));
16866
+ const frame = readFileSync9(join35(planDir, SLICE_FRAME));
16869
16867
  const fd = openSync5(scratchPath, "w");
16870
16868
  try {
16871
16869
  writeSync(fd, frame, 0, layout.payloadStart, 0);
@@ -16878,7 +16876,7 @@ function chunkAudioSource(planDir, chunkIndex, scratchPath) {
16878
16876
  );
16879
16877
  const start = layout.partStarts[chunkIndex];
16880
16878
  if (start !== void 0) {
16881
- const part = readFileSync9(join36(planDir, chunkAudioSlicePath(chunkIndex)));
16879
+ const part = readFileSync9(join35(planDir, chunkAudioSlicePath(chunkIndex)));
16882
16880
  writeSync(fd, part, 0, part.length, start);
16883
16881
  }
16884
16882
  ftruncateSync(fd, layout.sizeBytes);
@@ -16934,7 +16932,7 @@ async function muxChunkWithAudio(input) {
16934
16932
  // ../producer/src/services/distributed/planSize.ts
16935
16933
  import { createHash as createHash7 } from "crypto";
16936
16934
  import { lstatSync as lstatSync2, readdirSync as readdirSync9 } from "fs";
16937
- import { extname as extname5, join as join37, relative as relative4 } from "path";
16935
+ import { extname as extname5, join as join36, relative as relative4 } from "path";
16938
16936
  var MAX_TOP_COMPONENTS = 10;
16939
16937
  var SOURCE_MEDIA_EXTENSIONS = /* @__PURE__ */ new Set([
16940
16938
  ".aac",
@@ -17046,7 +17044,7 @@ function walkRegularFiles(dir, visit) {
17046
17044
  return;
17047
17045
  }
17048
17046
  for (const entry of entries) {
17049
- const full = join37(dir, entry.name);
17047
+ const full = join36(dir, entry.name);
17050
17048
  if (entry.isDirectory()) {
17051
17049
  walkRegularFiles(full, visit);
17052
17050
  } else if (entry.isFile()) {
@@ -17262,13 +17260,13 @@ function assertPositiveInteger2(name, value) {
17262
17260
  }
17263
17261
  var FREEZE_OWNED_PLAN_FILES = [
17264
17262
  "plan.json",
17265
- join38("meta", "composition.json"),
17266
- join38("meta", "encoder.json"),
17267
- join38("meta", "chunks.json")
17263
+ join37("meta", "composition.json"),
17264
+ join37("meta", "encoder.json"),
17265
+ join37("meta", "chunks.json")
17268
17266
  ];
17269
17267
  function removeFreezeOwnedPlanFiles(planDir) {
17270
17268
  for (const relativePath of FREEZE_OWNED_PLAN_FILES) {
17271
- rmSync12(join38(planDir, relativePath), { force: true });
17269
+ rmSync12(join37(planDir, relativePath), { force: true });
17272
17270
  }
17273
17271
  }
17274
17272
  function buildChunkSlices(totalFrames, chunkCount, effectiveChunkSize) {
@@ -17423,19 +17421,19 @@ function createVideoSourceShipper(input) {
17423
17421
  const known = shipped.get(srcPath);
17424
17422
  if (known) return known;
17425
17423
  const stagedRel = pathInside(input.workVideoFramesDir, srcPath);
17426
- const current = stagedRel === null ? srcPath : join38(input.planDir, "video-frames", stagedRel);
17424
+ const current = stagedRel === null ? srcPath : join37(input.planDir, "video-frames", stagedRel);
17427
17425
  let result = null;
17428
17426
  for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
17429
17427
  const rel = pathInside(root, srcPath);
17430
- if (rel !== null && (existsSync25(join38(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
17428
+ if (rel !== null && (existsSync25(join37(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
17431
17429
  result = ["compiled", ...rel.split(sep3)].join("/");
17432
17430
  break;
17433
17431
  }
17434
17432
  }
17435
17433
  if (result === null) {
17436
17434
  result = `video-sources/${shipped.size}${extname6(current)}`;
17437
- const destination = join38(input.planDir, ...result.split("/"));
17438
- mkdirSync14(join38(input.planDir, "video-sources"), { recursive: true });
17435
+ const destination = join37(input.planDir, ...result.split("/"));
17436
+ mkdirSync14(join37(input.planDir, "video-sources"), { recursive: true });
17439
17437
  try {
17440
17438
  linkSync(current, destination);
17441
17439
  } catch {
@@ -17481,17 +17479,18 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17481
17479
  entryFile: config.entryFile ?? "index.html",
17482
17480
  logger: config.logger,
17483
17481
  producerConfig: cfg,
17484
- variables: config.variables
17482
+ variables: config.variables,
17483
+ pageMotionBlur: config.pageMotionBlur
17485
17484
  });
17486
17485
  const entryFile = config.entryFile ?? "index.html";
17487
- const htmlPath = join38(projectDir, entryFile);
17486
+ const htmlPath = join37(projectDir, entryFile);
17488
17487
  if (!existsSync25(htmlPath)) {
17489
17488
  throw new Error(`[plan] entry file not found: ${htmlPath}`);
17490
17489
  }
17491
- const workDir = join38(planDir, ".plan-work");
17490
+ const workDir = join37(planDir, ".plan-work");
17492
17491
  rmSync12(workDir, { recursive: true, force: true });
17493
17492
  mkdirSync14(workDir, { recursive: true });
17494
- const compiledDir = join38(workDir, "compiled");
17493
+ const compiledDir = join37(workDir, "compiled");
17495
17494
  mkdirSync14(compiledDir, { recursive: true });
17496
17495
  let stageStarted = Date.now();
17497
17496
  cpSync2(projectDir, compiledDir, {
@@ -17505,10 +17504,10 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17505
17504
  }
17506
17505
  });
17507
17506
  logPlanStage(log, "copy", stageStarted);
17508
- const finalCompiledDir = join38(planDir, "compiled");
17507
+ const finalCompiledDir = join37(planDir, "compiled");
17509
17508
  const needsAlpha = outputNeedsAlpha(config.format);
17510
17509
  const remoteFiles = Object.entries(options.remoteFiles ?? {});
17511
- const remoteLocalPath = (rel) => join38(projectDir, ...rel.split("/"));
17510
+ const remoteLocalPath = (rel) => join37(projectDir, ...rel.split("/"));
17512
17511
  for (const [, file] of remoteFiles) {
17513
17512
  declareContentAddressedUrl(file.url, file.sha256);
17514
17513
  if (file.probeFactsUrl) declareProbeFactsUrl(file.url, file.probeFactsUrl);
@@ -17604,7 +17603,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17604
17603
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
17605
17604
  if (probeResult.probeSession) {
17606
17605
  try {
17607
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-7HHPSUSN.js");
17606
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-FNXCLKWN.js");
17608
17607
  await closeCaptureSession2(probeResult.probeSession);
17609
17608
  } catch (err) {
17610
17609
  log.warn("[plan] probe session close failed", {
@@ -17711,10 +17710,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17711
17710
  let stageStarted = Date.now();
17712
17711
  const extractResult = await extractPlanVideos(c, options.deferVideoExtraction);
17713
17712
  logPlanStage(log, "extract", stageStarted);
17714
- const stagedVideoFrames = join38(compiledDir, "__hyperframes_video_frames");
17715
- const videoFramesDst = join38(planDir, "video-frames");
17713
+ const stagedVideoFrames = join37(compiledDir, "__hyperframes_video_frames");
17714
+ const videoFramesDst = join37(planDir, "video-frames");
17716
17715
  if (existsSync25(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
17717
- const videoSourcesDir = join38(planDir, "video-sources");
17716
+ const videoSourcesDir = join37(planDir, "video-sources");
17718
17717
  rmSync12(videoSourcesDir, { recursive: true, force: true });
17719
17718
  if (existsSync25(stagedVideoFrames)) {
17720
17719
  renameWithRetry(stagedVideoFrames, videoFramesDst);
@@ -17751,7 +17750,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17751
17750
  };
17752
17751
  })
17753
17752
  });
17754
- mkdirSync14(join38(planDir, "meta"), { recursive: true });
17753
+ mkdirSync14(join37(planDir, "meta"), { recursive: true });
17755
17754
  writePlanRemoteFiles(
17756
17755
  planDir,
17757
17756
  remoteFiles.map(([rel, { sha256, sizeBytes }]) => ({
@@ -17761,7 +17760,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17761
17760
  }))
17762
17761
  );
17763
17762
  writeFileSync9(
17764
- join38(planDir, PLAN_VIDEOS_META_RELATIVE_PATH),
17763
+ join37(planDir, PLAN_VIDEOS_META_RELATIVE_PATH),
17765
17764
  JSON.stringify(planVideosJson, null, 2),
17766
17765
  "utf-8"
17767
17766
  );
@@ -17841,7 +17840,7 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17841
17840
  if (audioResult?.audioError) {
17842
17841
  applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
17843
17842
  }
17844
- const planAudioPath = join38(planDir, PLAN_AUDIO_RELATIVE_PATH);
17843
+ const planAudioPath = join37(planDir, PLAN_AUDIO_RELATIVE_PATH);
17845
17844
  if (audioResult?.hasAudio && existsSync25(audioResult.audioOutputPath)) {
17846
17845
  renameWithRetry(audioResult.audioOutputPath, planAudioPath);
17847
17846
  }
@@ -17965,7 +17964,7 @@ async function plan(projectDir, config, planDir, options = {}) {
17965
17964
  import { randomBytes } from "crypto";
17966
17965
  import { existsSync as existsSync28, mkdirSync as mkdirSync17, readFileSync as readFileSync11, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
17967
17966
  import { cpus as cpus3 } from "os";
17968
- import { join as join42 } from "path";
17967
+ import { join as join41 } from "path";
17969
17968
 
17970
17969
  // ../producer/src/services/distributed/planV2.ts
17971
17970
  import {
@@ -17973,7 +17972,6 @@ import {
17973
17972
  existsSync as existsSync27,
17974
17973
  lstatSync as lstatSync3,
17975
17974
  mkdirSync as mkdirSync16,
17976
- mkdtempSync as mkdtempSync6,
17977
17975
  readFileSync as readFileSync10,
17978
17976
  readdirSync as readdirSync10,
17979
17977
  rmSync as rmSync14,
@@ -17981,7 +17979,7 @@ import {
17981
17979
  writeFileSync as writeFileSync11
17982
17980
  } from "fs";
17983
17981
  import { tmpdir as tmpdir3 } from "os";
17984
- import { dirname as dirname15, isAbsolute as isAbsolute3, join as join41, relative as relative6, resolve as resolve8, sep as sep4 } from "path";
17982
+ import { dirname as dirname15, isAbsolute as isAbsolute3, join as join40, relative as relative6, resolve as resolve8, sep as sep4 } from "path";
17985
17983
 
17986
17984
  // ../producer/src/services/distributed/planV2Publisher.ts
17987
17985
  import {
@@ -17989,12 +17987,11 @@ import {
17989
17987
  existsSync as existsSync26,
17990
17988
  linkSync as linkSync2,
17991
17989
  mkdirSync as mkdirSync15,
17992
- mkdtempSync as mkdtempSync5,
17993
17990
  rmSync as rmSync13,
17994
17991
  statSync as statSync8,
17995
17992
  writeFileSync as writeFileSync10
17996
17993
  } from "fs";
17997
- import { dirname as dirname14, join as join40 } from "path";
17994
+ import { dirname as dirname14, join as join39 } from "path";
17998
17995
 
17999
17996
  // ../producer/src/services/distributed/planV2Errors.ts
18000
17997
  var PLAN_V2_INTEGRITY_UNRECOVERABLE = "PLAN_V2_INTEGRITY_UNRECOVERABLE";
@@ -18009,7 +18006,7 @@ var PlanV2IntegrityError = class extends Error {
18009
18006
  };
18010
18007
 
18011
18008
  // ../producer/src/services/distributed/planV2Layout.ts
18012
- import { join as join39 } from "path";
18009
+ import { join as join38 } from "path";
18013
18010
  var SHA256_PATTERN = /^[0-9a-f]{64}$/;
18014
18011
  function assertPlanV2Sha256(value, field) {
18015
18012
  if (typeof value !== "string" || !SHA256_PATTERN.test(value)) {
@@ -18019,7 +18016,7 @@ function assertPlanV2Sha256(value, field) {
18019
18016
  }
18020
18017
  function planV2BlobPath(root, sha256) {
18021
18018
  const digest = assertPlanV2Sha256(sha256, "artifact sha256");
18022
- return join39(root, "artifacts", "sha256", digest.slice(0, 2), digest);
18019
+ return join38(root, "artifacts", "sha256", digest.slice(0, 2), digest);
18023
18020
  }
18024
18021
 
18025
18022
  // ../producer/src/services/distributed/planV2Publisher.ts
@@ -18060,7 +18057,7 @@ var LocalPlanV2ArtifactPublisher = class {
18060
18057
  this.destinationDir = destinationDir;
18061
18058
  this.#linkFile = options.linkFile ?? linkSync2;
18062
18059
  mkdirSync15(dirname14(destinationDir), { recursive: true });
18063
- this.temporaryDir = mkdtempSync5(join40(dirname14(destinationDir), ".plan-v2-publish-"));
18060
+ this.temporaryDir = createStagingDir(dirname14(destinationDir), ".plan-v2-publish-");
18064
18061
  }
18065
18062
  async putBlob(blob) {
18066
18063
  const digest = assertPlanV2Sha256(blob.sha256, "published blob sha256");
@@ -18073,8 +18070,8 @@ var LocalPlanV2ArtifactPublisher = class {
18073
18070
  const destinationPath = planV2BlobPath(this.temporaryDir, digest);
18074
18071
  if (existsSync26(destinationPath)) return;
18075
18072
  mkdirSync15(dirname14(destinationPath), { recursive: true });
18076
- const stagingDir = mkdtempSync5(join40(dirname14(destinationPath), ".plan-v2-blob-"));
18077
- const temporaryPath = join40(stagingDir, "blob");
18073
+ const stagingDir = createStagingDir(dirname14(destinationPath), ".plan-v2-blob-");
18074
+ const temporaryPath = join39(stagingDir, "blob");
18078
18075
  try {
18079
18076
  try {
18080
18077
  this.#linkFile(blob.sourcePath, temporaryPath);
@@ -18095,7 +18092,7 @@ var LocalPlanV2ArtifactPublisher = class {
18095
18092
  );
18096
18093
  }
18097
18094
  }
18098
- writeFileSync10(join40(this.temporaryDir, "plan.json"), manifestBytes, "utf-8");
18095
+ writeFileSync10(join39(this.temporaryDir, "plan.json"), manifestBytes, "utf-8");
18099
18096
  renameWithRetry(this.temporaryDir, this.destinationDir);
18100
18097
  this.#committed = true;
18101
18098
  }
@@ -18140,7 +18137,7 @@ function listFiles(root) {
18140
18137
  const rootResolved = resolve8(root);
18141
18138
  function walk(dir) {
18142
18139
  for (const entry of readdirSync10(dir, { withFileTypes: true })) {
18143
- const absolutePath = join41(dir, entry.name);
18140
+ const absolutePath = join40(dir, entry.name);
18144
18141
  if (entry.isDirectory()) {
18145
18142
  walk(absolutePath);
18146
18143
  } else if (entry.isFile()) {
@@ -18167,13 +18164,13 @@ function assertValidExtractionCacheCompleteSentinel(path) {
18167
18164
  }
18168
18165
  }
18169
18166
  function validateExtractionCacheCompleteSentinels(executionPlanDir) {
18170
- const videoRoot = join41(executionPlanDir, "video-frames");
18167
+ const videoRoot = join40(executionPlanDir, "video-frames");
18171
18168
  if (!existsSync27(videoRoot)) return;
18172
18169
  for (const videoEntry of readdirSync10(videoRoot, { withFileTypes: true })) {
18173
18170
  if (!videoEntry.isDirectory()) continue;
18174
- const videoDir = join41(videoRoot, videoEntry.name);
18171
+ const videoDir = join40(videoRoot, videoEntry.name);
18175
18172
  if (readdirSync10(videoDir).includes(EXTRACTION_CACHE_COMPLETE_SENTINEL)) {
18176
- const sentinelPath = join41(videoDir, EXTRACTION_CACHE_COMPLETE_SENTINEL);
18173
+ const sentinelPath = join40(videoDir, EXTRACTION_CACHE_COMPLETE_SENTINEL);
18177
18174
  assertValidExtractionCacheCompleteSentinel(sentinelPath);
18178
18175
  }
18179
18176
  }
@@ -18220,7 +18217,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
18220
18217
  if (video.deferredRange) {
18221
18218
  const framePaths2 = /* @__PURE__ */ new Map();
18222
18219
  for (let index = 0; index < video.totalFrames; index++) {
18223
- framePaths2.set(index, join41(outputDir, String(index)));
18220
+ framePaths2.set(index, join40(outputDir, String(index)));
18224
18221
  }
18225
18222
  return { ...video, outputDir, framePaths: framePaths2, ownedByLookup: false };
18226
18223
  }
@@ -18228,7 +18225,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
18228
18225
  const framePaths = /* @__PURE__ */ new Map();
18229
18226
  for (const frameName of frameNames) {
18230
18227
  if (frameName === EXTRACTION_CACHE_COMPLETE_SENTINEL) {
18231
- assertValidExtractionCacheCompleteSentinel(join41(outputDir, frameName));
18228
+ assertValidExtractionCacheCompleteSentinel(join40(outputDir, frameName));
18232
18229
  continue;
18233
18230
  }
18234
18231
  const match = /(\d+)(?=\.[^.]+$)/.exec(frameName);
@@ -18247,7 +18244,7 @@ function listVideoFramePaths(executionPlanDir, videos) {
18247
18244
  `duplicate extracted frame index ${frameIndex} in ${outputDir}`
18248
18245
  );
18249
18246
  }
18250
- framePaths.set(frameIndex, join41(outputDir, frameName));
18247
+ framePaths.set(frameIndex, join40(outputDir, frameName));
18251
18248
  }
18252
18249
  return {
18253
18250
  ...video,
@@ -18268,7 +18265,7 @@ function parsePlanVideosJson2(value) {
18268
18265
  }
18269
18266
  }
18270
18267
  function materializeExtractedVideoDirectories(planDir) {
18271
- const videosPath = join41(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18268
+ const videosPath = join40(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18272
18269
  if (!existsSync27(videosPath)) return;
18273
18270
  const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
18274
18271
  for (const video of videos.extracted) {
@@ -18302,13 +18299,13 @@ function parseChunkSlices(value) {
18302
18299
  });
18303
18300
  }
18304
18301
  function buildVideoChunkDependencies(executionPlanDir, dimensions) {
18305
- const videoRoot = join41(executionPlanDir, "video-frames");
18302
+ const videoRoot = join40(executionPlanDir, "video-frames");
18306
18303
  const hasExtractedFrames = existsSync27(videoRoot) && listFiles(videoRoot).length > 0;
18307
- const videosPath = join41(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18304
+ const videosPath = join40(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18308
18305
  if (!existsSync27(videosPath)) {
18309
18306
  return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
18310
18307
  }
18311
- const chunksPath = join41(executionPlanDir, "meta", "chunks.json");
18308
+ const chunksPath = join40(executionPlanDir, "meta", "chunks.json");
18312
18309
  const videos = readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH);
18313
18310
  const chunks = readJsonFile(chunksPath, "meta/chunks.json");
18314
18311
  const parsedVideos = parsePlanVideosJson2(videos);
@@ -18364,8 +18361,8 @@ function computeManifestHash(manifest) {
18364
18361
  function writeBlob(sourcePath, destinationPath) {
18365
18362
  if (existsSync27(destinationPath)) return;
18366
18363
  mkdirSync16(dirname15(destinationPath), { recursive: true });
18367
- const temporaryDir = mkdtempSync6(join41(dirname15(destinationPath), ".plan-v2-blob-"));
18368
- const temporaryPath = join41(temporaryDir, "blob");
18364
+ const temporaryDir = createStagingDir(dirname15(destinationPath), ".plan-v2-blob-");
18365
+ const temporaryPath = join40(temporaryDir, "blob");
18369
18366
  try {
18370
18367
  copyFileSync6(sourcePath, temporaryPath);
18371
18368
  renameWithRetry(temporaryPath, destinationPath);
@@ -18401,7 +18398,7 @@ async function putTasks(tasks) {
18401
18398
  if (failure) throw failure.reason;
18402
18399
  }
18403
18400
  function buildPlanV2Publication(executionPlanDir, digests) {
18404
- const executionPlanPath = join41(executionPlanDir, "plan.json");
18401
+ const executionPlanPath = join40(executionPlanDir, "plan.json");
18405
18402
  if (!existsSync27(executionPlanPath)) {
18406
18403
  throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
18407
18404
  }
@@ -18429,7 +18426,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
18429
18426
  }
18430
18427
  validateExtractionCacheCompleteSentinels(executionPlanDir);
18431
18428
  const videoDependencyPlan = buildVideoChunkDependencies(executionPlanDir, dimensions);
18432
- const encoder = readJsonFile(join41(executionPlanDir, "meta", "encoder.json"), "meta/encoder.json");
18429
+ const encoder = readJsonFile(join40(executionPlanDir, "meta", "encoder.json"), "meta/encoder.json");
18433
18430
  const files = listFiles(executionPlanDir);
18434
18431
  const chunkAudio = !isRecord3(encoder) || encoder.chunksCarryAudio !== true ? "none" : files.some((file) => chunkAudioSliceTarget(file.path) !== null) ? "sliced" : "whole";
18435
18432
  for (const file of files) {
@@ -18490,13 +18487,13 @@ function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
18490
18487
  throw new PlanV2IntegrityError("a local plan v2 directory cannot reference remote files");
18491
18488
  }
18492
18489
  mkdirSync16(dirname15(planV2Dir), { recursive: true });
18493
- const tempDir = mkdtempSync6(join41(dirname15(planV2Dir), ".plan-v2-build-"));
18490
+ const tempDir = createStagingDir(dirname15(planV2Dir), ".plan-v2-build-");
18494
18491
  try {
18495
18492
  for (const blob of publication.blobs) {
18496
18493
  writeBlob(blob.sourcePath, planV2BlobPath(tempDir, blob.sha256));
18497
18494
  }
18498
18495
  writeFileSync11(
18499
- join41(tempDir, "plan.json"),
18496
+ join40(tempDir, "plan.json"),
18500
18497
  canonicalJsonStringify(publication.manifest),
18501
18498
  "utf-8"
18502
18499
  );
@@ -18537,7 +18534,7 @@ async function publishExecutionPlan(executionPlanDir, publisher, { digests, log
18537
18534
  }
18538
18535
  }
18539
18536
  async function planV2WithPublisher(projectDir, config, publisher, options = {}) {
18540
- const stagingRoot = mkdtempSync6(join41(options.stagingParentDir ?? tmpdir3(), ".execution-plan-"));
18537
+ const stagingRoot = createStagingDir(options.stagingParentDir ?? tmpdir3(), ".execution-plan-");
18541
18538
  const digests = /* @__PURE__ */ new Map();
18542
18539
  try {
18543
18540
  await buildLocalExecutionPlan(projectDir, config, stagingRoot, {
@@ -18548,7 +18545,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
18548
18545
  // artifactTargets ships every compiled/ file to all chunks, so each is in the manifest.
18549
18546
  whileAudioMixes: () => putBlobs(
18550
18547
  publisher,
18551
- listFiles(join41(stagingRoot, "compiled")).map(
18548
+ listFiles(join40(stagingRoot, "compiled")).map(
18552
18549
  (file) => publishBlobFor(file.absolutePath, digests)
18553
18550
  )
18554
18551
  ),
@@ -18585,7 +18582,7 @@ function resultFromManifest(planV2Dir, manifest) {
18585
18582
  isRecord3(executionPlan) ? executionPlan[REFERENCE_BACKGROUND_FIELD] : void 0
18586
18583
  ),
18587
18584
  planDir: planV2Dir,
18588
- manifestPath: join41(planV2Dir, "plan.json"),
18585
+ manifestPath: join40(planV2Dir, "plan.json"),
18589
18586
  planProtocol: PLAN_PROTOCOL_V2,
18590
18587
  planHash: manifest.planHash,
18591
18588
  sourcePlanV1Hash: getPlanV2ExecutionPlanHash(manifest),
@@ -18721,7 +18718,7 @@ function parsePlanV2Manifest(value) {
18721
18718
  return parsed;
18722
18719
  }
18723
18720
  function readPlanV2Manifest(planV2Dir) {
18724
- const manifestPath = join41(planV2Dir, "plan.json");
18721
+ const manifestPath = join40(planV2Dir, "plan.json");
18725
18722
  if (!existsSync27(manifestPath)) {
18726
18723
  throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
18727
18724
  }
@@ -18767,16 +18764,16 @@ function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}
18767
18764
  sourcePath: verifyBlob(planV2Dir, artifact)
18768
18765
  }));
18769
18766
  mkdirSync16(dirname15(destinationDir), { recursive: true });
18770
- const tempDir = mkdtempSync6(join41(dirname15(destinationDir), ".plan-v2-materialize-"));
18767
+ const tempDir = createStagingDir(dirname15(destinationDir), ".plan-v2-materialize-");
18771
18768
  try {
18772
18769
  for (const { artifact, sourcePath } of verified) {
18773
- const destinationPath = join41(tempDir, ...artifact.path.split("/"));
18770
+ const destinationPath = join40(tempDir, ...artifact.path.split("/"));
18774
18771
  mkdirSync16(dirname15(destinationPath), { recursive: true });
18775
18772
  copyFileSync6(sourcePath, destinationPath);
18776
18773
  }
18777
18774
  if (target.role === "chunk") materializeExtractedVideoDirectories(tempDir);
18778
18775
  writeFileSync11(
18779
- join41(tempDir, PLAN_V2_MATERIALIZATION_MARKER),
18776
+ join40(tempDir, PLAN_V2_MATERIALIZATION_MARKER),
18780
18777
  canonicalJsonStringify({
18781
18778
  manifest,
18782
18779
  target,
@@ -18799,7 +18796,7 @@ function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}
18799
18796
  // Join the artifact's OWN name, not the current constant: a plan written
18800
18797
  // before the container change carries the legacy name, and materializing it
18801
18798
  // under the new one would point at a file that was never written.
18802
- audioPath: target.role === "assembler" ? audioArtifact ? join41(destinationDir, audioArtifact.path) : null : null
18799
+ audioPath: target.role === "assembler" ? audioArtifact ? join40(destinationDir, audioArtifact.path) : null : null
18803
18800
  };
18804
18801
  }
18805
18802
  function assertRemoteSources(remoteSources, artifacts) {
@@ -18818,7 +18815,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
18818
18815
  return readValidatedPlanV2Materialization(planDir, expectedTarget)?.manifest ?? null;
18819
18816
  }
18820
18817
  function readValidatedPlanV2Materialization(planDir, expectedTarget) {
18821
- const markerPath = join41(planDir, PLAN_V2_MATERIALIZATION_MARKER);
18818
+ const markerPath = join40(planDir, PLAN_V2_MATERIALIZATION_MARKER);
18822
18819
  if (!existsSync27(markerPath)) return null;
18823
18820
  const marker = readJsonFile(markerPath, "materialization marker");
18824
18821
  if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
@@ -18836,7 +18833,7 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
18836
18833
  assertRemoteSources(remoteSources, required);
18837
18834
  for (const artifact of required) {
18838
18835
  if (Object.hasOwn(remoteSources, artifact.path)) continue;
18839
- const path = join41(planDir, ...artifact.path.split("/"));
18836
+ const path = join40(planDir, ...artifact.path.split("/"));
18840
18837
  if (!existsSync27(path) || statSync9(path).size !== artifact.sizeBytes) {
18841
18838
  throw new PlanV2IntegrityError(
18842
18839
  `materialized artifact missing or truncated: ${artifact.path}`
@@ -18967,7 +18964,7 @@ function hashChunkOutput(outputPath, kind) {
18967
18964
  if (kind === "file") return sha256Hex(readFileSync11(outputPath));
18968
18965
  const entries = readdirSync11(outputPath).filter((name) => /\.(png|jpg|jpeg)$/i.test(name)).sort();
18969
18966
  const lines = entries.map(
18970
- (name) => `${name}\0${sha256Hex(readFileSync11(join42(outputPath, name)))}`
18967
+ (name) => `${name}\0${sha256Hex(readFileSync11(join41(outputPath, name)))}`
18971
18968
  );
18972
18969
  return sha256Hex(lines.join("\0"));
18973
18970
  }
@@ -18984,9 +18981,9 @@ function resolveLockedVp9CpuUsed(lockedEncoder) {
18984
18981
  async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
18985
18982
  const start = Date.now();
18986
18983
  const log = defaultLogger;
18987
- const planJsonPath = join42(planDir, "plan.json");
18988
- const encoderJsonPath = join42(planDir, "meta", "encoder.json");
18989
- const chunksJsonPath = join42(planDir, "meta", "chunks.json");
18984
+ const planJsonPath = join41(planDir, "plan.json");
18985
+ const encoderJsonPath = join41(planDir, "meta", "encoder.json");
18986
+ const chunksJsonPath = join41(planDir, "meta", "chunks.json");
18990
18987
  if (!existsSync28(planJsonPath)) {
18991
18988
  throw new RenderChunkValidationError(
18992
18989
  MISSING_PLAN_ARTIFACT,
@@ -19012,7 +19009,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19012
19009
  }
19013
19010
  const encoder = JSON.parse(readFileSync11(encoderJsonPath, "utf-8"));
19014
19011
  const chunks = JSON.parse(readFileSync11(chunksJsonPath, "utf-8"));
19015
- const videosJsonPath = join42(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19012
+ const videosJsonPath = join41(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
19016
19013
  let planVideos = null;
19017
19014
  if (existsSync28(videosJsonPath)) {
19018
19015
  try {
@@ -19044,7 +19041,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19044
19041
  }
19045
19042
  const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
19046
19043
  const framesInChunk = range.endFrame - range.startFrame;
19047
- const compiledDir = join42(planDir, "compiled");
19044
+ const compiledDir = join41(planDir, "compiled");
19048
19045
  if (!existsSync28(compiledDir)) {
19049
19046
  throw new RenderChunkValidationError(
19050
19047
  MISSING_PLAN_ARTIFACT,
@@ -19087,7 +19084,8 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19087
19084
  crf: encoder.crf,
19088
19085
  bitrate: encoder.bitrate,
19089
19086
  hdrMode: "force-sdr",
19090
- entryFile: "index.html"
19087
+ entryFile: "index.html",
19088
+ pageMotionBlur: encoder.pageMotionBlur
19091
19089
  });
19092
19090
  job.totalFrames = framesInChunk;
19093
19091
  job.duration = framesInChunk * plan2.dimensions.fpsDen / plan2.dimensions.fpsNum;
@@ -19102,7 +19100,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19102
19100
  };
19103
19101
  const workDir = `${outputChunkPath}.work.${process.pid}.${randomBytes(4).toString("hex")}`;
19104
19102
  mkdirSync17(workDir, { recursive: true });
19105
- const framesDir = join42(workDir, "captured-frames");
19103
+ const framesDir = join41(workDir, "captured-frames");
19106
19104
  mkdirSync17(framesDir, { recursive: true });
19107
19105
  const videoFramesDir = `${workDir}.video-frames`;
19108
19106
  const chunkFrameNumbers = Array.from({ length: framesInChunk }, (_, i) => range.startFrame + i);
@@ -19127,7 +19125,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19127
19125
  dimensions: plan2.dimensions,
19128
19126
  encoder,
19129
19127
  videoCount: planVideos?.videos.length ?? 0,
19130
- html: readFileSync11(join42(compiledDir, "index.html"), "utf-8"),
19128
+ html: readFileSync11(join41(compiledDir, "index.html"), "utf-8"),
19131
19129
  // The plan ships a deferred source only to chunks that show it; don't wait on the rest.
19132
19130
  skipReadinessVideoIds: deferredVideos.filter(
19133
19131
  (video) => !shownFrames.get(video.videoId)?.size || remoteVideoIds.has(video.videoId)
@@ -19297,7 +19295,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19297
19295
  if (isPngSequence) {
19298
19296
  if (!existsSync28(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
19299
19297
  } else {
19300
- const outDir = join42(outputChunkPath, "..");
19298
+ const outDir = join41(outputChunkPath, "..");
19301
19299
  if (!existsSync28(outDir)) mkdirSync17(outDir, { recursive: true });
19302
19300
  }
19303
19301
  const encodeInput = {
@@ -19571,10 +19569,10 @@ async function renderSpan(projectDir, config, span, outputPath) {
19571
19569
  if (config.cfr === true) {
19572
19570
  throw new RenderSpanUnsupportedError("--start/--end cannot be combined with a cfr re-encode.");
19573
19571
  }
19574
- const workDir = mkdtempSync7(join43(tmpdir4(), "hf-render-span-"));
19572
+ const workDir = mkdtempSync(join42(tmpdir4(), "hf-render-span-"));
19575
19573
  try {
19576
- const planDir = join43(workDir, "plan");
19577
- const partsDir = join43(workDir, "parts");
19574
+ const planDir = join42(workDir, "plan");
19575
+ const partsDir = join42(workDir, "parts");
19578
19576
  mkdirSync18(partsDir, { recursive: true });
19579
19577
  const planned = await plan(
19580
19578
  projectDir,
@@ -19589,7 +19587,7 @@ async function renderSpan(projectDir, config, span, outputPath) {
19589
19587
  planned.totalFrames
19590
19588
  );
19591
19589
  const slices = JSON.parse(
19592
- readFileSync12(join43(planDir, "meta", "chunks.json"), "utf-8")
19590
+ readFileSync12(join42(planDir, "meta", "chunks.json"), "utf-8")
19593
19591
  );
19594
19592
  const parts = [];
19595
19593
  for (const slice of slices) {
@@ -19599,7 +19597,7 @@ async function renderSpan(projectDir, config, span, outputPath) {
19599
19597
  };
19600
19598
  if (range.endFrame <= range.startFrame) continue;
19601
19599
  throwIfAborted(config.abortSignal);
19602
- const part = join43(partsDir, `part-${String(parts.length).padStart(4, "0")}.mp4`);
19600
+ const part = join42(partsDir, `part-${String(parts.length).padStart(4, "0")}.mp4`);
19603
19601
  await renderChunk(planDir, slice.index, part, { frameRange: range });
19604
19602
  parts.push(part);
19605
19603
  }
@@ -20178,12 +20176,12 @@ import {
20178
20176
  existsSync as existsSync31,
20179
20177
  mkdirSync as mkdirSync19,
20180
20178
  statSync as statSync11,
20181
- mkdtempSync as mkdtempSync8,
20179
+ mkdtempSync as mkdtempSync2,
20182
20180
  writeFileSync as writeFileSync13,
20183
20181
  rmSync as rmSync17,
20184
20182
  createReadStream as createReadStream5
20185
20183
  } from "fs";
20186
- import { resolve as resolve10, dirname as dirname17, join as join46 } from "path";
20184
+ import { resolve as resolve10, dirname as dirname17, join as join45 } from "path";
20187
20185
  import { tmpdir as tmpdir5 } from "os";
20188
20186
  import { parseArgs } from "util";
20189
20187
  import crypto from "crypto";
@@ -20201,7 +20199,7 @@ import {
20201
20199
  closeSync as closeSync6,
20202
20200
  constants as constants3
20203
20201
  } from "fs";
20204
- import { resolve as resolve9, join as join44, relative as relative7, isAbsolute as isAbsolute4, sep as sep5 } from "path";
20202
+ import { resolve as resolve9, join as join43, relative as relative7, isAbsolute as isAbsolute4, sep as sep5 } from "path";
20205
20203
  function isStringRecord(value) {
20206
20204
  if (!value || typeof value !== "object" || Array.isArray(value)) {
20207
20205
  return false;
@@ -20268,7 +20266,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
20268
20266
  }
20269
20267
  }
20270
20268
  return {
20271
- error: `No HTML entry file found in project directory: ${join44(absProjectDir, preferredEntryFile || "index.html")}`
20269
+ error: `No HTML entry file found in project directory: ${join43(absProjectDir, preferredEntryFile || "index.html")}`
20272
20270
  };
20273
20271
  }
20274
20272
  function prepareHyperframeLintBody(body) {
@@ -20314,7 +20312,7 @@ async function runHyperframeLint(prepared) {
20314
20312
  // ../producer/src/services/healthWorker.ts
20315
20313
  import { Worker as Worker2 } from "worker_threads";
20316
20314
  import { fileURLToPath as fileURLToPath6 } from "url";
20317
- import { dirname as dirname16, join as join45 } from "path";
20315
+ import { dirname as dirname16, join as join44 } from "path";
20318
20316
  import { existsSync as existsSync30 } from "fs";
20319
20317
  var DEFAULT_HEALTH_PORT = 9848;
20320
20318
  async function startHealthWorker(options = {}) {
@@ -20390,7 +20388,7 @@ function defaultLogger2() {
20390
20388
  }
20391
20389
  function resolveWorkerEntry2() {
20392
20390
  const here = dirname16(fileURLToPath6(import.meta.url));
20393
- const candidates = [join45(here, "healthWorkerThread.js"), join45(here, "healthWorkerThread.ts")];
20391
+ const candidates = [join44(here, "healthWorkerThread.js"), join44(here, "healthWorkerThread.ts")];
20394
20392
  for (const candidate of candidates) {
20395
20393
  if (existsSync30(candidate)) return candidate;
20396
20394
  }
@@ -20598,8 +20596,8 @@ async function resolveInlineRenderHtml(body) {
20598
20596
  }
20599
20597
  function materializeInlineProject(html, options) {
20600
20598
  const tempRoot = process.env.PRODUCER_TMP_PROJECT_DIR || tmpdir5();
20601
- const tempProjectDir = mkdtempSync8(join46(tempRoot, "producer-project-"));
20602
- writeFileSync13(join46(tempProjectDir, "index.html"), html, "utf-8");
20599
+ const tempProjectDir = mkdtempSync2(join45(tempRoot, "producer-project-"));
20600
+ writeFileSync13(join45(tempProjectDir, "index.html"), html, "utf-8");
20603
20601
  return {
20604
20602
  prepared: {
20605
20603
  input: { projectDir: tempProjectDir, ...options },
@@ -21020,7 +21018,7 @@ function startServer(options = {}) {
21020
21018
  });
21021
21019
  async function shutdown(signal) {
21022
21020
  log.info(`Received ${signal}, shutting down`);
21023
- const { drainBrowserPool } = await import("./src-7HHPSUSN.js");
21021
+ const { drainBrowserPool } = await import("./src-FNXCLKWN.js");
21024
21022
  await drainBrowserPool().catch(() => {
21025
21023
  });
21026
21024
  const handle = await Promise.race([
@@ -21056,23 +21054,22 @@ if (isPublicServerEntry) {
21056
21054
  }
21057
21055
 
21058
21056
  // ../producer/src/services/distributed/planV2Execution.ts
21059
- import { mkdtempSync as mkdtempSync10, rmSync as rmSync19 } from "fs";
21057
+ import { mkdtempSync as mkdtempSync3, rmSync as rmSync19 } from "fs";
21060
21058
  import { tmpdir as tmpdir6 } from "os";
21061
- import { join as join48 } from "path";
21059
+ import { join as join47 } from "path";
21062
21060
 
21063
21061
  // ../producer/src/services/distributed/assemble.ts
21064
21062
  import {
21065
21063
  cpSync as cpSync3,
21066
21064
  existsSync as existsSync32,
21067
21065
  mkdirSync as mkdirSync20,
21068
- mkdtempSync as mkdtempSync9,
21069
21066
  readFileSync as readFileSync14,
21070
21067
  readdirSync as readdirSync12,
21071
21068
  rmSync as rmSync18,
21072
21069
  statSync as statSync12,
21073
21070
  writeFileSync as writeFileSync14
21074
21071
  } from "fs";
21075
- import { dirname as dirname18, join as join47 } from "path";
21072
+ import { basename as basename8, dirname as dirname18, join as join46 } from "path";
21076
21073
  function cfrRateControlArgs(locked) {
21077
21074
  const preset = getEncoderPreset(locked.quality ?? "standard", "mp4");
21078
21075
  if (locked.crf == null && locked.bitrate) {
@@ -21108,7 +21105,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
21108
21105
  if (!existsSync32(dirname18(outputPath))) {
21109
21106
  mkdirSync20(dirname18(outputPath), { recursive: true });
21110
21107
  }
21111
- const workDir = mkdtempSync9(`${outputPath}.assemble-work-`);
21108
+ const workDir = createStagingDir(dirname18(outputPath), `${basename8(outputPath)}.assemble-work-`);
21112
21109
  const fps = { num: plan2.dimensions.fpsNum, den: plan2.dimensions.fpsDen };
21113
21110
  const stageMs = {};
21114
21111
  const ctx = {
@@ -21128,7 +21125,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
21128
21125
  };
21129
21126
  try {
21130
21127
  const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
21131
- const finalPath = join47(workDir, `output.${format}`);
21128
+ const finalPath = join46(workDir, `output.${format}`);
21132
21129
  const audio = audioPath !== null && existsSync32(audioPath) ? audioPath : null;
21133
21130
  await writeJoined(ctx, videoSources, audio, finalPath);
21134
21131
  renameWithRetry(finalPath, outputPath);
@@ -21157,8 +21154,8 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
21157
21154
  };
21158
21155
  }
21159
21156
  function readAssemblePlan(planDir, chunkPaths) {
21160
- const planJsonPath = join47(planDir, "plan.json");
21161
- const chunksJsonPath = join47(planDir, "meta", "chunks.json");
21157
+ const planJsonPath = join46(planDir, "plan.json");
21158
+ const chunksJsonPath = join46(planDir, "meta", "chunks.json");
21162
21159
  if (!existsSync32(planJsonPath)) {
21163
21160
  throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
21164
21161
  }
@@ -21209,7 +21206,7 @@ function cfrEncodeArgs(inputArgs, encoder, fpsArg) {
21209
21206
  return args;
21210
21207
  }
21211
21208
  async function reencodeCfr(ctx, chunkPaths, encoder) {
21212
- const cfrOutputPath = join47(ctx.workDir, `cfr.${ctx.format}`);
21209
+ const cfrOutputPath = join46(ctx.workDir, `cfr.${ctx.format}`);
21213
21210
  const cfrArgs = cfrEncodeArgs(videoInputArgs(ctx, chunkPaths), encoder, ctx.fpsArg);
21214
21211
  appendRenderProvenanceArgs(cfrArgs, cfrOutputPath);
21215
21212
  cfrArgs.push("-y", cfrOutputPath);
@@ -21236,7 +21233,7 @@ async function writeJoined(ctx, videoSources, audioPath, finalPath) {
21236
21233
  );
21237
21234
  return;
21238
21235
  }
21239
- const paddedAudioPath = join47(ctx.workDir, "audio-padded.m4a");
21236
+ const paddedAudioPath = join46(ctx.workDir, "audio-padded.m4a");
21240
21237
  const padTrimResult = await ctx.timed(
21241
21238
  "audioMs",
21242
21239
  () => padOrTrimAudioToVideoFrameCount({
@@ -21276,7 +21273,7 @@ async function writeJoined(ctx, videoSources, audioPath, finalPath) {
21276
21273
  }
21277
21274
  }
21278
21275
  function concatDemuxerInput(chunkPaths, workDir, fpsArg) {
21279
- const listPath = join47(workDir, "concat-list.txt");
21276
+ const listPath = join46(workDir, "concat-list.txt");
21280
21277
  const body = chunkPaths.map((path) => `file '${path.replace(/'/g, "'\\''")}'`).join("\n");
21281
21278
  writeFileSync14(listPath, `${body}
21282
21279
  `, "utf-8");
@@ -21314,11 +21311,11 @@ function stitchesSeparateAudio(planDir) {
21314
21311
  return lockedAudio(planDir).separateAudio === true;
21315
21312
  }
21316
21313
  function planFormat(planDir) {
21317
- const plan2 = JSON.parse(readFileSync14(join47(planDir, "plan.json"), "utf-8"));
21314
+ const plan2 = JSON.parse(readFileSync14(join46(planDir, "plan.json"), "utf-8"));
21318
21315
  return plan2.dimensions.format;
21319
21316
  }
21320
21317
  function lockedAudio(planDir) {
21321
- const encoderJsonPath = join47(planDir, "meta", "encoder.json");
21318
+ const encoderJsonPath = join46(planDir, "meta", "encoder.json");
21322
21319
  if (!existsSync32(encoderJsonPath)) return {};
21323
21320
  return JSON.parse(readFileSync14(encoderJsonPath, "utf-8"));
21324
21321
  }
@@ -21328,7 +21325,7 @@ function readCfrEncoder(planDir, format) {
21328
21325
  `[assemble] cfr=true is only supported for format="mp4" (got "${format}"). Stream-copy paths for webm and mov already produce exact avg_frame_rate; cfr re-encode is not needed.`
21329
21326
  );
21330
21327
  }
21331
- const encoderJsonPath = join47(planDir, "meta", "encoder.json");
21328
+ const encoderJsonPath = join46(planDir, "meta", "encoder.json");
21332
21329
  if (!existsSync32(encoderJsonPath)) {
21333
21330
  throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
21334
21331
  }
@@ -21355,8 +21352,8 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
21355
21352
  throw new Error(`[assemble] png-sequence chunk has no frames: ${chunkDir}`);
21356
21353
  }
21357
21354
  for (const frame of frames) {
21358
- const dst = join47(outputPath, formatExportFrameName(globalIdx, "png"));
21359
- cpSync3(join47(chunkDir, frame), dst);
21355
+ const dst = join46(outputPath, formatExportFrameName(globalIdx, "png"));
21356
+ cpSync3(join46(chunkDir, frame), dst);
21360
21357
  globalIdx += 1;
21361
21358
  }
21362
21359
  }
@@ -21366,13 +21363,13 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
21366
21363
  );
21367
21364
  }
21368
21365
  if (audioPath !== null && existsSync32(audioPath)) {
21369
- const sidecar = join47(outputPath, MIXED_AUDIO_FILENAME);
21366
+ const sidecar = join46(outputPath, MIXED_AUDIO_FILENAME);
21370
21367
  cpSync3(audioPath, sidecar);
21371
21368
  }
21372
21369
  let fileSize = 0;
21373
21370
  for (const name of readdirSync12(outputPath)) {
21374
21371
  try {
21375
- fileSize += statSync12(join47(outputPath, name)).size;
21372
+ fileSize += statSync12(join46(outputPath, name)).size;
21376
21373
  } catch {
21377
21374
  }
21378
21375
  }
@@ -21386,8 +21383,8 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
21386
21383
 
21387
21384
  // ../producer/src/services/distributed/planV2Execution.ts
21388
21385
  async function renderChunkV2(planV2Dir, chunkIndex, outputChunkPath, options) {
21389
- const workRoot = mkdtempSync10(join48(tmpdir6(), "hf-plan-v2-chunk-"));
21390
- const materializedPlanDir = join48(workRoot, "plan");
21386
+ const workRoot = mkdtempSync3(join47(tmpdir6(), "hf-plan-v2-chunk-"));
21387
+ const materializedPlanDir = join47(workRoot, "plan");
21391
21388
  try {
21392
21389
  materializePlanV2Target(planV2Dir, { role: "chunk", chunkIndex }, materializedPlanDir);
21393
21390
  return await renderChunk(materializedPlanDir, chunkIndex, outputChunkPath, options);
@@ -21396,8 +21393,8 @@ async function renderChunkV2(planV2Dir, chunkIndex, outputChunkPath, options) {
21396
21393
  }
21397
21394
  }
21398
21395
  async function assembleV2(planV2Dir, chunkPaths, outputPath, options) {
21399
- const workRoot = mkdtempSync10(join48(tmpdir6(), "hf-plan-v2-assembler-"));
21400
- const materializedPlanDir = join48(workRoot, "plan");
21396
+ const workRoot = mkdtempSync3(join47(tmpdir6(), "hf-plan-v2-assembler-"));
21397
+ const materializedPlanDir = join47(workRoot, "plan");
21401
21398
  try {
21402
21399
  const materialized = materializePlanV2Target(
21403
21400
  planV2Dir,
@@ -21419,7 +21416,7 @@ async function assembleV2(planV2Dir, chunkPaths, outputPath, options) {
21419
21416
  // ../producer/src/services/distributed/projectHash.ts
21420
21417
  import { closeSync as closeSync7, openSync as openSync7, readdirSync as readdirSync13, readSync as readSync5, realpathSync as realpathSync2, statSync as statSync13 } from "fs";
21421
21418
  import { createHash as createHash8 } from "crypto";
21422
- import { join as join49 } from "path";
21419
+ import { join as join48 } from "path";
21423
21420
  var READ_CHUNK_BYTES = 256 * 1024;
21424
21421
 
21425
21422
  // ../producer/src/services/distributed/audioSidecar.ts