hyperframes 0.9.18 → 0.9.20

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 (247) hide show
  1. package/dist/{add-R3OQEWVP.js → add-6U3Y7DEN.js} +14 -15
  2. package/dist/{agentPromptGenerator-53UGASPS.js → agentPromptGenerator-2U62YSRT.js} +10 -11
  3. package/dist/{animatedGifPrep-XTZ3NW4D.js → animatedGifPrep-RC6CYTRI.js} +10 -11
  4. package/dist/api.js +35 -36
  5. package/dist/{appHistory-WXJ4STHX.js → appHistory-FVDSCS64.js} +1 -1
  6. package/dist/{asset-7BXTM7P4.js → asset-ER2CUS6B.js} +2 -2
  7. package/dist/{assetCataloger-B6QCN7D4.js → assetCataloger-425SRTPW.js} +11 -12
  8. package/dist/{audio-6QT2263V.js → audio-JUAMPMWA.js} +69 -25
  9. package/dist/{auth-JIVRJDOA.js → auth-DQ52RE6K.js} +4 -4
  10. package/dist/{autoUpdate-PL2F3J42.js → autoUpdate-YUZGZ5ZI.js} +2 -2
  11. package/dist/{avatars-3BH2GOU2.js → avatars-F4HNQISE.js} +16 -17
  12. package/dist/{backgroundChecks-MVBPFASG.js → backgroundChecks-MSOJBGL7.js} +3 -3
  13. package/dist/backgroundChecksWorker.js +3 -3
  14. package/dist/{batchRender-MRZD6NEE.js → batchRender-33AZEDWV.js} +5 -6
  15. package/dist/{beats-FSTI2GOV.js → beats-WI3UU5KD.js} +11 -12
  16. package/dist/{benchmark-7RQP4OKL.js → benchmark-ZE5Y75YM.js} +11 -12
  17. package/dist/{billing-ERTIEJRM.js → billing-N4BCUG7R.js} +15 -16
  18. package/dist/{browser-SHRES7YO.js → browser-HUOPVD2U.js} +16 -4
  19. package/dist/{bundleWithLocalizedFonts-FBN6DQG7.js → bundleWithLocalizedFonts-PRR3UAJT.js} +1 -1
  20. package/dist/{capture-JGEPACNE.js → capture-2QNE2DEY.js} +3 -3
  21. package/dist/{capture-FI236QMK.js → capture-UWQ2GBML.js} +22 -23
  22. package/dist/{captureCompositionFrame-G35BXLQV.js → captureCompositionFrame-S2A5KJUT.js} +16 -17
  23. package/dist/{catalog-TASPLI6U.js → catalog-BQZ55PQP.js} +14 -15
  24. package/dist/{catch-up-HGAVR2VQ.js → catch-up-JFII6DVC.js} +18 -7
  25. package/dist/{check-LOIL7QDO.js → check-KPFCL46S.js} +43 -42
  26. package/dist/{checkAudio-GLG3SWWQ.js → checkAudio-NTES344V.js} +13 -14
  27. package/dist/{checkBrowser-YQETGZSL.js → checkBrowser-WQWRQO2X.js} +35 -36
  28. package/dist/{chunk-K336C37N.js → chunk-35APUSDP.js} +1 -1
  29. package/dist/{chunk-JALAIYCE.js → chunk-3KJW4NNP.js} +9 -9
  30. package/dist/{chunk-7WEOM6IL.js → chunk-3WLJMGCI.js} +1 -1
  31. package/dist/{chunk-QBV3XGXU.js → chunk-4EUUYYB3.js} +35 -2
  32. package/dist/{chunk-MHSQBZQJ.js → chunk-4HWNUBW2.js} +3 -3
  33. package/dist/{chunk-NYN24QRB.js → chunk-4J2Y6G2X.js} +1 -1
  34. package/dist/{chunk-WPID5YHT.js → chunk-4XOQILDV.js} +1 -1
  35. package/dist/{chunk-WJBP3LIO.js → chunk-5ECZJECP.js} +1 -1
  36. package/dist/{chunk-FDYNOOQZ.js → chunk-5KJWA22L.js} +5 -5
  37. package/dist/{chunk-A64V7MWG.js → chunk-5V3R5ZMY.js} +7 -7
  38. package/dist/{chunk-NTMMUK6Q.js → chunk-5WKW4P6P.js} +10 -5
  39. package/dist/{chunk-GDQQ4U3L.js → chunk-6FI5JRM3.js} +122 -27
  40. package/dist/{chunk-LPDYBJ2K.js → chunk-76HDNQDL.js} +2 -2
  41. package/dist/{chunk-6GJ7QJL7.js → chunk-76IGIELW.js} +2 -2
  42. package/dist/{chunk-CQ7H3AHT.js → chunk-7CGSZ3OR.js} +13 -13
  43. package/dist/{chunk-4WV3XDN4.js → chunk-7DGAJ7RY.js} +1 -1
  44. package/dist/chunk-7DS3STTY.js +5035 -0
  45. package/dist/{chunk-N5U63MJG.js → chunk-7ISXVZHB.js} +4 -4
  46. package/dist/{chunk-UJOQZRIS.js → chunk-7PG57ERE.js} +1 -1
  47. package/dist/{chunk-MBZ56OAU.js → chunk-A457YCWN.js} +2 -2
  48. package/dist/{chunk-WMRHEI4N.js → chunk-ADJCNH7M.js} +1 -1
  49. package/dist/{chunk-ENVFGBRD.js → chunk-AXFYCH7S.js} +12 -0
  50. package/dist/{chunk-DQ64M2ZV.js → chunk-BA3FUJOU.js} +4 -4
  51. package/dist/{chunk-QT2SLY7N.js → chunk-BQ2U65ZF.js} +272 -186
  52. package/dist/{chunk-ZII5GCHN.js → chunk-C2PQTWAH.js} +1 -1
  53. package/dist/{chunk-FSHSG2G5.js → chunk-CKZQQ2DO.js} +1 -1
  54. package/dist/{chunk-GKLZMLX3.js → chunk-CXUT4XVT.js} +22 -1
  55. package/dist/{chunk-LKT5BLRG.js → chunk-D3ZYDQMH.js} +2 -2
  56. package/dist/{chunk-PKUGO6D3.js → chunk-DNWZ66ND.js} +1 -1
  57. package/dist/{chunk-DXOAVIPV.js → chunk-FPM6B5X5.js} +3 -3
  58. package/dist/{chunk-KWF5BWC7.js → chunk-FXPBFARU.js} +1 -1
  59. package/dist/{chunk-DUIVM4DL.js → chunk-FY2QFPEK.js} +1 -1
  60. package/dist/{chunk-UUZL4X3G.js → chunk-G2C7OTXI.js} +1 -1
  61. package/dist/{chunk-NC7I6JJZ.js → chunk-GH4QTKBM.js} +42 -15
  62. package/dist/{chunk-LPIHSJAU.js → chunk-GNY2WZKA.js} +3 -3
  63. package/dist/{chunk-J3QW55W5.js → chunk-H6676SHA.js} +1 -1
  64. package/dist/{chunk-K2KFYRVX.js → chunk-HCUEMQB4.js} +1 -1
  65. package/dist/{chunk-PX7EV4SO.js → chunk-HIT72LVX.js} +7 -7
  66. package/dist/{chunk-QVR75TAB.js → chunk-IBXWPFGK.js} +2 -2
  67. package/dist/{chunk-GBRXAHOL.js → chunk-IY4I7TV4.js} +2 -2
  68. package/dist/{chunk-PBKY4VTZ.js → chunk-JXGFZG73.js} +1 -1
  69. package/dist/{chunk-L24NAUBS.js → chunk-KBHBSWEE.js} +64 -19
  70. package/dist/{chunk-MBHKOK7C.js → chunk-KKNAM57Z.js} +1 -1
  71. package/dist/{chunk-6OBCXHIF.js → chunk-KPCCWI5Q.js} +3 -3
  72. package/dist/{chunk-FUQPQDBA.js → chunk-L6XUDQW6.js} +46 -20
  73. package/dist/{chunk-6AFDBTX6.js → chunk-LDV6P3DG.js} +1 -1
  74. package/dist/{chunk-CNCKUJSI.js → chunk-LEVO6XYF.js} +83 -31
  75. package/dist/{chunk-H3YLGOKX.js → chunk-LNHMJ555.js} +1 -1
  76. package/dist/{chunk-X2TDLUIK.js → chunk-M5CDC3VO.js} +32 -7
  77. package/dist/{chunk-AXCL2A3T.js → chunk-MHW4MMV4.js} +10 -10
  78. package/dist/{chunk-DNECYN6I.js → chunk-MQFX4OD3.js} +1 -1
  79. package/dist/{chunk-7NRTBDXX.js → chunk-N2I2YUL7.js} +7 -7
  80. package/dist/{chunk-35STY5XW.js → chunk-NHV3G6JH.js} +1 -1
  81. package/dist/{chunk-C6GJQWRL.js → chunk-NSNT4DNY.js} +2 -2
  82. package/dist/{chunk-ORM4MISE.js → chunk-NZ6JYCGU.js} +3 -3
  83. package/dist/{chunk-T6CCPIDG.js → chunk-OAQTFIWB.js} +3 -3
  84. package/dist/{chunk-IJOCZ7ND.js → chunk-OWBXXAYQ.js} +2 -2
  85. package/dist/{chunk-MQ3LHGNO.js → chunk-P2DAWEPF.js} +2 -2
  86. package/dist/{chunk-TJUJJYJC.js → chunk-P2GR4V7S.js} +1 -1
  87. package/dist/{chunk-W3O7S7FC.js → chunk-PAFAOFZZ.js} +1 -1
  88. package/dist/{chunk-HVACLBWZ.js → chunk-PGNE33QK.js} +236 -49
  89. package/dist/{chunk-JQTQM6RE.js → chunk-POKB2QVF.js} +2 -2
  90. package/dist/{chunk-VDQPHJVR.js → chunk-PWP4W2PF.js} +1 -1
  91. package/dist/{chunk-KAUUM3TL.js → chunk-Q6DA3X34.js} +4 -4
  92. package/dist/{chunk-AAEPGDLX.js → chunk-QSOIL3EE.js} +3 -3
  93. package/dist/{chunk-QVPHMXKR.js → chunk-QUYTXJLE.js} +1 -1
  94. package/dist/{chunk-6LMZ677L.js → chunk-QYWOP6MH.js} +3 -3
  95. package/dist/{chunk-PIPBEVLP.js → chunk-RFG4XUMQ.js} +1 -1
  96. package/dist/{chunk-LFQLYI7R.js → chunk-RONKIDIW.js} +5 -5
  97. package/dist/{chunk-WTOPHBYH.js → chunk-RPSR5YSD.js} +4 -4
  98. package/dist/{chunk-ZHP26FJS.js → chunk-S45SR3TL.js} +2 -2
  99. package/dist/{chunk-HEZYZUF5.js → chunk-S6MXHF7C.js} +1 -1
  100. package/dist/{chunk-56XJDA3H.js → chunk-SH6P5CMQ.js} +77 -2
  101. package/dist/{chunk-DGDTF64K.js → chunk-SVOUYNKZ.js} +44 -17
  102. package/dist/{chunk-PPWKGSEV.js → chunk-TCW3ALLF.js} +2 -2
  103. package/dist/{chunk-3OS2U5V2.js → chunk-TGSBNJYV.js} +2 -2
  104. package/dist/{chunk-PPCD5YIU.js → chunk-TKHWUM6J.js} +2 -2
  105. package/dist/{chunk-3ACGV3PF.js → chunk-UECTSXVZ.js} +1 -1
  106. package/dist/{chunk-XJZR7MXG.js → chunk-UH6JF4TY.js} +12 -5
  107. package/dist/{chunk-YJNI2NM7.js → chunk-USRF4NA6.js} +10 -10
  108. package/dist/{chunk-5IUSAGDH.js → chunk-UXEUKILH.js} +1 -1
  109. package/dist/{chunk-5O4RH4G3.js → chunk-VM6PDH32.js} +1 -1
  110. package/dist/{chunk-T3K56YF2.js → chunk-WMZHESNZ.js} +2 -2
  111. package/dist/{chunk-4JI4P3J6.js → chunk-WNPIJ7UG.js} +1 -1
  112. package/dist/{chunk-4M42XMWZ.js → chunk-X254MPK3.js} +1 -1
  113. package/dist/{chunk-P6QX426Y.js → chunk-XACDCHJF.js} +1 -1
  114. package/dist/{chunk-GOLNW4NI.js → chunk-XID37ELP.js} +2 -2
  115. package/dist/{chunk-75AH7UVP.js → chunk-XU5LAY46.js} +1 -1
  116. package/dist/{chunk-Y3P26O7I.js → chunk-Y5ZW3BRK.js} +3 -3
  117. package/dist/{chunk-AAQ32CJQ.js → chunk-YVFJWUSI.js} +1 -1
  118. package/dist/{chunk-53YFWZOA.js → chunk-Z745SNN4.js} +1 -1
  119. package/dist/{chunk-EOIDKM7D.js → chunk-ZNUMTYBZ.js} +3 -3
  120. package/dist/{clean-J6NG7RNU.js → clean-5FFXB5MF.js} +20 -21
  121. package/dist/cli.js +62 -62
  122. package/dist/{cloud-D3WTNTF2.js → cloud-CINLC3NP.js} +3 -3
  123. package/dist/{cloud-LETWSUJR.js → cloud-XC5OSAE2.js} +4 -4
  124. package/dist/{cloudrun-RERXEEVM.js → cloudrun-VVU4XERK.js} +6 -7
  125. package/dist/{compare-ARPUHHYW.js → compare-6ZVA7JDY.js} +32 -33
  126. package/dist/{compiler-DGB2I53W.js → compiler-4WKTHUPH.js} +4 -4
  127. package/dist/{component-2USQBQOH.js → component-CYXNZPHM.js} +3 -3
  128. package/dist/{compositions-X4GSF4RG.js → compositions-Z53CMRFQ.js} +14 -15
  129. package/dist/{curve-4OYTBAKF.js → curve-ZLVHONKG.js} +14 -15
  130. package/dist/{cuts-7MWGKKPB.js → cuts-JGHDX4ND.js} +15 -16
  131. package/dist/{delete-IY5EUCTR.js → delete-C6KCUXEV.js} +5 -5
  132. package/dist/{deploy-PEN3EL7H.js → deploy-3W4FAFBU.js} +1 -1
  133. package/dist/{describeProject-STLWIUTD.js → describeProject-NB7JQQRZ.js} +11 -12
  134. package/dist/{deterministicFonts-DQDB47K3.js → deterministicFonts-IXXU76SA.js} +1 -1
  135. package/dist/{diff-7T6PMH3C.js → diff-77IF7ZGC.js} +34 -35
  136. package/dist/{dist-7W5T76QK.js → dist-2MTQQEZT.js} +17 -17
  137. package/dist/{dist-URQMS2HM.js → dist-LPVHFSCW.js} +2 -2
  138. package/dist/{dist-K4BOTYAM.js → dist-PVM257OR.js} +11 -12
  139. package/dist/docs/motion-blur.md +3 -5
  140. package/dist/{doctor-65DXV54T.js → doctor-7ARBZ2FZ.js} +14 -15
  141. package/dist/{energy-BJVPUQDC.js → energy-2I6O5IQY.js} +15 -16
  142. package/dist/{events-KLSIFOUP.js → events-CG6ZFBPQ.js} +16 -4
  143. package/dist/{events-FVEDX5PT.js → events-CXZTEW5W.js} +17 -18
  144. package/dist/{events-MMV4IZQE.js → events-MCXWDE3G.js} +2 -2
  145. package/dist/{extract-ZDOKCY4G.js → extract-NSSKZ7EO.js} +15 -16
  146. package/dist/{face-SP6O3QUI.js → face-CZBXJIJD.js} +15 -16
  147. package/dist/{feedback-CCNOYJZG.js → feedback-3ZZQHXQA.js} +18 -19
  148. package/dist/{ffmpeg-2V25MA6C.js → ffmpeg-KOJQXOMH.js} +10 -11
  149. package/dist/{figma-C7GSU5XD.js → figma-T77MIMMN.js} +3 -3
  150. package/dist/fontLocalizeCli.js +14 -15
  151. package/dist/{frames-GW7MG4PX.js → frames-GMXMQ7DQ.js} +16 -17
  152. package/dist/{generate-TBA3D3BT.js → generate-PN2N6MQV.js} +26 -27
  153. package/dist/{get-EUPFU4PY.js → get-AMP7GO2J.js} +5 -5
  154. package/dist/{gpuPolicy-7WYJ73JK.js → gpuPolicy-336CZTOI.js} +10 -11
  155. package/dist/{grade-compare-V62HD24E.js → grade-compare-XHR7XCIJ.js} +33 -34
  156. package/dist/{heifImagePrep-K2VOQAMS.js → heifImagePrep-GAATPFZJ.js} +11 -12
  157. package/dist/{help-WIRMKAY5.js → help-QLT7Q5CF.js} +1 -1
  158. package/dist/{history-3JEFAPPA.js → history-IBK4ICX6.js} +19 -8
  159. package/dist/hyperframe.manifest.json +1 -1
  160. package/dist/hyperframe.runtime.iife.js +73 -73
  161. package/dist/hyperframes-player.global.js +3 -3
  162. package/dist/{info-XD7XL4UA.js → info-IF6TAH4N.js} +16 -17
  163. package/dist/{init-OCITZW56.js → init-7TY3OJ6O.js} +30 -31
  164. package/dist/{ink-RIBPCBLJ.js → ink-PGZ7QSBH.js} +15 -16
  165. package/dist/{inspect-O3KNTVYU.js → inspect-LHLSKDYO.js} +33 -34
  166. package/dist/{installer-JC737YVC.js → installer-DBTP7YGS.js} +6 -7
  167. package/dist/{keyframes-4YEMPCE3.js → keyframes-4M4776JR.js} +16 -8
  168. package/dist/{lambda-6RI6AZCI.js → lambda-FFMB6Y76.js} +14 -15
  169. package/dist/{layout-U323JUYY.js → layout-LJHS7HFD.js} +33 -34
  170. package/dist/{lint-HL2ZMYYD.js → lint-2J5AVK6D.js} +14 -10
  171. package/dist/{lintProject-6TML32JZ.js → lintProject-2OD4CDTW.js} +2 -2
  172. package/dist/{list-YVRLEZ5C.js → list-MAYBNZEL.js} +5 -5
  173. package/dist/{localPage-Z4A2OOHF.js → localPage-EKPNDJ27.js} +10 -11
  174. package/dist/{login-Z53XVXB2.js → login-CEU43XKU.js} +6 -6
  175. package/dist/{logout-EQ2HJDL4.js → logout-EKDVIU6Y.js} +2 -2
  176. package/dist/{look-QAEW6NLB.js → look-IYTF5GLD.js} +15 -16
  177. package/dist/{manager-Y5JESME2.js → manager-DILAI3UF.js} +11 -12
  178. package/dist/{measure-QAPM6I7P.js → measure-2WZGYPYI.js} +11 -11
  179. package/dist/{media-treatment-QBSD7Z4H.js → media-treatment-NEY3KFIE.js} +16 -17
  180. package/dist/{media-use-HWZY3QEN.js → media-use-3RF5K7J2.js} +4 -4
  181. package/dist/{models-MKZN7KP3.js → models-JG3K3WHB.js} +14 -15
  182. package/dist/{motionShot-EF2FD7HF.js → motionShot-BXTTHXNC.js} +19 -20
  183. package/dist/{normalize-audio-UI7VGKNU.js → normalize-audio-V42ORWPJ.js} +11 -12
  184. package/dist/{open-PUWUKUNK.js → open-TIGOP4UL.js} +15 -16
  185. package/dist/{parakeetRunner-3XQTNEZS.js → parakeetRunner-ECBLSKPA.js} +15 -16
  186. package/dist/{pipeline-UECOYEZ2.js → pipeline-NAQKFYVO.js} +13 -14
  187. package/dist/{play-4KFBSJLJ.js → play-OCUIRYGT.js} +22 -23
  188. package/dist/{preflight-NREEVZKH.js → preflight-FXN2DIKX.js} +11 -12
  189. package/dist/{present-5GDW3P4H.js → present-EIPGUFX2.js} +18 -19
  190. package/dist/{preview-MU3SNNHO.js → preview-D3DGM36N.js} +22 -23
  191. package/dist/{probe-ZZ5F7LF4.js → probe-LHGNRPYJ.js} +15 -16
  192. package/dist/{producer-AMLHR4XV.js → producer-MUSGQJB5.js} +1 -1
  193. package/dist/{projectConfig-LQDSRYHS.js → projectConfig-5XHCXAR2.js} +8 -9
  194. package/dist/{publication-VFQY5MS4.js → publication-YHI2M2PN.js} +4 -5
  195. package/dist/{publish-KFUMQFD4.js → publish-DD4ZAHEH.js} +15 -16
  196. package/dist/{refresh-ARZZRKMP.js → refresh-ZHLUUENK.js} +2 -2
  197. package/dist/{remove-background-GXQLMKYN.js → remove-background-AJBLAXSV.js} +14 -15
  198. package/dist/{render-5YMMU4K3.js → render-32BRUXZK.js} +7 -8
  199. package/dist/{render-U63G4NFP.js → render-AKGMPEQ4.js} +104 -62
  200. package/dist/{render-X2TJ52JS.js → render-LCH7X3UA.js} +42 -39
  201. package/dist/{render-batch-EJCIXNZ4.js → render-batch-BGZ4XDDA.js} +7 -8
  202. package/dist/renderSetupWorker.js +11 -8
  203. package/dist/{resolver-3AZ6BDNT.js → resolver-M64IRWRP.js} +6 -7
  204. package/dist/{reverse-SGQLQDPZ.js → reverse-HLLQAI77.js} +1 -1
  205. package/dist/{run-WZP6HXIH.js → run-Q4IUMQIY.js} +4 -4
  206. package/dist/{screenshotCapture-YHT6OFSL.js → screenshotCapture-INHISXPC.js} +11 -12
  207. package/dist/{sherpa-DHJ4KV3O.js → sherpa-MQLZFNTX.js} +14 -15
  208. package/dist/skills/hyperframes/references/motion.md +1 -1
  209. package/dist/skills/hyperframes/references/storyboard.md +1 -1
  210. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +1 -1
  211. package/dist/skills/media-use/references/heygen.md +9 -9
  212. package/dist/{skills-PSIYCWQF.js → skills-W4F5AJ2K.js} +19 -7
  213. package/dist/{skillsUpdateCheck-INFQ6JY4.js → skillsUpdateCheck-GVFHBX3G.js} +3 -3
  214. package/dist/{snapshot-BRJWWBVL.js → snapshot-34FUMOEG.js} +40 -41
  215. package/dist/{src-Q4HPEI72.js → src-M3NYEBA7.js} +13 -14
  216. package/dist/{src-4HGQRHW6.js → src-VL6XKFAA.js} +20 -19
  217. package/dist/{start-BF77FALB.js → start-A3YWCGDG.js} +24 -25
  218. package/dist/{staticProjectServer-MJGRVAHU.js → staticProjectServer-6NQWZP3Q.js} +21 -22
  219. package/dist/{status-GKDPASRO.js → status-ZBUL7MPB.js} +16 -17
  220. package/dist/studio/assets/{hyperframes-player-pLs7eSzg.js → hyperframes-player-ZQZslutT.js} +3 -3
  221. package/dist/studio/assets/index-Bgfyny02.css +1 -0
  222. package/dist/studio/assets/{index-DZ7OLB7p.js → index-Bn5atbhb.js} +1 -1
  223. package/dist/studio/assets/{index-D_iVCwL3.js → index-Bz2pYyGM.js} +196 -196
  224. package/dist/studio/index.html +2 -2
  225. package/dist/{studio-api-UOW3KWGH.js → studio-api-CIDVEQUP.js} +11 -12
  226. package/dist/{studioServer-6HZXHHM2.js → studioServer-4FEM4AAL.js} +66 -59
  227. package/dist/{sync-STGNZI3G.js → sync-PXQD6JNH.js} +15 -16
  228. package/dist/{telemetry-IXOTZW4E.js → telemetry-BMPRZBBX.js} +22 -2
  229. package/dist/{telemetry-3CL4XRJJ.js → telemetry-W7PZ4E2A.js} +16 -4
  230. package/dist/{templates-GK4UAT6M.js → templates-ELZU33UU.js} +25 -26
  231. package/dist/{timeline-QPB6QGXD.js → timeline-O7BR3IKC.js} +21 -22
  232. package/dist/{tokens-S7IZD453.js → tokens-RNFI6LFF.js} +2 -2
  233. package/dist/{transcribe-LPYK5H76.js → transcribe-GUUUSHHL.js} +28 -29
  234. package/dist/{transcribe-TL74MCTG.js → transcribe-XQOGYK6P.js} +13 -14
  235. package/dist/{update-WXPQPKMO.js → update-J37ZLNH7.js} +20 -8
  236. package/dist/{updateCheck-QRNGICLU.js → updateCheck-ALBUZ6YM.js} +2 -2
  237. package/dist/{upgrade-NH3NQOMG.js → upgrade-NVG73VIE.js} +3 -3
  238. package/dist/{upload-YQMBLKH5.js → upload-HBALN6HE.js} +5 -1
  239. package/dist/{urlDownloader-JELHNEVH.js → urlDownloader-TKEHDA5W.js} +9 -10
  240. package/dist/{validate-SRIEIBQV.js → validate-3TFHU3MJ.js} +27 -28
  241. package/dist/{video-ZMNAGSOC.js → video-PBNQGPQO.js} +11 -12
  242. package/dist/{voices-YVWEHLRS.js → voices-PF7EV4O4.js} +29 -28
  243. package/dist/warmCheck.js +41 -42
  244. package/package.json +1 -1
  245. package/dist/chunk-DSSDDLGX.js +0 -5035
  246. package/dist/chunk-TK7THLRO.js +0 -65
  247. package/dist/studio/assets/index-CNZk2EFC.css +0 -1
@@ -11,17 +11,17 @@ import {
11
11
  iterateFontFamilyDeclarations,
12
12
  normalizeSystemFontPrimaryFamilies,
13
13
  resolveFontFamilyDeclarationFamilies
14
- } from "./chunk-ENVFGBRD.js";
14
+ } from "./chunk-AXFYCH7S.js";
15
15
  import {
16
16
  Semaphore,
17
17
  prepareHeifImageInputs,
18
18
  withMediaProbeSlot
19
- } from "./chunk-T3K56YF2.js";
19
+ } from "./chunk-WMZHESNZ.js";
20
20
  import {
21
21
  EncoderInterruptedError,
22
22
  encoderFailureError,
23
23
  prepareAnimatedGifInputs
24
- } from "./chunk-GBRXAHOL.js";
24
+ } from "./chunk-IY4I7TV4.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-HVACLBWZ.js";
189
+ } from "./chunk-PGNE33QK.js";
190
190
  import {
191
191
  assignBundledRuntimeCompositionIds,
192
192
  emitMountedModuleScripts,
@@ -198,12 +198,17 @@ import {
198
198
  parsesAsScript,
199
199
  prepareFlattenedInnerRoot,
200
200
  stripSdrPngColourTags
201
- } from "./chunk-6GJ7QJL7.js";
201
+ } from "./chunk-76IGIELW.js";
202
202
  import {
203
203
  collectScratchLeftovers,
204
204
  removeScratch,
205
205
  renameWithRetry
206
206
  } from "./chunk-YWRUQ7XZ.js";
207
+ import {
208
+ TRANSITIONS,
209
+ convertTransfer,
210
+ crossfade
211
+ } from "./chunk-3GXQPCJC.js";
207
212
  import {
208
213
  DISTRIBUTED_FPS,
209
214
  HF_VFX_ATTR,
@@ -217,9 +222,11 @@ import {
217
222
  normalizeGsapBaseUrl,
218
223
  parseFps,
219
224
  parseVfxChain,
225
+ redactKnownPaths,
226
+ redactTelemetryString,
220
227
  resolveAuthoredTimingWindow,
221
228
  toFps
222
- } from "./chunk-56XJDA3H.js";
229
+ } from "./chunk-SH6P5CMQ.js";
223
230
  import {
224
231
  COMPOSITION_SOURCE_URL,
225
232
  HF_COLOR_GRADING_ATTR,
@@ -254,29 +261,25 @@ import {
254
261
  sourceTimeAt,
255
262
  styleElementsFor,
256
263
  timeAtSourceTime
257
- } from "./chunk-DSSDDLGX.js";
258
- import {
259
- TRANSITIONS,
260
- convertTransfer,
261
- crossfade
262
- } from "./chunk-3GXQPCJC.js";
263
- import {
264
- redactKnownPaths,
265
- redactTelemetryString
266
- } from "./chunk-TK7THLRO.js";
264
+ } from "./chunk-7DS3STTY.js";
267
265
  import {
268
266
  chromeMajorCeiling
269
267
  } from "./chunk-WE42NVH7.js";
270
268
  import {
271
269
  lintHyperframeHtml,
272
270
  resolveReferencedStart
273
- } from "./chunk-NTMMUK6Q.js";
271
+ } from "./chunk-5WKW4P6P.js";
274
272
  import {
275
273
  isUnresolvedAssetPlaceholder,
276
274
  readProjectFile,
277
275
  readTextFile,
278
276
  resolveProjectRelativeSrc
279
277
  } from "./chunk-WVRAFHJU.js";
278
+ import {
279
+ LOW_MEMORY_TOTAL_MB_THRESHOLD,
280
+ getCgroupMemoryLimitMb,
281
+ getSystemTotalMb
282
+ } from "./chunk-FBN2M2HK.js";
280
283
  import {
281
284
  CSS_URL_RE,
282
285
  MEDIA_START_BASIS_ATTR,
@@ -308,15 +311,10 @@ import {
308
311
  import {
309
312
  parseHTML
310
313
  } from "./chunk-GWTIFRF5.js";
311
- import {
312
- LOW_MEMORY_TOTAL_MB_THRESHOLD,
313
- getCgroupMemoryLimitMb,
314
- getSystemTotalMb
315
- } from "./chunk-FBN2M2HK.js";
316
314
 
317
315
  // ../producer/src/services/renderOrchestrator.ts
318
316
  import {
319
- existsSync as existsSync19,
317
+ existsSync as existsSync20,
320
318
  mkdirSync as mkdirSync10,
321
319
  readdirSync as readdirSync6,
322
320
  rmSync as rmSync10,
@@ -1165,7 +1163,7 @@ function resolveDeliveryEncoderOptions(config) {
1165
1163
  import {
1166
1164
  copyFileSync,
1167
1165
  cpSync,
1168
- existsSync as existsSync3,
1166
+ existsSync as existsSync4,
1169
1167
  mkdirSync,
1170
1168
  rmSync,
1171
1169
  symlinkSync,
@@ -1181,6 +1179,7 @@ import {
1181
1179
  relative as nodeRelative,
1182
1180
  isAbsolute as nodeIsAbsolute
1183
1181
  } from "path";
1182
+ import { existsSync as existsSync3 } from "fs";
1184
1183
  import { fileURLToPath as fileURLToPath2 } from "url";
1185
1184
  var DEFAULT_RENDERS_DIR = process.env.PRODUCER_RENDERS_DIR ?? // fileURLToPath (not URL.pathname): on Windows .pathname is "/D:/..." which
1186
1185
  // resolves to a bogus renders dir.
@@ -1219,6 +1218,13 @@ function resolveRenderPaths(projectDir, outputPath, rendersDir = DEFAULT_RENDERS
1219
1218
  const absoluteOutputPath = nodeResolve(resolvedOutputPath);
1220
1219
  return { absoluteProjectDir, absoluteOutputPath };
1221
1220
  }
1221
+ function resolveCompositionSrc(projectDir, src) {
1222
+ const rooted = (value) => nodeResolve(projectDir, value.replace(/^(?:\.?[\\/])+/, ""));
1223
+ const decoded = rooted(decodedUrlPath(src));
1224
+ if (!isPathInside2(decoded, projectDir)) return null;
1225
+ const raw = rooted(src);
1226
+ return !existsSync3(decoded) && isPathInside2(raw, projectDir) && existsSync3(raw) ? raw : decoded;
1227
+ }
1222
1228
 
1223
1229
  // ../producer/src/services/render/shared.ts
1224
1230
  var BROWSER_MEDIA_EPSILON = 1e-4;
@@ -1422,7 +1428,7 @@ var materializePathModule = {
1422
1428
  isAbsolute
1423
1429
  };
1424
1430
  var materializeFileSystem = {
1425
- existsSync: existsSync3,
1431
+ existsSync: existsSync4,
1426
1432
  mkdirSync,
1427
1433
  symlinkSync,
1428
1434
  cpSync,
@@ -1702,12 +1708,12 @@ var RenderExecutionContext = class {
1702
1708
  };
1703
1709
 
1704
1710
  // ../producer/src/services/render/artifactTransaction.ts
1705
- import { closeSync as closeSync2, existsSync as existsSync5, fstatSync as fstatSync2, openSync as openSync2, readSync, readdirSync as readdirSync2, rmSync as rmSync3 } from "fs";
1711
+ import { closeSync as closeSync2, existsSync as existsSync6, fstatSync as fstatSync2, openSync as openSync2, readSync, readdirSync as readdirSync2, rmSync as rmSync3 } from "fs";
1706
1712
  import { basename as basename3, dirname as dirname4, extname as extname2, join as join5, resolve as resolve4 } from "path";
1707
1713
 
1708
1714
  // ../producer/src/services/render/renderDirOwner.ts
1709
1715
  import {
1710
- existsSync as existsSync4,
1716
+ existsSync as existsSync5,
1711
1717
  lstatSync,
1712
1718
  mkdtempSync,
1713
1719
  readFileSync as readFileSync2,
@@ -1782,7 +1788,7 @@ function newestWriteMs(path) {
1782
1788
  }
1783
1789
  function isAbandoned(dir, ownerlessIdleMs, now) {
1784
1790
  try {
1785
- if (!lstatSync(dir).isDirectory() || existsSync4(join4(dir, TRANSACTION_BACKUP))) return false;
1791
+ if (!lstatSync(dir).isDirectory() || existsSync5(join4(dir, TRANSACTION_BACKUP))) return false;
1786
1792
  const owner = ownerState(dir);
1787
1793
  if (owner === "gone") return true;
1788
1794
  return owner === "none" && ownerlessIdleMs !== void 0 && now - newestWriteMs(dir) >= ownerlessIdleMs;
@@ -1814,7 +1820,7 @@ function createRenderWorkDir(prefix, outputDir) {
1814
1820
 
1815
1821
  // ../producer/src/services/render/artifactTransaction.ts
1816
1822
  var defaultFileSystem = {
1817
- existsSync: existsSync5,
1823
+ existsSync: existsSync6,
1818
1824
  renameSync: (source, destination) => renameWithRetry(source, destination),
1819
1825
  rmSync: rmSync3
1820
1826
  };
@@ -1968,7 +1974,7 @@ var ArtifactTransaction = class {
1968
1974
  async assertDirectoryExpectation(expected, files) {
1969
1975
  for (const required of expected.requiredFiles ?? []) {
1970
1976
  const path = join5(this.stagingPath, required);
1971
- if (!existsSync5(path)) {
1977
+ if (!existsSync6(path)) {
1972
1978
  throw new Error(`Render artifact directory is missing ${required}: ${this.stagingPath}`);
1973
1979
  }
1974
1980
  assertReadableNonEmptyFile(path);
@@ -2217,7 +2223,7 @@ function replanAfterFailure(plan2, failure) {
2217
2223
  }
2218
2224
 
2219
2225
  // ../producer/src/services/render/stages/captureSegmentedStage.ts
2220
- import { existsSync as existsSync6, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
2226
+ import { existsSync as existsSync7, mkdirSync as mkdirSync3, rmSync as rmSync6, statSync as statSync3 } from "fs";
2221
2227
  import { join as join10 } from "path";
2222
2228
 
2223
2229
  // ../producer/src/services/render/perfSummary.ts
@@ -2497,6 +2503,19 @@ function aggregateBeginFrameReuse(perfs) {
2497
2503
  if (noDamageFrames + hasDamageFrames === 0) return void 0;
2498
2504
  return { noDamageFrames, hasDamageFrames };
2499
2505
  }
2506
+ function aggregateMotionBlur(perfs) {
2507
+ const ran = perfs.flatMap((p) => p.motionBlur ?? []).filter((m) => m.tier || m.failedFrames > 0);
2508
+ const first = ran[0];
2509
+ if (!first) return void 0;
2510
+ return {
2511
+ tier: first.tier ?? ran.find((m) => m.tier)?.tier ?? null,
2512
+ reasonCode: first.reasonCode,
2513
+ movers: first.movers,
2514
+ failedFrames: ran.reduce((sum2, m) => sum2 + m.failedFrames, 0),
2515
+ readEvents: ran.some((m) => m.readEvents),
2516
+ fingerprint: ran.find((m) => m.fingerprint)?.fingerprint ?? null
2517
+ };
2518
+ }
2500
2519
  function buildRenderPerfSummary(input) {
2501
2520
  return {
2502
2521
  renderId: input.job.id,
@@ -2547,6 +2566,7 @@ function buildRenderPerfSummary(input) {
2547
2566
  staticDedup: aggregateDedup(input.dedupPerfs),
2548
2567
  chromeMemory: aggregateChromeMemory(input.dedupPerfs),
2549
2568
  beginFrameReuse: aggregateBeginFrameReuse(input.dedupPerfs),
2569
+ motionBlur: aggregateMotionBlur(input.dedupPerfs),
2550
2570
  drawElement: aggregateDrawElement(
2551
2571
  input.dedupPerfs,
2552
2572
  input.drawElement ?? { selfVerifyFallback: false }
@@ -3963,6 +3983,21 @@ function raceAgainstStall(promise, deadlineMs, input, signal) {
3963
3983
  );
3964
3984
  });
3965
3985
  }
3986
+ function createSessionInitBudget(input) {
3987
+ const initStallMs = Math.max(SESSION_INIT_STALL_MS, resolveCaptureStallTimeoutMs());
3988
+ const setup = createStallClock();
3989
+ return (work, stalled) => raceAgainstStall(
3990
+ work,
3991
+ initStallMs - setup.idle(0),
3992
+ {
3993
+ session: stalled,
3994
+ frameIndex: input.frameIndex,
3995
+ totalFrames: input.totalFrames,
3996
+ stallTimeoutMs: initStallMs
3997
+ },
3998
+ input.abortSignal
3999
+ );
4000
+ }
3966
4001
  function createDrainFrameGuard(args) {
3967
4002
  const { log, stats, frameTime } = args;
3968
4003
  const verifyMinDb = resolveDeVerifyMinDb();
@@ -4435,14 +4470,11 @@ async function runCaptureStreamingStage(input) {
4435
4470
  let resumes = 0;
4436
4471
  for (; ; ) {
4437
4472
  const videoInjector = createRenderVideoFrameInjector();
4438
- const initStallMs = Math.max(SESSION_INIT_STALL_MS, resolveCaptureStallTimeoutMs());
4439
- const setup = createStallClock();
4440
- const withinInitBudget = (work, stalled) => raceAgainstStall(
4441
- work,
4442
- initStallMs - setup.idle(0),
4443
- { session: stalled, frameIndex: resume.from, totalFrames, stallTimeoutMs: initStallMs },
4473
+ const withinInitBudget = createSessionInitBudget({
4474
+ frameIndex: resume.from,
4475
+ totalFrames,
4444
4476
  abortSignal
4445
- );
4477
+ });
4446
4478
  const openSession = async () => {
4447
4479
  const opening = createCaptureSession(
4448
4480
  fileServer.url,
@@ -4720,7 +4752,7 @@ async function captureSegmentToEncoder(ctx, segment) {
4720
4752
  path: segmentPath,
4721
4753
  // Recorded so resume can prove the file on disk is the one that
4722
4754
  // finished; absent only in unit tests, whose fake encoder writes none.
4723
- bytes: existsSync6(segmentPath) ? statSync3(segmentPath).size : 0
4755
+ bytes: existsSync7(segmentPath) ? statSync3(segmentPath).size : 0
4724
4756
  });
4725
4757
  return encodeResult;
4726
4758
  } finally {
@@ -4750,14 +4782,29 @@ function defaultSessionFactory(input) {
4750
4782
  });
4751
4783
  probeSession = null;
4752
4784
  }
4753
- const session = probeSession ?? await openSegmentedSession(input, injector);
4785
+ const withinInitBudget = createSessionInitBudget({
4786
+ frameIndex: input.job.framesRendered ?? 0,
4787
+ totalFrames: input.totalFrames,
4788
+ abortSignal: input.abortSignal
4789
+ });
4790
+ const openSession = async () => {
4791
+ const opening = openSegmentedSession(input, injector);
4792
+ try {
4793
+ return await withinInitBudget(opening, OPENING_CAPTURE_SESSION);
4794
+ } catch (error) {
4795
+ void opening.then(closeCaptureSession, () => {
4796
+ });
4797
+ throw error;
4798
+ }
4799
+ };
4800
+ const session = probeSession ?? await openSession();
4754
4801
  if (probeSession) {
4755
4802
  openSegmentedSessionReuse(input, probeSession, injector);
4756
4803
  probeSession = null;
4757
4804
  }
4758
4805
  try {
4759
- if (!session.isInitialized) await initializeSession(session);
4760
- await completeDeferredDrawElementInit(session);
4806
+ if (!session.isInitialized) await withinInitBudget(initializeSession(session), session);
4807
+ await withinInitBudget(completeDeferredDrawElementInit(session), session);
4761
4808
  } catch (error) {
4762
4809
  await closeCaptureSession(session).catch(() => {
4763
4810
  });
@@ -5671,7 +5718,7 @@ function trackSegmentFramePeak(frames, rootDir, onPeak) {
5671
5718
 
5672
5719
  // ../producer/src/services/render/segmentManifest.ts
5673
5720
  import { createHash as createHash2 } from "crypto";
5674
- import { existsSync as existsSync7, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
5721
+ import { existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync4, statSync as statSync5, writeFileSync as writeFileSync3 } from "fs";
5675
5722
  import { join as join15 } from "path";
5676
5723
  var MANIFEST_FILENAME = "segments.json";
5677
5724
  function computeSegmentPlanHash(input) {
@@ -5718,7 +5765,7 @@ function isManifest(value) {
5718
5765
  }
5719
5766
  function readSegmentManifest(segmentDir) {
5720
5767
  const path = join15(segmentDir, MANIFEST_FILENAME);
5721
- if (!existsSync7(path)) return null;
5768
+ if (!existsSync8(path)) return null;
5722
5769
  try {
5723
5770
  const parsed = JSON.parse(readFileSync4(path, "utf-8"));
5724
5771
  return isManifest(parsed) ? parsed : null;
@@ -5747,7 +5794,7 @@ async function validateCompletedSegments(manifest, expectedHash, probeFrames) {
5747
5794
  const ok = /* @__PURE__ */ new Set();
5748
5795
  if (manifest.planHash !== expectedHash) return ok;
5749
5796
  for (const entry of manifest.completed) {
5750
- if (!existsSync7(entry.path)) continue;
5797
+ if (!existsSync8(entry.path)) continue;
5751
5798
  const size = statSync5(entry.path).size;
5752
5799
  if (size <= 0 || size !== entry.bytes) continue;
5753
5800
  const frames = await probeFrames(entry.path);
@@ -5877,7 +5924,7 @@ var ALLOWED_STRING_DATA_KEYS = /* @__PURE__ */ new Set([
5877
5924
  "stagePhase",
5878
5925
  // Full-fidelity fast-capture fallback trigger — the specific reason
5879
5926
  // drawElement gated off ("filter:blur", "filter:drop-shadow",
5880
- // "backdrop-filter", "clip-path", "at_risk_timeline", "swiftshader", …).
5927
+ // "backdrop-filter", "clip-path", "at_risk_timeline", "swiftshader", "webgl_unavailable", …).
5881
5928
  // Populated on the `capture_fallback_profile` checkpoint emitted by
5882
5929
  // `fallbackCaptureProfile.ts` when the operator opts into
5883
5930
  // `HF_PROFILE_FALLBACK_CAPTURE=true` so downstream metric consumers can
@@ -6305,13 +6352,13 @@ function countAuthoredTimedClips(html) {
6305
6352
  }
6306
6353
 
6307
6354
  // ../producer/src/services/render/stages/compileStage.ts
6308
- import { existsSync as existsSync10, writeFileSync as writeFileSync4 } from "fs";
6355
+ import { existsSync as existsSync11, writeFileSync as writeFileSync4 } from "fs";
6309
6356
  import { join as join17 } from "path";
6310
6357
 
6311
6358
  // ../producer/src/services/htmlCompiler.ts
6312
6359
  import { createHash as createHash4 } from "crypto";
6313
- import { createReadStream as createReadStream2, existsSync as existsSync9, mkdirSync as mkdirSync7, readFileSync as readFileSync5 } from "fs";
6314
- import { join as join16, dirname as dirname6, resolve as resolve5, basename as basename4, relative as relative2 } from "path";
6360
+ import { createReadStream as createReadStream2, existsSync as existsSync10, mkdirSync as mkdirSync7, readFileSync as readFileSync5 } from "fs";
6361
+ import { join as join16, dirname as dirname6, resolve as resolve5, basename as basename4, relative as relative2, sep as sep2 } from "path";
6315
6362
 
6316
6363
  // ../producer/src/services/renderMediaCollector.ts
6317
6364
  function resolveHostEnd(host, hostStart) {
@@ -6460,7 +6507,7 @@ function getPositionEditsRenderScript() {
6460
6507
  }
6461
6508
 
6462
6509
  // ../producer/src/services/assetMediaType.ts
6463
- import { existsSync as existsSync8 } from "fs";
6510
+ import { existsSync as existsSync9 } from "fs";
6464
6511
  var ASSET_MEDIA_TYPE_MISMATCH = "ASSET_MEDIA_TYPE_MISMATCH";
6465
6512
  var AssetMediaTypeMismatchError = class extends Error {
6466
6513
  code = ASSET_MEDIA_TYPE_MISMATCH;
@@ -6526,7 +6573,7 @@ async function preflightCompositionAssetMediaTypes(input) {
6526
6573
  input.projectDir,
6527
6574
  input.compiledDir
6528
6575
  );
6529
- if (!existsSync8(resolvedPath)) continue;
6576
+ if (!existsSync9(resolvedPath)) continue;
6530
6577
  byPath.set(resolvedPath, [...byPath.get(resolvedPath) ?? [], reference]);
6531
6578
  }
6532
6579
  const mismatches = [];
@@ -6614,6 +6661,14 @@ Check that each file referenced by data-composition-src contains valid HTML with
6614
6661
  this.problems = problems;
6615
6662
  }
6616
6663
  };
6664
+ function normalizeCompositionSrcs(html, projectDir) {
6665
+ return html.replace(/(\bdata-composition-src=)(["'])([^"']*)\2/g, (whole, name, quote, value) => {
6666
+ if (!value.includes("%") && !value.startsWith("/")) return whole;
6667
+ const file = resolveCompositionSrc(projectDir, value);
6668
+ if (file === null) return whole;
6669
+ return `${name}${quote}${relative2(projectDir, file).split(sep2).join("/")}${quote}`;
6670
+ });
6671
+ }
6617
6672
  function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */ new Set()) {
6618
6673
  const { document: document2 } = parseHTML(html);
6619
6674
  const hosts = [...document2.querySelectorAll("[data-composition-src]")];
@@ -6622,7 +6677,11 @@ function assertSubCompositionsUsable(html, projectDir, visited = /* @__PURE__ */
6622
6677
  const srcPath = el.getAttribute("data-composition-src");
6623
6678
  if (!srcPath) continue;
6624
6679
  if (isUnresolvedAssetPlaceholder(srcPath)) continue;
6625
- const filePath = resolve5(projectDir, srcPath);
6680
+ const filePath = resolveCompositionSrc(projectDir, srcPath);
6681
+ if (filePath === null) {
6682
+ problems.push({ srcPath, detail: "it is outside the project folder" });
6683
+ continue;
6684
+ }
6626
6685
  if (visited.has(filePath)) continue;
6627
6686
  const read = readProjectFile(filePath);
6628
6687
  if (read.kind === "missing") {
@@ -6768,7 +6827,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
6768
6827
  let filePath = src;
6769
6828
  if (isHttpUrl(src)) {
6770
6829
  const remoteDir = join16(downloadDir, REMOTE_MEDIA_SUBDIR);
6771
- if (!existsSync9(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
6830
+ if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
6772
6831
  try {
6773
6832
  filePath = await downloadToTemp(src, remoteDir, void 0, void 0, void 0, {
6774
6833
  onTelemetry: logRemoteDownloadTelemetry
@@ -6781,7 +6840,7 @@ async function resolveMediaDuration(src, mediaStart, playbackRate, baseDir, down
6781
6840
  if (!filePath.startsWith("/")) filePath = join16(baseDir, filePath);
6782
6841
  filePath = urlByAbsentLocalPath?.get(filePath) ?? filePath;
6783
6842
  }
6784
- if (!isHttpUrl(filePath) && !existsSync9(filePath)) {
6843
+ if (!isHttpUrl(filePath) && !existsSync10(filePath)) {
6785
6844
  return { duration: null, resolvedPath: filePath };
6786
6845
  }
6787
6846
  const withSrcContext = (error) => {
@@ -6922,7 +6981,8 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
6922
6981
  for (const el of compEls) {
6923
6982
  const srcPath = el.getAttribute("data-composition-src");
6924
6983
  if (!srcPath) continue;
6925
- const filePath = resolve5(projectDir, srcPath);
6984
+ const filePath = resolveCompositionSrc(projectDir, srcPath);
6985
+ if (filePath === null) continue;
6926
6986
  if (visited.has(filePath)) {
6927
6987
  continue;
6928
6988
  }
@@ -6930,7 +6990,7 @@ async function parseSubCompositions(html, projectDir, downloadDir, visited = /*
6930
6990
  if (read.kind !== "file") {
6931
6991
  continue;
6932
6992
  }
6933
- const rawSubHtml = read.text;
6993
+ const rawSubHtml = normalizeCompositionSrcs(read.text, projectDir);
6934
6994
  const nestedVisited = new Set(visited);
6935
6995
  nestedVisited.add(filePath);
6936
6996
  workItems.push({ srcPath, filePath, rawSubHtml, nestedVisited });
@@ -7118,8 +7178,9 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
7118
7178
  resolveHtml: (srcPath) => {
7119
7179
  let compHtml = subCompositions.get(srcPath) || null;
7120
7180
  if (!compHtml) {
7121
- const read = readProjectFile(resolve5(projectDir, srcPath));
7122
- if (read.kind === "file") {
7181
+ const filePath = resolveCompositionSrc(projectDir, srcPath);
7182
+ const read = filePath ? readProjectFile(filePath) : null;
7183
+ if (read?.kind === "file") {
7123
7184
  compHtml = rewriteUnresolvableGsapToCdn(read.text, projectDir, srcPath);
7124
7185
  }
7125
7186
  }
@@ -7128,7 +7189,7 @@ function inlineSubCompositions2(html, subCompositions, projectDir, variableOverr
7128
7189
  parseHtml: (htmlStr) => parseHTML(htmlStr).document,
7129
7190
  // Mirrors the preview bundler: a sub-composition's SIBLING assets resolve
7130
7191
  // against its own directory, project-root refs stay as authored.
7131
- assetExists: (path) => existsSync9(resolve5(projectDir, path)),
7192
+ assetExists: (path) => existsSync10(resolve5(projectDir, path)),
7132
7193
  // Preserve the authored root wrapper as a child of the host, matching
7133
7194
  // the preview bundler's shape (htmlBundler.ts's prepareFlattenedInnerRoot,
7134
7195
  // which the runtime compositionLoader mirrors with its own copy for the
@@ -7319,7 +7380,7 @@ function collectExternalAssets(html, projectDir) {
7319
7380
  if (isPathInside2(absPath, absProjectDir)) {
7320
7381
  return null;
7321
7382
  }
7322
- if (!existsSync9(absPath)) return null;
7383
+ if (!existsSync10(absPath)) return null;
7323
7384
  const safeKey = toExternalAssetKey(absPath);
7324
7385
  externalAssets.set(safeKey, absPath);
7325
7386
  return safeKey;
@@ -7369,7 +7430,7 @@ var REMOTE_SOURCE_TAG_RE = /<source\b[^>]*?\bsrc\s*=\s*["'](https?:\/\/[^"']+)["
7369
7430
  var REMOTE_IMG_TAG_RE = /<img\b[^>]*?(?<![\w-])src\s*=\s*["'](https?:\/\/[^"']+)["'][^>]*>/gi;
7370
7431
  async function downloadAndRewriteUrls(urlSet, html, remoteDir, warnLabel, logLabel, extraRewrite) {
7371
7432
  if (urlSet.size === 0) return { html, remoteMediaAssets: /* @__PURE__ */ new Map() };
7372
- if (!existsSync9(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
7433
+ if (!existsSync10(remoteDir)) mkdirSync7(remoteDir, { recursive: true });
7373
7434
  const urlToLocal = /* @__PURE__ */ new Map();
7374
7435
  await Promise.all(
7375
7436
  [...urlSet].map(async (url) => {
@@ -7552,13 +7613,13 @@ function projectStylesheetFontFamilies(html, projectDir) {
7552
7613
  const href = /\bhref=["']([^"']+)["']/i.exec(tag)?.[1];
7553
7614
  if (!href || /^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(href)) continue;
7554
7615
  const sheet = resolve5(projectDir, decodedUrlPath(href).replace(/^(?:\.?\/)+/, ""));
7555
- if (!isPathInside2(sheet, projectDir) || !existsSync9(sheet)) continue;
7616
+ if (!isPathInside2(sheet, projectDir) || !existsSync10(sheet)) continue;
7556
7617
  for (const face of extractFontFaceBlocks(readFileSync5(sheet, "utf8"))) {
7557
7618
  const family = /font-family\s*:\s*([^;}]+)/i.exec(face)?.[1]?.trim().replace(/^['"]|['"]$/g, "");
7558
7619
  const shipsFile = [...face.matchAll(LOCAL_FONTFACE_URL_RE)].some(([, url = ""]) => {
7559
7620
  const path = decodedUrlPath(url);
7560
7621
  const file = path.startsWith("/") ? resolve5(projectDir, `.${path}`) : resolve5(dirname6(sheet), path);
7561
- return isPathInside2(file, projectDir) && existsSync9(file);
7622
+ return isPathInside2(file, projectDir) && existsSync10(file);
7562
7623
  });
7563
7624
  if (family && shipsFile) families.push(family);
7564
7625
  }
@@ -7628,7 +7689,7 @@ async function readLocalFont(absPath) {
7628
7689
  return { kind: "inline", buffer: Buffer.concat(chunks, totalBytes) };
7629
7690
  }
7630
7691
  async function embedLocalFontFaces(html, projectDir) {
7631
- const { fontToDataUri: toDataUri } = await import("./deterministicFonts-DQDB47K3.js");
7692
+ const { fontToDataUri: toDataUri } = await import("./deterministicFonts-IXXU76SA.js");
7632
7693
  const styleBlockRe = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
7633
7694
  const fontFaceRe = /@font-face\s*\{([^}]*)\}/gi;
7634
7695
  let result = html;
@@ -7696,7 +7757,7 @@ function renderGsapDist() {
7696
7757
  }
7697
7758
  function rewriteUnresolvableGsapToCdn(html, projectDir, compSrcPath) {
7698
7759
  let gsapDist;
7699
- const exists = (path) => existsSync9(resolve5(projectDir, path));
7760
+ const exists = (path) => existsSync10(resolve5(projectDir, path));
7700
7761
  return html.replace(
7701
7762
  /(<script\b[^>]*\bsrc=["'])([^"']*gsap[^"']*\/dist\/([^"']+))(["'][^>]*>)/gi,
7702
7763
  (full, prefix, src, file, suffix) => {
@@ -7713,7 +7774,7 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
7713
7774
  const entryPath = relative2(projectDir, htmlPath).replace(/\\/g, "/");
7714
7775
  if (!entryPath.includes("/")) return html;
7715
7776
  const { document: document2 } = parseHTML(html);
7716
- const assetExists = (path) => existsSync9(resolve5(projectDir, path));
7777
+ const assetExists = (path) => existsSync10(resolve5(projectDir, path));
7717
7778
  rewriteAssetPaths(
7718
7779
  document2.querySelectorAll("[src], [href], [srcset]"),
7719
7780
  entryPath,
@@ -7735,7 +7796,10 @@ function rebaseDirectEntryAssetPaths(html, projectDir, htmlPath) {
7735
7796
  }
7736
7797
  async function compileForRender(projectDir, htmlPath, downloadDir, options = {}) {
7737
7798
  const entryHtml = rebaseDirectEntryAssetPaths(readTextFile(htmlPath), projectDir, htmlPath);
7738
- const rawHtml = rewriteUnresolvableGsapToCdn(entryHtml, projectDir);
7799
+ const rawHtml = normalizeCompositionSrcs(
7800
+ rewriteUnresolvableGsapToCdn(entryHtml, projectDir),
7801
+ projectDir
7802
+ );
7739
7803
  assertSubCompositionsUsable(rawHtml, projectDir);
7740
7804
  const probes = /* @__PURE__ */ new Map();
7741
7805
  const { html: compiledHtml, unresolvedCompositions } = await compileHtmlFile(
@@ -8280,7 +8344,7 @@ function resolveEntryHtmlPath(input) {
8280
8344
  const rawEntry = readTextFile(htmlPath);
8281
8345
  if (entryFile === "index.html" || !isTemplateEntry(rawEntry)) return htmlPath;
8282
8346
  const projectIndexPath = join17(projectDir, "index.html");
8283
- if (!existsSync10(projectIndexPath)) {
8347
+ if (!existsSync11(projectIndexPath)) {
8284
8348
  throw new Error(
8285
8349
  `Template entry file "${entryFile}" requires a project index.html to extract its render shell.`
8286
8350
  );
@@ -9113,7 +9177,7 @@ function validateDistributedDuration(input) {
9113
9177
  }
9114
9178
 
9115
9179
  // ../producer/src/services/render/stages/extractVideosStage.ts
9116
- import { existsSync as existsSync11 } from "fs";
9180
+ import { existsSync as existsSync12 } from "fs";
9117
9181
  import { join as join19 } from "path";
9118
9182
 
9119
9183
  // ../producer/src/services/render/extractionFailureMetadata.ts
@@ -9370,7 +9434,7 @@ async function runExtractVideosStage(input) {
9370
9434
  const probeFailures = await Promise.all(
9371
9435
  composition.videos.map(async (v) => {
9372
9436
  const videoPath = resolveProjectRelativeSrc(v.src, projectDir, compiledDir);
9373
- if (!existsSync11(videoPath)) return null;
9437
+ if (!existsSync12(videoPath)) return null;
9374
9438
  try {
9375
9439
  const attempted = extractionPolicy.maxTransientRetries === 0 ? { result: await extractMediaMetadata(videoPath), retries: 0 } : await runVideoExtractionWithRetry(() => extractMediaMetadata(videoPath), {
9376
9440
  signal: abortSignal,
@@ -9408,7 +9472,7 @@ async function runExtractVideosStage(input) {
9408
9472
  const probed = await Promise.all(
9409
9473
  composition.images.map(async (img) => {
9410
9474
  const imgPath = resolveProjectRelativeSrc(img.src, projectDir, compiledDir);
9411
- if (!existsSync11(imgPath)) return null;
9475
+ if (!existsSync12(imgPath)) return null;
9412
9476
  const colorSpace = await probeColorSpaceSafely(imgPath, log);
9413
9477
  if (isHdrColorSpace(colorSpace)) {
9414
9478
  nativeHdrImageIds.add(img.id);
@@ -9528,7 +9592,7 @@ async function appendVideoAudioFromProbe(input) {
9528
9592
  videos.map(async (video) => {
9529
9593
  const path = isHttpUrl(video.src) ? video.src : resolveProjectRelativeSrc(video.src, projectDir, compiledDir);
9530
9594
  const readFrom = urlByAbsentLocalPath?.get(path) ?? path;
9531
- if (!isHttpUrl(readFrom) && !existsSync11(readFrom)) return null;
9595
+ if (!isHttpUrl(readFrom) && !existsSync12(readFrom)) return null;
9532
9596
  const metadata = await extractMediaMetadata(readFrom);
9533
9597
  const window2 = await resolveFinalFrameExtractionWindow(
9534
9598
  readFrom,
@@ -9548,7 +9612,7 @@ async function appendVideoAudioFromProbe(input) {
9548
9612
  }
9549
9613
 
9550
9614
  // ../producer/src/services/render/videoLayerPassthroughPlan.ts
9551
- import { existsSync as existsSync12 } from "fs";
9615
+ import { existsSync as existsSync13 } from "fs";
9552
9616
  var SAMPLES = 9;
9553
9617
  function inspectVideoLayout(id, w, h, time) {
9554
9618
  window.__hf?.seek?.(time);
@@ -9610,7 +9674,7 @@ async function planVideoLayerPassthrough(input) {
9610
9674
  const { video } = q;
9611
9675
  if (isHttpUrl(video.src)) return { reason: "remote_source" };
9612
9676
  const path = resolveProjectRelativeSrc(video.src, input.projectDir, input.compiledDir);
9613
- if (!existsSync12(path)) return { reason: "source_missing" };
9677
+ if (!existsSync13(path)) return { reason: "source_missing" };
9614
9678
  const layout = await probeVideoLayout(input.page, video.id, input.canvas, input.duration);
9615
9679
  if ("reason" in layout) return layout;
9616
9680
  const layer = await buildVideoLayerInput(
@@ -9625,11 +9689,11 @@ async function planVideoLayerPassthrough(input) {
9625
9689
  }
9626
9690
 
9627
9691
  // ../producer/src/services/render/stages/audioStage.ts
9628
- import { existsSync as existsSync14 } from "fs";
9692
+ import { existsSync as existsSync15 } from "fs";
9629
9693
  import { join as join22 } from "path";
9630
9694
 
9631
9695
  // ../producer/src/services/render/audioDeliveryLimit.ts
9632
- import { existsSync as existsSync13 } from "fs";
9696
+ import { existsSync as existsSync14 } from "fs";
9633
9697
  import { dirname as dirname8, join as join21 } from "path";
9634
9698
 
9635
9699
  // ../producer/src/services/render/audioPadTrim.ts
@@ -10113,7 +10177,7 @@ async function limitDeliveryPeaks(input, deps = {
10113
10177
  applyChain: applyAudioFxChain,
10114
10178
  encode: encodeAac,
10115
10179
  rename: renameWithRetry,
10116
- sourceExists: existsSync13
10180
+ sourceExists: existsSync14
10117
10181
  }) {
10118
10182
  const { audioPath, sourcePath, signal, timeoutMs } = input;
10119
10183
  if (!deps.sourceExists(sourcePath)) return { success: true };
@@ -10208,7 +10272,7 @@ async function runAudioStageScoped(input) {
10208
10272
  );
10209
10273
  audioLoweredDb = guard.loweredDb;
10210
10274
  input.log?.info("[audio] phases", { ...result.audioPhaseMs, guard: Date.now() - guardStart });
10211
- if (input.keepDeliverySource && !guard.sourceStale && existsSync14(pcmSourcePath)) {
10275
+ if (input.keepDeliverySource && !guard.sourceStale && existsSync15(pcmSourcePath)) {
10212
10276
  deliverySourcePath = pcmSourcePath;
10213
10277
  }
10214
10278
  }
@@ -10336,7 +10400,7 @@ async function mixAudioForDelivery(input, duration, pcmSourcePath) {
10336
10400
  }
10337
10401
 
10338
10402
  // ../producer/src/services/render/stages/captureStage.ts
10339
- import { existsSync as existsSync15, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
10403
+ import { existsSync as existsSync16, readdirSync as readdirSync4, statfsSync as statfsSync2 } from "fs";
10340
10404
  import { join as join23 } from "path";
10341
10405
  function shouldAllowAdaptiveCaptureRetry(workerCount, _explicitlyConfigured) {
10342
10406
  return workerCount > 1;
@@ -10393,7 +10457,7 @@ function diskCaptureShortfallError(needBytes, freeBytes, framesDir, basis, remed
10393
10457
  }
10394
10458
  function measureCaptureFrameBytes(workDir, framesDir) {
10395
10459
  let total = sampleDirectoryBytes(framesDir);
10396
- if (!existsSync15(workDir)) return total;
10460
+ if (!existsSync16(workDir)) return total;
10397
10461
  for (const attempt of readdirSync4(workDir)) {
10398
10462
  if (/^retry-\d+-batch-\d+-worker-\d+$/.test(attempt)) {
10399
10463
  total += sampleDirectoryBytes(join23(workDir, attempt));
@@ -10578,7 +10642,11 @@ async function runSequentialDiskCapture(input, captureOptions, captureCfg, check
10578
10642
  prepareCaptureSessionForReuse(session, framesDir, videoInjector);
10579
10643
  probeSession = null;
10580
10644
  }
10581
- await ensureSessionReady(session);
10645
+ await ensureSessionReady(session, {
10646
+ frameIndex: resumeFrom,
10647
+ totalFrames,
10648
+ abortSignal: input.abortSignal
10649
+ });
10582
10650
  assertAttemptActive();
10583
10651
  lastBrowserConsole = session.browserConsoleBuffer;
10584
10652
  await captureSessionFrames(session, {
@@ -10630,13 +10698,13 @@ function planTransientResume(error, ctx) {
10630
10698
  if (!firstMissing) return null;
10631
10699
  return isTransientCaptureRetryEligible(failure.kind, missing, ctx.retriesUsed) ? firstMissing.startFrame : null;
10632
10700
  }
10633
- async function ensureSessionReady(session) {
10701
+ async function ensureSessionReady(session, budget) {
10634
10702
  if (!session.isInitialized) {
10635
10703
  await initializeSession(session);
10636
10704
  return;
10637
10705
  }
10638
10706
  if (process.env.PRODUCER_EXPERIMENTAL_FAST_CAPTURE === "true") {
10639
- await completeDeferredDrawElementInit(session);
10707
+ await createSessionInitBudget(budget)(completeDeferredDrawElementInit(session), session);
10640
10708
  }
10641
10709
  }
10642
10710
  async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resumeFrom, checkDiskProjection }) {
@@ -10696,7 +10764,7 @@ async function captureSessionFrames(session, { input, rangeStart, rangeEnd, resu
10696
10764
  }
10697
10765
 
10698
10766
  // ../producer/src/services/render/stages/captureHdrStage.ts
10699
- import { existsSync as existsSync17, mkdirSync as mkdirSync8 } from "fs";
10767
+ import { existsSync as existsSync18, mkdirSync as mkdirSync8 } from "fs";
10700
10768
  import { join as join27 } from "path";
10701
10769
 
10702
10770
  // ../producer/src/services/hdrImageTransferCache.ts
@@ -10919,7 +10987,7 @@ import { Worker } from "worker_threads";
10919
10987
  import { fileURLToPath as fileURLToPath3, pathToFileURL } from "url";
10920
10988
  import { dirname as dirname9, join as join25 } from "path";
10921
10989
  import { createRequire } from "module";
10922
- import { existsSync as existsSync16 } from "fs";
10990
+ import { existsSync as existsSync17 } from "fs";
10923
10991
  import { cpus as cpus2 } from "os";
10924
10992
  function resolveWorkerEntry(explicit) {
10925
10993
  if (explicit && explicit.length > 0) {
@@ -10932,7 +11000,7 @@ function resolveWorkerEntry(explicit) {
10932
11000
  }
10933
11001
  const moduleDir = dirname9(fileURLToPath3(import.meta.url));
10934
11002
  const jsPath = join25(moduleDir, "shaderTransitionWorker.js");
10935
- if (existsSync16(jsPath)) return { path: jsPath, isTs: false };
11003
+ if (existsSync17(jsPath)) return { path: jsPath, isTs: false };
10936
11004
  const tsPath = join25(moduleDir, "shaderTransitionWorker.ts");
10937
11005
  return { path: tsPath, isTs: true };
10938
11006
  }
@@ -11493,7 +11561,7 @@ async function runCaptureHdrStage(input) {
11493
11561
  }
11494
11562
  const debugDumpEnabled = process.env.KEEP_TEMP === "1";
11495
11563
  const debugDumpDir = debugDumpEnabled ? join27(framesDir, "debug-composite") : null;
11496
- if (debugDumpDir && !existsSync17(debugDumpDir)) {
11564
+ if (debugDumpDir && !existsSync18(debugDumpDir)) {
11497
11565
  mkdirSync8(debugDumpDir, { recursive: true });
11498
11566
  }
11499
11567
  const compositeTransfer = resolveCompositeTransfer(hasHdrContent, effectiveHdr);
@@ -11650,7 +11718,7 @@ async function runCaptureHdrStage(input) {
11650
11718
  // ../producer/src/services/render/stages/encodeStage.ts
11651
11719
  import {
11652
11720
  copyFileSync as copyFileSync2,
11653
- existsSync as existsSync18,
11721
+ existsSync as existsSync19,
11654
11722
  mkdirSync as mkdirSync9,
11655
11723
  readdirSync as readdirSync5,
11656
11724
  readFileSync as readFileSync6,
@@ -11769,7 +11837,7 @@ async function encodeGifFromDir(framesDir, framePattern, outputPath, input) {
11769
11837
  const failure = await reencodeWithClearedWholeFrames(argsInput, run, startTime);
11770
11838
  if (failure) return failure;
11771
11839
  }
11772
- const fileSize = existsSync18(outputPath) ? statSync6(outputPath).size : 0;
11840
+ const fileSize = existsSync19(outputPath) ? statSync6(outputPath).size : 0;
11773
11841
  return {
11774
11842
  success: true,
11775
11843
  outputPath,
@@ -11930,7 +11998,7 @@ async function runEncodeStage(input) {
11930
11998
  const stage5Start = Date.now();
11931
11999
  if (isPngSequence) {
11932
12000
  const encoded = startEncodeProgress(job, "Writing PNG sequence", onProgress);
11933
- if (!existsSync18(outputPath)) mkdirSync9(outputPath, { recursive: true });
12001
+ if (!existsSync19(outputPath)) mkdirSync9(outputPath, { recursive: true });
11934
12002
  const captured = readdirSync5(framesDir).filter((name) => name.endsWith(".png")).sort();
11935
12003
  if (captured.length === 0) {
11936
12004
  throw new Error(
@@ -11941,7 +12009,7 @@ async function runEncodeStage(input) {
11941
12009
  const dst = join28(outputPath, formatExportFrameName(i, "png"));
11942
12010
  copyFileSync2(join28(framesDir, name), dst);
11943
12011
  });
11944
- if (hasAudio && audioOutputPath && existsSync18(audioOutputPath)) {
12012
+ if (hasAudio && audioOutputPath && existsSync19(audioOutputPath)) {
11945
12013
  copyFileSync2(audioOutputPath, join28(outputPath, MIXED_AUDIO_FILENAME));
11946
12014
  log.info(
11947
12015
  `[Render] png-sequence: ${MIXED_AUDIO_FILENAME} sidecar written to ${outputPath}/${MIXED_AUDIO_FILENAME}`
@@ -12329,7 +12397,7 @@ function findMissingFrameRanges(totalFrames, framesDir, frameExt) {
12329
12397
  let rangeStart = null;
12330
12398
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
12331
12399
  const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12332
- const missing = !existsSync19(framePath) || statSync7(framePath).size <= 8;
12400
+ const missing = !existsSync20(framePath) || statSync7(framePath).size <= 8;
12333
12401
  if (missing && rangeStart === null) {
12334
12402
  rangeStart = frameIndex;
12335
12403
  } else if (!missing && rangeStart !== null) {
@@ -12454,7 +12522,7 @@ function countCapturedFrames(totalFrames, framesDir, frameExt) {
12454
12522
  let captured = 0;
12455
12523
  for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
12456
12524
  const framePath = join29(framesDir, formatCaptureFrameName(frameIndex, frameExt));
12457
- if (existsSync19(framePath)) captured++;
12525
+ if (existsSync20(framePath)) captured++;
12458
12526
  }
12459
12527
  return captured;
12460
12528
  }
@@ -13119,7 +13187,7 @@ async function executeRenderJob(job, projectDir, outputPath, progressSink, abort
13119
13187
  validateDeliveryEncoderConfig(job.config);
13120
13188
  const debugDir = resolveRenderDebugDir();
13121
13189
  const outputDir = dirname11(outputPath);
13122
- if (!existsSync19(outputDir)) mkdirSync10(outputDir, { recursive: true });
13190
+ if (!existsSync20(outputDir)) mkdirSync10(outputDir, { recursive: true });
13123
13191
  const workDir = job.config.debug ? join29(debugDir, job.id) : createRenderWorkDir(resolveRenderWorkDirPrefix(outputPath, job.id), outputDir);
13124
13192
  const pipelineStart = Date.now();
13125
13193
  const baseLog = job.config.logger ?? defaultLogger;
@@ -13261,7 +13329,7 @@ async function executeRenderPipeline(input) {
13261
13329
  job.startedAt = /* @__PURE__ */ new Date();
13262
13330
  assertNotAborted();
13263
13331
  assertConfiguredFfmpegBinariesExist();
13264
- if (!existsSync19(workDir)) mkdirSync10(workDir, { recursive: true });
13332
+ if (!existsSync20(workDir)) mkdirSync10(workDir, { recursive: true });
13265
13333
  if (job.config.debug) {
13266
13334
  log.info("[Render] Debug artifacts enabled", { workDir, logPath });
13267
13335
  }
@@ -13291,7 +13359,7 @@ async function executeRenderPipeline(input) {
13291
13359
  });
13292
13360
  const entryFile = job.config.entryFile || "index.html";
13293
13361
  const htmlPath = join29(projectDir, entryFile);
13294
- if (!existsSync19(htmlPath)) {
13362
+ if (!existsSync20(htmlPath)) {
13295
13363
  throw new Error(`Entry file not found: ${htmlPath}`);
13296
13364
  }
13297
13365
  assertNotAborted();
@@ -13606,9 +13674,11 @@ async function executeRenderPipeline(input) {
13606
13674
  );
13607
13675
  pendingAudio = audioStage.catch(() => void 0);
13608
13676
  const stage4Start = Date.now();
13609
- updateJobStatus(job, "rendering", "Starting frame capture", 25, onProgress, {
13677
+ const EFFECT_SCAN_STAGE = "Checking effects";
13678
+ const startingFrameCapture = () => updateJobStatus(job, "rendering", "Starting frame capture", 25, onProgress, {
13610
13679
  code: "start_browsers"
13611
13680
  });
13681
+ startingFrameCapture();
13612
13682
  if (!fileServer) {
13613
13683
  const fileServerStart = observability.stageStart("file_server", { reused: false });
13614
13684
  try {
@@ -13633,7 +13703,7 @@ async function executeRenderPipeline(input) {
13633
13703
  throw new Error("File server failed to initialize before frame capture");
13634
13704
  }
13635
13705
  const framesDir = join29(workDir, "captured-frames");
13636
- if (!existsSync19(framesDir)) mkdirSync10(framesDir, { recursive: true });
13706
+ if (!existsSync20(framesDir)) mkdirSync10(framesDir, { recursive: true });
13637
13707
  updateJobStatus(job, "rendering", "Checking browser GPU", 25, onProgress, {
13638
13708
  code: "start_browsers"
13639
13709
  });
@@ -13641,6 +13711,7 @@ async function executeRenderPipeline(input) {
13641
13711
  chromePath: resolveHeadlessShellPath(cfg),
13642
13712
  browserTimeout: cfg.browserTimeout
13643
13713
  });
13714
+ startingFrameCapture();
13644
13715
  captureForceScreenshot = applyConcreteGpuScreenshotClamp(
13645
13716
  captureForceScreenshot,
13646
13717
  resolvedBrowserGpuMode,
@@ -13689,10 +13760,13 @@ async function executeRenderPipeline(input) {
13689
13760
  onEffectScanProgress: (scanned, total) => updateJobStatus(
13690
13761
  job,
13691
13762
  "rendering",
13692
- `Checking effects, ${scanned} of ${total} frames`,
13763
+ `${EFFECT_SCAN_STAGE}, ${scanned} of ${total} frames`,
13693
13764
  25,
13694
13765
  onProgress
13695
13766
  ),
13767
+ onEffectScanEnd: () => {
13768
+ if (job.currentStage.startsWith(EFFECT_SCAN_STAGE)) startingFrameCapture();
13769
+ },
13696
13770
  requiresWebGpu: compositionRequiresWebGpu(compiled.html),
13697
13771
  // Live route for Chrome memory (spec §5 Phase −1). The aggregate route
13698
13772
  // through CapturePerfSummary only exists on success; a mid-capture
@@ -13960,6 +14034,7 @@ async function executeRenderPipeline(input) {
13960
14034
  } finally {
13961
14035
  calibrationFrames?.release();
13962
14036
  }
14037
+ startingFrameCapture();
13963
14038
  captureCalibration = outcome.calibration;
13964
14039
  calibrationEvaluateTimedOut = outcome.calibrationEvaluateTimedOut;
13965
14040
  captureForceScreenshot = outcome.forceScreenshot;
@@ -15018,7 +15093,7 @@ async function executeRenderPipeline(input) {
15018
15093
  })
15019
15094
  );
15020
15095
  const totalElapsed = Date.now() - pipelineStart;
15021
- const tmpPeakBytes = existsSync19(workDir) ? sampleDirectoryBytes(workDir) : 0;
15096
+ const tmpPeakBytes = existsSync20(workDir) ? sampleDirectoryBytes(workDir) : 0;
15022
15097
  recordTransientRetryObservability();
15023
15098
  observability.checkpoint("pipeline", "artifact validated", { totalElapsedMs: totalElapsed });
15024
15099
  const observabilitySummary = observability.summary({
@@ -15099,7 +15174,7 @@ async function executeRenderPipeline(input) {
15099
15174
  }
15100
15175
  }
15101
15176
  if (job.config.debug) {
15102
- if (!isPngSequence && !isHls && existsSync19(stagedOutputPath)) {
15177
+ if (!isPngSequence && !isHls && existsSync20(stagedOutputPath)) {
15103
15178
  const debugOutput = join29(workDir, `output${videoExt}`);
15104
15179
  copyFileSync3(stagedOutputPath, debugOutput);
15105
15180
  }
@@ -15600,25 +15675,25 @@ async function writeStitchedMp4(chunkPaths, outputPath, audioPath) {
15600
15675
  import {
15601
15676
  copyFileSync as copyFileSync4,
15602
15677
  cpSync as cpSync2,
15603
- existsSync as existsSync24,
15678
+ existsSync as existsSync25,
15604
15679
  linkSync,
15605
15680
  mkdirSync as mkdirSync14,
15606
15681
  rmSync as rmSync12,
15607
15682
  writeFileSync as writeFileSync9
15608
15683
  } from "fs";
15609
- import { extname as extname6, isAbsolute as isAbsolute2, join as join38, relative as relative5, sep as sep2 } from "path";
15684
+ import { extname as extname6, isAbsolute as isAbsolute2, join as join38, relative as relative5, sep as sep3 } from "path";
15610
15685
 
15611
15686
  // ../producer/src/services/distributed/planFrameCost.ts
15612
15687
  import { join as join33 } from "path";
15613
15688
 
15614
15689
  // ../producer/src/services/distributed/chunkFrames.ts
15615
- import { existsSync as existsSync21, readdirSync as readdirSync7 } from "fs";
15690
+ import { existsSync as existsSync22, readdirSync as readdirSync7 } from "fs";
15616
15691
  import { extname as extname4, join as join32 } from "path";
15617
15692
 
15618
15693
  // ../producer/src/services/distributed/shared.ts
15619
15694
  import { execFile as execFileCallback } from "child_process";
15620
15695
  import { dirname as dirname13, join as join31 } from "path";
15621
- import { existsSync as existsSync20, readFileSync as readFileSync7 } from "fs";
15696
+ import { existsSync as existsSync21, readFileSync as readFileSync7 } from "fs";
15622
15697
  import { fileURLToPath as fileURLToPath5 } from "url";
15623
15698
  import { promisify as promisify2 } from "util";
15624
15699
  var PLAN_VIDEOS_META_RELATIVE_PATH = "meta/videos.json";
@@ -15630,7 +15705,7 @@ function isPlanAudioArtifactPath(path) {
15630
15705
  function resolvePlanAudioPath(planDir) {
15631
15706
  for (const name of [PLAN_AUDIO_RELATIVE_PATH, PLAN_AUDIO_LEGACY_RELATIVE_PATH]) {
15632
15707
  const candidate = join31(planDir, name);
15633
- if (existsSync20(candidate)) return candidate;
15708
+ if (existsSync21(candidate)) return candidate;
15634
15709
  }
15635
15710
  return null;
15636
15711
  }
@@ -15891,7 +15966,7 @@ function readProducerVersion() {
15891
15966
  let current = startDir;
15892
15967
  for (let i = 0; i < 10; i++) {
15893
15968
  const candidate = join31(current, "package.json");
15894
- if (existsSync20(candidate)) {
15969
+ if (existsSync21(candidate)) {
15895
15970
  try {
15896
15971
  const pkg = JSON.parse(readFileSync7(candidate, "utf-8"));
15897
15972
  if (pkg.name === "@hyperframes/producer" && typeof pkg.version === "string") {
@@ -15945,7 +16020,7 @@ function rebuildExtractedFramesFromPlanDir(planDir, videos, indexMode = "dense-v
15945
16020
  const result = [];
15946
16021
  for (const v of videos) {
15947
16022
  const outputDir = join32(planDir, "video-frames", v.videoId);
15948
- if (!existsSync21(outputDir)) {
16023
+ if (!existsSync22(outputDir)) {
15949
16024
  throw new Error(
15950
16025
  `[renderChunk] planDir missing extracted video frames for ${JSON.stringify(v.videoId)}: ${outputDir} not present. plan() should have written frames here; the planDir is malformed.`
15951
16026
  );
@@ -16044,7 +16119,7 @@ async function extractDeferredVideoFramesForChunk(input) {
16044
16119
  const range = planned.get(video.videoId).deferredRange;
16045
16120
  const remoteUrl = remoteSources[range.sourcePath];
16046
16121
  const sourcePath = remoteUrl ?? join32(input.planDir, ...range.sourcePath.split("/"));
16047
- if (remoteUrl === void 0 && !existsSync21(sourcePath)) {
16122
+ if (remoteUrl === void 0 && !existsSync22(sourcePath)) {
16048
16123
  throw new RenderChunkValidationError(
16049
16124
  MISSING_PLAN_ARTIFACT,
16050
16125
  `[renderChunk] planDir is missing the source for video ${JSON.stringify(video.videoId)}: ${range.sourcePath}`
@@ -16237,7 +16312,7 @@ async function readPlanReferenceBackground(input) {
16237
16312
  }
16238
16313
 
16239
16314
  // ../producer/src/services/render/stages/freezePlan.ts
16240
- import { existsSync as existsSync22, mkdirSync as mkdirSync12, readFileSync as readFileSync8, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
16315
+ import { existsSync as existsSync23, mkdirSync as mkdirSync12, readFileSync as readFileSync8, readdirSync as readdirSync8, writeFileSync as writeFileSync7 } from "fs";
16241
16316
  import { join as join35, relative as relative3, resolve as resolve7 } from "path";
16242
16317
 
16243
16318
  // ../producer/src/services/distributed/planProtocol.ts
@@ -16427,7 +16502,7 @@ function planFileSha256(absolutePath, digests) {
16427
16502
  return sha256;
16428
16503
  }
16429
16504
  async function prehashPlanFiles(dir, digests) {
16430
- if (!existsSync22(dir)) return;
16505
+ if (!existsSync23(dir)) return;
16431
16506
  for (const { absolutePath } of listPlanFiles(dir)) {
16432
16507
  if (!digests.has(absolutePath)) digests.set(absolutePath, await sha256FileAsync(absolutePath));
16433
16508
  }
@@ -16497,15 +16572,15 @@ function writePlanRemoteFiles(planDir, files) {
16497
16572
  }
16498
16573
  function readPlanRemoteFiles(planDir) {
16499
16574
  const path = join35(planDir, PLAN_REMOTE_FILES_RELATIVE_PATH);
16500
- return existsSync22(path) ? JSON.parse(readFileSync8(path, "utf-8")) : [];
16575
+ return existsSync23(path) ? JSON.parse(readFileSync8(path, "utf-8")) : [];
16501
16576
  }
16502
16577
  function recomputePlanHashFromPlanDir(planDir, digests) {
16503
16578
  const planJsonPath = join35(planDir, "plan.json");
16504
16579
  const encoderJsonPath = join35(planDir, "meta", "encoder.json");
16505
- if (!existsSync22(planJsonPath)) {
16580
+ if (!existsSync23(planJsonPath)) {
16506
16581
  throw new Error(`[freezePlan] plan.json missing: ${planJsonPath}`);
16507
16582
  }
16508
- if (!existsSync22(encoderJsonPath)) {
16583
+ if (!existsSync23(encoderJsonPath)) {
16509
16584
  throw new Error(`[freezePlan] meta/encoder.json missing: ${encoderJsonPath}`);
16510
16585
  }
16511
16586
  const planJson = JSON.parse(readFileSync8(planJsonPath, "utf-8"));
@@ -16535,11 +16610,11 @@ async function freezePlan(input) {
16535
16610
  hasAudio,
16536
16611
  digests
16537
16612
  } = input;
16538
- if (!existsSync22(planDir)) {
16613
+ if (!existsSync23(planDir)) {
16539
16614
  throw new Error(`[freezePlan] planDir does not exist: ${planDir}`);
16540
16615
  }
16541
16616
  const metaDir = join35(planDir, "meta");
16542
- if (!existsSync22(metaDir)) mkdirSync12(metaDir, { recursive: true });
16617
+ if (!existsSync23(metaDir)) mkdirSync12(metaDir, { recursive: true });
16543
16618
  writeFileSync7(
16544
16619
  join35(metaDir, "composition.json"),
16545
16620
  `${JSON.stringify(composition, null, 2)}
@@ -16616,7 +16691,7 @@ function applyRuntimeEnvSnapshot(snapshot, env = process.env) {
16616
16691
  }
16617
16692
 
16618
16693
  // ../producer/src/services/distributed/chunkAudio.ts
16619
- import { closeSync as closeSync5, existsSync as existsSync23, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync9 } from "fs";
16694
+ import { closeSync as closeSync5, existsSync as existsSync24, ftruncateSync, mkdirSync as mkdirSync13, openSync as openSync5, readFileSync as readFileSync9 } from "fs";
16620
16695
  import { writeFileSync as writeFileSync8, writeSync } from "fs";
16621
16696
  import { join as join36 } from "path";
16622
16697
  function audioCutForChunk(grid, chunks, index, fps) {
@@ -16721,7 +16796,7 @@ async function writeChunkAudioSlices(input) {
16721
16796
  }
16722
16797
  function chunkAudioSource(planDir, chunkIndex, scratchPath) {
16723
16798
  const layoutPath = join36(planDir, SLICE_LAYOUT);
16724
- if (!existsSync23(layoutPath)) return resolvePlanAudioPath(planDir);
16799
+ if (!existsSync24(layoutPath)) return resolvePlanAudioPath(planDir);
16725
16800
  const layout = JSON.parse(readFileSync9(layoutPath, "utf-8"));
16726
16801
  const frame = readFileSync9(join36(planDir, SLICE_FRAME));
16727
16802
  const fd = openSync5(scratchPath, "w");
@@ -17267,7 +17342,7 @@ function pathInside(root, path) {
17267
17342
  function stableSourcePath(roots, srcPath) {
17268
17343
  for (const [root, prefix] of roots) {
17269
17344
  const rel = pathInside(root, srcPath);
17270
- if (rel !== null) return [prefix, ...rel.split(sep2)].filter(Boolean).join("/");
17345
+ if (rel !== null) return [prefix, ...rel.split(sep3)].filter(Boolean).join("/");
17271
17346
  }
17272
17347
  return srcPath;
17273
17348
  }
@@ -17281,8 +17356,8 @@ function createVideoSourceShipper(input) {
17281
17356
  let result = null;
17282
17357
  for (const root of stagedRel === null ? [input.workCompiledDir, input.projectDir] : []) {
17283
17358
  const rel = pathInside(root, srcPath);
17284
- if (rel !== null && (existsSync24(join38(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
17285
- result = ["compiled", ...rel.split(sep2)].join("/");
17359
+ if (rel !== null && (existsSync25(join38(input.planDir, "compiled", rel)) || input.isRemote(srcPath))) {
17360
+ result = ["compiled", ...rel.split(sep3)].join("/");
17286
17361
  break;
17287
17362
  }
17288
17363
  }
@@ -17309,7 +17384,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17309
17384
  useGpu: false,
17310
17385
  browserGpuMode: "software"
17311
17386
  });
17312
- if (!existsSync24(planDir)) mkdirSync14(planDir, { recursive: true });
17387
+ if (!existsSync25(planDir)) mkdirSync14(planDir, { recursive: true });
17313
17388
  const log = config.logger ?? defaultLogger;
17314
17389
  const sizeLimitBytes = options.executionPlanSizeLimitBytes ?? config.planDirSizeLimitBytes ?? PLAN_DIR_SIZE_LIMIT_BYTES;
17315
17390
  const abortSignal = config.abortSignal;
@@ -17339,7 +17414,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17339
17414
  });
17340
17415
  const entryFile = config.entryFile ?? "index.html";
17341
17416
  const htmlPath = join38(projectDir, entryFile);
17342
- if (!existsSync24(htmlPath)) {
17417
+ if (!existsSync25(htmlPath)) {
17343
17418
  throw new Error(`[plan] entry file not found: ${htmlPath}`);
17344
17419
  }
17345
17420
  const workDir = join38(planDir, ".plan-work");
@@ -17354,7 +17429,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17354
17429
  filter: (src) => {
17355
17430
  const rel = relative5(projectDir, src);
17356
17431
  if (rel === "" || rel.startsWith("..")) return true;
17357
- const firstSegment = rel.split(sep2, 1)[0];
17432
+ const firstSegment = rel.split(sep3, 1)[0];
17358
17433
  return firstSegment === void 0 || !PLAN_PROJECT_DIR_SKIP_SEGMENTS.has(firstSegment);
17359
17434
  }
17360
17435
  });
@@ -17458,7 +17533,7 @@ async function compilePlanComposition(projectDir, config, planDir, options) {
17458
17533
  if (probeResult.fileServer) closeFileServerSafely(probeResult.fileServer, "plan", log);
17459
17534
  if (probeResult.probeSession) {
17460
17535
  try {
17461
- const { closeCaptureSession: closeCaptureSession2 } = await import("./src-4HGQRHW6.js");
17536
+ const { closeCaptureSession: closeCaptureSession2 } = await import("./src-VL6XKFAA.js");
17462
17537
  await closeCaptureSession2(probeResult.probeSession);
17463
17538
  } catch (err) {
17464
17539
  log.warn("[plan] probe session close failed", {
@@ -17567,15 +17642,15 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17567
17642
  logPlanStage(log, "extract", stageStarted);
17568
17643
  const stagedVideoFrames = join38(compiledDir, "__hyperframes_video_frames");
17569
17644
  const videoFramesDst = join38(planDir, "video-frames");
17570
- if (existsSync24(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
17645
+ if (existsSync25(videoFramesDst)) rmSync12(videoFramesDst, { recursive: true, force: true });
17571
17646
  const videoSourcesDir = join38(planDir, "video-sources");
17572
17647
  rmSync12(videoSourcesDir, { recursive: true, force: true });
17573
- if (existsSync24(stagedVideoFrames)) {
17648
+ if (existsSync25(stagedVideoFrames)) {
17574
17649
  renameWithRetry(stagedVideoFrames, videoFramesDst);
17575
17650
  } else {
17576
17651
  mkdirSync14(videoFramesDst, { recursive: true });
17577
17652
  }
17578
- if (existsSync24(finalCompiledDir)) rmSync12(finalCompiledDir, { recursive: true, force: true });
17653
+ if (existsSync25(finalCompiledDir)) rmSync12(finalCompiledDir, { recursive: true, force: true });
17579
17654
  renameWithRetry(compiledDir, finalCompiledDir);
17580
17655
  const shipVideoSource = createVideoSourceShipper({
17581
17656
  planDir,
@@ -17695,10 +17770,10 @@ async function buildLocalExecutionPlan(projectDir, config, executionPlanDir, opt
17695
17770
  applyDistributedAudioWarningPolicy(job, audioResult.audioError, audioResult.audioFailures, log);
17696
17771
  }
17697
17772
  const planAudioPath = join38(planDir, PLAN_AUDIO_RELATIVE_PATH);
17698
- if (audioResult?.hasAudio && existsSync24(audioResult.audioOutputPath)) {
17773
+ if (audioResult?.hasAudio && existsSync25(audioResult.audioOutputPath)) {
17699
17774
  renameWithRetry(audioResult.audioOutputPath, planAudioPath);
17700
17775
  }
17701
- if (chunksCarryAudio && existsSync24(planAudioPath)) {
17776
+ if (chunksCarryAudio && existsSync25(planAudioPath)) {
17702
17777
  if (options.sliceChunkAudio) {
17703
17778
  stageStarted = Date.now();
17704
17779
  await writeChunkAudioSlices({
@@ -17816,14 +17891,14 @@ async function plan(projectDir, config, planDir, options = {}) {
17816
17891
 
17817
17892
  // ../producer/src/services/distributed/renderChunk.ts
17818
17893
  import { randomBytes } from "crypto";
17819
- import { existsSync as existsSync27, mkdirSync as mkdirSync17, readFileSync as readFileSync11, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
17894
+ import { existsSync as existsSync28, mkdirSync as mkdirSync17, readFileSync as readFileSync11, readdirSync as readdirSync11, rmSync as rmSync15, writeFileSync as writeFileSync12 } from "fs";
17820
17895
  import { cpus as cpus3 } from "os";
17821
17896
  import { join as join42 } from "path";
17822
17897
 
17823
17898
  // ../producer/src/services/distributed/planV2.ts
17824
17899
  import {
17825
17900
  copyFileSync as copyFileSync6,
17826
- existsSync as existsSync26,
17901
+ existsSync as existsSync27,
17827
17902
  lstatSync as lstatSync3,
17828
17903
  mkdirSync as mkdirSync16,
17829
17904
  mkdtempSync as mkdtempSync6,
@@ -17834,12 +17909,12 @@ import {
17834
17909
  writeFileSync as writeFileSync11
17835
17910
  } from "fs";
17836
17911
  import { tmpdir as tmpdir3 } from "os";
17837
- import { dirname as dirname15, isAbsolute as isAbsolute3, join as join41, relative as relative6, resolve as resolve8, sep as sep3 } from "path";
17912
+ import { dirname as dirname15, isAbsolute as isAbsolute3, join as join41, relative as relative6, resolve as resolve8, sep as sep4 } from "path";
17838
17913
 
17839
17914
  // ../producer/src/services/distributed/planV2Publisher.ts
17840
17915
  import {
17841
17916
  copyFileSync as copyFileSync5,
17842
- existsSync as existsSync25,
17917
+ existsSync as existsSync26,
17843
17918
  linkSync as linkSync2,
17844
17919
  mkdirSync as mkdirSync15,
17845
17920
  mkdtempSync as mkdtempSync5,
@@ -17907,7 +17982,7 @@ var LocalPlanV2ArtifactPublisher = class {
17907
17982
  #linkFile;
17908
17983
  #committed = false;
17909
17984
  constructor(destinationDir, options = {}) {
17910
- if (existsSync25(destinationDir)) {
17985
+ if (existsSync26(destinationDir)) {
17911
17986
  throw new PlanV2IntegrityError(`output directory already exists: ${destinationDir}`);
17912
17987
  }
17913
17988
  this.destinationDir = destinationDir;
@@ -17924,7 +17999,7 @@ var LocalPlanV2ArtifactPublisher = class {
17924
17999
  );
17925
18000
  }
17926
18001
  const destinationPath = planV2BlobPath(this.temporaryDir, digest);
17927
- if (existsSync25(destinationPath)) return;
18002
+ if (existsSync26(destinationPath)) return;
17928
18003
  mkdirSync15(dirname14(destinationPath), { recursive: true });
17929
18004
  const stagingDir = mkdtempSync5(join40(dirname14(destinationPath), ".plan-v2-blob-"));
17930
18005
  const temporaryPath = join40(stagingDir, "blob");
@@ -17942,7 +18017,7 @@ var LocalPlanV2ArtifactPublisher = class {
17942
18017
  }
17943
18018
  async commitManifest(manifestBytes) {
17944
18019
  for (const digest of new Set(manifestDigests(manifestBytes))) {
17945
- if (!existsSync25(planV2BlobPath(this.temporaryDir, digest))) {
18020
+ if (!existsSync26(planV2BlobPath(this.temporaryDir, digest))) {
17946
18021
  throw new PlanV2IntegrityError(
17947
18022
  `cannot commit manifest before referenced blob is durable: ${digest}`
17948
18023
  );
@@ -17998,7 +18073,7 @@ function listFiles(root) {
17998
18073
  walk(absolutePath);
17999
18074
  } else if (entry.isFile()) {
18000
18075
  files.push({
18001
- path: relative6(rootResolved, absolutePath).split(sep3).join("/"),
18076
+ path: relative6(rootResolved, absolutePath).split(sep4).join("/"),
18002
18077
  absolutePath
18003
18078
  });
18004
18079
  } else {
@@ -18021,7 +18096,7 @@ function assertValidExtractionCacheCompleteSentinel(path) {
18021
18096
  }
18022
18097
  function validateExtractionCacheCompleteSentinels(executionPlanDir) {
18023
18098
  const videoRoot = join41(executionPlanDir, "video-frames");
18024
- if (!existsSync26(videoRoot)) return;
18099
+ if (!existsSync27(videoRoot)) return;
18025
18100
  for (const videoEntry of readdirSync10(videoRoot, { withFileTypes: true })) {
18026
18101
  if (!videoEntry.isDirectory()) continue;
18027
18102
  const videoDir = join41(videoRoot, videoEntry.name);
@@ -18038,7 +18113,7 @@ function isExtractionCacheCompleteSentinelPath(path) {
18038
18113
  function resolveExtractedVideoOutputDir(planDir, videoId) {
18039
18114
  const videoRoot = resolve8(planDir, "video-frames");
18040
18115
  const outputDir = resolve8(videoRoot, videoId);
18041
- if (outputDir === videoRoot || !outputDir.startsWith(`${videoRoot}${sep3}`)) {
18116
+ if (outputDir === videoRoot || !outputDir.startsWith(`${videoRoot}${sep4}`)) {
18042
18117
  throw new PlanV2IntegrityError(`unsafe extracted video id: ${JSON.stringify(videoId)}`);
18043
18118
  }
18044
18119
  return outputDir;
@@ -18122,7 +18197,7 @@ function parsePlanVideosJson2(value) {
18122
18197
  }
18123
18198
  function materializeExtractedVideoDirectories(planDir) {
18124
18199
  const videosPath = join41(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18125
- if (!existsSync26(videosPath)) return;
18200
+ if (!existsSync27(videosPath)) return;
18126
18201
  const videos = parsePlanVideosJson2(readJsonFile(videosPath, PLAN_VIDEOS_META_RELATIVE_PATH));
18127
18202
  for (const video of videos.extracted) {
18128
18203
  mkdirSync16(resolveExtractedVideoOutputDir(planDir, video.videoId), { recursive: true });
@@ -18156,9 +18231,9 @@ function parseChunkSlices(value) {
18156
18231
  }
18157
18232
  function buildVideoChunkDependencies(executionPlanDir, dimensions) {
18158
18233
  const videoRoot = join41(executionPlanDir, "video-frames");
18159
- const hasExtractedFrames = existsSync26(videoRoot) && listFiles(videoRoot).length > 0;
18234
+ const hasExtractedFrames = existsSync27(videoRoot) && listFiles(videoRoot).length > 0;
18160
18235
  const videosPath = join41(executionPlanDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18161
- if (!existsSync26(videosPath)) {
18236
+ if (!existsSync27(videosPath)) {
18162
18237
  return hasExtractedFrames ? { mode: "full-source-pack", dependencies: null } : { mode: "exact-rendered-frames", dependencies: /* @__PURE__ */ new Map() };
18163
18238
  }
18164
18239
  const chunksPath = join41(executionPlanDir, "meta", "chunks.json");
@@ -18198,7 +18273,7 @@ function collectChunkVideoDependencies(input) {
18198
18273
  for (let frame = chunk.startFrame; frame < chunk.endFrame; frame++) {
18199
18274
  const globalTime = frame * input.fpsDen / input.fpsNum;
18200
18275
  for (const [videoId, payload] of input.table.getActiveFramePayloads(globalTime)) {
18201
- const path = input.deferredSources.get(videoId) ?? relative6(resolve8(input.executionPlanDir), payload.framePath).split(sep3).join("/");
18276
+ const path = input.deferredSources.get(videoId) ?? relative6(resolve8(input.executionPlanDir), payload.framePath).split(sep4).join("/");
18202
18277
  assertSafeRelativePath(path);
18203
18278
  const indexes = mutable.get(path) ?? /* @__PURE__ */ new Set();
18204
18279
  indexes.add(chunk.index);
@@ -18215,7 +18290,7 @@ function computeManifestHash(manifest) {
18215
18290
  return sha256Hex(`${PLAN_V2_HASH_PREFIX}${canonicalJsonStringify(manifestPayload(manifest))}`);
18216
18291
  }
18217
18292
  function writeBlob(sourcePath, destinationPath) {
18218
- if (existsSync26(destinationPath)) return;
18293
+ if (existsSync27(destinationPath)) return;
18219
18294
  mkdirSync16(dirname15(destinationPath), { recursive: true });
18220
18295
  const temporaryDir = mkdtempSync6(join41(dirname15(destinationPath), ".plan-v2-blob-"));
18221
18296
  const temporaryPath = join41(temporaryDir, "blob");
@@ -18255,7 +18330,7 @@ async function putTasks(tasks) {
18255
18330
  }
18256
18331
  function buildPlanV2Publication(executionPlanDir, digests) {
18257
18332
  const executionPlanPath = join41(executionPlanDir, "plan.json");
18258
- if (!existsSync26(executionPlanPath)) {
18333
+ if (!existsSync27(executionPlanPath)) {
18259
18334
  throw new PlanV2IntegrityError(`execution plan is missing plan.json: ${executionPlanPath}`);
18260
18335
  }
18261
18336
  const executionPlanValue = readJsonFile(executionPlanPath, "execution plan.json");
@@ -18335,7 +18410,7 @@ function buildPlanV2Publication(executionPlanDir, digests) {
18335
18410
  };
18336
18411
  }
18337
18412
  function createPlanV2FromExecutionPlan(executionPlanDir, planV2Dir) {
18338
- if (existsSync26(planV2Dir)) {
18413
+ if (existsSync27(planV2Dir)) {
18339
18414
  throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
18340
18415
  }
18341
18416
  const publication = buildPlanV2Publication(executionPlanDir);
@@ -18421,7 +18496,7 @@ async function planV2WithPublisher(projectDir, config, publisher, options = {})
18421
18496
  }
18422
18497
  }
18423
18498
  async function planV2(projectDir, config, planV2Dir) {
18424
- if (existsSync26(planV2Dir)) {
18499
+ if (existsSync27(planV2Dir)) {
18425
18500
  throw new PlanV2IntegrityError(`output directory already exists: ${planV2Dir}`);
18426
18501
  }
18427
18502
  const publisher = new LocalPlanV2ArtifactPublisher(planV2Dir);
@@ -18575,7 +18650,7 @@ function parsePlanV2Manifest(value) {
18575
18650
  }
18576
18651
  function readPlanV2Manifest(planV2Dir) {
18577
18652
  const manifestPath = join41(planV2Dir, "plan.json");
18578
- if (!existsSync26(manifestPath)) {
18653
+ if (!existsSync27(manifestPath)) {
18579
18654
  throw new PlanV2IntegrityError(`missing v2 manifest: ${manifestPath}`);
18580
18655
  }
18581
18656
  const value = readJsonFile(manifestPath, "v2 manifest");
@@ -18594,7 +18669,7 @@ function listPlanV2ArtifactsForTarget(manifest, target) {
18594
18669
  }
18595
18670
  function verifyBlob(planV2Dir, artifact) {
18596
18671
  const sourcePath = planV2BlobPath(planV2Dir, artifact.sha256);
18597
- if (!existsSync26(sourcePath)) {
18672
+ if (!existsSync27(sourcePath)) {
18598
18673
  throw new PlanV2IntegrityError(`missing content-addressed artifact ${artifact.sha256}`);
18599
18674
  }
18600
18675
  const stats = statSync9(sourcePath);
@@ -18607,7 +18682,7 @@ function verifyBlob(planV2Dir, artifact) {
18607
18682
  return sourcePath;
18608
18683
  }
18609
18684
  function materializePlanV2Target(planV2Dir, target, destinationDir, options = {}) {
18610
- if (existsSync26(destinationDir)) {
18685
+ if (existsSync27(destinationDir)) {
18611
18686
  throw new PlanV2IntegrityError(`materialization destination already exists: ${destinationDir}`);
18612
18687
  }
18613
18688
  const manifest = readPlanV2Manifest(planV2Dir);
@@ -18672,7 +18747,7 @@ function validatePlanV2MaterializedTarget(planDir, expectedTarget) {
18672
18747
  }
18673
18748
  function readValidatedPlanV2Materialization(planDir, expectedTarget) {
18674
18749
  const markerPath = join41(planDir, PLAN_V2_MATERIALIZATION_MARKER);
18675
- if (!existsSync26(markerPath)) return null;
18750
+ if (!existsSync27(markerPath)) return null;
18676
18751
  const marker = readJsonFile(markerPath, "materialization marker");
18677
18752
  if (!isRecord3(marker) || !isRecord3(marker.manifest) || !isRecord3(marker.target)) {
18678
18753
  throw new PlanV2IntegrityError("malformed materialization marker");
@@ -18690,7 +18765,7 @@ function readValidatedPlanV2Materialization(planDir, expectedTarget) {
18690
18765
  for (const artifact of required) {
18691
18766
  if (Object.hasOwn(remoteSources, artifact.path)) continue;
18692
18767
  const path = join41(planDir, ...artifact.path.split("/"));
18693
- if (!existsSync26(path) || statSync9(path).size !== artifact.sizeBytes) {
18768
+ if (!existsSync27(path) || statSync9(path).size !== artifact.sizeBytes) {
18694
18769
  throw new PlanV2IntegrityError(
18695
18770
  `materialized artifact missing or truncated: ${artifact.path}`
18696
18771
  );
@@ -18789,12 +18864,23 @@ async function runCaptureWithScreenshotFallback(input) {
18789
18864
  try {
18790
18865
  return await input.run(input.forceScreenshot);
18791
18866
  } catch (error) {
18792
- if (input.forceScreenshot || await input.canRetry?.() === false) throw error;
18793
- if (!shouldRetryChunkCaptureWithScreenshot(error)) throw error;
18867
+ if (input.forceScreenshot || await input.canRetry?.() === false)
18868
+ throw imageMissingIn(error) ?? error;
18869
+ if (!shouldRetryChunkCaptureWithScreenshot(error)) throw imageMissingIn(error) ?? error;
18794
18870
  input.onFallback?.(error);
18795
18871
  await input.resetForScreenshotRetry();
18796
- return await input.run(true);
18872
+ return await input.run(true).catch((retryError) => {
18873
+ throw imageMissingIn(retryError) ?? retryError;
18874
+ });
18875
+ }
18876
+ }
18877
+ function imageMissingIn(error) {
18878
+ let e = error;
18879
+ for (let depth = 0; depth < 5 && typeof e === "object" && e !== null; depth++) {
18880
+ if (e.name === "ImageMissingFromFrameError") return e;
18881
+ e = e.cause;
18797
18882
  }
18883
+ return void 0;
18798
18884
  }
18799
18885
  async function beginFrameSessionNeedsScreenshotFallback(session, probe = probeBeginFrameLiveness) {
18800
18886
  if (session.launchCaptureMode !== "beginframe") return false;
@@ -18829,7 +18915,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
18829
18915
  const planJsonPath = join42(planDir, "plan.json");
18830
18916
  const encoderJsonPath = join42(planDir, "meta", "encoder.json");
18831
18917
  const chunksJsonPath = join42(planDir, "meta", "chunks.json");
18832
- if (!existsSync27(planJsonPath)) {
18918
+ if (!existsSync28(planJsonPath)) {
18833
18919
  throw new RenderChunkValidationError(
18834
18920
  MISSING_PLAN_ARTIFACT,
18835
18921
  `[renderChunk] planDir is missing required artifact: ${planJsonPath}`
@@ -18845,7 +18931,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
18845
18931
  const v2Manifest = v2Materialization?.manifest ?? null;
18846
18932
  const remoteSources = v2Materialization?.remoteSources ?? {};
18847
18933
  for (const required of [encoderJsonPath, chunksJsonPath]) {
18848
- if (!existsSync27(required)) {
18934
+ if (!existsSync28(required)) {
18849
18935
  throw new RenderChunkValidationError(
18850
18936
  MISSING_PLAN_ARTIFACT,
18851
18937
  `[renderChunk] planDir is missing required artifact: ${required}`
@@ -18856,7 +18942,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
18856
18942
  const chunks = JSON.parse(readFileSync11(chunksJsonPath, "utf-8"));
18857
18943
  const videosJsonPath = join42(planDir, PLAN_VIDEOS_META_RELATIVE_PATH);
18858
18944
  let planVideos = null;
18859
- if (existsSync27(videosJsonPath)) {
18945
+ if (existsSync28(videosJsonPath)) {
18860
18946
  try {
18861
18947
  planVideos = validatePlanVideosForChunk(JSON.parse(readFileSync11(videosJsonPath, "utf-8")));
18862
18948
  } catch (err) {
@@ -18887,7 +18973,7 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
18887
18973
  const range = resolveChunkFrameRange(slice, chunkIndex, options?.frameRange);
18888
18974
  const framesInChunk = range.endFrame - range.startFrame;
18889
18975
  const compiledDir = join42(planDir, "compiled");
18890
- if (!existsSync27(compiledDir)) {
18976
+ if (!existsSync28(compiledDir)) {
18891
18977
  throw new RenderChunkValidationError(
18892
18978
  MISSING_PLAN_ARTIFACT,
18893
18979
  `[renderChunk] planDir missing compiled/ directory: ${compiledDir}`
@@ -19137,10 +19223,10 @@ async function renderChunk(planDir, chunkIndex, outputChunkPath, options) {
19137
19223
  const effectiveBitrate = encoder.crf != null ? void 0 : encoder.bitrate;
19138
19224
  const videoOnlyPath = encoder.chunksCarryAudio ? `${outputChunkPath}.video.mp4` : outputChunkPath;
19139
19225
  if (isPngSequence) {
19140
- if (!existsSync27(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
19226
+ if (!existsSync28(outputChunkPath)) mkdirSync17(outputChunkPath, { recursive: true });
19141
19227
  } else {
19142
19228
  const outDir = join42(outputChunkPath, "..");
19143
- if (!existsSync27(outDir)) mkdirSync17(outDir, { recursive: true });
19229
+ if (!existsSync28(outDir)) mkdirSync17(outDir, { recursive: true });
19144
19230
  }
19145
19231
  const encodeInput = {
19146
19232
  job,
@@ -20000,7 +20086,7 @@ function renderRequestFromDistributedConfig(input) {
20000
20086
 
20001
20087
  // ../producer/src/server.ts
20002
20088
  import {
20003
- existsSync as existsSync30,
20089
+ existsSync as existsSync31,
20004
20090
  mkdirSync as mkdirSync19,
20005
20091
  statSync as statSync11,
20006
20092
  mkdtempSync as mkdtempSync8,
@@ -20018,7 +20104,7 @@ import { serve as serve2 } from "@hono/node-server";
20018
20104
 
20019
20105
  // ../producer/src/services/hyperframeLint.ts
20020
20106
  import {
20021
- existsSync as existsSync28,
20107
+ existsSync as existsSync29,
20022
20108
  readFileSync as readFileSync13,
20023
20109
  statSync as statSync10,
20024
20110
  openSync as openSync6,
@@ -20026,7 +20112,7 @@ import {
20026
20112
  closeSync as closeSync6,
20027
20113
  constants as constants3
20028
20114
  } from "fs";
20029
- import { resolve as resolve9, join as join44, relative as relative7, isAbsolute as isAbsolute4, sep as sep4 } from "path";
20115
+ import { resolve as resolve9, join as join44, relative as relative7, isAbsolute as isAbsolute4, sep as sep5 } from "path";
20030
20116
  function isStringRecord(value) {
20031
20117
  if (!value || typeof value !== "object" || Array.isArray(value)) {
20032
20118
  return false;
@@ -20071,7 +20157,7 @@ function readEntryHtml(filePath) {
20071
20157
  }
20072
20158
  function readProjectEntryFile(projectDir, preferredEntryFile) {
20073
20159
  const absProjectDir = resolve9(projectDir);
20074
- if (!existsSync28(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
20160
+ if (!existsSync29(absProjectDir) || !statSync10(absProjectDir).isDirectory()) {
20075
20161
  return { error: `Project directory not found: ${absProjectDir}` };
20076
20162
  }
20077
20163
  const entryCandidates = [preferredEntryFile, "index.html", "src/index.html"].filter(
@@ -20080,7 +20166,7 @@ function readProjectEntryFile(projectDir, preferredEntryFile) {
20080
20166
  for (const entryFile of entryCandidates) {
20081
20167
  const absoluteEntryPath = resolve9(absProjectDir, entryFile);
20082
20168
  const entryRelativePath = relative7(absProjectDir, absoluteEntryPath);
20083
- if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep4}`) || isAbsolute4(entryRelativePath)) {
20169
+ if (entryRelativePath === ".." || entryRelativePath.startsWith(`..${sep5}`) || isAbsolute4(entryRelativePath)) {
20084
20170
  return { error: `Entry file must stay inside project directory: ${entryFile}` };
20085
20171
  }
20086
20172
  const html = readEntryHtml(absoluteEntryPath);
@@ -20140,7 +20226,7 @@ async function runHyperframeLint(prepared) {
20140
20226
  import { Worker as Worker2 } from "worker_threads";
20141
20227
  import { fileURLToPath as fileURLToPath6 } from "url";
20142
20228
  import { dirname as dirname16, join as join45 } from "path";
20143
- import { existsSync as existsSync29 } from "fs";
20229
+ import { existsSync as existsSync30 } from "fs";
20144
20230
  var DEFAULT_HEALTH_PORT = 9848;
20145
20231
  async function startHealthWorker(options = {}) {
20146
20232
  const log = options.logger ?? defaultLogger2();
@@ -20217,7 +20303,7 @@ function resolveWorkerEntry2() {
20217
20303
  const here = dirname16(fileURLToPath6(import.meta.url));
20218
20304
  const candidates = [join45(here, "healthWorkerThread.js"), join45(here, "healthWorkerThread.ts")];
20219
20305
  for (const candidate of candidates) {
20220
- if (existsSync29(candidate)) return candidate;
20306
+ if (existsSync30(candidate)) return candidate;
20221
20307
  }
20222
20308
  return void 0;
20223
20309
  }
@@ -20357,7 +20443,7 @@ function resolvePreparedRenderOutput(prepared, rendersDir, log) {
20357
20443
  const { input, cleanupProjectDir } = prepared;
20358
20444
  const absoluteOutputPath = resolveOutputPath(input.projectDir, input.outputPath, rendersDir, log);
20359
20445
  const outputDir = dirname17(absoluteOutputPath);
20360
- if (!existsSync30(outputDir)) mkdirSync19(outputDir, { recursive: true });
20446
+ if (!existsSync31(outputDir)) mkdirSync19(outputDir, { recursive: true });
20361
20447
  return { input, cleanupProjectDir, absoluteOutputPath };
20362
20448
  }
20363
20449
  function validateRenderOverrides(body) {
@@ -20398,11 +20484,11 @@ function prepareProjectDirectory(projectDir, options) {
20398
20484
  const candidate = nonEmptyString(projectDir);
20399
20485
  if (!candidate) return null;
20400
20486
  const absProjectDir = resolve10(candidate);
20401
- if (!existsSync30(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
20487
+ if (!existsSync31(absProjectDir) || !statSync11(absProjectDir).isDirectory()) {
20402
20488
  return { error: `Project directory not found: ${absProjectDir}` };
20403
20489
  }
20404
20490
  const entry = options.entryFile || "index.html";
20405
- if (!existsSync30(resolve10(absProjectDir, entry))) {
20491
+ if (!existsSync31(resolve10(absProjectDir, entry))) {
20406
20492
  return { error: `Entry file "${entry}" not found in project directory: ${absProjectDir}` };
20407
20493
  }
20408
20494
  return { prepared: { input: { projectDir: absProjectDir, ...options } } };
@@ -20494,7 +20580,7 @@ function cleanupTempDir(dir, log) {
20494
20580
  }
20495
20581
  }
20496
20582
  function outputFileSize(path) {
20497
- return existsSync30(path) ? statSync11(path).size : 0;
20583
+ return existsSync31(path) ? statSync11(path).size : 0;
20498
20584
  }
20499
20585
  function createBlockingProgressReporter(log, requestId) {
20500
20586
  let lastLoggedPct = -10;
@@ -20798,7 +20884,7 @@ function createRenderHandlers(options = {}) {
20798
20884
  if (!artifact) {
20799
20885
  return c.json({ success: false, error: "Output artifact not found or expired" }, 404);
20800
20886
  }
20801
- if (!existsSync30(artifact.path)) {
20887
+ if (!existsSync31(artifact.path)) {
20802
20888
  store.delete(token);
20803
20889
  return c.json({ success: false, error: "Output artifact file missing" }, 404);
20804
20890
  }
@@ -20845,7 +20931,7 @@ function startServer(options = {}) {
20845
20931
  });
20846
20932
  async function shutdown(signal) {
20847
20933
  log.info(`Received ${signal}, shutting down`);
20848
- const { drainBrowserPool } = await import("./src-4HGQRHW6.js");
20934
+ const { drainBrowserPool } = await import("./src-VL6XKFAA.js");
20849
20935
  await drainBrowserPool().catch(() => {
20850
20936
  });
20851
20937
  const handle = await Promise.race([
@@ -20888,7 +20974,7 @@ import { join as join48 } from "path";
20888
20974
  // ../producer/src/services/distributed/assemble.ts
20889
20975
  import {
20890
20976
  cpSync as cpSync3,
20891
- existsSync as existsSync31,
20977
+ existsSync as existsSync32,
20892
20978
  mkdirSync as mkdirSync20,
20893
20979
  mkdtempSync as mkdtempSync9,
20894
20980
  readFileSync as readFileSync14,
@@ -20930,7 +21016,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
20930
21016
  }
20931
21017
  const format = plan2.dimensions.format;
20932
21018
  const cfrEncoder = cfr ? readCfrEncoder(planDir, format) : null;
20933
- if (!existsSync31(dirname18(outputPath))) {
21019
+ if (!existsSync32(dirname18(outputPath))) {
20934
21020
  mkdirSync20(dirname18(outputPath), { recursive: true });
20935
21021
  }
20936
21022
  const workDir = mkdtempSync9(`${outputPath}.assemble-work-`);
@@ -20954,7 +21040,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
20954
21040
  try {
20955
21041
  const videoSources = cfrEncoder ? [await reencodeCfr(ctx, chunkPaths, cfrEncoder)] : chunkPaths;
20956
21042
  const finalPath = join47(workDir, `output.${format}`);
20957
- const audio = audioPath !== null && existsSync31(audioPath) ? audioPath : null;
21043
+ const audio = audioPath !== null && existsSync32(audioPath) ? audioPath : null;
20958
21044
  await writeJoined(ctx, videoSources, audio, finalPath);
20959
21045
  renameWithRetry(finalPath, outputPath);
20960
21046
  log.info("[assemble] stage timings", {
@@ -20972,7 +21058,7 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
20972
21058
  });
20973
21059
  }
20974
21060
  }
20975
- const fileSize = existsSync31(outputPath) ? statSync12(outputPath).size : 0;
21061
+ const fileSize = existsSync32(outputPath) ? statSync12(outputPath).size : 0;
20976
21062
  return {
20977
21063
  ...referenceBackgroundResult(plan2[REFERENCE_BACKGROUND_FIELD]),
20978
21064
  outputPath,
@@ -20984,13 +21070,13 @@ async function assemble(planDir, chunkOutputs, audioPath, outputPath, options) {
20984
21070
  function readAssemblePlan(planDir, chunkPaths) {
20985
21071
  const planJsonPath = join47(planDir, "plan.json");
20986
21072
  const chunksJsonPath = join47(planDir, "meta", "chunks.json");
20987
- if (!existsSync31(planJsonPath)) {
21073
+ if (!existsSync32(planJsonPath)) {
20988
21074
  throw new Error(`[assemble] planDir missing plan.json: ${planJsonPath}`);
20989
21075
  }
20990
21076
  const plan2 = JSON.parse(readFileSync14(planJsonPath, "utf-8"));
20991
21077
  readPlanProtocolV1(plan2, DISTRIBUTED_RENDER_CAPABILITIES.roles.assembler);
20992
21078
  validatePlanV2MaterializedTarget(planDir, { role: "assembler" });
20993
- if (!existsSync31(chunksJsonPath)) {
21079
+ if (!existsSync32(chunksJsonPath)) {
20994
21080
  throw new Error(`[assemble] planDir missing meta/chunks.json: ${chunksJsonPath}`);
20995
21081
  }
20996
21082
  const chunks = JSON.parse(readFileSync14(chunksJsonPath, "utf-8"));
@@ -21005,7 +21091,7 @@ function readAssemblePlan(planDir, chunkPaths) {
21005
21091
  }
21006
21092
  }
21007
21093
  for (const path of chunkPaths.flat()) {
21008
- if (!existsSync31(path)) {
21094
+ if (!existsSync32(path)) {
21009
21095
  throw new Error(`[assemble] chunk path does not exist: ${path}`);
21010
21096
  }
21011
21097
  }
@@ -21144,7 +21230,7 @@ function planFormat(planDir) {
21144
21230
  }
21145
21231
  function lockedAudio(planDir) {
21146
21232
  const encoderJsonPath = join47(planDir, "meta", "encoder.json");
21147
- if (!existsSync31(encoderJsonPath)) return {};
21233
+ if (!existsSync32(encoderJsonPath)) return {};
21148
21234
  return JSON.parse(readFileSync14(encoderJsonPath, "utf-8"));
21149
21235
  }
21150
21236
  function readCfrEncoder(planDir, format) {
@@ -21154,7 +21240,7 @@ function readCfrEncoder(planDir, format) {
21154
21240
  );
21155
21241
  }
21156
21242
  const encoderJsonPath = join47(planDir, "meta", "encoder.json");
21157
- if (!existsSync31(encoderJsonPath)) {
21243
+ if (!existsSync32(encoderJsonPath)) {
21158
21244
  throw new Error(`[assemble] planDir missing meta/encoder.json: ${encoderJsonPath}`);
21159
21245
  }
21160
21246
  const encoderJson = JSON.parse(readFileSync14(encoderJsonPath, "utf-8"));
@@ -21166,7 +21252,7 @@ function readCfrEncoder(planDir, format) {
21166
21252
  return encoderJson;
21167
21253
  }
21168
21254
  function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, startTimeMs) {
21169
- if (existsSync31(outputPath)) rmSync18(outputPath, { recursive: true, force: true });
21255
+ if (existsSync32(outputPath)) rmSync18(outputPath, { recursive: true, force: true });
21170
21256
  mkdirSync20(outputPath, { recursive: true });
21171
21257
  let globalIdx = 0;
21172
21258
  for (const chunkDir of chunkPaths) {
@@ -21190,7 +21276,7 @@ function mergePngFrameDirs(chunkPaths, outputPath, totalFrames, audioPath, start
21190
21276
  `[assemble] png-sequence frame count mismatch: merged ${globalIdx} frames vs plan.totalFrames=${totalFrames}. Using on-disk count.`
21191
21277
  );
21192
21278
  }
21193
- if (audioPath !== null && existsSync31(audioPath)) {
21279
+ if (audioPath !== null && existsSync32(audioPath)) {
21194
21280
  const sidecar = join47(outputPath, MIXED_AUDIO_FILENAME);
21195
21281
  cpSync3(audioPath, sidecar);
21196
21282
  }