hyperframes 0.9.49 → 0.9.51
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.
- package/dist/{add-PALFYN7F.js → add-SERNROOY.js} +8 -8
- package/dist/{agentPromptGenerator-W7YECUWC.js → agentPromptGenerator-GVWX5P55.js} +13 -14
- package/dist/{animatedGifPrep-RGTZSKE4.js → animatedGifPrep-53UU67BG.js} +9 -8
- package/dist/api.d.ts +1 -0
- package/dist/api.js +30 -29
- package/dist/{asset-JI35ENTB.js → asset-MCBHJZCT.js} +2 -2
- package/dist/{assetCataloger-A3T63E76.js → assetCataloger-4DS44LB2.js} +8 -8
- package/dist/{audio-PWT3Y4ER.js → audio-RCVQDNXZ.js} +15 -15
- package/dist/{auth-HVB4YRTT.js → auth-MS46YSQ5.js} +2 -2
- package/dist/{autoUpdate-6DLBJZZW.js → autoUpdate-KECZLRZD.js} +2 -2
- package/dist/{avatars-VKB5R2JP.js → avatars-VYEPMXIO.js} +11 -11
- package/dist/{backgroundChecks-XCMKJT4Z.js → backgroundChecks-HAX5LQ2L.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{batchRender-XYL2E7IX.js → batchRender-VKM4E7PI.js} +1 -1
- package/dist/{beats-C2HOZUAS.js → beats-WZSPVMQ4.js} +10 -10
- package/dist/{benchmark-TWKPWI27.js → benchmark-O5GWBFWE.js} +10 -9
- package/dist/{billing-74IFJYAX.js → billing-D6ZZNKPW.js} +8 -7
- package/dist/{browser-GG3NMOT2.js → browser-YHAPXFOK.js} +7 -7
- package/dist/{bundleWithLocalizedFonts-HBFTQBPU.js → bundleWithLocalizedFonts-Z5IHK62J.js} +1 -1
- package/dist/{capture-ZGZPBEA3.js → capture-5WTC5QWV.js} +4 -4
- package/dist/{capture-S76Z24SZ.js → capture-VAY75ASS.js} +31 -18
- package/dist/{captureCompositionFrame-GX7OQSDA.js → captureCompositionFrame-6DCRCIKA.js} +10 -10
- package/dist/{catalog-U5IHPRJZ.js → catalog-CH4H6C5E.js} +8 -8
- package/dist/{catch-up-XCQZZDVD.js → catch-up-KT6MHQBO.js} +8 -7
- package/dist/{check-ZEG6CTIC.js → check-6L7IEY5U.js} +33 -32
- package/dist/{checkAudio-SAEK5LIU.js → checkAudio-EAM7FCLJ.js} +10 -10
- package/dist/{checkBrowser-UDT2ROZ3.js → checkBrowser-IIMZI2LZ.js} +27 -26
- package/dist/{chunk-RWCYIF4C.js → chunk-2BRVSU2O.js} +3 -3
- package/dist/{chunk-IML2Z4HA.js → chunk-2L2A2HRW.js} +50 -20
- package/dist/{chunk-OT4X3UJO.js → chunk-3VPBUDK6.js} +1 -1
- package/dist/{chunk-QE2G4RUL.js → chunk-445BBSZS.js} +1 -1
- package/dist/{chunk-FWABCPJF.js → chunk-4Q2HYZZK.js} +1 -1
- package/dist/{chunk-XHLWZTCQ.js → chunk-4ZNB3EXI.js} +5 -5
- package/dist/{chunk-IXJNKHSW.js → chunk-5XSIAXIP.js} +2 -2
- package/dist/{chunk-67QXALQY.js → chunk-6PXVXIC7.js} +24 -8
- package/dist/{chunk-6TKGMCMZ.js → chunk-6WHTS73J.js} +1 -1
- package/dist/{chunk-FOIT542N.js → chunk-76HCZQ2W.js} +1 -1
- package/dist/{chunk-YZFBMMY2.js → chunk-77KEU6NG.js} +2 -2
- package/dist/{chunk-KZYOTTKM.js → chunk-7ADDESOW.js} +1 -1
- package/dist/{chunk-AVND7IBZ.js → chunk-7DJVLFIL.js} +2 -2
- package/dist/chunk-7RLMDAUO.js +60 -0
- package/dist/{chunk-PKIQ4ZR3.js → chunk-ACFNPUL7.js} +2 -2
- package/dist/{chunk-ISMKLYU5.js → chunk-AGTOSMG6.js} +1 -1
- package/dist/{chunk-ARKLBIF5.js → chunk-BPNCNZG5.js} +1 -1
- package/dist/{chunk-JZ7MGLDY.js → chunk-BQCW5T3M.js} +1 -1
- package/dist/{chunk-26UWY6Y7.js → chunk-BQWFOVLO.js} +1 -1
- package/dist/{chunk-SJLVYPVA.js → chunk-BSHZIPFP.js} +9 -9
- package/dist/{chunk-6RHYYH7J.js → chunk-CLRM7ZI5.js} +2 -2
- package/dist/{chunk-IWZDLLVZ.js → chunk-COHL5422.js} +3 -3
- package/dist/{chunk-W5LEGKUI.js → chunk-CTFMKRFI.js} +4 -4
- package/dist/{chunk-CPKLZATK.js → chunk-CTRYPHSE.js} +2 -2
- package/dist/{chunk-ESO4PNZJ.js → chunk-D3DY7Q6S.js} +2 -2
- package/dist/{chunk-PGY4WFKL.js → chunk-DMF4ML3Y.js} +1 -1
- package/dist/{chunk-BLZS4ZNW.js → chunk-DP7LWIKE.js} +1 -1
- package/dist/{chunk-D6YNLDSQ.js → chunk-ECJX6EJN.js} +2 -2
- package/dist/{chunk-SWNYAKJZ.js → chunk-EEVDBYVF.js} +1 -1
- package/dist/{chunk-IDX4AAHE.js → chunk-EMX4P4WP.js} +2 -2
- package/dist/{chunk-IHD5UW2O.js → chunk-EVHZDKB2.js} +2 -2
- package/dist/{chunk-DOFY4D3Q.js → chunk-EYXMXWME.js} +41 -16
- package/dist/{chunk-G5NF5RYM.js → chunk-FDBK2NOH.js} +4 -4
- package/dist/{chunk-YZJSU2XH.js → chunk-FXQ5577T.js} +4 -4
- package/dist/{chunk-JQPR3J5V.js → chunk-GTCPI2UK.js} +2 -2
- package/dist/{chunk-DNDMJYSA.js → chunk-H4LCNEA2.js} +131 -56
- package/dist/{chunk-L3IF3ICK.js → chunk-HGDOOG4T.js} +1 -1
- package/dist/{chunk-RAIAWYV6.js → chunk-HZLN3V3P.js} +1 -1
- package/dist/{chunk-2IIKGFO3.js → chunk-I4XV2UMQ.js} +1 -1
- package/dist/{chunk-M3MXR3HG.js → chunk-I6SCA2ME.js} +22 -11
- package/dist/{chunk-2RNRAB6U.js → chunk-ILQAOOR4.js} +1 -1
- package/dist/{chunk-7IQ4S5B3.js → chunk-IUIFNZTJ.js} +21 -21
- package/dist/{chunk-ULPGXTB4.js → chunk-IZQDQ5AN.js} +1 -1
- package/dist/{chunk-PXYO7CSG.js → chunk-K27EQ4Z4.js} +4 -4
- package/dist/{chunk-UETMAXZF.js → chunk-K4SWGMPO.js} +9 -4
- package/dist/{chunk-7CLDXOEJ.js → chunk-KLIVZ5VG.js} +2 -1
- package/dist/{chunk-VC77JQWW.js → chunk-KQFGINDM.js} +309 -197
- package/dist/{chunk-CYWEBM2Q.js → chunk-KQRSEH4X.js} +1 -1
- package/dist/chunk-L2U4ISSS.js +93 -0
- package/dist/{chunk-GJUX6ELV.js → chunk-LJFGZKVL.js} +11 -11
- package/dist/{chunk-BIFCKMA2.js → chunk-LOKPWAFW.js} +7 -7
- package/dist/{chunk-W4JWPYLU.js → chunk-MQGRMXFN.js} +50 -11
- package/dist/{chunk-SC2UNTNA.js → chunk-MRJQQDZR.js} +2 -2
- package/dist/{chunk-INKZ3QC6.js → chunk-MZD5KJDU.js} +12 -12
- package/dist/{chunk-DLRGADJX.js → chunk-N5IAKDUQ.js} +1 -1
- package/dist/{chunk-GWTNXGIH.js → chunk-NFRKPLTJ.js} +1 -1
- package/dist/{chunk-UL2P4PMR.js → chunk-P3K7LZCY.js} +1 -1
- package/dist/{chunk-MYEVOW4Z.js → chunk-PALZMYFH.js} +2 -2
- package/dist/{chunk-PQFUF5XD.js → chunk-PNJ4M4QZ.js} +2 -2
- package/dist/{chunk-TCNUA5RK.js → chunk-QKCU2J2V.js} +4 -4
- package/dist/{chunk-PNHLR7UQ.js → chunk-R5OSZK62.js} +8 -8
- package/dist/{chunk-MXOWNQCI.js → chunk-R64WJS45.js} +2 -2
- package/dist/{chunk-DS3IJC74.js → chunk-RQX5C7JD.js} +1 -1
- package/dist/{chunk-NQW4IK5U.js → chunk-SBQLLGXW.js} +2 -2
- package/dist/{chunk-IS6FYK3E.js → chunk-SFJWTPOF.js} +1 -1
- package/dist/{chunk-23PJ2IA5.js → chunk-SMUNLDEY.js} +2 -2
- package/dist/{chunk-DDXHYDJW.js → chunk-TDQUQAW5.js} +3 -3
- package/dist/{chunk-B2DE7LZ6.js → chunk-TE3CITOB.js} +2 -2
- package/dist/{chunk-PWMGT73E.js → chunk-TJXXLWQ4.js} +2 -2
- package/dist/{chunk-5TJRJXFQ.js → chunk-TQMTMD72.js} +1 -1
- package/dist/{chunk-2HNZSVMA.js → chunk-TQW3G23G.js} +10 -10
- package/dist/{chunk-HYMWSWKM.js → chunk-U3LWQGCD.js} +7 -2
- package/dist/{chunk-7SY3DERR.js → chunk-UBHBB3TB.js} +1 -1
- package/dist/{chunk-LS2FSESG.js → chunk-UHTWJOJ6.js} +56 -3
- package/dist/{chunk-6OPBJLMM.js → chunk-USYPUTGC.js} +1 -1
- package/dist/{chunk-AOITLZJO.js → chunk-UX2KMUKC.js} +6 -2
- package/dist/{chunk-6LDIZ4GJ.js → chunk-UX2SUCRS.js} +1 -1
- package/dist/{chunk-C4YBN5X6.js → chunk-UZGN5MTD.js} +1 -1
- package/dist/{chunk-LGXOIEXD.js → chunk-V7M6HV23.js} +1 -1
- package/dist/{chunk-EPQC3FGZ.js → chunk-WFQJ6EJ6.js} +19 -4
- package/dist/{chunk-Y4CPI5F6.js → chunk-WIZBFUBI.js} +2 -2
- package/dist/{chunk-S6TSXBWT.js → chunk-WQ2N2AG7.js} +4 -4
- package/dist/{chunk-2PZSUSHI.js → chunk-WQ3WMTSS.js} +3 -3
- package/dist/{chunk-37NCCCVV.js → chunk-WSZJS4QC.js} +5 -34
- package/dist/{chunk-UDFMNCZR.js → chunk-XEMS4TXW.js} +1 -1
- package/dist/{chunk-2KPNFTOV.js → chunk-XILU2D2B.js} +1 -1
- package/dist/{chunk-ADY66LYZ.js → chunk-XPAQK6E4.js} +9 -9
- package/dist/{chunk-L4XB67KR.js → chunk-YQSW3GXC.js} +2 -2
- package/dist/{chunk-6D2TEACV.js → chunk-ZXIWAD2G.js} +1 -1
- package/dist/{clean-XXEL3ZBK.js → clean-E6CXNNF5.js} +20 -19
- package/dist/cli.js +62 -62
- package/dist/{cloud-XXMDGEMK.js → cloud-2M4WWTSQ.js} +4 -4
- package/dist/{cloudrun-XXGMWBUO.js → cloudrun-EULFHQQL.js} +1 -1
- package/dist/{compare-JUVSFZRQ.js → compare-MHFCJIWI.js} +24 -23
- package/dist/{compiler-XTVXLGQA.js → compiler-DUG4GFRI.js} +3 -3
- package/dist/{component-KEJ34SM2.js → component-KRPXKVZH.js} +3 -3
- package/dist/{compositions-BF3NDKKG.js → compositions-MXESIGTW.js} +12 -12
- package/dist/{curve-QHLJ452Y.js → curve-BE2B7NIC.js} +11 -11
- package/dist/{cuts-VKKXIQPW.js → cuts-7GJF6CE2.js} +12 -12
- package/dist/{delete-GEZVZPWY.js → delete-6NUSXGFC.js} +2 -2
- package/dist/{deploy-ORQ7QDRG.js → deploy-D3NO4UPN.js} +2 -2
- package/dist/{describeProject-LEBOC6CL.js → describeProject-6Y7GXXYM.js} +7 -7
- package/dist/{destroy-ANCSST2S.js → destroy-6ESKQA5T.js} +2 -2
- package/dist/{diff-5X65JPB2.js → diff-NB4SANJX.js} +25 -25
- package/dist/{dist-4ZDHU5RE.js → dist-2YJCNIWI.js} +2 -2
- package/dist/{dist-BKWVQR7A.js → dist-MNFB4YKV.js} +9 -8
- package/dist/{dist-YX7FMBUD.js → dist-MXWEGMRB.js} +1 -1
- package/dist/{doctor-WUL4VESK.js → doctor-JAZHU2BT.js} +13 -13
- package/dist/{energy-L2VWHVVA.js → energy-X5E2NPBL.js} +12 -12
- package/dist/{events-3SKWRLOR.js → events-5QYPAD2S.js} +5 -4
- package/dist/{events-5EEASGJC.js → events-JWW4ASN3.js} +7 -6
- package/dist/{events-7FFAOKAE.js → events-XA2QQBP7.js} +14 -14
- package/dist/{execute-6VLBSJWW.js → execute-N7L5W7DV.js} +20 -19
- package/dist/{extract-NW3KYNN4.js → extract-YQAMVIVK.js} +12 -12
- package/dist/{face-4S5NWVNA.js → face-M7VZIIEP.js} +12 -12
- package/dist/{feedback-3OW5JVE4.js → feedback-DX6N4RT3.js} +13 -12
- package/dist/{ffmpeg-64HDYTRA.js → ffmpeg-U2UP72FB.js} +7 -7
- package/dist/{figma-SN5Z2GUZ.js → figma-BMMVU5ML.js} +3 -3
- package/dist/fontLocalizeCli.js +12 -11
- package/dist/{frames-NZNNVA3R.js → frames-XB4N4WW2.js} +13 -13
- package/dist/{generate-22O776FD.js → generate-M5ACNHVM.js} +18 -18
- package/dist/{get-O6YCY5BU.js → get-65JSCBTR.js} +2 -2
- package/dist/{gpuPolicy-26UL7BND.js → gpuPolicy-XC2BONM7.js} +7 -7
- package/dist/{grade-compare-6JGG6AUM.js → grade-compare-LPDDN5LL.js} +25 -24
- package/dist/{heifImagePrep-6ZP77OL4.js → heifImagePrep-QMFBHJQG.js} +10 -9
- package/dist/{help-4IHXYFYU.js → help-VLKAJCUD.js} +1 -1
- package/dist/{history-ACOL6DPJ.js → history-XPGU76VB.js} +10 -9
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/hyperframes-slideshow.global.js +14 -14
- package/dist/{info-MVEC7EO5.js → info-DGY5NFZJ.js} +14 -14
- package/dist/{init-YQRSQKD2.js → init-OYK5QV3A.js} +26 -26
- package/dist/{ink-A63OPAUS.js → ink-UJ6T72I6.js} +12 -12
- package/dist/{inspect-5FWI42ZE.js → inspect-GNE5FQDJ.js} +25 -24
- package/dist/{installer-2LTM4GWP.js → installer-FI6HT2FW.js} +1 -1
- package/dist/{keyframes-4ANCPAXZ.js → keyframes-MFGXRBMS.js} +10 -9
- package/dist/{lambda-A7UY44ZG.js → lambda-OOESQH7O.js} +11 -11
- package/dist/{layout-7GGOEVCP.js → layout-67GYUHRL.js} +25 -24
- package/dist/{lint-AYAPUYJA.js → lint-GW3AGJO3.js} +10 -10
- package/dist/{lintProject-7C4U6NHF.js → lintProject-G4MXY4YA.js} +2 -2
- package/dist/{list-TGPJOBFL.js → list-FMAPGP4I.js} +2 -2
- package/dist/{localPage-YJNVGFUR.js → localPage-76LUQEMF.js} +7 -7
- package/dist/{login-UFEGKTWJ.js → login-YOMRKZTT.js} +4 -4
- package/dist/{look-TS4DMBJZ.js → look-CTRMUUY6.js} +12 -12
- package/dist/{manager-25RJ4IZN.js → manager-TMKN4DX5.js} +3 -3
- package/dist/{manager-RN3IP5UM.js → manager-ZNADMKUJ.js} +8 -8
- package/dist/{measure-L2FJMFZQ.js → measure-RPPQJGKH.js} +11 -11
- package/dist/{media-treatment-JB5W5JI4.js → media-treatment-UZ4L4MDB.js} +14 -14
- package/dist/{media-use-TMR5E5WJ.js → media-use-B7OLG3J3.js} +3 -3
- package/dist/{models-R5L2ZQFX.js → models-ZXXLZBLQ.js} +11 -11
- package/dist/{motionShot-FXPW7WFS.js → motionShot-DBW6UXTD.js} +14 -14
- package/dist/{normalize-audio-IWEUGFKJ.js → normalize-audio-L4AE5ASS.js} +10 -9
- package/dist/{open-YKOIAP7J.js → open-YBZJF2HO.js} +8 -7
- package/dist/{parakeetRunner-BMBL6UGF.js → parakeetRunner-ZLFQAJ45.js} +13 -13
- package/dist/{pipeline-HRJ3VN5Z.js → pipeline-3L4HX4CH.js} +10 -10
- package/dist/{plan-IIQ7SXWV.js → plan-R4I5XT6L.js} +14 -14
- package/dist/{play-FPIHIX3E.js → play-J54FH42B.js} +19 -18
- package/dist/{preflight-4AV5WOGU.js → preflight-SMPZLLLL.js} +10 -10
- package/dist/{present-4K3VJUM7.js → present-AXOSYIJE.js} +20 -19
- package/dist/{preview-2NIQ2EBG.js → preview-6VDMGAQI.js} +14 -14
- package/dist/{probe-O42OCKVH.js → probe-CXIQVZAM.js} +12 -12
- package/dist/{producer-MTQYIIGW.js → producer-EQOO6NE2.js} +1 -1
- package/dist/{projectConfig-LSJSU4UR.js → projectConfig-VPL64JBD.js} +1 -1
- package/dist/{publicNetwork-CWKAKZXP.js → publicNetwork-GFQID4Q6.js} +1 -1
- package/dist/{publication-4EYVOO47.js → publication-ST3VFFWM.js} +1 -1
- package/dist/{publish-QU6NA5UG.js → publish-DCOFEASH.js} +13 -12
- package/dist/{remove-background-55RUOFXG.js → remove-background-OHGBEI7B.js} +11 -11
- package/dist/{render-UWWZFXK5.js → render-CMY2ELLE.js} +23 -22
- package/dist/{render-IFRE426H.js → render-MG5MX45D.js} +1 -1
- package/dist/{render-WRCZGKUW.js → render-ONBJRZRU.js} +30 -29
- package/dist/{render-batch-2BWEMPAQ.js → render-batch-C3XGAQGX.js} +1 -1
- package/dist/renderSetupWorker.js +5 -5
- package/dist/{resolver-PM56BNET.js → resolver-AGMKICJW.js} +1 -1
- package/dist/{reverse-HIJSN6T6.js → reverse-UIQAE3DC.js} +1 -1
- package/dist/{run-GGMHXAKM.js → run-NQBD5RDR.js} +2 -2
- package/dist/{screenshotCapture-F2G3ASF3.js → screenshotCapture-PUK46H3O.js} +7 -7
- package/dist/{service-DLHBDMEI.js → service-HULLICEP.js} +12 -12
- package/dist/{share-GS3Z4J2Z.js → share-VKY5LLZ7.js} +15 -15
- package/dist/{sherpa-VL2QSAMK.js → sherpa-WDVEYQHZ.js} +12 -12
- package/dist/{skills-LXKJRUCF.js → skills-6K2EZEJK.js} +10 -9
- package/dist/{skillsUpdateCheck-XMFKI3F2.js → skillsUpdateCheck-UXRH4JIW.js} +3 -3
- package/dist/{slideshow-ARJR22W4.js → slideshow-PC3BBO5F.js} +1 -1
- package/dist/{snapshot-6BVWACEB.js → snapshot-UDJB33E5.js} +32 -31
- package/dist/{src-5DALALRV.js → src-66ZYEQPG.js} +14 -10
- package/dist/{src-K6EIKBHK.js → src-6GRYTLZ5.js} +16 -10
- package/dist/{start-GSVOQ7VY.js → start-VJPLZ7YN.js} +16 -16
- package/dist/{staticProjectServer-PXZAGXPM.js → staticProjectServer-5QU3ICQV.js} +14 -13
- package/dist/{status-U532HK6C.js → status-SZ4QKSVN.js} +7 -7
- package/dist/studio/assets/{hyperframes-player-DhaQoeHg.js → hyperframes-player-i4dtJlrd.js} +1 -1
- package/dist/studio/assets/{index-qILK-NRY.js → index-Be_pDhIw.js} +1 -1
- package/dist/studio/assets/{index-DPeGppVA.js → index-Dvlt50yp.js} +117 -117
- package/dist/studio/assets/{pausedVideoDecoder-DqCJ5lI8.js → pausedVideoDecoder-C_20YkSR.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-BTDNUTUL.js → studio-api-OJEU24EG.js} +9 -8
- package/dist/{studioServer-ZDIVHU5Q.js → studioServer-VRYGQOGN.js} +48 -47
- package/dist/{sync-KXUIN2XW.js → sync-NSGF4MPJ.js} +12 -12
- package/dist/{system-BONOLEJX.js → system-I5KGZTUG.js} +3 -2
- package/dist/{telemetry-BE6NYAAP.js → telemetry-Q45SZSZC.js} +7 -6
- package/dist/{templates-6DXDZKQT.js → templates-X7UD7HRJ.js} +8 -7
- package/dist/{timeline-DYU2RWSB.js → timeline-JVN34ETY.js} +19 -18
- package/dist/{tokens-SSWEYFOF.js → tokens-GWFTTI5U.js} +2 -2
- package/dist/{transcribe-EHMQS2JF.js → transcribe-7MADUIYX.js} +11 -11
- package/dist/{transcribe-7E653TIR.js → transcribe-PJRBKRPT.js} +21 -21
- package/dist/{update-5PNT24HU.js → update-D3V2PW3U.js} +11 -10
- package/dist/{updateCheck-DS6TTOUW.js → updateCheck-5G4ZILYA.js} +2 -2
- package/dist/{upgrade-EHJ32IGT.js → upgrade-4BNSDRCV.js} +3 -3
- package/dist/{urlDownloader-6ZROXAQ7.js → urlDownloader-RLZ7H7NM.js} +6 -6
- package/dist/{validate-OPKF4E6C.js → validate-JW6LLGWB.js} +23 -22
- package/dist/{video-BRGYDCC2.js → video-WOBS7YW2.js} +8 -8
- package/dist/{voices-CYPYVEAI.js → voices-E6WE2Q2U.js} +16 -16
- package/dist/warmCheck.js +33 -32
- package/package.json +1 -1
- package/dist/chunk-47JAY366.js +0 -44
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isBlockedNetworkHost,
|
|
11
11
|
logRefusal,
|
|
12
12
|
startCaptureProxy
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UHTWJOJ6.js";
|
|
14
14
|
import {
|
|
15
15
|
removeTreeBestEffort,
|
|
16
16
|
removeTreeBestEffortAsync
|
|
@@ -105,6 +105,10 @@ import {
|
|
|
105
105
|
timeAtSourceTime,
|
|
106
106
|
volumeSegmentSampleCount
|
|
107
107
|
} from "./chunk-DQZRNGDS.js";
|
|
108
|
+
import {
|
|
109
|
+
isPrivateFileUnder,
|
|
110
|
+
isVcsOrSecretPath
|
|
111
|
+
} from "./chunk-XWK2RSD5.js";
|
|
108
112
|
import {
|
|
109
113
|
browserPathFromEnv,
|
|
110
114
|
buildChromeLaunchEnv,
|
|
@@ -116,16 +120,11 @@ import {
|
|
|
116
120
|
} from "./chunk-LEIR7IDJ.js";
|
|
117
121
|
import {
|
|
118
122
|
resolveReferencedStart
|
|
119
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-H4LCNEA2.js";
|
|
120
124
|
import {
|
|
121
125
|
isWithinProjectRoot,
|
|
122
126
|
resolveProjectRelativeSrc
|
|
123
127
|
} from "./chunk-MP4TEYUJ.js";
|
|
124
|
-
import {
|
|
125
|
-
FFMPEG_PATH_ENV,
|
|
126
|
-
FFPROBE_PATH_ENV,
|
|
127
|
-
findFfBinary
|
|
128
|
-
} from "./chunk-IU5DC4HP.js";
|
|
129
128
|
import {
|
|
130
129
|
LOW_MEMORY_TOTAL_MB_THRESHOLD,
|
|
131
130
|
getAvailableMemoryMb,
|
|
@@ -134,7 +133,13 @@ import {
|
|
|
134
133
|
hostCpuCount,
|
|
135
134
|
isLowMemorySystem,
|
|
136
135
|
usableCpuCount
|
|
137
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-U3LWQGCD.js";
|
|
137
|
+
import {
|
|
138
|
+
FFMPEG_PATH_ENV,
|
|
139
|
+
FFPROBE_PATH_ENV,
|
|
140
|
+
findFfBinary,
|
|
141
|
+
findTrustedExecutable
|
|
142
|
+
} from "./chunk-IU5DC4HP.js";
|
|
138
143
|
import {
|
|
139
144
|
isPathInside
|
|
140
145
|
} from "./chunk-6MKM2RVL.js";
|
|
@@ -837,7 +842,7 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
|
|
|
837
842
|
const profile = mkdtempSync(join2(tmpdir2(), "hf-chrome-probe-"));
|
|
838
843
|
const timeoutMs = options.timeoutMs ?? PROBE_TIMEOUT_MS;
|
|
839
844
|
try {
|
|
840
|
-
return await new Promise((
|
|
845
|
+
return await new Promise((resolve3) => {
|
|
841
846
|
let stderr = "";
|
|
842
847
|
const child = spawn(executablePath, startupArgs(args, profile), {
|
|
843
848
|
env: buildChromeLaunchEnv(options.env),
|
|
@@ -846,14 +851,14 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
|
|
|
846
851
|
});
|
|
847
852
|
const timer = setTimeout(() => {
|
|
848
853
|
child.kill();
|
|
849
|
-
|
|
854
|
+
resolve3(`Chrome started and kept running for ${timeoutMs} ms when launched on its own.`);
|
|
850
855
|
}, timeoutMs);
|
|
851
856
|
options.signal?.addEventListener(
|
|
852
857
|
"abort",
|
|
853
858
|
() => {
|
|
854
859
|
clearTimeout(timer);
|
|
855
860
|
child.kill();
|
|
856
|
-
|
|
861
|
+
resolve3("The startup check was cancelled.");
|
|
857
862
|
},
|
|
858
863
|
{ once: true }
|
|
859
864
|
);
|
|
@@ -862,14 +867,14 @@ async function diagnoseChromeStartup(executablePath, args, options = {}) {
|
|
|
862
867
|
});
|
|
863
868
|
child.once("error", (error) => {
|
|
864
869
|
clearTimeout(timer);
|
|
865
|
-
|
|
870
|
+
resolve3(`Chrome could not be started: ${error.message}`);
|
|
866
871
|
});
|
|
867
872
|
child.once("exit", (code, signal) => {
|
|
868
873
|
clearTimeout(timer);
|
|
869
874
|
const how = signal ? `was stopped by ${signal}` : `exited with code ${code}`;
|
|
870
875
|
const named = nameChromeExit(code, options.platform);
|
|
871
876
|
const lines = tail(stderr);
|
|
872
|
-
|
|
877
|
+
resolve3(
|
|
873
878
|
[`Chrome ${how} when launched on its own.`, named, lines && `stderr:
|
|
874
879
|
${lines}`].filter(Boolean).join("\n")
|
|
875
880
|
);
|
|
@@ -1007,7 +1012,7 @@ function scanHtmlOpeningTags(html) {
|
|
|
1007
1012
|
}
|
|
1008
1013
|
|
|
1009
1014
|
// ../engine/src/services/browserManager.ts
|
|
1010
|
-
import {
|
|
1015
|
+
import { execFileSync } from "child_process";
|
|
1011
1016
|
import { existsSync as existsSync2, readdirSync, statSync } from "fs";
|
|
1012
1017
|
import { join as join3 } from "path";
|
|
1013
1018
|
import { homedir } from "os";
|
|
@@ -1179,7 +1184,7 @@ var BrowserLeasePool = class _BrowserLeasePool {
|
|
|
1179
1184
|
for (const entry of entries) this.requestClose(entry, false);
|
|
1180
1185
|
const settle = Promise.all(entries.map((entry) => entry.closePromise));
|
|
1181
1186
|
const bound = new Promise(
|
|
1182
|
-
(
|
|
1187
|
+
(resolve3) => setTimeout(resolve3, _BrowserLeasePool.DRAIN_FORCE_CLOSE_MS).unref()
|
|
1183
1188
|
);
|
|
1184
1189
|
this.drainPromise = Promise.race([settle, bound]).then(() => {
|
|
1185
1190
|
for (const entry of entries) if (this.entries.has(entry)) this.requestClose(entry, true);
|
|
@@ -1278,11 +1283,11 @@ var BrowserLeasePool = class _BrowserLeasePool {
|
|
|
1278
1283
|
await Promise.race([
|
|
1279
1284
|
this.options.close(result.browser).catch(() => {
|
|
1280
1285
|
}),
|
|
1281
|
-
new Promise((
|
|
1286
|
+
new Promise((resolve3) => {
|
|
1282
1287
|
entry.forceClose = () => {
|
|
1283
1288
|
entry.forceClose = void 0;
|
|
1284
1289
|
this.options.forceClose(result.browser);
|
|
1285
|
-
|
|
1290
|
+
resolve3();
|
|
1286
1291
|
};
|
|
1287
1292
|
})
|
|
1288
1293
|
]);
|
|
@@ -1961,12 +1966,18 @@ var _cachedVramMb = null;
|
|
|
1961
1966
|
function probeNvidiaVramMb() {
|
|
1962
1967
|
if (_cachedVramMb !== null) return _cachedVramMb;
|
|
1963
1968
|
try {
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1969
|
+
const nvidiaSmi = findTrustedExecutable("nvidia-smi");
|
|
1970
|
+
if (!nvidiaSmi) return null;
|
|
1971
|
+
const out = execFileSync(
|
|
1972
|
+
nvidiaSmi,
|
|
1973
|
+
["--query-gpu=memory.total", "--format=csv,noheader,nounits"],
|
|
1974
|
+
{
|
|
1975
|
+
timeout: 3e3,
|
|
1976
|
+
encoding: "utf-8",
|
|
1977
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
1978
|
+
windowsHide: true
|
|
1979
|
+
}
|
|
1980
|
+
).trim();
|
|
1970
1981
|
const mb = parseInt(out.split("\n")[0] ?? "", 10);
|
|
1971
1982
|
if (Number.isFinite(mb) && mb > 0) {
|
|
1972
1983
|
_cachedVramMb = mb;
|
|
@@ -2113,11 +2124,11 @@ async function assertWebGpuAdapterAvailable(page, requiresWebGpu, softwareWebGpu
|
|
|
2113
2124
|
};
|
|
2114
2125
|
return await Promise.race([
|
|
2115
2126
|
probe(),
|
|
2116
|
-
new Promise((
|
|
2127
|
+
new Promise((resolve3) => {
|
|
2117
2128
|
timer = (globalThis.window?.__HF_VIRTUAL_TIME__?.originalSetTimeout ?? setTimeout)(
|
|
2118
2129
|
() => {
|
|
2119
2130
|
expired = true;
|
|
2120
|
-
|
|
2131
|
+
resolve3(false);
|
|
2121
2132
|
},
|
|
2122
2133
|
timeoutMs
|
|
2123
2134
|
);
|
|
@@ -2580,7 +2591,7 @@ async function produceDrawElementFrame(page, width, height, quality = 80, syncTo
|
|
|
2580
2591
|
);
|
|
2581
2592
|
}
|
|
2582
2593
|
const frameId = ++state.nextId;
|
|
2583
|
-
const encodeResult = new Promise((
|
|
2594
|
+
const encodeResult = new Promise((resolve3, reject) => {
|
|
2584
2595
|
const timer = setTimeout(() => {
|
|
2585
2596
|
if (state.pending.delete(frameId)) {
|
|
2586
2597
|
reject(new Error(`drawElement worker encode timed out (frame ${frameId})`));
|
|
@@ -2589,7 +2600,7 @@ async function produceDrawElementFrame(page, width, height, quality = 80, syncTo
|
|
|
2589
2600
|
state.pending.set(frameId, {
|
|
2590
2601
|
resolve: (b) => {
|
|
2591
2602
|
clearTimeout(timer);
|
|
2592
|
-
|
|
2603
|
+
resolve3(b);
|
|
2593
2604
|
},
|
|
2594
2605
|
reject: (e) => {
|
|
2595
2606
|
clearTimeout(timer);
|
|
@@ -2745,7 +2756,7 @@ async function produceDrawElementFrameBatch(page, times, width, height, quality
|
|
|
2745
2756
|
for (let i = 0; i < times.length; i++) {
|
|
2746
2757
|
const frameId = ++state.nextId;
|
|
2747
2758
|
fids.push(frameId);
|
|
2748
|
-
const p = new Promise((
|
|
2759
|
+
const p = new Promise((resolve3, reject) => {
|
|
2749
2760
|
const timer = setTimeout(() => {
|
|
2750
2761
|
if (state.pending.delete(frameId)) {
|
|
2751
2762
|
reject(new Error(`drawElement worker encode timed out (frame ${frameId})`));
|
|
@@ -2754,7 +2765,7 @@ async function produceDrawElementFrameBatch(page, times, width, height, quality
|
|
|
2754
2765
|
state.pending.set(frameId, {
|
|
2755
2766
|
resolve: (b) => {
|
|
2756
2767
|
clearTimeout(timer);
|
|
2757
|
-
|
|
2768
|
+
resolve3(b);
|
|
2758
2769
|
},
|
|
2759
2770
|
reject: (e) => {
|
|
2760
2771
|
clearTimeout(timer);
|
|
@@ -3881,8 +3892,8 @@ async function describePageMotionBlur(page, record2) {
|
|
|
3881
3892
|
}
|
|
3882
3893
|
async function describePageMotionBlurAtEnd(page, timeoutMs = 1500, record2) {
|
|
3883
3894
|
let timer;
|
|
3884
|
-
const stuck = new Promise((
|
|
3885
|
-
timer = setTimeout(() =>
|
|
3895
|
+
const stuck = new Promise((resolve3) => {
|
|
3896
|
+
timer = setTimeout(() => resolve3(null), timeoutMs);
|
|
3886
3897
|
});
|
|
3887
3898
|
try {
|
|
3888
3899
|
const r = await Promise.race([readPageMotionBlur(page), stuck]);
|
|
@@ -4002,8 +4013,8 @@ async function probeBeginFrameLiveness(page, timeoutMs, frameTimeTicks, interval
|
|
|
4002
4013
|
try {
|
|
4003
4014
|
return await Promise.race([
|
|
4004
4015
|
client.send("HeadlessExperimental.beginFrame", params).then(() => true).catch(() => false),
|
|
4005
|
-
new Promise((
|
|
4006
|
-
timer = setTimeout(() =>
|
|
4016
|
+
new Promise((resolve3) => {
|
|
4017
|
+
timer = setTimeout(() => resolve3(false), timeoutMs);
|
|
4007
4018
|
})
|
|
4008
4019
|
]);
|
|
4009
4020
|
} finally {
|
|
@@ -4601,9 +4612,9 @@ async function initThreeDProjectionInPage() {
|
|
|
4601
4612
|
const toDataUrl = async (url) => {
|
|
4602
4613
|
const resp = await fetch(url);
|
|
4603
4614
|
const blob = await resp.blob();
|
|
4604
|
-
return new Promise((
|
|
4615
|
+
return new Promise((resolve3, reject) => {
|
|
4605
4616
|
const r = new FileReader();
|
|
4606
|
-
r.onload = () =>
|
|
4617
|
+
r.onload = () => resolve3(String(r.result));
|
|
4607
4618
|
r.onerror = () => reject(new Error(`FileReader failed for ${url}`));
|
|
4608
4619
|
r.readAsDataURL(blob);
|
|
4609
4620
|
});
|
|
@@ -5302,12 +5313,12 @@ async function scanChunk(page, times) {
|
|
|
5302
5313
|
}, times);
|
|
5303
5314
|
}
|
|
5304
5315
|
function withinBudget(work, ms) {
|
|
5305
|
-
return new Promise((
|
|
5306
|
-
const timer = setTimeout(() =>
|
|
5316
|
+
return new Promise((resolve3, reject) => {
|
|
5317
|
+
const timer = setTimeout(() => resolve3(null), Math.max(0, ms));
|
|
5307
5318
|
work.then(
|
|
5308
5319
|
(value) => {
|
|
5309
5320
|
clearTimeout(timer);
|
|
5310
|
-
|
|
5321
|
+
resolve3(value);
|
|
5311
5322
|
},
|
|
5312
5323
|
(error) => {
|
|
5313
5324
|
clearTimeout(timer);
|
|
@@ -5487,7 +5498,16 @@ function urlInputArgs(input, {
|
|
|
5487
5498
|
);
|
|
5488
5499
|
}
|
|
5489
5500
|
const networkRetry = tool === "ffmpeg" ? ["-reconnect_on_network_error", "1"] : [];
|
|
5490
|
-
|
|
5501
|
+
const nestedOpensStayOnHttps = resolveRestrictPageNetwork() ? ["-protocol_whitelist", "https,tls,tcp"] : [];
|
|
5502
|
+
return [
|
|
5503
|
+
"-tls_verify",
|
|
5504
|
+
"1",
|
|
5505
|
+
"-ca_file",
|
|
5506
|
+
caFile,
|
|
5507
|
+
...RECONNECT_ARGS,
|
|
5508
|
+
...networkRetry,
|
|
5509
|
+
...nestedOpensStayOnHttps
|
|
5510
|
+
];
|
|
5491
5511
|
}
|
|
5492
5512
|
function redactUrlQueriesInError(error) {
|
|
5493
5513
|
if (!(error instanceof Error)) return error;
|
|
@@ -5544,8 +5564,8 @@ var ManagedChildProcess = class {
|
|
|
5544
5564
|
this.options = options;
|
|
5545
5565
|
this.now = options.now ?? Date.now;
|
|
5546
5566
|
this.startedAtMs = this.now();
|
|
5547
|
-
this.outcomePromise = new Promise((
|
|
5548
|
-
this.resolveOutcome =
|
|
5567
|
+
this.outcomePromise = new Promise((resolve3) => {
|
|
5568
|
+
this.resolveOutcome = resolve3;
|
|
5549
5569
|
});
|
|
5550
5570
|
child.stderr?.on("data", this.onStderr);
|
|
5551
5571
|
child.once("spawn", this.onSpawn);
|
|
@@ -6034,7 +6054,7 @@ function readProbeJson(filePath, signal) {
|
|
|
6034
6054
|
}
|
|
6035
6055
|
var runtimeFfprobeMajor;
|
|
6036
6056
|
function ffprobeMajor() {
|
|
6037
|
-
runtimeFfprobeMajor ??= new Promise((
|
|
6057
|
+
runtimeFfprobeMajor ??= new Promise((resolve3) => {
|
|
6038
6058
|
let out = "";
|
|
6039
6059
|
const binary = getFfprobeBinary();
|
|
6040
6060
|
const proc = spawn3(binary, ["-version"], {
|
|
@@ -6042,8 +6062,8 @@ function ffprobeMajor() {
|
|
|
6042
6062
|
windowsHide: true
|
|
6043
6063
|
});
|
|
6044
6064
|
proc.stdout.on("data", (chunk) => out += String(chunk));
|
|
6045
|
-
proc.on("error", () =>
|
|
6046
|
-
proc.on("close", () =>
|
|
6065
|
+
proc.on("error", () => resolve3(void 0));
|
|
6066
|
+
proc.on("close", () => resolve3(Number(/version n?(\d+)/.exec(out)?.[1]) || void 0));
|
|
6047
6067
|
});
|
|
6048
6068
|
return runtimeFfprobeMajor;
|
|
6049
6069
|
}
|
|
@@ -6934,7 +6954,9 @@ var defaultReadFile = (path) => readFile(path, "utf8");
|
|
|
6934
6954
|
function defaultExec() {
|
|
6935
6955
|
const execFileP = promisify2(execFile2);
|
|
6936
6956
|
return async (file, args) => {
|
|
6937
|
-
const
|
|
6957
|
+
const binary = findTrustedExecutable(file);
|
|
6958
|
+
if (!binary) throw new Error(`${file} is not in a trusted PATH folder`);
|
|
6959
|
+
const { stdout } = await execFileP(binary, [...args], { windowsHide: true, timeout: 5e3 });
|
|
6938
6960
|
return { stdout: String(stdout) };
|
|
6939
6961
|
};
|
|
6940
6962
|
}
|
|
@@ -7324,9 +7346,9 @@ async function decodeDynamicCssBackgroundImages(page) {
|
|
|
7324
7346
|
const image = new Image();
|
|
7325
7347
|
image.src = url;
|
|
7326
7348
|
let timer;
|
|
7327
|
-
const expired = new Promise((
|
|
7349
|
+
const expired = new Promise((resolve3) => {
|
|
7328
7350
|
timer = (window.__HF_VIRTUAL_TIME__?.originalSetTimeout ?? setTimeout)(
|
|
7329
|
-
() =>
|
|
7351
|
+
() => resolve3("late"),
|
|
7330
7352
|
limitMs
|
|
7331
7353
|
);
|
|
7332
7354
|
});
|
|
@@ -7447,7 +7469,7 @@ function formatHttpErrorDiagnostic(input) {
|
|
|
7447
7469
|
return `[Browser:HTTP${input.status}] ${input.method} ${sanitizeDiagnosticUrl(input.url)} resource=${input.resourceType}${statusText}`;
|
|
7448
7470
|
}
|
|
7449
7471
|
var LOCKED_WARMUP_TICKS = 60;
|
|
7450
|
-
var realSleep = (ms) => new Promise((
|
|
7472
|
+
var realSleep = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
7451
7473
|
function warmupFrameTimeTicks(state, intervalMs) {
|
|
7452
7474
|
return state.ticks * intervalMs;
|
|
7453
7475
|
}
|
|
@@ -7535,10 +7557,10 @@ async function waitForCloseWithTimeout(promise) {
|
|
|
7535
7557
|
() => void 0,
|
|
7536
7558
|
() => void 0
|
|
7537
7559
|
),
|
|
7538
|
-
new Promise((
|
|
7560
|
+
new Promise((resolve3) => {
|
|
7539
7561
|
timer = setTimeout(() => {
|
|
7540
7562
|
timedOut = true;
|
|
7541
|
-
|
|
7563
|
+
resolve3();
|
|
7542
7564
|
}, CAPTURE_SESSION_CLOSE_TIMEOUT_MS);
|
|
7543
7565
|
})
|
|
7544
7566
|
]);
|
|
@@ -8155,7 +8177,7 @@ async function pollHfReady(page, timeoutMs, intervalMs = 100) {
|
|
|
8155
8177
|
}
|
|
8156
8178
|
}
|
|
8157
8179
|
}
|
|
8158
|
-
await new Promise((
|
|
8180
|
+
await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
|
|
8159
8181
|
}
|
|
8160
8182
|
const diag = await evaluateHfDiagnostic(page);
|
|
8161
8183
|
if (diag.hasSeek && diag.duration === 0) {
|
|
@@ -8343,7 +8365,7 @@ async function pollSubCompositionTimelines(page, timeoutMs, {
|
|
|
8343
8365
|
);
|
|
8344
8366
|
break;
|
|
8345
8367
|
}
|
|
8346
|
-
await new Promise((
|
|
8368
|
+
await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
|
|
8347
8369
|
}
|
|
8348
8370
|
const pendingIds = ready && knownUnregisteredIds.length === 0 ? [] : await listUnregisteredTimelineIds(page);
|
|
8349
8371
|
if (ready && pendingIds.length > 0 && (getScriptLoadFailures?.() ?? []).length > 0) {
|
|
@@ -8387,7 +8409,7 @@ async function pollVideosReady(page, skipIds, timeoutMs, intervalMs = 100) {
|
|
|
8387
8409
|
const deadline = Date.now() + timeoutMs;
|
|
8388
8410
|
while (Date.now() < deadline) {
|
|
8389
8411
|
if (await check()) return true;
|
|
8390
|
-
await new Promise((
|
|
8412
|
+
await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
|
|
8391
8413
|
}
|
|
8392
8414
|
return check();
|
|
8393
8415
|
}
|
|
@@ -8410,7 +8432,7 @@ async function pollImagesReady(page, timeoutMs, intervalMs = 100) {
|
|
|
8410
8432
|
const deadline = Date.now() + timeoutMs;
|
|
8411
8433
|
while (Date.now() < deadline) {
|
|
8412
8434
|
if (await check()) return true;
|
|
8413
|
-
await new Promise((
|
|
8435
|
+
await new Promise((resolve3) => setTimeout(resolve3, intervalMs));
|
|
8414
8436
|
}
|
|
8415
8437
|
return check();
|
|
8416
8438
|
}
|
|
@@ -8554,7 +8576,7 @@ async function waitForShownLateImages(session, frameIndex) {
|
|
|
8554
8576
|
throw stopped;
|
|
8555
8577
|
}
|
|
8556
8578
|
if (waiting.length === 0) return;
|
|
8557
|
-
await new Promise((
|
|
8579
|
+
await new Promise((resolve3) => setTimeout(resolve3, LATE_IMAGE_POLL_MS));
|
|
8558
8580
|
}
|
|
8559
8581
|
}
|
|
8560
8582
|
function recordBackgroundDecodeTimeouts(session, urls) {
|
|
@@ -8691,7 +8713,7 @@ async function waitForOptionalTailwindReady(page, timeoutMs) {
|
|
|
8691
8713
|
page.evaluate(
|
|
8692
8714
|
`Promise.resolve(window.__tailwindReady).then(() => true, () => false)`
|
|
8693
8715
|
),
|
|
8694
|
-
new Promise((
|
|
8716
|
+
new Promise((resolve3) => setTimeout(() => resolve3(false), timeoutMs))
|
|
8695
8717
|
]);
|
|
8696
8718
|
if (!ready) {
|
|
8697
8719
|
throw new Error(
|
|
@@ -9652,7 +9674,7 @@ function claimStaticDedupCheck(session) {
|
|
|
9652
9674
|
const pending = checks.get(key);
|
|
9653
9675
|
if (pending) return { kind: "reuse", check: pending };
|
|
9654
9676
|
let settle;
|
|
9655
|
-
checks.set(key, new Promise((
|
|
9677
|
+
checks.set(key, new Promise((resolve3) => settle = resolve3));
|
|
9656
9678
|
return { kind: "verify", settle };
|
|
9657
9679
|
}
|
|
9658
9680
|
function shareableStaticFrames(verdict) {
|
|
@@ -11827,12 +11849,12 @@ function createFrameReorderBuffer(startFrame, endFrame) {
|
|
|
11827
11849
|
let cursor = startFrame;
|
|
11828
11850
|
let aborted = null;
|
|
11829
11851
|
const pending = /* @__PURE__ */ new Map();
|
|
11830
|
-
const enqueueAt = (frame,
|
|
11852
|
+
const enqueueAt = (frame, resolve3, reject) => {
|
|
11831
11853
|
const list = pending.get(frame);
|
|
11832
11854
|
if (list === void 0) {
|
|
11833
|
-
pending.set(frame, [{ resolve:
|
|
11855
|
+
pending.set(frame, [{ resolve: resolve3, reject }]);
|
|
11834
11856
|
} else {
|
|
11835
|
-
list.push({ resolve:
|
|
11857
|
+
list.push({ resolve: resolve3, reject });
|
|
11836
11858
|
}
|
|
11837
11859
|
};
|
|
11838
11860
|
const flushAt = (frame) => {
|
|
@@ -11841,31 +11863,31 @@ function createFrameReorderBuffer(startFrame, endFrame) {
|
|
|
11841
11863
|
pending.delete(frame);
|
|
11842
11864
|
for (const waiter of list) waiter.resolve();
|
|
11843
11865
|
};
|
|
11844
|
-
const waitForFrame = (frame) => new Promise((
|
|
11866
|
+
const waitForFrame = (frame) => new Promise((resolve3, reject) => {
|
|
11845
11867
|
if (aborted) {
|
|
11846
11868
|
reject(aborted);
|
|
11847
11869
|
return;
|
|
11848
11870
|
}
|
|
11849
11871
|
if (frame === cursor) {
|
|
11850
|
-
|
|
11872
|
+
resolve3();
|
|
11851
11873
|
return;
|
|
11852
11874
|
}
|
|
11853
|
-
enqueueAt(frame,
|
|
11875
|
+
enqueueAt(frame, resolve3, reject);
|
|
11854
11876
|
});
|
|
11855
11877
|
const advanceTo = (frame) => {
|
|
11856
11878
|
cursor = frame;
|
|
11857
11879
|
flushAt(frame);
|
|
11858
11880
|
};
|
|
11859
|
-
const waitForAllDone = () => new Promise((
|
|
11881
|
+
const waitForAllDone = () => new Promise((resolve3, reject) => {
|
|
11860
11882
|
if (aborted) {
|
|
11861
11883
|
reject(aborted);
|
|
11862
11884
|
return;
|
|
11863
11885
|
}
|
|
11864
11886
|
if (cursor >= endFrame) {
|
|
11865
|
-
|
|
11887
|
+
resolve3();
|
|
11866
11888
|
return;
|
|
11867
11889
|
}
|
|
11868
|
-
enqueueAt(endFrame,
|
|
11890
|
+
enqueueAt(endFrame, resolve3, reject);
|
|
11869
11891
|
});
|
|
11870
11892
|
const abort = (err) => {
|
|
11871
11893
|
if (aborted) return;
|
|
@@ -12195,8 +12217,8 @@ function spawnFfmpegStream(outputPath, args, {
|
|
|
12195
12217
|
}
|
|
12196
12218
|
const stdin = ffmpeg.stdin;
|
|
12197
12219
|
if (stdin && !stdin.destroyed) {
|
|
12198
|
-
await new Promise((
|
|
12199
|
-
stdin.end(() =>
|
|
12220
|
+
await new Promise((resolve3) => {
|
|
12221
|
+
stdin.end(() => resolve3());
|
|
12200
12222
|
});
|
|
12201
12223
|
}
|
|
12202
12224
|
const outcome = await exitPromise;
|
|
@@ -12377,20 +12399,20 @@ function isMemberGroupHidden(groupsById, el) {
|
|
|
12377
12399
|
|
|
12378
12400
|
// ../engine/src/services/videoFrameExtractor.ts
|
|
12379
12401
|
import { copyFileSync as copyFileSync2, existsSync as existsSync10, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync5 } from "fs";
|
|
12380
|
-
import { basename as basename2, isAbsolute, join as join13, normalize, relative, win32 } from "path";
|
|
12402
|
+
import { basename as basename2, isAbsolute as isAbsolute2, join as join13, normalize, relative as relative2, win32 } from "path";
|
|
12381
12403
|
|
|
12382
12404
|
// ../engine/src/utils/concurrencyLimit.ts
|
|
12383
12405
|
function createConcurrencyLimit(limit) {
|
|
12384
12406
|
let active = 0;
|
|
12385
12407
|
const waiting = [];
|
|
12386
|
-
const waitForSlot = (signal) => new Promise((
|
|
12408
|
+
const waitForSlot = (signal) => new Promise((resolve3) => {
|
|
12387
12409
|
const granted = () => {
|
|
12388
12410
|
signal?.removeEventListener("abort", aborted);
|
|
12389
|
-
|
|
12411
|
+
resolve3(true);
|
|
12390
12412
|
};
|
|
12391
12413
|
const aborted = () => {
|
|
12392
12414
|
waiting.splice(waiting.indexOf(granted), 1);
|
|
12393
|
-
|
|
12415
|
+
resolve3(false);
|
|
12394
12416
|
};
|
|
12395
12417
|
waiting.push(granted);
|
|
12396
12418
|
signal?.addEventListener("abort", aborted, { once: true });
|
|
@@ -12487,11 +12509,167 @@ import {
|
|
|
12487
12509
|
statSync as statSync5,
|
|
12488
12510
|
unlinkSync
|
|
12489
12511
|
} from "fs";
|
|
12490
|
-
import { createHash, randomUUID as randomUUID2 } from "crypto";
|
|
12512
|
+
import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
|
|
12491
12513
|
import dns from "dns";
|
|
12492
|
-
import { dirname as
|
|
12514
|
+
import { dirname as dirname6, extname as extname2, join as join11 } from "path";
|
|
12493
12515
|
import { Readable, Transform } from "stream";
|
|
12494
12516
|
import { pipeline } from "stream/promises";
|
|
12517
|
+
|
|
12518
|
+
// ../engine/src/utils/notMediaPayload.ts
|
|
12519
|
+
import { createHash } from "crypto";
|
|
12520
|
+
import { open as openFile } from "fs/promises";
|
|
12521
|
+
import { dirname as dirname5, isAbsolute, relative, resolve as resolve2 } from "path";
|
|
12522
|
+
var NOT_MEDIA_PAYLOAD = "NOT_MEDIA_PAYLOAD";
|
|
12523
|
+
var MAX_LISTED_FINGERPRINTS = 8;
|
|
12524
|
+
var NotMediaPayloadError = class extends Error {
|
|
12525
|
+
code = NOT_MEDIA_PAYLOAD;
|
|
12526
|
+
owner = "user";
|
|
12527
|
+
retryable = false;
|
|
12528
|
+
elementFingerprints;
|
|
12529
|
+
constructor(elementFingerprints) {
|
|
12530
|
+
const listed2 = elementFingerprints.slice(0, MAX_LISTED_FINGERPRINTS).join(",");
|
|
12531
|
+
const elided = elementFingerprints.length - MAX_LISTED_FINGERPRINTS;
|
|
12532
|
+
super(
|
|
12533
|
+
`${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.`
|
|
12534
|
+
);
|
|
12535
|
+
this.name = "NotMediaPayloadError";
|
|
12536
|
+
this.elementFingerprints = elementFingerprints;
|
|
12537
|
+
}
|
|
12538
|
+
};
|
|
12539
|
+
function fingerprintElementId(elementId) {
|
|
12540
|
+
return createHash("sha256").update(elementId).digest("hex").slice(0, 16);
|
|
12541
|
+
}
|
|
12542
|
+
var SNIFF_BYTES = 512;
|
|
12543
|
+
var DOCUMENT_OPENING_BYTES = /* @__PURE__ */ new Set([60, 123, 91]);
|
|
12544
|
+
var SKIPPABLE_LEADING_BYTES = /* @__PURE__ */ new Set([0, 9, 10, 11, 12, 13, 32]);
|
|
12545
|
+
var BYTE_ORDER_MARKS = [
|
|
12546
|
+
Buffer.from([239, 187, 191]),
|
|
12547
|
+
// UTF-8
|
|
12548
|
+
Buffer.from([255, 254]),
|
|
12549
|
+
// UTF-16 LE
|
|
12550
|
+
Buffer.from([254, 255])
|
|
12551
|
+
// UTF-16 BE
|
|
12552
|
+
];
|
|
12553
|
+
function byteOrderMarkLength(head) {
|
|
12554
|
+
for (const mark of BYTE_ORDER_MARKS) {
|
|
12555
|
+
if (head.length >= mark.length && head.subarray(0, mark.length).equals(mark)) {
|
|
12556
|
+
return mark.length;
|
|
12557
|
+
}
|
|
12558
|
+
}
|
|
12559
|
+
return 0;
|
|
12560
|
+
}
|
|
12561
|
+
async function readHead(filePath, bytes = SNIFF_BYTES) {
|
|
12562
|
+
const fh = await openFile(filePath, "r");
|
|
12563
|
+
try {
|
|
12564
|
+
const buf = Buffer.alloc(bytes);
|
|
12565
|
+
let filled = 0;
|
|
12566
|
+
while (filled < buf.length) {
|
|
12567
|
+
const { bytesRead } = await fh.read(buf, filled, buf.length - filled, filled);
|
|
12568
|
+
if (bytesRead === 0) break;
|
|
12569
|
+
filled += bytesRead;
|
|
12570
|
+
}
|
|
12571
|
+
return buf.subarray(0, filled);
|
|
12572
|
+
} finally {
|
|
12573
|
+
await fh.close().catch(() => {
|
|
12574
|
+
});
|
|
12575
|
+
}
|
|
12576
|
+
}
|
|
12577
|
+
function startsWithDocumentByte(head) {
|
|
12578
|
+
for (let index = byteOrderMarkLength(head); index < head.length; index++) {
|
|
12579
|
+
const byte = head[index];
|
|
12580
|
+
if (byte === void 0) break;
|
|
12581
|
+
if (SKIPPABLE_LEADING_BYTES.has(byte)) continue;
|
|
12582
|
+
return DOCUMENT_OPENING_BYTES.has(byte);
|
|
12583
|
+
}
|
|
12584
|
+
return false;
|
|
12585
|
+
}
|
|
12586
|
+
async function isNotMediaPayload(filePath) {
|
|
12587
|
+
try {
|
|
12588
|
+
return startsWithDocumentByte(await readHead(filePath)) || await playlistLeavesItsFolder(filePath);
|
|
12589
|
+
} catch {
|
|
12590
|
+
return false;
|
|
12591
|
+
}
|
|
12592
|
+
}
|
|
12593
|
+
async function assertMediaPayload(filePath, elementId) {
|
|
12594
|
+
if (await isNotMediaPayload(filePath)) {
|
|
12595
|
+
throw new NotMediaPayloadError([fingerprintElementId(elementId)]);
|
|
12596
|
+
}
|
|
12597
|
+
}
|
|
12598
|
+
var MAX_PLAYLIST_BYTES = 8 * 1024 * 1024;
|
|
12599
|
+
var MAX_PLAYLIST_DEPTH = 8;
|
|
12600
|
+
var HTTP_URL = /^https?:\/\//i;
|
|
12601
|
+
var OTHER_SCHEME = /^[a-z][a-z0-9+.-]+:/i;
|
|
12602
|
+
var DRIVE_PATH = /^[a-z]:[\\/]/i;
|
|
12603
|
+
function playlistEntries(text) {
|
|
12604
|
+
const body = text.replace(/^\uFEFF/, "").trimStart();
|
|
12605
|
+
if (body.startsWith("#EXTM3U")) {
|
|
12606
|
+
return body.split(/\r?\n/).flatMap((raw) => {
|
|
12607
|
+
const line = raw.trim();
|
|
12608
|
+
const uris = [...line.matchAll(/URI="([^"]*)"/gi)].map((match) => match[1]);
|
|
12609
|
+
return line && !line.startsWith("#") ? [line, ...uris] : uris;
|
|
12610
|
+
});
|
|
12611
|
+
}
|
|
12612
|
+
if (/^ffconcat\s+version/i.test(body)) {
|
|
12613
|
+
return body.split(/\r?\n/).flatMap((raw) => {
|
|
12614
|
+
const match = /^\s*file\s+(.*)$/.exec(raw);
|
|
12615
|
+
if (!match) return [];
|
|
12616
|
+
const value = match[1].trim();
|
|
12617
|
+
return [value.startsWith("'") ? value.slice(1, -1).replace(/\\(.)/g, "$1") : value];
|
|
12618
|
+
});
|
|
12619
|
+
}
|
|
12620
|
+
return void 0;
|
|
12621
|
+
}
|
|
12622
|
+
function entryLeavesFolder(entry, base, folder) {
|
|
12623
|
+
if (HTTP_URL.test(entry)) return false;
|
|
12624
|
+
if (OTHER_SCHEME.test(entry) && !DRIVE_PATH.test(entry)) return true;
|
|
12625
|
+
return [entry, safeDecode(entry)].some((path) => {
|
|
12626
|
+
if (isAbsolute(path) || DRIVE_PATH.test(path) || path.startsWith("\\")) return true;
|
|
12627
|
+
const inside = relative(folder, resolve2(base, path));
|
|
12628
|
+
return inside === ".." || inside.startsWith("../") || inside.startsWith("..\\") || isAbsolute(inside);
|
|
12629
|
+
});
|
|
12630
|
+
}
|
|
12631
|
+
function safeDecode(value) {
|
|
12632
|
+
try {
|
|
12633
|
+
return decodeURIComponent(value);
|
|
12634
|
+
} catch {
|
|
12635
|
+
return value;
|
|
12636
|
+
}
|
|
12637
|
+
}
|
|
12638
|
+
async function playlistLeavesItsFolder(filePath, placedAt = filePath) {
|
|
12639
|
+
const placed = resolve2(placedAt);
|
|
12640
|
+
return listLeaves(resolve2(filePath), placed, dirname5(placed), /* @__PURE__ */ new Set(), 0);
|
|
12641
|
+
}
|
|
12642
|
+
async function startsAsPlaylist(path) {
|
|
12643
|
+
const head = (await readHead(path)).toString("utf8").replace(/^\uFEFF/, "").trimStart();
|
|
12644
|
+
return head.startsWith("#EXTM3U") || /^ffconcat\s+version/i.test(head);
|
|
12645
|
+
}
|
|
12646
|
+
async function listLeaves(readPath, path, folder, seen, depth) {
|
|
12647
|
+
try {
|
|
12648
|
+
if (!await startsAsPlaylist(readPath)) return false;
|
|
12649
|
+
if (depth >= MAX_PLAYLIST_DEPTH) return true;
|
|
12650
|
+
if (seen.has(path)) return false;
|
|
12651
|
+
seen.add(path);
|
|
12652
|
+
const body = await readHead(readPath, MAX_PLAYLIST_BYTES + 1);
|
|
12653
|
+
if (body.length > MAX_PLAYLIST_BYTES) return true;
|
|
12654
|
+
for (const entry of playlistEntries(body.toString("utf8")) ?? []) {
|
|
12655
|
+
if (await entryLeaves(entry, dirname5(path), folder, seen, depth)) return true;
|
|
12656
|
+
}
|
|
12657
|
+
return false;
|
|
12658
|
+
} catch {
|
|
12659
|
+
return false;
|
|
12660
|
+
}
|
|
12661
|
+
}
|
|
12662
|
+
async function entryLeaves(entry, base, folder, seen, depth) {
|
|
12663
|
+
if (entryLeavesFolder(entry, base, folder)) return true;
|
|
12664
|
+
if (HTTP_URL.test(entry)) return false;
|
|
12665
|
+
for (const local of /* @__PURE__ */ new Set([entry, safeDecode(entry)])) {
|
|
12666
|
+
const nested = resolve2(base, local);
|
|
12667
|
+
if (await listLeaves(nested, nested, folder, seen, depth + 1)) return true;
|
|
12668
|
+
}
|
|
12669
|
+
return false;
|
|
12670
|
+
}
|
|
12671
|
+
|
|
12672
|
+
// ../engine/src/utils/urlDownloader.ts
|
|
12495
12673
|
var inFlightDownloads = /* @__PURE__ */ new Map();
|
|
12496
12674
|
var signalScopes = /* @__PURE__ */ new WeakMap();
|
|
12497
12675
|
var nextSignalScope = 1;
|
|
@@ -12515,7 +12693,7 @@ function safeDownloadUrlIdentity(url) {
|
|
|
12515
12693
|
} catch {
|
|
12516
12694
|
}
|
|
12517
12695
|
return {
|
|
12518
|
-
urlFingerprint:
|
|
12696
|
+
urlFingerprint: createHash2("sha256").update(canonical).digest("hex"),
|
|
12519
12697
|
host
|
|
12520
12698
|
};
|
|
12521
12699
|
}
|
|
@@ -12600,7 +12778,7 @@ function assertPublicHttpsUrl(url) {
|
|
|
12600
12778
|
}
|
|
12601
12779
|
function getFilenameFromUrl(url, validationScope) {
|
|
12602
12780
|
const physicalIdentity = validationScope === "" ? url : `${url}\0${validationScope}`;
|
|
12603
|
-
const hash =
|
|
12781
|
+
const hash = createHash2("md5").update(physicalIdentity).digest("hex").slice(0, 12);
|
|
12604
12782
|
const urlObj = new URL(url);
|
|
12605
12783
|
const ext = extname2(urlObj.pathname) || ".mp4";
|
|
12606
12784
|
return `download_${hash}${ext}`;
|
|
@@ -12651,10 +12829,10 @@ async function waitForCacheLock(signal) {
|
|
|
12651
12829
|
if (signal?.aborted) {
|
|
12652
12830
|
throw new UrlDownloadError("cancelled", false, "Download cancelled");
|
|
12653
12831
|
}
|
|
12654
|
-
await new Promise((
|
|
12832
|
+
await new Promise((resolve3, reject) => {
|
|
12655
12833
|
const timeout = setTimeout(() => {
|
|
12656
12834
|
signal?.removeEventListener("abort", onAbort);
|
|
12657
|
-
|
|
12835
|
+
resolve3();
|
|
12658
12836
|
}, CACHE_LOCK_POLL_MS);
|
|
12659
12837
|
const onAbort = () => {
|
|
12660
12838
|
clearTimeout(timeout);
|
|
@@ -13077,8 +13255,8 @@ async function fetchToPartial(url, partialPath, controller, options, onSizedBody
|
|
|
13077
13255
|
const contentEncoding = response.headers.get("content-encoding")?.trim().toLowerCase();
|
|
13078
13256
|
const expectedBytes = !contentEncoding || contentEncoding === "identity" ? declaredLength : void 0;
|
|
13079
13257
|
let receivedBytes = 0;
|
|
13080
|
-
const sha256 =
|
|
13081
|
-
const md5 =
|
|
13258
|
+
const sha256 = createHash2("sha256");
|
|
13259
|
+
const md5 = createHash2("md5");
|
|
13082
13260
|
const prefixChunks = [];
|
|
13083
13261
|
let prefixBytes = 0;
|
|
13084
13262
|
const inspector = new Transform({
|
|
@@ -13157,7 +13335,7 @@ async function fetchToPartial(url, partialPath, controller, options, onSizedBody
|
|
|
13157
13335
|
expectedBytes,
|
|
13158
13336
|
receivedBytes,
|
|
13159
13337
|
rangeDisposition,
|
|
13160
|
-
etagFingerprint: etag ?
|
|
13338
|
+
etagFingerprint: etag ? createHash2("sha256").update(etag).digest("hex") : void 0,
|
|
13161
13339
|
etagWeak: etag ? /^W\//i.test(etag) : void 0,
|
|
13162
13340
|
localSize,
|
|
13163
13341
|
localSha256
|
|
@@ -13216,7 +13394,7 @@ function emitDownloadTelemetry(options, event) {
|
|
|
13216
13394
|
}
|
|
13217
13395
|
}
|
|
13218
13396
|
async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, signal) {
|
|
13219
|
-
const attemptDir = createStagingDir(
|
|
13397
|
+
const attemptDir = createStagingDir(dirname6(localPath), ".hf-download-");
|
|
13220
13398
|
const partialPath = join11(attemptDir, "payload");
|
|
13221
13399
|
const controller = new AbortController();
|
|
13222
13400
|
let timedOut = false;
|
|
@@ -13246,6 +13424,15 @@ async function runDownloadAttempt(url, localPath, timeoutMs, attempt, options, s
|
|
|
13246
13424
|
throw new UrlDownloadError("cancelled", false, "Download cancelled");
|
|
13247
13425
|
}
|
|
13248
13426
|
const integrity = await fetchToPartial(url, partialPath, controller, options, extendTimeout);
|
|
13427
|
+
if (await playlistLeavesItsFolder(partialPath, localPath)) {
|
|
13428
|
+
throw new UrlDownloadError(
|
|
13429
|
+
"invalid_payload",
|
|
13430
|
+
false,
|
|
13431
|
+
"Download is a playlist naming files outside its folder",
|
|
13432
|
+
integrity.status,
|
|
13433
|
+
integrity
|
|
13434
|
+
);
|
|
13435
|
+
}
|
|
13249
13436
|
let outcome = await syncAndPublishPartial(partialPath, localPath, timeoutMs, signal);
|
|
13250
13437
|
let publishedIntegrity = integrity;
|
|
13251
13438
|
if (outcome === "race_reused") {
|
|
@@ -13369,7 +13556,7 @@ async function downloadWithRetry(url, localPath, timeoutMs, signal, onTransientR
|
|
|
13369
13556
|
}
|
|
13370
13557
|
}
|
|
13371
13558
|
async function inspectExistingFile(path) {
|
|
13372
|
-
const sha256 =
|
|
13559
|
+
const sha256 = createHash2("sha256");
|
|
13373
13560
|
const prefixChunks = [];
|
|
13374
13561
|
let prefixBytes = 0;
|
|
13375
13562
|
let localSize = 0;
|
|
@@ -13533,7 +13720,7 @@ function unwrapTemplate(html) {
|
|
|
13533
13720
|
}
|
|
13534
13721
|
|
|
13535
13722
|
// ../engine/src/utils/mediaPathSegment.ts
|
|
13536
|
-
import { createHash as
|
|
13723
|
+
import { createHash as createHash3 } from "crypto";
|
|
13537
13724
|
var PLAIN_SEGMENT = /^(?!\.{1,2}$)[^/\\:]+$/;
|
|
13538
13725
|
var GENERATED_SUFFIX = /~[0-9a-f]{12}$/;
|
|
13539
13726
|
var READABLE_MAX_BYTES = 64;
|
|
@@ -13541,7 +13728,7 @@ function mediaIdPathSegment(id) {
|
|
|
13541
13728
|
if (PLAIN_SEGMENT.test(id) && !GENERATED_SUFFIX.test(id) && survivesCaseAndUnicodeFoldingOnMacAndWindowsDisks(id))
|
|
13542
13729
|
return id;
|
|
13543
13730
|
const readable = truncateUtf8(id.replace(/[/\\:]/g, "_"), READABLE_MAX_BYTES);
|
|
13544
|
-
const digest =
|
|
13731
|
+
const digest = createHash3("sha256").update(id).digest("hex").slice(0, 12);
|
|
13545
13732
|
return `${readable}~${digest}`;
|
|
13546
13733
|
}
|
|
13547
13734
|
function survivesCaseAndUnicodeFoldingOnMacAndWindowsDisks(id) {
|
|
@@ -13559,7 +13746,7 @@ function truncateUtf8(text, maxBytes) {
|
|
|
13559
13746
|
}
|
|
13560
13747
|
|
|
13561
13748
|
// ../engine/src/services/extractionCache.ts
|
|
13562
|
-
import { createHash as
|
|
13749
|
+
import { createHash as createHash4, randomUUID as randomUUID3 } from "crypto";
|
|
13563
13750
|
import {
|
|
13564
13751
|
createReadStream as createReadStream3,
|
|
13565
13752
|
existsSync as existsSync9,
|
|
@@ -13578,7 +13765,7 @@ var SCHEMA_PREFIX = "hfcache-v10-";
|
|
|
13578
13765
|
var KEY_HEX_CHARS = 16;
|
|
13579
13766
|
async function readContentSha256(path, signal) {
|
|
13580
13767
|
try {
|
|
13581
|
-
const hash =
|
|
13768
|
+
const hash = createHash4("sha256");
|
|
13582
13769
|
for await (const chunk of createReadStream3(path, { signal })) hash.update(chunk);
|
|
13583
13770
|
return hash.digest("hex");
|
|
13584
13771
|
} catch {
|
|
@@ -13608,7 +13795,7 @@ function canonicalKeyBlob(input) {
|
|
|
13608
13795
|
return JSON.stringify(blob);
|
|
13609
13796
|
}
|
|
13610
13797
|
function computeCacheKey(input) {
|
|
13611
|
-
return
|
|
13798
|
+
return createHash4("sha256").update(canonicalKeyBlob(input)).digest("hex");
|
|
13612
13799
|
}
|
|
13613
13800
|
function cacheEntryDirName(keyHash) {
|
|
13614
13801
|
return SCHEMA_PREFIX + keyHash.slice(0, KEY_HEX_CHARS);
|
|
@@ -13909,7 +14096,7 @@ function videoExtractionSourceLabel(src, baseDir) {
|
|
|
13909
14096
|
}
|
|
13910
14097
|
}
|
|
13911
14098
|
const path = src.split(/[?#]/)[0];
|
|
13912
|
-
const lib = WINDOWS_ABSOLUTE.test(path) ? win32 : { isAbsolute, relative, basename: basename2, normalize };
|
|
14099
|
+
const lib = WINDOWS_ABSOLUTE.test(path) ? win32 : { isAbsolute: isAbsolute2, relative: relative2, basename: basename2, normalize };
|
|
13913
14100
|
const relativePath = lib.isAbsolute(path) ? lib.relative(baseDir, path) : lib.normalize(path);
|
|
13914
14101
|
const label = relativePath.startsWith("..") || lib.isAbsolute(relativePath) ? lib.basename(path) : relativePath;
|
|
13915
14102
|
return label.replace(/\\/g, "/");
|
|
@@ -16404,87 +16591,7 @@ async function queryElementStacking(page, nativeHdrIds) {
|
|
|
16404
16591
|
|
|
16405
16592
|
// ../engine/src/services/audioMixer.ts
|
|
16406
16593
|
import { closeSync as closeSync4, existsSync as existsSync12, mkdirSync as mkdirSync7, openSync as openSync4, rmSync as rmSync7, writeFileSync as writeFileSync7 } from "fs";
|
|
16407
|
-
import { join as join17, dirname as
|
|
16408
|
-
|
|
16409
|
-
// ../engine/src/utils/notMediaPayload.ts
|
|
16410
|
-
import { createHash as createHash4 } from "crypto";
|
|
16411
|
-
import { open as openFile } from "fs/promises";
|
|
16412
|
-
var NOT_MEDIA_PAYLOAD = "NOT_MEDIA_PAYLOAD";
|
|
16413
|
-
var MAX_LISTED_FINGERPRINTS = 8;
|
|
16414
|
-
var NotMediaPayloadError = class extends Error {
|
|
16415
|
-
code = NOT_MEDIA_PAYLOAD;
|
|
16416
|
-
owner = "user";
|
|
16417
|
-
retryable = false;
|
|
16418
|
-
elementFingerprints;
|
|
16419
|
-
constructor(elementFingerprints) {
|
|
16420
|
-
const listed2 = elementFingerprints.slice(0, MAX_LISTED_FINGERPRINTS).join(",");
|
|
16421
|
-
const elided = elementFingerprints.length - MAX_LISTED_FINGERPRINTS;
|
|
16422
|
-
super(
|
|
16423
|
-
`${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.`
|
|
16424
|
-
);
|
|
16425
|
-
this.name = "NotMediaPayloadError";
|
|
16426
|
-
this.elementFingerprints = elementFingerprints;
|
|
16427
|
-
}
|
|
16428
|
-
};
|
|
16429
|
-
function fingerprintElementId(elementId) {
|
|
16430
|
-
return createHash4("sha256").update(elementId).digest("hex").slice(0, 16);
|
|
16431
|
-
}
|
|
16432
|
-
var SNIFF_BYTES = 512;
|
|
16433
|
-
var DOCUMENT_OPENING_BYTES = /* @__PURE__ */ new Set([60, 123, 91]);
|
|
16434
|
-
var SKIPPABLE_LEADING_BYTES = /* @__PURE__ */ new Set([0, 9, 10, 11, 12, 13, 32]);
|
|
16435
|
-
var BYTE_ORDER_MARKS = [
|
|
16436
|
-
Buffer.from([239, 187, 191]),
|
|
16437
|
-
// UTF-8
|
|
16438
|
-
Buffer.from([255, 254]),
|
|
16439
|
-
// UTF-16 LE
|
|
16440
|
-
Buffer.from([254, 255])
|
|
16441
|
-
// UTF-16 BE
|
|
16442
|
-
];
|
|
16443
|
-
function byteOrderMarkLength(head) {
|
|
16444
|
-
for (const mark of BYTE_ORDER_MARKS) {
|
|
16445
|
-
if (head.length >= mark.length && head.subarray(0, mark.length).equals(mark)) {
|
|
16446
|
-
return mark.length;
|
|
16447
|
-
}
|
|
16448
|
-
}
|
|
16449
|
-
return 0;
|
|
16450
|
-
}
|
|
16451
|
-
async function readHead(filePath) {
|
|
16452
|
-
const fh = await openFile(filePath, "r");
|
|
16453
|
-
try {
|
|
16454
|
-
const buf = Buffer.alloc(SNIFF_BYTES);
|
|
16455
|
-
let filled = 0;
|
|
16456
|
-
while (filled < buf.length) {
|
|
16457
|
-
const { bytesRead } = await fh.read(buf, filled, buf.length - filled, filled);
|
|
16458
|
-
if (bytesRead === 0) break;
|
|
16459
|
-
filled += bytesRead;
|
|
16460
|
-
}
|
|
16461
|
-
return buf.subarray(0, filled);
|
|
16462
|
-
} finally {
|
|
16463
|
-
await fh.close().catch(() => {
|
|
16464
|
-
});
|
|
16465
|
-
}
|
|
16466
|
-
}
|
|
16467
|
-
function startsWithDocumentByte(head) {
|
|
16468
|
-
for (let index = byteOrderMarkLength(head); index < head.length; index++) {
|
|
16469
|
-
const byte = head[index];
|
|
16470
|
-
if (byte === void 0) break;
|
|
16471
|
-
if (SKIPPABLE_LEADING_BYTES.has(byte)) continue;
|
|
16472
|
-
return DOCUMENT_OPENING_BYTES.has(byte);
|
|
16473
|
-
}
|
|
16474
|
-
return false;
|
|
16475
|
-
}
|
|
16476
|
-
async function isNotMediaPayload(filePath) {
|
|
16477
|
-
try {
|
|
16478
|
-
return startsWithDocumentByte(await readHead(filePath));
|
|
16479
|
-
} catch {
|
|
16480
|
-
return false;
|
|
16481
|
-
}
|
|
16482
|
-
}
|
|
16483
|
-
async function assertMediaPayload(filePath, elementId) {
|
|
16484
|
-
if (await isNotMediaPayload(filePath)) {
|
|
16485
|
-
throw new NotMediaPayloadError([fingerprintElementId(elementId)]);
|
|
16486
|
-
}
|
|
16487
|
-
}
|
|
16594
|
+
import { join as join17, dirname as dirname9, isAbsolute as isAbsolute3, relative as relative3 } from "path";
|
|
16488
16595
|
|
|
16489
16596
|
// ../core/dist/audioFade.js
|
|
16490
16597
|
var HF_AUDIO_FADE_IN_ATTR = "data-fade-in";
|
|
@@ -16521,7 +16628,7 @@ function clampFadesToDuration(fades, duration) {
|
|
|
16521
16628
|
// ../engine/src/services/aacEncode.ts
|
|
16522
16629
|
import { execFile as execFile3 } from "child_process";
|
|
16523
16630
|
import { readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
|
|
16524
|
-
import { dirname as
|
|
16631
|
+
import { dirname as dirname7, join as join14 } from "path";
|
|
16525
16632
|
var SAMPLE_RATE = 48e3;
|
|
16526
16633
|
var FRAME_SAMPLES = 1024;
|
|
16527
16634
|
var MIN_SEGMENT_SECONDS = 60;
|
|
@@ -16559,13 +16666,13 @@ var settsDurationSupport = /* @__PURE__ */ new Map();
|
|
|
16559
16666
|
function supportsSettsDuration(binary = getFfmpegBinary()) {
|
|
16560
16667
|
let supported = settsDurationSupport.get(binary);
|
|
16561
16668
|
if (!supported) {
|
|
16562
|
-
supported = new Promise((
|
|
16669
|
+
supported = new Promise((resolve3) => {
|
|
16563
16670
|
execFile3(
|
|
16564
16671
|
binary,
|
|
16565
16672
|
["-hide_banner", "-h", "bsf=setts"],
|
|
16566
16673
|
{ windowsHide: true },
|
|
16567
16674
|
(error, stdout) => {
|
|
16568
|
-
|
|
16675
|
+
resolve3(error !== null || stdout.includes("duration"));
|
|
16569
16676
|
}
|
|
16570
16677
|
);
|
|
16571
16678
|
});
|
|
@@ -16589,7 +16696,7 @@ async function encodeAac(input, outputPath, totalDuration, {
|
|
|
16589
16696
|
if (!await supportsSettsDuration()) {
|
|
16590
16697
|
return encodeInOnePass(input, outputPath, { signal, timeout, filter });
|
|
16591
16698
|
}
|
|
16592
|
-
const dir = createStagingDir(
|
|
16699
|
+
const dir = createStagingDir(dirname7(outputPath), ".aac-segments-");
|
|
16593
16700
|
try {
|
|
16594
16701
|
const segments = planSegments(totalDuration, count).map((segment, k) => ({
|
|
16595
16702
|
...segment,
|
|
@@ -16755,7 +16862,7 @@ function audioFailureDiagnostics(values) {
|
|
|
16755
16862
|
|
|
16756
16863
|
// ../engine/src/services/audioVolumeEnvelope.ts
|
|
16757
16864
|
import { readFileSync as readFileSync7, rmSync as rmSync6, writeFileSync as writeFileSync5 } from "fs";
|
|
16758
|
-
import { dirname as
|
|
16865
|
+
import { dirname as dirname8, join as join15 } from "path";
|
|
16759
16866
|
|
|
16760
16867
|
// ../core/dist/runtime/mediaVolumeEnvelope.js
|
|
16761
16868
|
function normaliseEnvelope(keyframes, trackStart, baseVolume) {
|
|
@@ -16881,7 +16988,7 @@ function applyVolumeEnvelopeToWav(wavPath, keyframes, trackStart, baseVolume) {
|
|
|
16881
16988
|
const layout = parseWavLayout(buffer);
|
|
16882
16989
|
if (!layout) return false;
|
|
16883
16990
|
scaleSamples(buffer, layout, gainAt);
|
|
16884
|
-
stagingDir = createStagingDir(
|
|
16991
|
+
stagingDir = createStagingDir(dirname8(wavPath), ".hf-volume-");
|
|
16885
16992
|
const tempPath = join15(stagingDir, "audio.wav");
|
|
16886
16993
|
writeFileSync5(tempPath, buffer, { flag: "wx" });
|
|
16887
16994
|
renameWithRetry(tempPath, wavPath);
|
|
@@ -17774,8 +17881,8 @@ function buildTrackInputFilter(track, index, volumeFilter, totalDuration, padToD
|
|
|
17774
17881
|
return `${filters}${padToDuration ? `,apad,asetpts=N/SR/TB,atrim=0:${formatFilterNumber(totalDuration)}` : ""}[a${index}]`;
|
|
17775
17882
|
}
|
|
17776
17883
|
function missingSourceMessage(elementId, src, baseDir, resolvedPath) {
|
|
17777
|
-
const relativePath =
|
|
17778
|
-
const insideProject = !relativePath.startsWith("..") && !
|
|
17884
|
+
const relativePath = relative3(baseDir, resolvedPath).replace(/\\/g, "/");
|
|
17885
|
+
const insideProject = !relativePath.startsWith("..") && !isAbsolute3(relativePath);
|
|
17779
17886
|
const authored = /^([\\/]|[A-Za-z]:)/.test(src) ? "" : `src="${src}" `;
|
|
17780
17887
|
return `Source not found for audio element ${elementId}: ${authored}resolved to ${insideProject ? relativePath : "a path outside the project"}`;
|
|
17781
17888
|
}
|
|
@@ -17957,7 +18064,7 @@ var FAIL_ON_READ_ERROR_INSTEAD_OF_ENDING_THERE = ["-xerror"];
|
|
|
17957
18064
|
var SIDECAR_WARM_UP_SECONDS = 1;
|
|
17958
18065
|
async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config, audioSidecarUrl, options) {
|
|
17959
18066
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
17960
|
-
const outputDir =
|
|
18067
|
+
const outputDir = dirname9(outputPath);
|
|
17961
18068
|
if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
17962
18069
|
const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
|
|
17963
18070
|
const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
|
|
@@ -18103,7 +18210,7 @@ function isRemoteElement(element, baseDir, compiledDir, config) {
|
|
|
18103
18210
|
}
|
|
18104
18211
|
async function generateSilence(outputPath, duration, signal, config) {
|
|
18105
18212
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
18106
|
-
const outputDir =
|
|
18213
|
+
const outputDir = dirname9(outputPath);
|
|
18107
18214
|
if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
18108
18215
|
const args = [
|
|
18109
18216
|
"-f",
|
|
@@ -18157,7 +18264,7 @@ async function mixAudioTracksFlat(tracks, outputPath, totalDuration, signal, con
|
|
|
18157
18264
|
failures: result2.failure ? [result2.failure] : void 0
|
|
18158
18265
|
};
|
|
18159
18266
|
}
|
|
18160
|
-
const outputDir =
|
|
18267
|
+
const outputDir = dirname9(outputPath);
|
|
18161
18268
|
if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
18162
18269
|
const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
|
|
18163
18270
|
const filterParts = [];
|
|
@@ -18266,7 +18373,7 @@ function groupNormalizeOptionUnsupported(stderr) {
|
|
|
18266
18373
|
}
|
|
18267
18374
|
async function mixGroupMembersFlat(memberTracks, outputPath, totalDuration, signal, config) {
|
|
18268
18375
|
const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
|
|
18269
|
-
const outputDir =
|
|
18376
|
+
const outputDir = dirname9(outputPath);
|
|
18270
18377
|
if (!existsSync12(outputDir)) mkdirSync7(outputDir, { recursive: true });
|
|
18271
18378
|
const buildInputFilters = (ignoreKeyframes, padMembers) => memberTracks.map((track, i) => {
|
|
18272
18379
|
const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
|
|
@@ -18399,8 +18506,8 @@ async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal,
|
|
|
18399
18506
|
if (memberTracks.length <= MAX_MIX_INPUTS) {
|
|
18400
18507
|
return mixGroupMembersFlat(memberTracks, outputPath, totalDuration, signal, config);
|
|
18401
18508
|
}
|
|
18402
|
-
mkdirSync7(
|
|
18403
|
-
const scratchDir = createStagingDir(
|
|
18509
|
+
mkdirSync7(dirname9(outputPath), { recursive: true });
|
|
18510
|
+
const scratchDir = createStagingDir(dirname9(outputPath), ".mix-batches-");
|
|
18404
18511
|
try {
|
|
18405
18512
|
const summed = await sumInSlices(memberTracks, scratchDir, totalDuration, signal, config);
|
|
18406
18513
|
if (!summed.success) return summed;
|
|
@@ -18414,8 +18521,8 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config)
|
|
|
18414
18521
|
if (tracks.length <= MAX_MIX_INPUTS) {
|
|
18415
18522
|
return mixAudioTracksFlat(tracks, outputPath, totalDuration, signal, config);
|
|
18416
18523
|
}
|
|
18417
|
-
mkdirSync7(
|
|
18418
|
-
const scratchDir = createStagingDir(
|
|
18524
|
+
mkdirSync7(dirname9(outputPath), { recursive: true });
|
|
18525
|
+
const scratchDir = createStagingDir(dirname9(outputPath), ".mix-batches-");
|
|
18419
18526
|
try {
|
|
18420
18527
|
const summed = await sumInSlices(tracks, scratchDir, totalDuration, signal, config);
|
|
18421
18528
|
if (!summed.success) {
|
|
@@ -19189,7 +19296,7 @@ function shouldVerifyWorkerGpu(workerId, config) {
|
|
|
19189
19296
|
}
|
|
19190
19297
|
function withParallelWorkerDeadline(promise, diagnostic, timeoutMs, signal) {
|
|
19191
19298
|
if (signal?.aborted) return Promise.reject(new Error("Parallel worker cancelled"));
|
|
19192
|
-
return new Promise((
|
|
19299
|
+
return new Promise((resolve3, reject) => {
|
|
19193
19300
|
let timer;
|
|
19194
19301
|
const cleanup = () => {
|
|
19195
19302
|
if (timer) clearTimeout(timer);
|
|
@@ -19214,7 +19321,7 @@ function withParallelWorkerDeadline(promise, diagnostic, timeoutMs, signal) {
|
|
|
19214
19321
|
promise.then(
|
|
19215
19322
|
(value) => {
|
|
19216
19323
|
cleanup();
|
|
19217
|
-
|
|
19324
|
+
resolve3(value);
|
|
19218
19325
|
},
|
|
19219
19326
|
(error) => {
|
|
19220
19327
|
cleanup();
|
|
@@ -19534,8 +19641,8 @@ function isPoolFatalWorkerFailure(failure, streaming) {
|
|
|
19534
19641
|
function createFirstSessionGate(verify) {
|
|
19535
19642
|
let fail;
|
|
19536
19643
|
let pass;
|
|
19537
|
-
const settled = new Promise((
|
|
19538
|
-
pass =
|
|
19644
|
+
const settled = new Promise((resolve3, reject) => {
|
|
19645
|
+
pass = resolve3;
|
|
19539
19646
|
fail = reject;
|
|
19540
19647
|
});
|
|
19541
19648
|
settled.catch(() => {
|
|
@@ -19741,9 +19848,11 @@ function readRegularFile(filePath) {
|
|
|
19741
19848
|
function resolveContainedPaths(projectDir, compiledDir, relativePath) {
|
|
19742
19849
|
const projectPath = join20(projectDir, relativePath);
|
|
19743
19850
|
if (!isWithinProjectRoot(projectDir, projectPath)) return null;
|
|
19851
|
+
if (isPrivateFileUnder(projectDir, projectPath, isVcsOrSecretPath)) return null;
|
|
19744
19852
|
if (!compiledDir) return { projectPath, compiledPath: null };
|
|
19745
19853
|
const compiledPath = join20(compiledDir, relativePath);
|
|
19746
19854
|
if (!isWithinProjectRoot(compiledDir, compiledPath)) return null;
|
|
19855
|
+
if (isPrivateFileUnder(compiledDir, compiledPath, isVcsOrSecretPath)) return null;
|
|
19747
19856
|
return { projectPath, compiledPath };
|
|
19748
19857
|
}
|
|
19749
19858
|
function createFileServer(options) {
|
|
@@ -19777,11 +19886,11 @@ function createFileServer(options) {
|
|
|
19777
19886
|
headers: { "Content-Type": contentType }
|
|
19778
19887
|
});
|
|
19779
19888
|
});
|
|
19780
|
-
return new Promise((
|
|
19889
|
+
return new Promise((resolve3) => {
|
|
19781
19890
|
const server = serve({ fetch: app.fetch, port, hostname }, (info) => {
|
|
19782
19891
|
const actualPort = info.port;
|
|
19783
19892
|
const url = `http://localhost:${actualPort}`;
|
|
19784
|
-
|
|
19893
|
+
resolve3({
|
|
19785
19894
|
url,
|
|
19786
19895
|
port: actualPort,
|
|
19787
19896
|
close: () => server.close()
|
|
@@ -20141,6 +20250,8 @@ export {
|
|
|
20141
20250
|
oneProcessOverPipe,
|
|
20142
20251
|
isOneProcessOverPipe,
|
|
20143
20252
|
sandboxDeniedRemediation,
|
|
20253
|
+
chromeSandboxEnabled,
|
|
20254
|
+
chromeSandboxArgs,
|
|
20144
20255
|
launchWithChromeSandboxFallback,
|
|
20145
20256
|
BrowserLeasePool,
|
|
20146
20257
|
setHostHandlesSigint,
|
|
@@ -20297,6 +20408,12 @@ export {
|
|
|
20297
20408
|
HF_AUDIO_GROUP_TAG,
|
|
20298
20409
|
HF_AUDIO_GROUP_ATTR,
|
|
20299
20410
|
isSelfOrAncestorHidden,
|
|
20411
|
+
NOT_MEDIA_PAYLOAD,
|
|
20412
|
+
NotMediaPayloadError,
|
|
20413
|
+
fingerprintElementId,
|
|
20414
|
+
isNotMediaPayload,
|
|
20415
|
+
assertMediaPayload,
|
|
20416
|
+
playlistLeavesItsFolder,
|
|
20300
20417
|
safeDownloadUrlIdentity,
|
|
20301
20418
|
writeUrlDownloadTelemetry,
|
|
20302
20419
|
assertPublicHttpsUrl,
|
|
@@ -20344,11 +20461,6 @@ export {
|
|
|
20344
20461
|
measureVideoShownBoxRanges,
|
|
20345
20462
|
queryVideoElementBounds,
|
|
20346
20463
|
queryElementStacking,
|
|
20347
|
-
NOT_MEDIA_PAYLOAD,
|
|
20348
|
-
NotMediaPayloadError,
|
|
20349
|
-
fingerprintElementId,
|
|
20350
|
-
isNotMediaPayload,
|
|
20351
|
-
assertMediaPayload,
|
|
20352
20464
|
aacSegmentCount,
|
|
20353
20465
|
encodeAac,
|
|
20354
20466
|
audioFailureDiagnostics,
|