hyperframes 0.9.48 → 0.9.50

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 (223) hide show
  1. package/dist/{add-3H4DG4RA.js → add-MHBYQHUR.js} +6 -6
  2. package/dist/{agentPromptGenerator-PIHKWDAW.js → agentPromptGenerator-LJHTM6QS.js} +6 -6
  3. package/dist/{animatedGifPrep-SXYSHW6I.js → animatedGifPrep-V5SQRWAT.js} +6 -6
  4. package/dist/api.js +24 -24
  5. package/dist/{asset-43VALPNF.js → asset-2QF7W45V.js} +2 -2
  6. package/dist/{assetCataloger-MUOL6FRF.js → assetCataloger-HBGLL5OY.js} +7 -7
  7. package/dist/{audio-ZHGSDLJR.js → audio-ERHWZM2O.js} +11 -11
  8. package/dist/{auth-UXRKOJQB.js → auth-JNM2N5FK.js} +2 -2
  9. package/dist/{autoUpdate-PMEPQG65.js → autoUpdate-2A3PNPOQ.js} +2 -2
  10. package/dist/{avatars-QFBWZAIE.js → avatars-UXJM3YOF.js} +10 -10
  11. package/dist/{backgroundChecks-OK6SI7BE.js → backgroundChecks-FM7JOSDW.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{batchRender-XYL2E7IX.js → batchRender-VKM4E7PI.js} +1 -1
  14. package/dist/{beats-O23QKE6J.js → beats-BAZOHGIS.js} +7 -7
  15. package/dist/{benchmark-DKBSDIX5.js → benchmark-AWDTJZW2.js} +7 -7
  16. package/dist/{billing-ZZCU3K3Q.js → billing-M7FIGUG3.js} +5 -5
  17. package/dist/{browser-4X6WZ6UD.js → browser-BJBAMHOZ.js} +4 -4
  18. package/dist/{bundleWithLocalizedFonts-M64DWYM5.js → bundleWithLocalizedFonts-NWMD2BBQ.js} +1 -1
  19. package/dist/{capture-JJARZBDS.js → capture-GKI3WNTE.js} +12 -12
  20. package/dist/{capture-O3W6P6DB.js → capture-V3KIGAHK.js} +4 -4
  21. package/dist/{captureCompositionFrame-JLTAV6VN.js → captureCompositionFrame-C3QPXFZZ.js} +9 -9
  22. package/dist/{catalog-4A4CPKPT.js → catalog-5VRQXFNE.js} +6 -6
  23. package/dist/{catch-up-EUQFPFMU.js → catch-up-IWRZL3T6.js} +5 -5
  24. package/dist/{check-IZ6SFIGR.js → check-3TTCBOR5.js} +27 -27
  25. package/dist/{checkAudio-5IRYPK3A.js → checkAudio-WNVIHTTH.js} +8 -8
  26. package/dist/{checkBrowser-HUCHMJV4.js → checkBrowser-IQR4HWS6.js} +21 -21
  27. package/dist/{chunk-5MHENUR3.js → chunk-2M7GGAXG.js} +2 -2
  28. package/dist/{chunk-BEPEMS56.js → chunk-3LTJKGJQ.js} +4 -4
  29. package/dist/{chunk-FFZE3G5R.js → chunk-4OWHB6Y4.js} +1 -1
  30. package/dist/{chunk-FWABCPJF.js → chunk-4Q2HYZZK.js} +1 -1
  31. package/dist/{chunk-IQA5CXNE.js → chunk-4QRYBCP5.js} +1 -1
  32. package/dist/{chunk-NECZT66A.js → chunk-5SIOKBKO.js} +3 -3
  33. package/dist/{chunk-FF3VETCD.js → chunk-5YF3NCZV.js} +1 -1
  34. package/dist/{chunk-E5OW6L6E.js → chunk-62LL7YPC.js} +2 -2
  35. package/dist/{chunk-67QXALQY.js → chunk-62R36CZW.js} +3 -3
  36. package/dist/{chunk-HZXRORAG.js → chunk-6Q7QF4UD.js} +2 -2
  37. package/dist/{chunk-PBTXEWFY.js → chunk-747XM6QN.js} +2 -2
  38. package/dist/{chunk-JUI6DQFD.js → chunk-7H6NEDNA.js} +2 -2
  39. package/dist/{chunk-XUCEC2EI.js → chunk-7W3MLVDC.js} +2 -2
  40. package/dist/{chunk-IK7DQLH7.js → chunk-7YKLBEIC.js} +6 -6
  41. package/dist/{chunk-CTWD5ND3.js → chunk-A5LYBVBC.js} +8 -8
  42. package/dist/{chunk-44EG3TMN.js → chunk-ARIBOM26.js} +1 -1
  43. package/dist/{chunk-RV6ZSL4E.js → chunk-ARREGNEF.js} +3 -3
  44. package/dist/{chunk-MZ2LNNLT.js → chunk-AVBZSLK5.js} +4 -4
  45. package/dist/{chunk-JET2QWI5.js → chunk-CB3GR7GV.js} +2 -2
  46. package/dist/{chunk-GXPAR6JC.js → chunk-CGHWDZXR.js} +2 -2
  47. package/dist/{chunk-ZJTSSZVG.js → chunk-CII7LO6I.js} +1 -1
  48. package/dist/{chunk-I4OQGQ5M.js → chunk-CIZB4MFK.js} +1 -1
  49. package/dist/{chunk-NAUOUIEW.js → chunk-CX5Y3TUU.js} +1 -1
  50. package/dist/{chunk-2GS3N3TZ.js → chunk-D3UYYHU2.js} +1 -1
  51. package/dist/{chunk-YZERHM3O.js → chunk-DSKX5OD2.js} +2 -2
  52. package/dist/{chunk-5IE7DN6I.js → chunk-DV5KH45B.js} +1 -1
  53. package/dist/{chunk-6DNSUUKB.js → chunk-E2QJFCYC.js} +8 -3
  54. package/dist/{chunk-ZQMK76GC.js → chunk-F7Z7UDAV.js} +1 -1
  55. package/dist/{chunk-JN4ING5S.js → chunk-FLDJ5AYW.js} +2 -2
  56. package/dist/{chunk-4HP2MTKM.js → chunk-G5M6MZPP.js} +1 -1
  57. package/dist/{chunk-T4TF22AD.js → chunk-GOZNQ2BU.js} +5 -5
  58. package/dist/{chunk-RGGQBF7T.js → chunk-GVYDYPMK.js} +1 -1
  59. package/dist/{chunk-DNDMJYSA.js → chunk-H4LCNEA2.js} +131 -56
  60. package/dist/{chunk-I542AQXY.js → chunk-H6GW4MUA.js} +2 -2
  61. package/dist/{chunk-OO4R2IFF.js → chunk-HCPT6BJD.js} +1 -1
  62. package/dist/{chunk-JYOOWDQK.js → chunk-I4PWEIZK.js} +1 -1
  63. package/dist/{chunk-GZSJYNAJ.js → chunk-I7UACFVY.js} +71 -24
  64. package/dist/{chunk-PVR4LBWK.js → chunk-JHNICCT2.js} +11 -11
  65. package/dist/{chunk-JX7623IE.js → chunk-JQPR3J5V.js} +2 -2
  66. package/dist/{chunk-7X2TCJJ7.js → chunk-KDT2WX7M.js} +1 -1
  67. package/dist/{chunk-FLHKID4G.js → chunk-LRKSFIYI.js} +2 -2
  68. package/dist/{chunk-UG3G4HEH.js → chunk-LS2FSESG.js} +58 -28
  69. package/dist/{chunk-EVRVYDKJ.js → chunk-LSL3XC2T.js} +4 -4
  70. package/dist/{chunk-POCPG2WI.js → chunk-M2UX3RAP.js} +7 -7
  71. package/dist/{chunk-EWMPCW7J.js → chunk-NLHR5VAJ.js} +1 -1
  72. package/dist/{chunk-WT2OKPEW.js → chunk-NLTJMUK6.js} +1 -1
  73. package/dist/{chunk-ULNYVLR5.js → chunk-NOSZSEN6.js} +1 -1
  74. package/dist/{chunk-QQSVDBSH.js → chunk-NYUTPQQ3.js} +10 -10
  75. package/dist/{chunk-Z2DDFW7J.js → chunk-OHC6GZAK.js} +9 -9
  76. package/dist/{chunk-LIQZZ6AE.js → chunk-OUABE6YT.js} +1 -1
  77. package/dist/{chunk-CDBPBLYJ.js → chunk-PGY4WFKL.js} +1 -1
  78. package/dist/{chunk-SXMAJMTP.js → chunk-PNL7SMWV.js} +2 -2
  79. package/dist/{chunk-ESXZZU25.js → chunk-QARZ5SCV.js} +2 -2
  80. package/dist/{chunk-3LH7DND6.js → chunk-QIKIHGPS.js} +1 -1
  81. package/dist/{chunk-DACTRVDQ.js → chunk-QLHNKVBG.js} +3 -3
  82. package/dist/{chunk-MXOWNQCI.js → chunk-R64WJS45.js} +2 -2
  83. package/dist/{chunk-4WDBYCUK.js → chunk-R76QWLJI.js} +1 -1
  84. package/dist/{chunk-DDXHYDJW.js → chunk-RJEX3RRW.js} +1 -1
  85. package/dist/{chunk-7SNB3KGY.js → chunk-S2Z46FMO.js} +1 -1
  86. package/dist/{chunk-5AJNQMML.js → chunk-T44NTM2R.js} +1 -1
  87. package/dist/{chunk-OFAEOC67.js → chunk-T47SZ3SP.js} +5 -5
  88. package/dist/{chunk-SGLUNJTO.js → chunk-TMAF33SA.js} +1 -1
  89. package/dist/{chunk-ZR7CJIH3.js → chunk-TW6S6A2B.js} +19 -19
  90. package/dist/{chunk-DFJIVRYU.js → chunk-U4CJQ4AU.js} +1 -1
  91. package/dist/{chunk-7SY3DERR.js → chunk-UBHBB3TB.js} +1 -1
  92. package/dist/{chunk-BM6LSTMG.js → chunk-UJRRUNWQ.js} +2 -2
  93. package/dist/{chunk-IPTZMILN.js → chunk-VNIVH2ZQ.js} +1 -1
  94. package/dist/{chunk-EPQC3FGZ.js → chunk-WFQJ6EJ6.js} +19 -4
  95. package/dist/{chunk-M5PWCI3M.js → chunk-WXNVVZCC.js} +3 -3
  96. package/dist/{chunk-TM4PTEAL.js → chunk-XBD5NV2F.js} +1 -1
  97. package/dist/{chunk-P4FZ67X5.js → chunk-XP5X4TKU.js} +1 -1
  98. package/dist/{chunk-3JWNN5PN.js → chunk-YIKOKVHE.js} +293 -187
  99. package/dist/{chunk-TPVRUKKI.js → chunk-YTO34UZE.js} +4 -4
  100. package/dist/{chunk-W56YNDIJ.js → chunk-YYF4HKW5.js} +1 -1
  101. package/dist/{chunk-5DW2DEHX.js → chunk-Z5TKOD2D.js} +1 -1
  102. package/dist/{chunk-4BJYQXFF.js → chunk-ZI5QVXG4.js} +1 -1
  103. package/dist/{chunk-CZBTUYLW.js → chunk-ZPMIIPDH.js} +3 -3
  104. package/dist/{chunk-VTLYJLGX.js → chunk-ZX52DCZH.js} +2 -2
  105. package/dist/{clean-YTQ7THRZ.js → clean-BT36HK75.js} +13 -13
  106. package/dist/cli.js +62 -62
  107. package/dist/{cloud-NYF5MJVW.js → cloud-R2QOPFMH.js} +4 -4
  108. package/dist/{cloudrun-XXGMWBUO.js → cloudrun-EULFHQQL.js} +1 -1
  109. package/dist/{compare-Z32R2SCB.js → compare-RUB5AIPD.js} +18 -18
  110. package/dist/{compiler-XTVXLGQA.js → compiler-DUG4GFRI.js} +3 -3
  111. package/dist/{component-UAZQ4P7D.js → component-NBW4NP3J.js} +3 -3
  112. package/dist/{compositions-WRX752GP.js → compositions-FHO2G54H.js} +10 -10
  113. package/dist/{curve-GPONFTFR.js → curve-2MSCLXM7.js} +10 -10
  114. package/dist/{cuts-RC2WIAYL.js → cuts-ND6ZL5AI.js} +11 -11
  115. package/dist/{delete-MDRUJACW.js → delete-FMQCJAHX.js} +2 -2
  116. package/dist/{deploy-EV4JCQW6.js → deploy-5UOYKYXF.js} +2 -2
  117. package/dist/{describeProject-D2MMDRME.js → describeProject-OIK763B5.js} +6 -6
  118. package/dist/{destroy-IBQ64X7C.js → destroy-MLAFCH6B.js} +2 -2
  119. package/dist/{diff-BGZFEZ7V.js → diff-KKJRQKFR.js} +23 -23
  120. package/dist/{dist-4ZDHU5RE.js → dist-2YJCNIWI.js} +2 -2
  121. package/dist/{dist-YX7FMBUD.js → dist-MXWEGMRB.js} +1 -1
  122. package/dist/{dist-BKWVQR7A.js → dist-UMYCC5T5.js} +5 -5
  123. package/dist/{doctor-TDF4VFEI.js → doctor-5DILJANT.js} +10 -10
  124. package/dist/{energy-DDE435SP.js → energy-BLU27H7G.js} +11 -11
  125. package/dist/{events-CQLKSC62.js → events-35CZGWGO.js} +2 -2
  126. package/dist/{events-IFAKMWNL.js → events-AXNHFZTY.js} +12 -12
  127. package/dist/{events-WA3SQMWZ.js → events-GRLM5BLQ.js} +4 -4
  128. package/dist/{execute-H337HQ2I.js → execute-FRDHPWNT.js} +16 -16
  129. package/dist/{extract-LOH2HC74.js → extract-ILQCKYWJ.js} +11 -11
  130. package/dist/{face-RMDNBINB.js → face-S3YZLPEO.js} +11 -11
  131. package/dist/{feedback-QX4CBEFU.js → feedback-LTEDBBL2.js} +8 -8
  132. package/dist/{ffmpeg-LXWLSIJN.js → ffmpeg-OJIIUEQQ.js} +6 -6
  133. package/dist/{figma-QNCIZZKI.js → figma-DXIX3JW2.js} +3 -3
  134. package/dist/fontLocalizeCli.js +9 -9
  135. package/dist/{frames-M3ZAUTAZ.js → frames-E7GSMQMG.js} +12 -12
  136. package/dist/{generate-JHWY26CH.js → generate-5BV3VOF5.js} +16 -16
  137. package/dist/{get-UOPVKIUK.js → get-LO5YZK5S.js} +2 -2
  138. package/dist/{gpuPolicy-4UHHZMH7.js → gpuPolicy-L6YX2UOM.js} +6 -6
  139. package/dist/{grade-compare-TRTR3HGM.js → grade-compare-45DGL4FX.js} +19 -19
  140. package/dist/{heifImagePrep-7DRKOFIJ.js → heifImagePrep-HZWZ6RCU.js} +7 -7
  141. package/dist/{help-XBJ3CPJG.js → help-NXUWIQZJ.js} +1 -1
  142. package/dist/{history-4NBOWTAK.js → history-B2VYYYFA.js} +7 -7
  143. package/dist/hyperframes-player.global.js +1 -1
  144. package/dist/hyperframes-slideshow.global.js +14 -14
  145. package/dist/{info-6OUYHW5G.js → info-6BK7QHQN.js} +12 -12
  146. package/dist/{init-U4UGYE5D.js → init-5NJNDMW5.js} +23 -23
  147. package/dist/{ink-3K5U33XB.js → ink-I2VH46VQ.js} +11 -11
  148. package/dist/{inspect-U6QLWQW2.js → inspect-VMCKQEOT.js} +19 -19
  149. package/dist/{installer-2LTM4GWP.js → installer-FI6HT2FW.js} +1 -1
  150. package/dist/{keyframes-HRT4ICFF.js → keyframes-2ZZUDJD7.js} +7 -7
  151. package/dist/{lambda-QCYXB7S3.js → lambda-BHLB7JHL.js} +10 -10
  152. package/dist/{layout-S6E5YVK5.js → layout-4Y2DWTXM.js} +19 -19
  153. package/dist/{lint-JNQUZ5H6.js → lint-QPQRY5WD.js} +8 -8
  154. package/dist/{lintProject-7C4U6NHF.js → lintProject-G4MXY4YA.js} +2 -2
  155. package/dist/{list-IEATKMVG.js → list-SPRUZTEJ.js} +2 -2
  156. package/dist/{localPage-KKLCOLJR.js → localPage-TZFDEA6W.js} +6 -6
  157. package/dist/{login-BWXQWFKL.js → login-JOQCOSOK.js} +4 -4
  158. package/dist/{look-5EMJASLS.js → look-3UNLVDPJ.js} +11 -11
  159. package/dist/{manager-7XKYKMB7.js → manager-7IV66O64.js} +7 -7
  160. package/dist/{measure-UW3MUWR7.js → measure-PFOIM7OJ.js} +11 -11
  161. package/dist/{media-treatment-C26U3INH.js → media-treatment-WR2EYI6J.js} +12 -12
  162. package/dist/{media-use-IGSJKXLU.js → media-use-VRMLASYM.js} +3 -3
  163. package/dist/{models-XQMHEBHU.js → models-6BN6ZA2T.js} +10 -10
  164. package/dist/{motionShot-PH2I6VOO.js → motionShot-SX6BQ2A3.js} +12 -12
  165. package/dist/{normalize-audio-ROHXFODM.js → normalize-audio-E2EMJIJU.js} +5 -5
  166. package/dist/{open-UAGIY4HR.js → open-N4SZ4OC6.js} +5 -5
  167. package/dist/{parakeetRunner-OOJI6E2B.js → parakeetRunner-GVZ2XLDV.js} +11 -11
  168. package/dist/{pipeline-GQUCPCXS.js → pipeline-Z4RAIXQM.js} +9 -9
  169. package/dist/{plan-PNV4KSCO.js → plan-NJKLH5DY.js} +12 -12
  170. package/dist/{play-UEEYAMEA.js → play-2P3J4O6N.js} +11 -11
  171. package/dist/{preflight-E6FYCMJX.js → preflight-VQ366D6O.js} +7 -7
  172. package/dist/{present-ZKBO5RTJ.js → present-HCY6XKUF.js} +12 -12
  173. package/dist/{preview-SQFT4TGS.js → preview-ZE435ZVI.js} +12 -12
  174. package/dist/{probe-35RQ7WQ6.js → probe-J2KN3Y3Z.js} +11 -11
  175. package/dist/{producer-7PCYSXHR.js → producer-G6AH4NES.js} +1 -1
  176. package/dist/{projectConfig-LSJSU4UR.js → projectConfig-VPL64JBD.js} +1 -1
  177. package/dist/{publicNetwork-CWRD7PSE.js → publicNetwork-CWKAKZXP.js} +5 -1
  178. package/dist/{publication-4EYVOO47.js → publication-ST3VFFWM.js} +1 -1
  179. package/dist/{publish-UEF3X6G7.js → publish-CMIRMUVW.js} +6 -6
  180. package/dist/{remove-background-KES26J53.js → remove-background-2HPZDKTN.js} +10 -10
  181. package/dist/{render-GH2KWOVT.js → render-FYWFWCL7.js} +17 -17
  182. package/dist/{render-IFRE426H.js → render-MG5MX45D.js} +1 -1
  183. package/dist/{render-4C7Q32BC.js → render-WXDAMYQU.js} +25 -25
  184. package/dist/{render-batch-2BWEMPAQ.js → render-batch-C3XGAQGX.js} +1 -1
  185. package/dist/renderSetupWorker.js +2 -2
  186. package/dist/{resolver-PM56BNET.js → resolver-AGMKICJW.js} +1 -1
  187. package/dist/{reverse-I6VOINAN.js → reverse-XNTL6ILN.js} +1 -1
  188. package/dist/{screenshotCapture-HXTGIPHY.js → screenshotCapture-4FFWYCKV.js} +6 -6
  189. package/dist/{service-KXRPG74T.js → service-BW7NT4R2.js} +10 -10
  190. package/dist/{share-G2UPZLLH.js → share-JJ6G2SRE.js} +13 -13
  191. package/dist/{sherpa-P3IEXV3S.js → sherpa-ZARNRTUF.js} +10 -10
  192. package/dist/{skills-4KNW2APN.js → skills-H6QD7AIP.js} +7 -7
  193. package/dist/{skillsUpdateCheck-XRXMK2BR.js → skillsUpdateCheck-BBSSMBNI.js} +3 -3
  194. package/dist/{slideshow-ARJR22W4.js → slideshow-PC3BBO5F.js} +1 -1
  195. package/dist/{snapshot-MSTKQXSJ.js → snapshot-AIASY7ZT.js} +26 -26
  196. package/dist/{src-5O3RW44E.js → src-IVCOSSDJ.js} +9 -5
  197. package/dist/{src-EJXQBNFT.js → src-RNWDJRGO.js} +8 -8
  198. package/dist/{start-WERFNWUG.js → start-CVUWN3EJ.js} +14 -14
  199. package/dist/{staticProjectServer-MTL5UOLQ.js → staticProjectServer-XHYEFNOX.js} +9 -9
  200. package/dist/{status-MOLSRFMM.js → status-TCUB55VV.js} +5 -5
  201. package/dist/studio/assets/{hyperframes-player-DYtpqF4w.js → hyperframes-player-DHIxqu8A.js} +1 -1
  202. package/dist/studio/assets/{index-pSFnTYYo.js → index-CefNftWO.js} +1 -1
  203. package/dist/studio/assets/{index-D_6Nvt4M.js → index-CuCj-ntQ.js} +117 -117
  204. package/dist/studio/assets/{pausedVideoDecoder-D_jYmpmj.js → pausedVideoDecoder-Dy-s5uPt.js} +1 -1
  205. package/dist/studio/index.html +1 -1
  206. package/dist/{studio-api-BTDNUTUL.js → studio-api-HPYJHSZY.js} +5 -5
  207. package/dist/{studioServer-A73V7BGB.js → studioServer-RIYJYGVD.js} +40 -40
  208. package/dist/{sync-VV4THGGW.js → sync-ILVIJDYI.js} +11 -11
  209. package/dist/{telemetry-VTF2M5AG.js → telemetry-Q6X3TCN6.js} +4 -4
  210. package/dist/{templates-IDYVXLRA.js → templates-64NH2NZF.js} +5 -5
  211. package/dist/{timeline-RHXNE24Z.js → timeline-CR4YEFN4.js} +13 -13
  212. package/dist/{tokens-TYYUI63J.js → tokens-NISS5JD7.js} +2 -2
  213. package/dist/{transcribe-ZC22NJXV.js → transcribe-AP3PUNHX.js} +9 -9
  214. package/dist/{transcribe-5JGZPJCT.js → transcribe-R7K7NSGF.js} +18 -18
  215. package/dist/{update-QIVTZXMN.js → update-OI6DZTRT.js} +8 -8
  216. package/dist/{updateCheck-7RZEDERP.js → updateCheck-7ZCJ7FNE.js} +2 -2
  217. package/dist/{upgrade-HYRR4ZLW.js → upgrade-D6VGQSRH.js} +3 -3
  218. package/dist/{urlDownloader-YPKIQ2PI.js → urlDownloader-KE7AXBCY.js} +7 -5
  219. package/dist/{validate-ZWUJ2E2U.js → validate-LZBOVEFV.js} +17 -17
  220. package/dist/{video-CNLMBOOB.js → video-7KEKO4H2.js} +7 -7
  221. package/dist/{voices-4GOW5GZG.js → voices-6EOBOCEU.js} +14 -14
  222. package/dist/warmCheck.js +27 -27
  223. package/package.json +1 -1
@@ -8,8 +8,9 @@ import {
8
8
  browserProxyArgs,
9
9
  createPublicOnlyProfile,
10
10
  isBlockedNetworkHost,
11
+ logRefusal,
11
12
  startCaptureProxy
12
- } from "./chunk-UG3G4HEH.js";
13
+ } from "./chunk-LS2FSESG.js";
13
14
  import {
14
15
  removeTreeBestEffort,
15
16
  removeTreeBestEffortAsync
@@ -104,6 +105,10 @@ import {
104
105
  timeAtSourceTime,
105
106
  volumeSegmentSampleCount
106
107
  } from "./chunk-DQZRNGDS.js";
108
+ import {
109
+ isPrivateFileUnder,
110
+ isVcsOrSecretPath
111
+ } from "./chunk-XWK2RSD5.js";
107
112
  import {
108
113
  browserPathFromEnv,
109
114
  buildChromeLaunchEnv,
@@ -115,7 +120,7 @@ import {
115
120
  } from "./chunk-LEIR7IDJ.js";
116
121
  import {
117
122
  resolveReferencedStart
118
- } from "./chunk-DNDMJYSA.js";
123
+ } from "./chunk-H4LCNEA2.js";
119
124
  import {
120
125
  isWithinProjectRoot,
121
126
  resolveProjectRelativeSrc
@@ -836,7 +841,7 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
836
841
  const profile = mkdtempSync(join2(tmpdir2(), "hf-chrome-probe-"));
837
842
  const timeoutMs = options.timeoutMs ?? PROBE_TIMEOUT_MS;
838
843
  try {
839
- return await new Promise((resolve2) => {
844
+ return await new Promise((resolve3) => {
840
845
  let stderr = "";
841
846
  const child = spawn(executablePath, startupArgs(args, profile), {
842
847
  env: buildChromeLaunchEnv(options.env),
@@ -845,14 +850,14 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
845
850
  });
846
851
  const timer = setTimeout(() => {
847
852
  child.kill();
848
- resolve2(`Chrome started and kept running for ${timeoutMs} ms when launched on its own.`);
853
+ resolve3(`Chrome started and kept running for ${timeoutMs} ms when launched on its own.`);
849
854
  }, timeoutMs);
850
855
  options.signal?.addEventListener(
851
856
  "abort",
852
857
  () => {
853
858
  clearTimeout(timer);
854
859
  child.kill();
855
- resolve2("The startup check was cancelled.");
860
+ resolve3("The startup check was cancelled.");
856
861
  },
857
862
  { once: true }
858
863
  );
@@ -861,14 +866,14 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
861
866
  });
862
867
  child.once("error", (error) => {
863
868
  clearTimeout(timer);
864
- resolve2(`Chrome could not be started: ${error.message}`);
869
+ resolve3(`Chrome could not be started: ${error.message}`);
865
870
  });
866
871
  child.once("exit", (code, signal) => {
867
872
  clearTimeout(timer);
868
873
  const how = signal ? `was stopped by ${signal}` : `exited with code ${code}`;
869
874
  const named = nameChromeExit(code, options.platform);
870
875
  const lines = tail(stderr);
871
- resolve2(
876
+ resolve3(
872
877
  [`Chrome ${how} when launched on its own.`, named, lines && `stderr:
873
878
  ${lines}`].filter(Boolean).join("\n")
874
879
  );
@@ -1178,7 +1183,7 @@ var BrowserLeasePool = class _BrowserLeasePool {
1178
1183
  for (const entry of entries) this.requestClose(entry, false);
1179
1184
  const settle = Promise.all(entries.map((entry) => entry.closePromise));
1180
1185
  const bound = new Promise(
1181
- (resolve2) => setTimeout(resolve2, _BrowserLeasePool.DRAIN_FORCE_CLOSE_MS).unref()
1186
+ (resolve3) => setTimeout(resolve3, _BrowserLeasePool.DRAIN_FORCE_CLOSE_MS).unref()
1182
1187
  );
1183
1188
  this.drainPromise = Promise.race([settle, bound]).then(() => {
1184
1189
  for (const entry of entries) if (this.entries.has(entry)) this.requestClose(entry, true);
@@ -1277,11 +1282,11 @@ var BrowserLeasePool = class _BrowserLeasePool {
1277
1282
  await Promise.race([
1278
1283
  this.options.close(result.browser).catch(() => {
1279
1284
  }),
1280
- new Promise((resolve2) => {
1285
+ new Promise((resolve3) => {
1281
1286
  entry.forceClose = () => {
1282
1287
  entry.forceClose = void 0;
1283
1288
  this.options.forceClose(result.browser);
1284
- resolve2();
1289
+ resolve3();
1285
1290
  };
1286
1291
  })
1287
1292
  ]);
@@ -1831,7 +1836,7 @@ async function launchInsideSandbox(ppt, options) {
1831
1836
  }
1832
1837
  }
1833
1838
  async function publicOnlyNetwork(pageServerHost) {
1834
- const proxy = await startCaptureProxy(null);
1839
+ const proxy = await startCaptureProxy(null, logRefusal);
1835
1840
  try {
1836
1841
  const userDataDir = await createPublicOnlyProfile("hf-render-profile-");
1837
1842
  return {
@@ -2112,11 +2117,11 @@ async function assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu
2112
2117
  };
2113
2118
  return await Promise.race([
2114
2119
  probe(),
2115
- new Promise((resolve2) => {
2120
+ new Promise((resolve3) => {
2116
2121
  timer = (globalThis.window?.__HF_VIRTUAL_TIME__?.originalSetTimeout ?? setTimeout)(
2117
2122
  () => {
2118
2123
  expired = true;
2119
- resolve2(false);
2124
+ resolve3(false);
2120
2125
  },
2121
2126
  timeoutMs
2122
2127
  );
@@ -2579,7 +2584,7 @@ async function produceDrawElementFrame(page, width, height, quality = 80, syncTo
2579
2584
  );
2580
2585
  }
2581
2586
  const frameId = ++state.nextId;
2582
- const encodeResult = new Promise((resolve2, reject) => {
2587
+ const encodeResult = new Promise((resolve3, reject) => {
2583
2588
  const timer = setTimeout(() => {
2584
2589
  if (state.pending.delete(frameId)) {
2585
2590
  reject(new Error(`drawElement worker encode timed out (frame ${frameId})`));
@@ -2588,7 +2593,7 @@ async function produceDrawElementFrame(page, width, height, quality = 80, syncTo
2588
2593
  state.pending.set(frameId, {
2589
2594
  resolve: (b) => {
2590
2595
  clearTimeout(timer);
2591
- resolve2(b);
2596
+ resolve3(b);
2592
2597
  },
2593
2598
  reject: (e) => {
2594
2599
  clearTimeout(timer);
@@ -2744,7 +2749,7 @@ async function produceDrawElementFrameBatch(page, times, width, height, quality
2744
2749
  for (let i = 0; i < times.length; i++) {
2745
2750
  const frameId = ++state.nextId;
2746
2751
  fids.push(frameId);
2747
- const p = new Promise((resolve2, reject) => {
2752
+ const p = new Promise((resolve3, reject) => {
2748
2753
  const timer = setTimeout(() => {
2749
2754
  if (state.pending.delete(frameId)) {
2750
2755
  reject(new Error(`drawElement worker encode timed out (frame ${frameId})`));
@@ -2753,7 +2758,7 @@ async function produceDrawElementFrameBatch(page, times, width, height, quality
2753
2758
  state.pending.set(frameId, {
2754
2759
  resolve: (b) => {
2755
2760
  clearTimeout(timer);
2756
- resolve2(b);
2761
+ resolve3(b);
2757
2762
  },
2758
2763
  reject: (e) => {
2759
2764
  clearTimeout(timer);
@@ -3880,8 +3885,8 @@ async function describePageMotionBlur(page, record2) {
3880
3885
  }
3881
3886
  async function describePageMotionBlurAtEnd(page, timeoutMs = 1500, record2) {
3882
3887
  let timer;
3883
- const stuck = new Promise((resolve2) => {
3884
- timer = setTimeout(() => resolve2(null), timeoutMs);
3888
+ const stuck = new Promise((resolve3) => {
3889
+ timer = setTimeout(() => resolve3(null), timeoutMs);
3885
3890
  });
3886
3891
  try {
3887
3892
  const r = await Promise.race([readPageMotionBlur(page), stuck]);
@@ -4001,8 +4006,8 @@ async function probeBeginFrameLiveness(page, timeoutMs, frameTimeTicks, interval
4001
4006
  try {
4002
4007
  return await Promise.race([
4003
4008
  client.send("HeadlessExperimental.beginFrame", params).then(() => true).catch(() => false),
4004
- new Promise((resolve2) => {
4005
- timer = setTimeout(() => resolve2(false), timeoutMs);
4009
+ new Promise((resolve3) => {
4010
+ timer = setTimeout(() => resolve3(false), timeoutMs);
4006
4011
  })
4007
4012
  ]);
4008
4013
  } finally {
@@ -4600,9 +4605,9 @@ async function initThreeDProjectionInPage() {
4600
4605
  const toDataUrl = async (url) => {
4601
4606
  const resp = await fetch(url);
4602
4607
  const blob = await resp.blob();
4603
- return new Promise((resolve2, reject) => {
4608
+ return new Promise((resolve3, reject) => {
4604
4609
  const r = new FileReader();
4605
- r.onload = () => resolve2(String(r.result));
4610
+ r.onload = () => resolve3(String(r.result));
4606
4611
  r.onerror = () => reject(new Error(`FileReader failed for ${url}`));
4607
4612
  r.readAsDataURL(blob);
4608
4613
  });
@@ -5301,12 +5306,12 @@ async function scanChunk(page, times) {
5301
5306
  }, times);
5302
5307
  }
5303
5308
  function withinBudget(work, ms) {
5304
- return new Promise((resolve2, reject) => {
5305
- const timer = setTimeout(() => resolve2(null), Math.max(0, ms));
5309
+ return new Promise((resolve3, reject) => {
5310
+ const timer = setTimeout(() => resolve3(null), Math.max(0, ms));
5306
5311
  work.then(
5307
5312
  (value) => {
5308
5313
  clearTimeout(timer);
5309
- resolve2(value);
5314
+ resolve3(value);
5310
5315
  },
5311
5316
  (error) => {
5312
5317
  clearTimeout(timer);
@@ -5486,7 +5491,16 @@ function urlInputArgs(input, {
5486
5491
  );
5487
5492
  }
5488
5493
  const networkRetry = tool === "ffmpeg" ? ["-reconnect_on_network_error", "1"] : [];
5489
- return ["-tls_verify", "1", "-ca_file", caFile, ...RECONNECT_ARGS, ...networkRetry];
5494
+ const nestedOpensStayOnHttps = resolveRestrictPageNetwork() ? ["-protocol_whitelist", "https,tls,tcp"] : [];
5495
+ return [
5496
+ "-tls_verify",
5497
+ "1",
5498
+ "-ca_file",
5499
+ caFile,
5500
+ ...RECONNECT_ARGS,
5501
+ ...networkRetry,
5502
+ ...nestedOpensStayOnHttps
5503
+ ];
5490
5504
  }
5491
5505
  function redactUrlQueriesInError(error) {
5492
5506
  if (!(error instanceof Error)) return error;
@@ -5543,8 +5557,8 @@ var ManagedChildProcess = class {
5543
5557
  this.options = options;
5544
5558
  this.now = options.now ?? Date.now;
5545
5559
  this.startedAtMs = this.now();
5546
- this.outcomePromise = new Promise((resolve2) => {
5547
- this.resolveOutcome = resolve2;
5560
+ this.outcomePromise = new Promise((resolve3) => {
5561
+ this.resolveOutcome = resolve3;
5548
5562
  });
5549
5563
  child.stderr?.on("data", this.onStderr);
5550
5564
  child.once("spawn", this.onSpawn);
@@ -6033,7 +6047,7 @@ function readProbeJson(filePath, signal) {
6033
6047
  }
6034
6048
  var runtimeFfprobeMajor;
6035
6049
  function ffprobeMajor() {
6036
- runtimeFfprobeMajor ??= new Promise((resolve2) => {
6050
+ runtimeFfprobeMajor ??= new Promise((resolve3) => {
6037
6051
  let out = "";
6038
6052
  const binary = getFfprobeBinary();
6039
6053
  const proc = spawn3(binary, ["-version"], {
@@ -6041,8 +6055,8 @@ function ffprobeMajor() {
6041
6055
  windowsHide: true
6042
6056
  });
6043
6057
  proc.stdout.on("data", (chunk) => out += String(chunk));
6044
- proc.on("error", () => resolve2(void 0));
6045
- proc.on("close", () => resolve2(Number(/version n?(\d+)/.exec(out)?.[1]) || void 0));
6058
+ proc.on("error", () => resolve3(void 0));
6059
+ proc.on("close", () => resolve3(Number(/version n?(\d+)/.exec(out)?.[1]) || void 0));
6046
6060
  });
6047
6061
  return runtimeFfprobeMajor;
6048
6062
  }
@@ -7323,9 +7337,9 @@ async function decodeDynamicCssBackgroundImages(page) {
7323
7337
  const image = new Image();
7324
7338
  image.src = url;
7325
7339
  let timer;
7326
- const expired = new Promise((resolve2) => {
7340
+ const expired = new Promise((resolve3) => {
7327
7341
  timer = (window.__HF_VIRTUAL_TIME__?.originalSetTimeout ?? setTimeout)(
7328
- () => resolve2("late"),
7342
+ () => resolve3("late"),
7329
7343
  limitMs
7330
7344
  );
7331
7345
  });
@@ -7446,7 +7460,7 @@ function formatHttpErrorDiagnostic(input) {
7446
7460
  return `[Browser:HTTP${input.status}] ${input.method} ${sanitizeDiagnosticUrl(input.url)} resource=${input.resourceType}${statusText}`;
7447
7461
  }
7448
7462
  var LOCKED_WARMUP_TICKS = 60;
7449
- var realSleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
7463
+ var realSleep = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
7450
7464
  function warmupFrameTimeTicks(state, intervalMs) {
7451
7465
  return state.ticks * intervalMs;
7452
7466
  }
@@ -7534,10 +7548,10 @@ async function waitForCloseWithTimeout(promise) {
7534
7548
  () => void 0,
7535
7549
  () => void 0
7536
7550
  ),
7537
- new Promise((resolve2) => {
7551
+ new Promise((resolve3) => {
7538
7552
  timer = setTimeout(() => {
7539
7553
  timedOut = true;
7540
- resolve2();
7554
+ resolve3();
7541
7555
  }, CAPTURE_SESSION_CLOSE_TIMEOUT_MS);
7542
7556
  })
7543
7557
  ]);
@@ -8154,7 +8168,7 @@ async function pollHfReady(page, timeoutMs, intervalMs = 100) {
8154
8168
  }
8155
8169
  }
8156
8170
  }
8157
- await new Promise((resolve2) => setTimeout(resolve2, intervalMs));
8171
+ await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
8158
8172
  }
8159
8173
  const diag = await evaluateHfDiagnostic(page);
8160
8174
  if (diag.hasSeek && diag.duration === 0) {
@@ -8342,7 +8356,7 @@ async function pollSubCompositionTimelines(page, timeoutMs, {
8342
8356
  );
8343
8357
  break;
8344
8358
  }
8345
- await new Promise((resolve2) => setTimeout(resolve2, intervalMs));
8359
+ await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
8346
8360
  }
8347
8361
  const pendingIds = ready && knownUnregisteredIds.length === 0 ? [] : await listUnregisteredTimelineIds(page);
8348
8362
  if (ready && pendingIds.length > 0 && (getScriptLoadFailures?.() ?? []).length > 0) {
@@ -8386,7 +8400,7 @@ async function pollVideosReady(page, skipIds, timeoutMs, intervalMs = 100) {
8386
8400
  const deadline = Date.now() + timeoutMs;
8387
8401
  while (Date.now() < deadline) {
8388
8402
  if (await check()) return true;
8389
- await new Promise((resolve2) => setTimeout(resolve2, intervalMs));
8403
+ await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
8390
8404
  }
8391
8405
  return check();
8392
8406
  }
@@ -8409,7 +8423,7 @@ async function pollImagesReady(page, timeoutMs, intervalMs = 100) {
8409
8423
  const deadline = Date.now() + timeoutMs;
8410
8424
  while (Date.now() < deadline) {
8411
8425
  if (await check()) return true;
8412
- await new Promise((resolve2) => setTimeout(resolve2, intervalMs));
8426
+ await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
8413
8427
  }
8414
8428
  return check();
8415
8429
  }
@@ -8553,7 +8567,7 @@ async function waitForShownLateImages(session, frameIndex) {
8553
8567
  throw stopped;
8554
8568
  }
8555
8569
  if (waiting.length === 0) return;
8556
- await new Promise((resolve2) => setTimeout(resolve2, LATE_IMAGE_POLL_MS));
8570
+ await new Promise((resolve3) => setTimeout(resolve3, LATE_IMAGE_POLL_MS));
8557
8571
  }
8558
8572
  }
8559
8573
  function recordBackgroundDecodeTimeouts(session, urls) {
@@ -8690,7 +8704,7 @@ async function waitForOptionalTailwindReady(page, timeoutMs) {
8690
8704
  page.evaluate(
8691
8705
  `Promise.resolve(window.__tailwindReady).then(() => true, () => false)`
8692
8706
  ),
8693
- new Promise((resolve2) => setTimeout(() => resolve2(false), timeoutMs))
8707
+ new Promise((resolve3) => setTimeout(() => resolve3(false), timeoutMs))
8694
8708
  ]);
8695
8709
  if (!ready) {
8696
8710
  throw new Error(
@@ -9651,7 +9665,7 @@ function claimStaticDedupCheck(session) {
9651
9665
  const pending = checks.get(key);
9652
9666
  if (pending) return { kind: "reuse", check: pending };
9653
9667
  let settle;
9654
- checks.set(key, new Promise((resolve2) => settle = resolve2));
9668
+ checks.set(key, new Promise((resolve3) => settle = resolve3));
9655
9669
  return { kind: "verify", settle };
9656
9670
  }
9657
9671
  function shareableStaticFrames(verdict) {
@@ -11826,12 +11840,12 @@ function createFrameReorderBuffer(startFrame, endFrame) {
11826
11840
  let cursor = startFrame;
11827
11841
  let aborted = null;
11828
11842
  const pending = /* @__PURE__ */ new Map();
11829
- const enqueueAt = (frame, resolve2, reject) => {
11843
+ const enqueueAt = (frame, resolve3, reject) => {
11830
11844
  const list = pending.get(frame);
11831
11845
  if (list === void 0) {
11832
- pending.set(frame, [{ resolve: resolve2, reject }]);
11846
+ pending.set(frame, [{ resolve: resolve3, reject }]);
11833
11847
  } else {
11834
- list.push({ resolve: resolve2, reject });
11848
+ list.push({ resolve: resolve3, reject });
11835
11849
  }
11836
11850
  };
11837
11851
  const flushAt = (frame) => {
@@ -11840,31 +11854,31 @@ function createFrameReorderBuffer(startFrame, endFrame) {
11840
11854
  pending.delete(frame);
11841
11855
  for (const waiter of list) waiter.resolve();
11842
11856
  };
11843
- const waitForFrame = (frame) => new Promise((resolve2, reject) => {
11857
+ const waitForFrame = (frame) => new Promise((resolve3, reject) => {
11844
11858
  if (aborted) {
11845
11859
  reject(aborted);
11846
11860
  return;
11847
11861
  }
11848
11862
  if (frame === cursor) {
11849
- resolve2();
11863
+ resolve3();
11850
11864
  return;
11851
11865
  }
11852
- enqueueAt(frame, resolve2, reject);
11866
+ enqueueAt(frame, resolve3, reject);
11853
11867
  });
11854
11868
  const advanceTo = (frame) => {
11855
11869
  cursor = frame;
11856
11870
  flushAt(frame);
11857
11871
  };
11858
- const waitForAllDone = () => new Promise((resolve2, reject) => {
11872
+ const waitForAllDone = () => new Promise((resolve3, reject) => {
11859
11873
  if (aborted) {
11860
11874
  reject(aborted);
11861
11875
  return;
11862
11876
  }
11863
11877
  if (cursor >= endFrame) {
11864
- resolve2();
11878
+ resolve3();
11865
11879
  return;
11866
11880
  }
11867
- enqueueAt(endFrame, resolve2, reject);
11881
+ enqueueAt(endFrame, resolve3, reject);
11868
11882
  });
11869
11883
  const abort = (err) => {
11870
11884
  if (aborted) return;
@@ -12194,8 +12208,8 @@ function spawnFfmpegStream(outputPath, args, {
12194
12208
  }
12195
12209
  const stdin = ffmpeg.stdin;
12196
12210
  if (stdin && !stdin.destroyed) {
12197
- await new Promise((resolve2) => {
12198
- stdin.end(() => resolve2());
12211
+ await new Promise((resolve3) => {
12212
+ stdin.end(() => resolve3());
12199
12213
  });
12200
12214
  }
12201
12215
  const outcome = await exitPromise;
@@ -12376,20 +12390,20 @@ function isMemberGroupHidden(groupsById, el) {
12376
12390
 
12377
12391
  // ../engine/src/services/videoFrameExtractor.ts
12378
12392
  import { copyFileSync as copyFileSync2, existsSync as existsSync10, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
12379
- import { basename as basename2, isAbsolute, join as join13, normalize, relative, win32 } from "path";
12393
+ import { basename as basename2, isAbsolute as isAbsolute2, join as join13, normalize, relative as relative2, win32 } from "path";
12380
12394
 
12381
12395
  // ../engine/src/utils/concurrencyLimit.ts
12382
12396
  function createConcurrencyLimit(limit) {
12383
12397
  let active = 0;
12384
12398
  const waiting = [];
12385
- const waitForSlot = (signal) => new Promise((resolve2) => {
12399
+ const waitForSlot = (signal) => new Promise((resolve3) => {
12386
12400
  const granted = () => {
12387
12401
  signal?.removeEventListener("abort", aborted);
12388
- resolve2(true);
12402
+ resolve3(true);
12389
12403
  };
12390
12404
  const aborted = () => {
12391
12405
  waiting.splice(waiting.indexOf(granted), 1);
12392
- resolve2(false);
12406
+ resolve3(false);
12393
12407
  };
12394
12408
  waiting.push(granted);
12395
12409
  signal?.addEventListener("abort", aborted, { once: true });
@@ -12486,11 +12500,167 @@ import {
12486
12500
  statSync as statSync5,
12487
12501
  unlinkSync
12488
12502
  } from "fs";
12489
- import { createHash, randomUUID as randomUUID2 } from "crypto";
12503
+ import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
12490
12504
  import dns from "dns";
12491
- import { dirname as dirname5, extname as extname2, join as join11 } from "path";
12505
+ import { dirname as dirname6, extname as extname2, join as join11 } from "path";
12492
12506
  import { Readable, Transform } from "stream";
12493
12507
  import { pipeline } from "stream/promises";
12508
+
12509
+ // ../engine/src/utils/notMediaPayload.ts
12510
+ import { createHash } from "crypto";
12511
+ import { open as openFile } from "fs/promises";
12512
+ import { dirname as dirname5, isAbsolute, relative, resolve as resolve2 } from "path";
12513
+ var NOT_MEDIA_PAYLOAD = "NOT_MEDIA_PAYLOAD";
12514
+ var MAX_LISTED_FINGERPRINTS = 8;
12515
+ var NotMediaPayloadError = class extends Error {
12516
+ code = NOT_MEDIA_PAYLOAD;
12517
+ owner = "user";
12518
+ retryable = false;
12519
+ elementFingerprints;
12520
+ constructor(elementFingerprints) {
12521
+ const listed2 = elementFingerprints.slice(0, MAX_LISTED_FINGERPRINTS).join(",");
12522
+ const elided = elementFingerprints.length - MAX_LISTED_FINGERPRINTS;
12523
+ super(
12524
+ `${elementFingerprints.length} media source(s) are text documents (HTML/XML/JSON, or a playlist naming files outside its own folder), not media containers [elements=${listed2}${elided > 0 ? `,+${elided}` : ""}]. Either an unresolved nested-composition preview URL was authored as a media src, or the source answered with an error page or API error body carrying a success status.`
12525
+ );
12526
+ this.name = "NotMediaPayloadError";
12527
+ this.elementFingerprints = elementFingerprints;
12528
+ }
12529
+ };
12530
+ function fingerprintElementId(elementId) {
12531
+ return createHash("sha256").update(elementId).digest("hex").slice(0, 16);
12532
+ }
12533
+ var SNIFF_BYTES = 512;
12534
+ var DOCUMENT_OPENING_BYTES = /* @__PURE__ */ new Set([60, 123, 91]);
12535
+ var SKIPPABLE_LEADING_BYTES = /* @__PURE__ */ new Set([0, 9, 10, 11, 12, 13, 32]);
12536
+ var BYTE_ORDER_MARKS = [
12537
+ Buffer.from([239, 187, 191]),
12538
+ // UTF-8
12539
+ Buffer.from([255, 254]),
12540
+ // UTF-16 LE
12541
+ Buffer.from([254, 255])
12542
+ // UTF-16 BE
12543
+ ];
12544
+ function byteOrderMarkLength(head) {
12545
+ for (const mark of BYTE_ORDER_MARKS) {
12546
+ if (head.length >= mark.length && head.subarray(0, mark.length).equals(mark)) {
12547
+ return mark.length;
12548
+ }
12549
+ }
12550
+ return 0;
12551
+ }
12552
+ async function readHead(filePath, bytes = SNIFF_BYTES) {
12553
+ const fh = await openFile(filePath, "r");
12554
+ try {
12555
+ const buf = Buffer.alloc(bytes);
12556
+ let filled = 0;
12557
+ while (filled < buf.length) {
12558
+ const { bytesRead } = await fh.read(buf, filled, buf.length - filled, filled);
12559
+ if (bytesRead === 0) break;
12560
+ filled += bytesRead;
12561
+ }
12562
+ return buf.subarray(0, filled);
12563
+ } finally {
12564
+ await fh.close().catch(() => {
12565
+ });
12566
+ }
12567
+ }
12568
+ function startsWithDocumentByte(head) {
12569
+ for (let index = byteOrderMarkLength(head); index < head.length; index++) {
12570
+ const byte = head[index];
12571
+ if (byte === void 0) break;
12572
+ if (SKIPPABLE_LEADING_BYTES.has(byte)) continue;
12573
+ return DOCUMENT_OPENING_BYTES.has(byte);
12574
+ }
12575
+ return false;
12576
+ }
12577
+ async function isNotMediaPayload(filePath) {
12578
+ try {
12579
+ return startsWithDocumentByte(await readHead(filePath)) || await playlistLeavesItsFolder(filePath);
12580
+ } catch {
12581
+ return false;
12582
+ }
12583
+ }
12584
+ async function assertMediaPayload(filePath, elementId) {
12585
+ if (await isNotMediaPayload(filePath)) {
12586
+ throw new NotMediaPayloadError([fingerprintElementId(elementId)]);
12587
+ }
12588
+ }
12589
+ var MAX_PLAYLIST_BYTES = 8 * 1024 * 1024;
12590
+ var MAX_PLAYLIST_DEPTH = 8;
12591
+ var HTTP_URL = /^https?:\/\//i;
12592
+ var OTHER_SCHEME = /^[a-z][a-z0-9+.-]+:/i;
12593
+ var DRIVE_PATH = /^[a-z]:[\\/]/i;
12594
+ function playlistEntries(text) {
12595
+ const body = text.replace(/^\uFEFF/, "").trimStart();
12596
+ if (body.startsWith("#EXTM3U")) {
12597
+ return body.split(/\r?\n/).flatMap((raw) => {
12598
+ const line = raw.trim();
12599
+ const uris = [...line.matchAll(/URI="([^"]*)"/gi)].map((match) => match[1]);
12600
+ return line && !line.startsWith("#") ? [line, ...uris] : uris;
12601
+ });
12602
+ }
12603
+ if (/^ffconcat\s+version/i.test(body)) {
12604
+ return body.split(/\r?\n/).flatMap((raw) => {
12605
+ const match = /^\s*file\s+(.*)$/.exec(raw);
12606
+ if (!match) return [];
12607
+ const value = match[1].trim();
12608
+ return [value.startsWith("'") ? value.slice(1, -1).replace(/\\(.)/g, "$1") : value];
12609
+ });
12610
+ }
12611
+ return void 0;
12612
+ }
12613
+ function entryLeavesFolder(entry, base, folder) {
12614
+ if (HTTP_URL.test(entry)) return false;
12615
+ if (OTHER_SCHEME.test(entry) && !DRIVE_PATH.test(entry)) return true;
12616
+ return [entry, safeDecode(entry)].some((path) => {
12617
+ if (isAbsolute(path) || DRIVE_PATH.test(path) || path.startsWith("\\")) return true;
12618
+ const inside = relative(folder, resolve2(base, path));
12619
+ return inside === ".." || inside.startsWith("../") || inside.startsWith("..\\") || isAbsolute(inside);
12620
+ });
12621
+ }
12622
+ function safeDecode(value) {
12623
+ try {
12624
+ return decodeURIComponent(value);
12625
+ } catch {
12626
+ return value;
12627
+ }
12628
+ }
12629
+ async function playlistLeavesItsFolder(filePath, placedAt = filePath) {
12630
+ const placed = resolve2(placedAt);
12631
+ return listLeaves(resolve2(filePath), placed, dirname5(placed), /* @__PURE__ */ new Set(), 0);
12632
+ }
12633
+ async function startsAsPlaylist(path) {
12634
+ const head = (await readHead(path)).toString("utf8").replace(/^\uFEFF/, "").trimStart();
12635
+ return head.startsWith("#EXTM3U") || /^ffconcat\s+version/i.test(head);
12636
+ }
12637
+ async function listLeaves(readPath, path, folder, seen, depth) {
12638
+ try {
12639
+ if (!await startsAsPlaylist(readPath)) return false;
12640
+ if (depth >= MAX_PLAYLIST_DEPTH) return true;
12641
+ if (seen.has(path)) return false;
12642
+ seen.add(path);
12643
+ const body = await readHead(readPath, MAX_PLAYLIST_BYTES + 1);
12644
+ if (body.length > MAX_PLAYLIST_BYTES) return true;
12645
+ for (const entry of playlistEntries(body.toString("utf8")) ?? []) {
12646
+ if (await entryLeaves(entry, dirname5(path), folder, seen, depth)) return true;
12647
+ }
12648
+ return false;
12649
+ } catch {
12650
+ return false;
12651
+ }
12652
+ }
12653
+ async function entryLeaves(entry, base, folder, seen, depth) {
12654
+ if (entryLeavesFolder(entry, base, folder)) return true;
12655
+ if (HTTP_URL.test(entry)) return false;
12656
+ for (const local of /* @__PURE__ */ new Set([entry, safeDecode(entry)])) {
12657
+ const nested = resolve2(base, local);
12658
+ if (await listLeaves(nested, nested, folder, seen, depth + 1)) return true;
12659
+ }
12660
+ return false;
12661
+ }
12662
+
12663
+ // ../engine/src/utils/urlDownloader.ts
12494
12664
  var inFlightDownloads = /* @__PURE__ */ new Map();
12495
12665
  var signalScopes = /* @__PURE__ */ new WeakMap();
12496
12666
  var nextSignalScope = 1;
@@ -12514,7 +12684,7 @@ function safeDownloadUrlIdentity(url) {
12514
12684
  } catch {
12515
12685
  }
12516
12686
  return {
12517
- urlFingerprint: createHash("sha256").update(canonical).digest("hex"),
12687
+ urlFingerprint: createHash2("sha256").update(canonical).digest("hex"),
12518
12688
  host
12519
12689
  };
12520
12690
  }
@@ -12599,7 +12769,7 @@ function assertPublicHttpsUrl(url) {
12599
12769
  }
12600
12770
  function getFilenameFromUrl(url, validationScope) {
12601
12771
  const physicalIdentity = validationScope === "" ? url : `${url}\0${validationScope}`;
12602
- const hash = createHash("md5").update(physicalIdentity).digest("hex").slice(0, 12);
12772
+ const hash = createHash2("md5").update(physicalIdentity).digest("hex").slice(0, 12);
12603
12773
  const urlObj = new URL(url);
12604
12774
  const ext = extname2(urlObj.pathname) || ".mp4";
12605
12775
  return `download_${hash}${ext}`;
@@ -12650,10 +12820,10 @@ async function waitForCacheLock(signal) {
12650
12820
  if (signal?.aborted) {
12651
12821
  throw new UrlDownloadError("cancelled", false, "Download cancelled");
12652
12822
  }
12653
- await new Promise((resolve2, reject) => {
12823
+ await new Promise((resolve3, reject) => {
12654
12824
  const timeout = setTimeout(() => {
12655
12825
  signal?.removeEventListener("abort", onAbort);
12656
- resolve2();
12826
+ resolve3();
12657
12827
  }, CACHE_LOCK_POLL_MS);
12658
12828
  const onAbort = () => {
12659
12829
  clearTimeout(timeout);
@@ -12836,7 +13006,7 @@ async function fetchWithValidatedRedirects(initialUrl, controller) {
12836
13006
  currentUrl = resolveRedirectUrl(response, currentUrl, redirects);
12837
13007
  }
12838
13008
  }
12839
- async function fetchPublicHttpsText(url, options) {
13009
+ async function fetchPublicHttpsBytes(url, options) {
12840
13010
  const timeoutMs = options.timeoutMs ?? 15e3;
12841
13011
  if (!Number.isSafeInteger(options.maxBytes) || options.maxBytes <= 0) {
12842
13012
  throw new RangeError("maxBytes must be a positive safe integer");
@@ -12863,7 +13033,7 @@ async function fetchPublicHttpsText(url, options) {
12863
13033
  await cancelResponseBody(response);
12864
13034
  throw classifyHttpFailure(response.status);
12865
13035
  }
12866
- if (!response.body) return "";
13036
+ if (!response.body) return new Uint8Array();
12867
13037
  let declaredLength;
12868
13038
  try {
12869
13039
  declaredLength = parseDeclaredLength(response);
@@ -12910,7 +13080,7 @@ async function fetchPublicHttpsText(url, options) {
12910
13080
  { expectedBytes, receivedBytes }
12911
13081
  );
12912
13082
  }
12913
- return new TextDecoder().decode(Buffer.concat(chunks.map((chunk) => Buffer.from(chunk))));
13083
+ return Buffer.concat(chunks.map((chunk) => Buffer.from(chunk)));
12914
13084
  } catch (error) {
12915
13085
  if (callerAborted) {
12916
13086
  throw new UrlDownloadError("cancelled", false, "Text fetch cancelled");
@@ -12925,6 +13095,9 @@ async function fetchPublicHttpsText(url, options) {
12925
13095
  controller.abort();
12926
13096
  }
12927
13097
  }
13098
+ async function fetchPublicHttpsText(url, options) {
13099
+ return new TextDecoder().decode(await fetchPublicHttpsBytes(url, options));
13100
+ }
12928
13101
  function parseDeclaredLength(response) {
12929
13102
  const raw = response.headers.get("content-length");
12930
13103
  if (raw === null) return void 0;
@@ -13073,8 +13246,8 @@ async function fetchToPartial(url, partialPath, controller, options, onSizedBody
13073
13246
  const contentEncoding = response.headers.get("content-encoding")?.trim().toLowerCase();
13074
13247
  const expectedBytes = !contentEncoding || contentEncoding === "identity" ? declaredLength : void 0;
13075
13248
  let receivedBytes = 0;
13076
- const sha256 = createHash("sha256");
13077
- const md5 = createHash("md5");
13249
+ const sha256 = createHash2("sha256");
13250
+ const md5 = createHash2("md5");
13078
13251
  const prefixChunks = [];
13079
13252
  let prefixBytes = 0;
13080
13253
  const inspector = new Transform({
@@ -13153,7 +13326,7 @@ async function fetchToPartial(url, partialPath, controller, options, onSizedBody
13153
13326
  expectedBytes,
13154
13327
  receivedBytes,
13155
13328
  rangeDisposition,
13156
- etagFingerprint: etag ? createHash("sha256").update(etag).digest("hex") : void 0,
13329
+ etagFingerprint: etag ? createHash2("sha256").update(etag).digest("hex") : void 0,
13157
13330
  etagWeak: etag ? /^W\//i.test(etag) : void 0,
13158
13331
  localSize,
13159
13332
  localSha256
@@ -13212,7 +13385,7 @@ function emitDownloadTelemetry(options, event) {
13212
13385
  }
13213
13386
  }
13214
13387
  async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, signal) {
13215
- const attemptDir = createStagingDir(dirname5(localPath), ".hf-download-");
13388
+ const attemptDir = createStagingDir(dirname6(localPath), ".hf-download-");
13216
13389
  const partialPath = join11(attemptDir, "payload");
13217
13390
  const controller = new AbortController();
13218
13391
  let timedOut = false;
@@ -13242,6 +13415,15 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
13242
13415
  throw new UrlDownloadError("cancelled", false, "Download cancelled");
13243
13416
  }
13244
13417
  const integrity = await fetchToPartial(url, partialPath, controller, options, extendTimeout);
13418
+ if (await playlistLeavesItsFolder(partialPath, localPath)) {
13419
+ throw new UrlDownloadError(
13420
+ "invalid_payload",
13421
+ false,
13422
+ "Download is a playlist naming files outside its folder",
13423
+ integrity.status,
13424
+ integrity
13425
+ );
13426
+ }
13245
13427
  let outcome = await syncAndPublishPartial(partialPath, localPath, timeoutMs, signal);
13246
13428
  let publishedIntegrity = integrity;
13247
13429
  if (outcome === "race_reused") {
@@ -13365,7 +13547,7 @@ async function downloadWithRetry(url, localPath, timeoutMs, signal, onTransientR
13365
13547
  }
13366
13548
  }
13367
13549
  async function inspectExistingFile(path) {
13368
- const sha256 = createHash("sha256");
13550
+ const sha256 = createHash2("sha256");
13369
13551
  const prefixChunks = [];
13370
13552
  let prefixBytes = 0;
13371
13553
  let localSize = 0;
@@ -13529,7 +13711,7 @@ function unwrapTemplate(html) {
13529
13711
  }
13530
13712
 
13531
13713
  // ../engine/src/utils/mediaPathSegment.ts
13532
- import { createHash as createHash2 } from "crypto";
13714
+ import { createHash as createHash3 } from "crypto";
13533
13715
  var PLAIN_SEGMENT = /^(?!\.{1,2}$)[^/\\:]+$/;
13534
13716
  var GENERATED_SUFFIX = /~[0-9a-f]{12}$/;
13535
13717
  var READABLE_MAX_BYTES = 64;
@@ -13537,7 +13719,7 @@ function mediaIdPathSegment(id) {
13537
13719
  if (PLAIN_SEGMENT.test(id) && !GENERATED_SUFFIX.test(id) && survivesCaseAndUnicodeFoldingOnMacAndWindowsDisks(id))
13538
13720
  return id;
13539
13721
  const readable = truncateUtf8(id.replace(/[/\\:]/g, "_"), READABLE_MAX_BYTES);
13540
- const digest = createHash2("sha256").update(id).digest("hex").slice(0, 12);
13722
+ const digest = createHash3("sha256").update(id).digest("hex").slice(0, 12);
13541
13723
  return `${readable}~${digest}`;
13542
13724
  }
13543
13725
  function survivesCaseAndUnicodeFoldingOnMacAndWindowsDisks(id) {
@@ -13555,7 +13737,7 @@ function truncateUtf8(text, maxBytes) {
13555
13737
  }
13556
13738
 
13557
13739
  // ../engine/src/services/extractionCache.ts
13558
- import { createHash as createHash3, randomUUID as randomUUID3 } from "crypto";
13740
+ import { createHash as createHash4, randomUUID as randomUUID3 } from "crypto";
13559
13741
  import {
13560
13742
  createReadStream as createReadStream3,
13561
13743
  existsSync as existsSync9,
@@ -13574,7 +13756,7 @@ var SCHEMA_PREFIX = "hfcache-v10-";
13574
13756
  var KEY_HEX_CHARS = 16;
13575
13757
  async function readContentSha256(path, signal) {
13576
13758
  try {
13577
- const hash = createHash3("sha256");
13759
+ const hash = createHash4("sha256");
13578
13760
  for await (const chunk of createReadStream3(path, { signal })) hash.update(chunk);
13579
13761
  return hash.digest("hex");
13580
13762
  } catch {
@@ -13604,7 +13786,7 @@ function canonicalKeyBlob(input) {
13604
13786
  return JSON.stringify(blob);
13605
13787
  }
13606
13788
  function computeCacheKey(input) {
13607
- return createHash3("sha256").update(canonicalKeyBlob(input)).digest("hex");
13789
+ return createHash4("sha256").update(canonicalKeyBlob(input)).digest("hex");
13608
13790
  }
13609
13791
  function cacheEntryDirName(keyHash) {
13610
13792
  return SCHEMA_PREFIX + keyHash.slice(0, KEY_HEX_CHARS);
@@ -13905,7 +14087,7 @@ function videoExtractionSourceLabel(src, baseDir) {
13905
14087
  }
13906
14088
  }
13907
14089
  const path = src.split(/[?#]/)[0];
13908
- const lib = WINDOWS_ABSOLUTE.test(path) ? win32 : { isAbsolute, relative, basename: basename2, normalize };
14090
+ const lib = WINDOWS_ABSOLUTE.test(path) ? win32 : { isAbsolute: isAbsolute2, relative: relative2, basename: basename2, normalize };
13909
14091
  const relativePath = lib.isAbsolute(path) ? lib.relative(baseDir, path) : lib.normalize(path);
13910
14092
  const label = relativePath.startsWith("..") || lib.isAbsolute(relativePath) ? lib.basename(path) : relativePath;
13911
14093
  return label.replace(/\\/g, "/");
@@ -16400,87 +16582,7 @@ async function queryElementStacking(page, nativeHdrIds) {
16400
16582
 
16401
16583
  // ../engine/src/services/audioMixer.ts
16402
16584
  import { closeSync as closeSync4, existsSync as existsSync12, mkdirSync as mkdirSync7, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
16403
- import { join as join17, dirname as dirname8, isAbsolute as isAbsolute2, relative as relative2 } from "path";
16404
-
16405
- // ../engine/src/utils/notMediaPayload.ts
16406
- import { createHash as createHash4 } from "crypto";
16407
- import { open as openFile } from "fs/promises";
16408
- var NOT_MEDIA_PAYLOAD = "NOT_MEDIA_PAYLOAD";
16409
- var MAX_LISTED_FINGERPRINTS = 8;
16410
- var NotMediaPayloadError = class extends Error {
16411
- code = NOT_MEDIA_PAYLOAD;
16412
- owner = "user";
16413
- retryable = false;
16414
- elementFingerprints;
16415
- constructor(elementFingerprints) {
16416
- const listed2 = elementFingerprints.slice(0, MAX_LISTED_FINGERPRINTS).join(",");
16417
- const elided = elementFingerprints.length - MAX_LISTED_FINGERPRINTS;
16418
- super(
16419
- `${elementFingerprints.length} media source(s) are text documents (HTML/XML/JSON), not media containers [elements=${listed2}${elided > 0 ? `,+${elided}` : ""}]. Either an unresolved nested-composition preview URL was authored as a media src, or the source answered with an error page or API error body carrying a success status.`
16420
- );
16421
- this.name = "NotMediaPayloadError";
16422
- this.elementFingerprints = elementFingerprints;
16423
- }
16424
- };
16425
- function fingerprintElementId(elementId) {
16426
- return createHash4("sha256").update(elementId).digest("hex").slice(0, 16);
16427
- }
16428
- var SNIFF_BYTES = 512;
16429
- var DOCUMENT_OPENING_BYTES = /* @__PURE__ */ new Set([60, 123, 91]);
16430
- var SKIPPABLE_LEADING_BYTES = /* @__PURE__ */ new Set([0, 9, 10, 11, 12, 13, 32]);
16431
- var BYTE_ORDER_MARKS = [
16432
- Buffer.from([239, 187, 191]),
16433
- // UTF-8
16434
- Buffer.from([255, 254]),
16435
- // UTF-16 LE
16436
- Buffer.from([254, 255])
16437
- // UTF-16 BE
16438
- ];
16439
- function byteOrderMarkLength(head) {
16440
- for (const mark of BYTE_ORDER_MARKS) {
16441
- if (head.length >= mark.length && head.subarray(0, mark.length).equals(mark)) {
16442
- return mark.length;
16443
- }
16444
- }
16445
- return 0;
16446
- }
16447
- async function readHead(filePath) {
16448
- const fh = await openFile(filePath, "r");
16449
- try {
16450
- const buf = Buffer.alloc(SNIFF_BYTES);
16451
- let filled = 0;
16452
- while (filled < buf.length) {
16453
- const { bytesRead } = await fh.read(buf, filled, buf.length - filled, filled);
16454
- if (bytesRead === 0) break;
16455
- filled += bytesRead;
16456
- }
16457
- return buf.subarray(0, filled);
16458
- } finally {
16459
- await fh.close().catch(() => {
16460
- });
16461
- }
16462
- }
16463
- function startsWithDocumentByte(head) {
16464
- for (let index = byteOrderMarkLength(head); index < head.length; index++) {
16465
- const byte = head[index];
16466
- if (byte === void 0) break;
16467
- if (SKIPPABLE_LEADING_BYTES.has(byte)) continue;
16468
- return DOCUMENT_OPENING_BYTES.has(byte);
16469
- }
16470
- return false;
16471
- }
16472
- async function isNotMediaPayload(filePath) {
16473
- try {
16474
- return startsWithDocumentByte(await readHead(filePath));
16475
- } catch {
16476
- return false;
16477
- }
16478
- }
16479
- async function assertMediaPayload(filePath, elementId) {
16480
- if (await isNotMediaPayload(filePath)) {
16481
- throw new NotMediaPayloadError([fingerprintElementId(elementId)]);
16482
- }
16483
- }
16585
+ import { join as join17, dirname as dirname9, isAbsolute as isAbsolute3, relative as relative3 } from "path";
16484
16586
 
16485
16587
  // ../core/dist/audioFade.js
16486
16588
  var HF_AUDIO_FADE_IN_ATTR = "data-fade-in";
@@ -16517,7 +16619,7 @@ function clampFadesToDuration(fades, duration) {
16517
16619
  // ../engine/src/services/aacEncode.ts
16518
16620
  import { execFile as execFile3 } from "child_process";
16519
16621
  import { readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
16520
- import { dirname as dirname6, join as join14 } from "path";
16622
+ import { dirname as dirname7, join as join14 } from "path";
16521
16623
  var SAMPLE_RATE = 48e3;
16522
16624
  var FRAME_SAMPLES = 1024;
16523
16625
  var MIN_SEGMENT_SECONDS = 60;
@@ -16555,13 +16657,13 @@ var settsDurationSupport = /* @__PURE__ */ new Map();
16555
16657
  function supportsSettsDuration(binary = getFfmpegBinary()) {
16556
16658
  let supported = settsDurationSupport.get(binary);
16557
16659
  if (!supported) {
16558
- supported = new Promise((resolve2) => {
16660
+ supported = new Promise((resolve3) => {
16559
16661
  execFile3(
16560
16662
  binary,
16561
16663
  ["-hide_banner", "-h", "bsf=setts"],
16562
16664
  { windowsHide: true },
16563
16665
  (error, stdout) => {
16564
- resolve2(error !== null || stdout.includes("duration"));
16666
+ resolve3(error !== null || stdout.includes("duration"));
16565
16667
  }
16566
16668
  );
16567
16669
  });
@@ -16585,7 +16687,7 @@ async function encodeAac(input, outputPath, totalDuration, {
16585
16687
  if (!await supportsSettsDuration()) {
16586
16688
  return encodeInOnePass(input, outputPath, { signal, timeout, filter });
16587
16689
  }
16588
- const dir = createStagingDir(dirname6(outputPath), ".aac-segments-");
16690
+ const dir = createStagingDir(dirname7(outputPath), ".aac-segments-");
16589
16691
  try {
16590
16692
  const segments = planSegments(totalDuration, count).map((segment, k) => ({
16591
16693
  ...segment,
@@ -16751,7 +16853,7 @@ function audioFailureDiagnostics(values) {
16751
16853
 
16752
16854
  // ../engine/src/services/audioVolumeEnvelope.ts
16753
16855
  import { readFileSync as readFileSync7, rmSync as rmSync6, writeFileSync as writeFileSync5 } from "fs";
16754
- import { dirname as dirname7, join as join15 } from "path";
16856
+ import { dirname as dirname8, join as join15 } from "path";
16755
16857
 
16756
16858
  // ../core/dist/runtime/mediaVolumeEnvelope.js
16757
16859
  function normaliseEnvelope(keyframes, trackStart, baseVolume) {
@@ -16877,7 +16979,7 @@ function applyVolumeEnvelopeToWav(wavPath, keyframes, trackStart, baseVolume) {
16877
16979
  const layout = parseWavLayout(buffer);
16878
16980
  if (!layout) return false;
16879
16981
  scaleSamples(buffer, layout, gainAt);
16880
- stagingDir = createStagingDir(dirname7(wavPath), ".hf-volume-");
16982
+ stagingDir = createStagingDir(dirname8(wavPath), ".hf-volume-");
16881
16983
  const tempPath = join15(stagingDir, "audio.wav");
16882
16984
  writeFileSync5(tempPath, buffer, { flag: "wx" });
16883
16985
  renameWithRetry(tempPath, wavPath);
@@ -17770,8 +17872,8 @@ function buildTrackInputFilter(track, index, volumeFilter, totalDuration, padToD
17770
17872
  return `${filters}${padToDuration ? `,apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}` : ""}[a${index}]`;
17771
17873
  }
17772
17874
  function missingSourceMessage(elementId, src, baseDir, resolvedPath) {
17773
- const relativePath = relative2(baseDir, resolvedPath).replace(/\\/g, "/");
17774
- const insideProject = !relativePath.startsWith("..") && !isAbsolute2(relativePath);
17875
+ const relativePath = relative3(baseDir, resolvedPath).replace(/\\/g, "/");
17876
+ const insideProject = !relativePath.startsWith("..") && !isAbsolute3(relativePath);
17775
17877
  const authored = /^([\\/]|[A-Za-z]:)/.test(src) ? "" : `src="${src}" `;
17776
17878
  return `Source not found for audio element ${elementId}: ${authored}resolved to ${insideProject ? relativePath : "a path outside the project"}`;
17777
17879
  }
@@ -17953,7 +18055,7 @@ var FAIL_ON_READ_ERROR_INSTEAD_OF_ENDING_THERE = ["-xerror"];
17953
18055
  var SIDECAR_WARM_UP_SECONDS = 1;
17954
18056
  async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config, audioSidecarUrl, options) {
17955
18057
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
17956
- const outputDir = dirname8(outputPath);
18058
+ const outputDir = dirname9(outputPath);
17957
18059
  if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
17958
18060
  const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
17959
18061
  const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
@@ -18099,7 +18201,7 @@ function isRemoteElement(element, baseDir, compiledDir, config) {
18099
18201
  }
18100
18202
  async function generateSilence(outputPath, duration, signal, config) {
18101
18203
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
18102
- const outputDir = dirname8(outputPath);
18204
+ const outputDir = dirname9(outputPath);
18103
18205
  if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18104
18206
  const args = [
18105
18207
  "-f",
@@ -18153,7 +18255,7 @@ async function mixAudioTracksFlat(tracks, outputPath, totalDuration, signal, con
18153
18255
  failures: result2.failure ? [result2.failure] : void 0
18154
18256
  };
18155
18257
  }
18156
- const outputDir = dirname8(outputPath);
18258
+ const outputDir = dirname9(outputPath);
18157
18259
  if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18158
18260
  const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
18159
18261
  const filterParts = [];
@@ -18262,7 +18364,7 @@ function groupNormalizeOptionUnsupported(stderr) {
18262
18364
  }
18263
18365
  async function mixGroupMembersFlat(memberTracks, outputPath, totalDuration, signal, config) {
18264
18366
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
18265
- const outputDir = dirname8(outputPath);
18367
+ const outputDir = dirname9(outputPath);
18266
18368
  if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
18267
18369
  const buildInputFilters = (ignoreKeyframes, padMembers) => memberTracks.map((track, i) => {
18268
18370
  const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
@@ -18395,8 +18497,8 @@ async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal,
18395
18497
  if (memberTracks.length <= MAX_MIX_INPUTS) {
18396
18498
  return mixGroupMembersFlat(memberTracks, outputPath, totalDuration, signal, config);
18397
18499
  }
18398
- mkdirSync7(dirname8(outputPath), { recursive: true });
18399
- const scratchDir = createStagingDir(dirname8(outputPath), ".mix-batches-");
18500
+ mkdirSync7(dirname9(outputPath), { recursive: true });
18501
+ const scratchDir = createStagingDir(dirname9(outputPath), ".mix-batches-");
18400
18502
  try {
18401
18503
  const summed = await sumInSlices(memberTracks, scratchDir, totalDuration, signal, config);
18402
18504
  if (!summed.success) return summed;
@@ -18410,8 +18512,8 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
18410
18512
  if (tracks.length <= MAX_MIX_INPUTS) {
18411
18513
  return mixAudioTracksFlat(tracks, outputPath, totalDuration, signal, config);
18412
18514
  }
18413
- mkdirSync7(dirname8(outputPath), { recursive: true });
18414
- const scratchDir = createStagingDir(dirname8(outputPath), ".mix-batches-");
18515
+ mkdirSync7(dirname9(outputPath), { recursive: true });
18516
+ const scratchDir = createStagingDir(dirname9(outputPath), ".mix-batches-");
18415
18517
  try {
18416
18518
  const summed = await sumInSlices(tracks, scratchDir, totalDuration, signal, config);
18417
18519
  if (!summed.success) {
@@ -19185,7 +19287,7 @@ function shouldVerifyWorkerGpu(workerId, config) {
19185
19287
  }
19186
19288
  function withParallelWorkerDeadline(promise, diagnostic, timeoutMs, signal) {
19187
19289
  if (signal?.aborted) return Promise.reject(new Error("Parallel worker cancelled"));
19188
- return new Promise((resolve2, reject) => {
19290
+ return new Promise((resolve3, reject) => {
19189
19291
  let timer;
19190
19292
  const cleanup = () => {
19191
19293
  if (timer) clearTimeout(timer);
@@ -19210,7 +19312,7 @@ function withParallelWorkerDeadline(promise, diagnostic, timeoutMs, signal) {
19210
19312
  promise.then(
19211
19313
  (value) => {
19212
19314
  cleanup();
19213
- resolve2(value);
19315
+ resolve3(value);
19214
19316
  },
19215
19317
  (error) => {
19216
19318
  cleanup();
@@ -19530,8 +19632,8 @@ function isPoolFatalWorkerFailure(failure, streaming) {
19530
19632
  function createFirstSessionGate(verify) {
19531
19633
  let fail;
19532
19634
  let pass;
19533
- const settled = new Promise((resolve2, reject) => {
19534
- pass = resolve2;
19635
+ const settled = new Promise((resolve3, reject) => {
19636
+ pass = resolve3;
19535
19637
  fail = reject;
19536
19638
  });
19537
19639
  settled.catch(() => {
@@ -19737,9 +19839,11 @@ function readRegularFile(filePath) {
19737
19839
  function resolveContainedPaths(projectDir, compiledDir, relativePath) {
19738
19840
  const projectPath = join20(projectDir, relativePath);
19739
19841
  if (!isWithinProjectRoot(projectDir, projectPath)) return null;
19842
+ if (isPrivateFileUnder(projectDir, projectPath, isVcsOrSecretPath)) return null;
19740
19843
  if (!compiledDir) return { projectPath, compiledPath: null };
19741
19844
  const compiledPath = join20(compiledDir, relativePath);
19742
19845
  if (!isWithinProjectRoot(compiledDir, compiledPath)) return null;
19846
+ if (isPrivateFileUnder(compiledDir, compiledPath, isVcsOrSecretPath)) return null;
19743
19847
  return { projectPath, compiledPath };
19744
19848
  }
19745
19849
  function createFileServer(options) {
@@ -19773,11 +19877,11 @@ function createFileServer(options) {
19773
19877
  headers: { "Content-Type": contentType }
19774
19878
  });
19775
19879
  });
19776
- return new Promise((resolve2) => {
19880
+ return new Promise((resolve3) => {
19777
19881
  const server = serve({ fetch: app.fetch, port, hostname }, (info) => {
19778
19882
  const actualPort = info.port;
19779
19883
  const url = `http://localhost:${actualPort}`;
19780
- resolve2({
19884
+ resolve3({
19781
19885
  url,
19782
19886
  port: actualPort,
19783
19887
  close: () => server.close()
@@ -20293,10 +20397,17 @@ export {
20293
20397
  HF_AUDIO_GROUP_TAG,
20294
20398
  HF_AUDIO_GROUP_ATTR,
20295
20399
  isSelfOrAncestorHidden,
20400
+ NOT_MEDIA_PAYLOAD,
20401
+ NotMediaPayloadError,
20402
+ fingerprintElementId,
20403
+ isNotMediaPayload,
20404
+ assertMediaPayload,
20405
+ playlistLeavesItsFolder,
20296
20406
  safeDownloadUrlIdentity,
20297
20407
  writeUrlDownloadTelemetry,
20298
20408
  assertPublicHttpsUrl,
20299
20409
  _setDownloadFetchForTests,
20410
+ fetchPublicHttpsBytes,
20300
20411
  fetchPublicHttpsText,
20301
20412
  downloadToTemp,
20302
20413
  isHttpUrl,
@@ -20339,11 +20450,6 @@ export {
20339
20450
  measureVideoShownBoxRanges,
20340
20451
  queryVideoElementBounds,
20341
20452
  queryElementStacking,
20342
- NOT_MEDIA_PAYLOAD,
20343
- NotMediaPayloadError,
20344
- fingerprintElementId,
20345
- isNotMediaPayload,
20346
- assertMediaPayload,
20347
20453
  aacSegmentCount,
20348
20454
  encodeAac,
20349
20455
  audioFailureDiagnostics,